Module: Ecommerce

Defined in:
lib/ecommerce.rb,
lib/ecommerce/client.rb,
lib/ecommerce/request.rb,
lib/ecommerce/version.rb,
lib/ecommerce/response.rb,
lib/ecommerce/exception.rb,
lib/ecommerce/configuration.rb,
lib/ecommerce/resources/base.rb,
lib/ecommerce/resources/order.rb,
lib/ecommerce/attribute_handler.rb,
lib/ecommerce/resources/collection.rb,
lib/ecommerce/resources/invoice_plan.rb,
lib/ecommerce/resources/account_order.rb,
lib/ecommerce/resources/invoice_order.rb,
lib/ecommerce/resources/adjustment_order.rb,
lib/ecommerce/resources/order_collection.rb,
lib/ecommerce/resources/invoice_order_collection.rb,
lib/ecommerce/resources/adjustment_order_collection.rb

Defined Under Namespace

Modules: Resources Classes: AttributeHandler, Client, Configuration, Exception, Request, Response

Constant Summary collapse

VERSION =
"0.0.5"
RequestTimeout =
Class.new(Exception)
RequestError =
Class.new(Exception)

Class Method Summary collapse

Class Method Details

.clientObject



29
30
31
# File 'lib/ecommerce.rb', line 29

def self.client
  Client.new(Ecommerce.configuration.token, Ecommerce.configuration.secret)
end

.configurationObject



21
22
23
# File 'lib/ecommerce.rb', line 21

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



25
26
27
# File 'lib/ecommerce.rb', line 25

def self.configure
  yield(configuration) if block_given?
end