Class: Lithic::Resources::Transfers

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/transfers.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Transfers

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Transfers.

Parameters:



45
46
47
# File 'lib/lithic/resources/transfers.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

#create(amount:, from:, to:, token: nil, memo: nil, request_options: {}) ⇒ Lithic::Models::Transfer

Deprecated.

Some parameter documentations has been truncated, see Models::TransferCreateParams for more details.

Transfer funds between two financial accounts or between a financial account and card

Parameters:

  • amount (Integer)

    Amount to be transferred in the currency’s smallest unit (e.g., cents for USD).

  • from (String)

    Globally unique identifier for the financial account or card that will send the

  • to (String)

    Globally unique identifier for the financial account or card that will receive t

  • token (String)

    Customer-provided token that will serve as an idempotency token. This token will

  • memo (String)

    Optional descriptor for the transfer.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/lithic/resources/transfers.rb', line 31

def create(params)
  parsed, options = Lithic::TransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/transfer",
    body: parsed,
    model: Lithic::Transfer,
    options: options
  )
end