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, redirect_uri: 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 Image
Methods included from Item
#delete_item, #edit_item, #get_item, #upload_item_file
Constructor Details
#initialize(seller_id:, application_id:, application_secret:, authorization_code: nil, redirect_uri: nil, refresh_token: nil) ⇒ Client
Returns a new instance of Client.
25 26 27 28 29 30 31 |
# File 'lib/yahoo_store_api.rb', line 25 def initialize(seller_id:, application_id:, application_secret:, authorization_code: nil, redirect_uri: nil, refresh_token: nil) @seller_id = seller_id @application_id = application_id @application_secret = application_secret @redirect_uri = redirect_uri ? "&redirect_uri=" + CGI.escape(redirect_uri) : nil @access_token = refresh_token.present? ? refresh_access_token(refresh_token) : get_access_token() end |
Instance Attribute Details
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
19 20 21 |
# File 'lib/yahoo_store_api.rb', line 19 def refresh_token @refresh_token end |