Class: CheckoutSdk::Transfers::TransfersClient

Inherits:
Client
  • Object
show all
Defined in:
lib/checkout_sdk/transfers/transfers_client.rb

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Constructor Details

#initialize(api_client, configuration) ⇒ TransfersClient

Returns a new instance of TransfersClient.

Parameters:



11
12
13
# File 'lib/checkout_sdk/transfers/transfers_client.rb', line 11

def initialize(api_client, configuration)
  super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
end

Instance Method Details

#initiate_transfer_of_funds(create_transfer, idempotency_key = nil) ⇒ Object

Parameters:

  • create_transfer (Hash, CreateTransfer)
  • idempotency_key (String, nil) (defaults to: nil)


17
18
19
# File 'lib/checkout_sdk/transfers/transfers_client.rb', line 17

def initiate_transfer_of_funds(create_transfer, idempotency_key = nil)
  api_client.invoke_post(TRANSFERS, sdk_authorization, create_transfer, idempotency_key)
end

#retrieve_transfer(transfer_id) ⇒ Object

Parameters:

  • transfer_id (String)


22
23
24
# File 'lib/checkout_sdk/transfers/transfers_client.rb', line 22

def retrieve_transfer(transfer_id)
  api_client.invoke_get(build_path(TRANSFERS, transfer_id), sdk_authorization)
end