Module: Ebay::Requestable

Included in:
Browse, Finding, Merchandising, Oauth::ClientCredentialsGrant, Shopping
Defined in:
lib/ebay/requestable.rb

Overview

Adds an HTTP client and ability to switch to the eBay Sandbox environment

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#endpointString (readonly)

Returns:

  • (String)


29
30
31
# File 'lib/ebay/requestable.rb', line 29

def endpoint
  @endpoint ||= self.class.endpoint
end

#httpHTTP::Client

Returns:

  • (HTTP::Client)


23
24
25
# File 'lib/ebay/requestable.rb', line 23

def http
  @http ||= HTTP::Client.new
end

Instance Method Details

#sandboxself

Switches to the eBay Sandbox environment

Returns:

  • (self)


36
37
38
39
# File 'lib/ebay/requestable.rb', line 36

def sandbox
  @endpoint = endpoint.sub('ebay', 'sandbox.ebay')
  self
end