Class: YahooStoreApi::Client

Inherits:
Object
  • Object
show all
Includes:
Item, Publish, Stock
Defined in:
lib/yahoo_store_api.rb

Constant Summary

Constants included from Helper

Helper::ENDPOINT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Publish

#reserve_publish

Methods included from Helper

#connection, #error_parser, #handler, #response_parser

Methods included from Stock

#get_stock, #set_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(authorization_code)
end

Instance Attribute Details

#refresh_tokenObject (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