Method: Chain::Account::ClientModule#create_receiver

Defined in:
lib/chain/account.rb

#create_receiver(opts) ⇒ Receiver

Creates a new receiver under the specified account.

Parameters:

  • opts (Hash)

    Options hash

Options Hash (opts):

  • :account_alias (String)

    Unique alias for an account. Either account_alias or account_id is required.

  • :account_id (String)

    Unique ID for an account. Either account_alias or account_id is required.

  • :expires_at (String)

    An RFC3339 timestamp indicating when the receiver will expire. Defaults to 30 days in the future.

Returns:



79
80
81
# File 'lib/chain/account.rb', line 79

def create_receiver(opts)
  client.conn.singleton_batch_request('create-account-receiver', [opts]) { |item| Receiver.new(item) }
end