Class: Increase::Resources::RealTimePaymentsTransfers

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/real_time_payments_transfers.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RealTimePaymentsTransfers

Returns a new instance of RealTimePaymentsTransfers.



6
7
8
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Create a Real-Time Payments Transfer

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :amount (Integer)

    The transfer amount in USD cents. For Real-Time Payments transfers, must be positive.

  • :creditor_name (String)

    The name of the transfer's recipient.

  • :remittance_information (String)

    Unstructured information that will show on the recipient's bank statement.

  • :source_account_number_id (String)

    The identifier of the Account Number from which to send the transfer.

  • :debtor_name (String)

    The name of the transfer's sender. If not provided, defaults to the name of the account's entity.

  • :destination_account_number (String)

    The destination account number.

  • :destination_routing_number (String)

    The destination American Bankers' Association (ABA) Routing Transit Number (RTN).

  • :external_account_id (String)

    The ID of an External Account to initiate a transfer to. If this parameter is provided, destination_account_number and destination_routing_number must be absent.

  • :require_approval (Boolean)

    Whether the transfer requires explicit approval via the dashboard or API.

  • :ultimate_creditor_name (String)

    The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else.

  • :ultimate_debtor_name (String)

    The name of the ultimate sender of the transfer. Set this if the funds are being sent on behalf of someone who is not the account holder at Increase.

Returns:



35
36
37
38
39
40
41
42
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 35

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/real_time_payments_transfers"
  req[:body] = params
  req[:model] = Increase::Models::RealTimePaymentsTransfer
  @client.request(req, opts)
end

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::RealTimePaymentsTransfer>

List Real-Time Payments Transfers

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :account_id (String)

    Filter Real-Time Payments Transfers to those belonging to the specified Account.

  • :created_at (CreatedAt)
  • :cursor (String)

    Return the page of entries after this one.

  • :external_account_id (String)

    Filter Real-Time Payments Transfers to those made to the specified External Account.

  • :idempotency_key (String)

    Filter records to the one with the specified idempotency_key you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • :limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 objects.

Returns:



76
77
78
79
80
81
82
83
84
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 76

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/real_time_payments_transfers"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::RealTimePaymentsTransfer
  @client.request(req, opts)
end

#retrieve(real_time_payments_transfer_id, opts = {}) ⇒ Increase::Models::RealTimePaymentsTransfer

Retrieve a Real-Time Payments Transfer

Parameters:

  • real_time_payments_transfer_id (String)

    The identifier of the Real-Time Payments Transfer.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



50
51
52
53
54
55
56
# File 'lib/increase/resources/real_time_payments_transfers.rb', line 50

def retrieve(real_time_payments_transfer_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/real_time_payments_transfers/#{real_time_payments_transfer_id}"
  req[:model] = Increase::Models::RealTimePaymentsTransfer
  @client.request(req, opts)
end