Module: Seoshop

Defined in:
lib/seoshop-api.rb,
lib/seoshop-api/client.rb,
lib/seoshop-api/version.rb,
lib/seoshop-api/api/shop.rb,
lib/seoshop-api/api/order.rb,
lib/seoshop-api/api/account.rb,
lib/seoshop-api/api/product.rb,
lib/seoshop-api/api/customer.rb,
lib/seoshop-api/core/response_parser.rb

Defined Under Namespace

Modules: Account, Customer, Order, Product, Shop Classes: Client, EncodeOj, ParseOj, ResponseParser

Constant Summary collapse

VERSION =
'0.0.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_keyString

Returns the app key that is registered with Storenvy.

Returns:

  • (String)

    the app key that is registered with Storenvy



16
17
18
# File 'lib/seoshop-api.rb', line 16

def app_key
  @app_key
end

.parallel_requestsInteger String

Returns defines the maximum parallel request for the gem to preform.

Returns:

  • (Integer String)

    defines the maximum parallel request for the gem to preform



12
13
14
# File 'lib/seoshop-api.rb', line 12

def parallel_requests
  @parallel_requests
end

.secretString

Returns the secret that is registered with Storenvy.

Returns:

  • (String)

    the secret that is registered with Storenvy



20
21
22
# File 'lib/seoshop-api.rb', line 20

def secret
  @secret
end

.urlString

Returns the base url of the Seoshop Api.

Returns:

  • (String)

    the base url of the Seoshop Api



8
9
10
# File 'lib/seoshop-api.rb', line 8

def url
  @url
end

Class Method Details

.client(access_token, shop_language) ⇒ Object

Returns an instance of Seoshop::Client.

Returns:

  • an instance of Seoshop::Client



42
43
44
# File 'lib/seoshop-api.rb', line 42

def client(access_token, shop_language)
  @client ||= Seoshop::Client.new(access_token, shop_language)
end

.configure {|self| ... } ⇒ Object

Configuration interface of the gem

Yields:

  • (self)

    to accept configuration settings



25
26
27
28
# File 'lib/seoshop-api.rb', line 25

def configure
  yield self
  true
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Makes sure that the method missing is checked with the Seoshop::Client instance

Parameters:

  • method_name (String)

    the name of the method we want to run

  • include_private (Boolean) (defaults to: false)

    defines wether to check for private functions as well

Returns:

  • (Boolean)


35
36
37
# File 'lib/seoshop-api.rb', line 35

def respond_to_missing?(method_name, include_private=false)
  client.respond_to?(method_name, include_private)
end