Class: Lithic::Resources::BlockchainRecipients

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/blockchain_recipients.rb,
sig/lithic/resources/blockchain_recipients.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ BlockchainRecipients

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 BlockchainRecipients.

Parameters:



52
53
54
# File 'lib/lithic/resources/blockchain_recipients.rb', line 52

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_token:, address:, chain:, owner:, owner_type:, address_tag: nil, name: nil, request_options: {}) ⇒ Lithic::Models::BlockchainRecipient

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

Register a blockchain address as a withdrawal destination for a financial account

The recipient is created with a PENDING verification state and cannot receive a payout until screening of the address completes. Registering an address that is already registered to the same financial account returns the existing recipient and its current verification state, rather than creating a second one

Parameters:

  • account_token (String)

    The financial account the blockchain recipient belongs to

  • address (String)

    The blockchain address funds will be withdrawn to

  • chain (String)

    The blockchain network that the address belongs to

  • owner (String)

    Legal name of the business or individual who owns the blockchain address

  • owner_type (Symbol, Lithic::Models::OwnerType)

    Owner Type

  • address_tag (String)

    An optional tag or memo used by some chains to identify the destination of a tra

  • name (String)

    The nickname for this blockchain recipient

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

Returns:

See Also:



38
39
40
41
42
43
44
45
46
47
# File 'lib/lithic/resources/blockchain_recipients.rb', line 38

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