Class: SilencerShop::Client
- Includes:
- API
- Defined in:
- lib/silencer_shop/client.rb
Constant Summary
Constants included from API
API::FILE_UPLOAD_ATTRS, API::ROOT_API_URL, API::USER_AGENT
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #dealer ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #order ⇒ Object
- #product_feed ⇒ Object
Methods included from API
#get_request, #post_file_request, #post_request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 |
# File 'lib/silencer_shop/client.rb', line 13 def initialize( = {}) requires!(, :username, :password) @options = authenticate! end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
11 12 13 |
# File 'lib/silencer_shop/client.rb', line 11 def access_token @access_token end |
Instance Method Details
#dealer ⇒ Object
28 29 30 |
# File 'lib/silencer_shop/client.rb', line 28 def dealer @dealer ||= SilencerShop::Dealer.new(self) end |
#order ⇒ Object
24 25 26 |
# File 'lib/silencer_shop/client.rb', line 24 def order @order ||= SilencerShop::Order.new(self) end |
#product_feed ⇒ Object
20 21 22 |
# File 'lib/silencer_shop/client.rb', line 20 def product_feed @product_feed ||= SilencerShop::ProductFeed.new(self) end |