class EbayTrader::FetchToken

Fetch an eBay user authentication token using a {SessionID} value.

@see developer.ebay.com/DevZone/XML/docs/Reference/eBay/FetchToken.html @see developer.ebay.com/DevZone/XML/docs/HowTo/Tokens/GettingTokens.html @see developer.ebay.com/DevZone/guides/ebayfeatures/Basics/Tokens-MultipleUsers.html

Constants

CALL_NAME

Attributes

session_id[R]

Public Class Methods

new(session_id, args = {}) click to toggle source

Construct a fetch token eBay API request with the given session ID. @param [SessionID|String] session_id the session ID. @param [Hash] args a hash of optional arguments.

Calls superclass method
# File lib/ebay_trader/fetch_token.rb, line 25
def initialize(session_id, args = {})
  session_id = session_id.id if session_id.is_a?(SessionID)
  @session_id = session_id.freeze
  super(CALL_NAME, args) do
    SessionID session_id
  end
end

Public Instance Methods

auth_token() click to toggle source

Get the authentication token. @return [String] the authentication token.

# File lib/ebay_trader/fetch_token.rb, line 36
def auth_token
  response_hash[:ebay_auth_token]
end
expiry_time() click to toggle source

Get the Time at which the authentication token expires. @return [Time] the expiry time.

# File lib/ebay_trader/fetch_token.rb, line 43
def expiry_time
  response_hash[:hard_expiration_time]
end