Module: Tradenity

Defined in:
lib/tradenity/version.rb,
lib/tradenity.rb,
lib/tradenity/api_error.rb,
lib/tradenity/api_client.rb,
lib/tradenity/exceptions.rb,
lib/tradenity/token_holder.rb,
lib/tradenity/configuration.rb,
lib/tradenity/rails/railtie.rb,
lib/tradenity/resources/brand.rb,
lib/tradenity/resources/order.rb,
lib/tradenity/resources/photo.rb,
lib/tradenity/resources/state.rb,
lib/tradenity/resources/utils.rb,
lib/tradenity/resources/coupon.rb,
lib/tradenity/resources/option.rb,
lib/tradenity/resources/paging.rb,
lib/tradenity/resources/weight.rb,
lib/tradenity/resources/address.rb,
lib/tradenity/resources/country.rb,
lib/tradenity/resources/gateway.rb,
lib/tradenity/resources/payment.rb,
lib/tradenity/resources/product.rb,
lib/tradenity/resources/variant.rb,
lib/tradenity/resources/category.rb,
lib/tradenity/resources/currency.rb,
lib/tradenity/resources/customer.rb,
lib/tradenity/resources/geo_zone.rb,
lib/tradenity/resources/tax_rate.rb,
lib/tradenity/resources/line_item.rb,
lib/tradenity/resources/promotion.rb,
lib/tradenity/resources/tax_class.rb,
lib/tradenity/resources/web_hooks.rb,
lib/tradenity/resources/wish_list.rb,
lib/tradenity/resources/collection.rb,
lib/tradenity/resources/dimensions.rb,
lib/tradenity/resources/option_set.rb,
lib/tradenity/resources/transaction.rb,
lib/tradenity/resources/contact_info.rb,
lib/tradenity/resources/option_value.rb,
lib/tradenity/resources/payment_card.rb,
lib/tradenity/resources/store_credit.rb,
lib/tradenity/resources/tax_settings.rb,
lib/tradenity/resources/test_gateway.rb,
lib/tradenity/resources/cart_settings.rb,
lib/tradenity/resources/free_shipping.rb,
lib/tradenity/resources/instance_meta.rb,
lib/tradenity/resources/payment_token.rb,
lib/tradenity/resources/shopping_cart.rb,
lib/tradenity/resources/store_profile.rb,
lib/tradenity/resources/customer_group.rb,
lib/tradenity/resources/items_selector.rb,
lib/tradenity/resources/payment_source.rb,
lib/tradenity/resources/stripe_gateway.rb,
lib/tradenity/resources/discount_coupon.rb,
lib/tradenity/resources/order_line_item.rb,
lib/tradenity/resources/return_settings.rb,
lib/tradenity/resources/shipping_method.rb,
lib/tradenity/resources/states_geo_zone.rb,
lib/tradenity/resources/table_rate_rule.rb,
lib/tradenity/resources/cancel_operation.rb,
lib/tradenity/resources/free_item_coupon.rb,
lib/tradenity/resources/general_settings.rb,
lib/tradenity/resources/payment_settings.rb,
lib/tradenity/resources/refund_operation.rb,
lib/tradenity/resources/return_line_item.rb,
lib/tradenity/resources/return_operation.rb,
lib/tradenity/resources/braintree_gateway.rb,
lib/tradenity/resources/countries_geo_zone.rb,
lib/tradenity/resources/discount_promotion.rb,
lib/tradenity/resources/inventory_settings.rb,
lib/tradenity/resources/refund_transaction.rb,
lib/tradenity/resources/zip_codes_geo_zone.rb,
lib/tradenity/resources/credit_card_payment.rb,
lib/tradenity/resources/fixed_rate_shipping.rb,
lib/tradenity/resources/payment_transaction.rb,
lib/tradenity/resources/table_rate_shipping.rb,
lib/tradenity/resources/free_shipping_coupon.rb,
lib/tradenity/resources/mail_server_settings.rb,
lib/tradenity/resources/measurement_settings.rb,
lib/tradenity/resources/store_credit_payment.rb,
lib/tradenity/resources/free_shipping_promotion.rb,
lib/tradenity/resources/cash_on_delivery_payment.rb,
lib/tradenity/resources/store_credit_transaction.rb

Overview

#Tradenity API

#Tradenity eCommerce Rest API

Contact: [email protected] Generated by: github.com/tradenity

Defined Under Namespace

Modules: RailsSupport Classes: Address, ApiClient, ApiError, BraintreeGateway, Brand, CancelOperation, CartSettings, CashOnDeliveryPayment, Category, Collection, Configuration, ContactInfo, CountriesGeoZone, Country, Coupon, CreditCardPayment, Currency, Customer, CustomerGroup, Dimensions, DiscountCoupon, DiscountPromotion, FixedRateShipping, FreeItemCoupon, FreeShipping, FreeShippingCoupon, FreeShippingPromotion, Gateway, GeneralSettings, GeoZone, InstanceMeta, InventorySettings, ItemsSelector, LineItem, MailServerSettings, MeasurementSettings, Option, OptionSet, OptionValue, Order, OrderLineItem, Page, PageRequest, Payment, PaymentCard, PaymentSettings, PaymentSource, PaymentToken, PaymentTransaction, Photo, Product, Promotion, Railtie, RefundOperation, RefundTransaction, ReturnLineItem, ReturnOperation, ReturnSettings, SessionExpiredException, SessionTokenHolder, ShippingMethod, ShoppingCart, State, StatesGeoZone, StoreCredit, StoreCreditPayment, StoreCreditTransaction, StoreProfile, StripeGateway, TableRateRule, TableRateShipping, TaxClass, TaxRate, TaxSettings, TestGateway, Transaction, Variant, WebHooks, Weight, WishList, ZipCodesGeoZone

Constant Summary collapse

VERSION =
'1.0.1'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configureObject

Customize default settings for the SDK using block.

Tradenity.configure do |config|
  config.username = "xxx"
  config.password = "xxx"
end

If no block given, return the default Configuration object.



109
110
111
112
113
114
115
# File 'lib/tradenity.rb', line 109

def configure
  if block_given?
    yield(Configuration.default)
  else
    Configuration.default
  end
end

Instance Method Details

#valid_password?(password, test_password) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/tradenity/resources/utils.rb', line 4

def valid_password?(password, test_password)
  BCrypt::Password.new(password) == test_password
end