Module: Shirtsio

Extended by:
Configuration
Defined in:
lib/shirtsio.rb,
lib/shirtsio/api.rb,
lib/shirtsio/error.rb,
lib/shirtsio/utils.rb,
lib/shirtsio/request.rb,
lib/shirtsio/version.rb,
lib/shirtsio/connection.rb,
lib/shirtsio/configuration.rb

Defined Under Namespace

Modules: Configuration, Connection, Request, Utils Classes: API, BadRequest, DSL, Endpoint, Error, Order, Product, Quote, RequestFailed, Status, Unauthorized

Constant Summary collapse

VERSION =
"1.0.2"

Constants included from Configuration

Configuration::DEFAULT_API_KEY, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_PROXY, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.api(options = {}) ⇒ Object



24
25
26
# File 'lib/shirtsio.rb', line 24

def self.api(options = {})
  Shirtsio::API.new(options)
end

.method_missing(method, *args, &block) ⇒ Object



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

def self.method_missing(method, *args, &block)
  return super unless api.respond_to?(method)
  api.send(method, *args, &block)
end

.respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/shirtsio.rb', line 33

def self.respond_to?(method)
  api.respond_to?(method) || super
end