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
- #endpoint ⇒ String readonly
- #http ⇒ HTTP::Client
Instance Method Summary collapse
-
#sandbox ⇒ self
Switches to the eBay Sandbox environment.
Instance Attribute Details
#endpoint ⇒ String (readonly)
29 30 31 |
# File 'lib/ebay/requestable.rb', line 29 def endpoint @endpoint ||= self.class.endpoint end |
#http ⇒ HTTP::Client
23 24 25 |
# File 'lib/ebay/requestable.rb', line 23 def http @http ||= HTTP::Client.new end |
Instance Method Details
#sandbox ⇒ self
Switches to the eBay Sandbox environment
36 37 38 39 |
# File 'lib/ebay/requestable.rb', line 36 def sandbox @endpoint = endpoint.sub('ebay', 'sandbox.ebay') self end |