Class: Tamara::PaymentTypes

Inherits:
ApplicationService show all
Includes:
JsonSchemas::PaymentTypes
Defined in:
lib/tamara/api/payment_types.rb

Constant Summary

Constants included from JsonSchemas::Validator

JsonSchemas::Validator::ERROR_MESSAGES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from JsonSchemas::Validator

#validate_params!

Methods inherited from ApplicationService

#call, #initialize

Methods included from Request

#api_token, #error_message, #handle_response_error, #headers, #parsed_response, #response_body, #response_status

Constructor Details

This class inherits a constructor from Tamara::ApplicationService

Class Method Details

.list(country: "SA", order_value: 1, opts: {}) ⇒ Object



5
6
7
# File 'lib/tamara/api/payment_types.rb', line 5

def self.list(country: "SA", order_value: 1, opts: {})
  new(country: country, order_value: order_value, opts: opts).call
end

Instance Method Details

#call_apiObject



9
10
11
# File 'lib/tamara/api/payment_types.rb', line 9

def call_api
  ::Faraday.get(url, api_params, headers)
end