Class: SamcartAPI::ApiRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/samcart_api/api_request.rb

Constant Summary collapse

RETRY_ATTEMPTS =
3

Instance Method Summary collapse

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

#performObject



15
16
17
# File 'lib/samcart_api/api_request.rb', line 15

def perform
  safe_request { make_request }
end