Class: Tamara::Orders::Authorize

Inherits:
ApplicationService show all
Includes:
JsonSchemas::Types::Uuid, JsonSchemas::Validator
Defined in:
lib/tamara/api/orders/authorize.rb

Constant Summary

Constants included from JsonSchemas::Validator

JsonSchemas::Validator::ERROR_MESSAGES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from JsonSchemas::Types::Uuid

schema, #schema

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

.call(order_id:, opts: {}) ⇒ Object



7
8
9
# File 'lib/tamara/api/orders/authorize.rb', line 7

def self.call(order_id:, opts: {})
  new(order_id: order_id, opts: opts).call
end

Instance Method Details

#call_apiObject



11
12
13
# File 'lib/tamara/api/orders/authorize.rb', line 11

def call_api
  ::Faraday.post(url, {}.to_json, headers)
end