Class: YahooStoreApi::Client
- Inherits:
-
Object
- Object
- YahooStoreApi::Client
- Defined in:
- lib/yahoo_store_api.rb
Constant Summary
Constants included from Helper
Instance Attribute Summary collapse
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(seller_id:, application_id:, application_secret:, authorization_code: nil, refresh_token: nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Publish
Methods included from Helper
#connection, #error_parser, #handler, #response_parser
Methods included from Stock
Methods included from Item
#delete_item, #edit_item, #get_item
Constructor Details
#initialize(seller_id:, application_id:, application_secret:, authorization_code: nil, refresh_token: nil) ⇒ Client
Returns a new instance of Client.
22 23 24 25 26 27 |
# File 'lib/yahoo_store_api.rb', line 22 def initialize(seller_id:, application_id:, application_secret:, authorization_code: nil, refresh_token: nil) @seller_id = seller_id @application_id = application_id @application_secret = application_secret @access_token = reflesh_access_token(refresh_token) || get_access_token() end |
Instance Attribute Details
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
17 18 19 |
# File 'lib/yahoo_store_api.rb', line 17 def refresh_token @refresh_token end |