Class: SamcartAPI::ApiRequest
- Inherits:
-
Object
- Object
- SamcartAPI::ApiRequest
- Defined in:
- lib/samcart_api/api_request.rb
Constant Summary collapse
- RETRY_ATTEMPTS =
3
Instance Method Summary collapse
-
#initialize(method, path, params, api_key) ⇒ ApiRequest
constructor
A new instance of ApiRequest.
- #perform ⇒ Object
Constructor Details
#initialize(method, path, params, api_key) ⇒ ApiRequest
Returns a new instance of ApiRequest.
7 8 9 10 11 12 13 |
# File 'lib/samcart_api/api_request.rb', line 7 def initialize(method, path, params, api_key) @method = method @path = path @params = params @api_key = api_key @version = SamcartAPI.configuration.version end |
Instance Method Details
#perform ⇒ Object
15 16 17 |
# File 'lib/samcart_api/api_request.rb', line 15 def perform safe_request { make_request } end |