Class: Increase::Resources::RealTimePaymentsRequestForPayments

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RealTimePaymentsRequestForPayments

Returns a new instance of RealTimePaymentsRequestForPayments.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Create a Real-Time Payments Request for Payment

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 requested amount in USD cents. Must be positive.

  • :debtor (Debtor)

    Details of the person being requested to pay.

  • :destination_account_number_id (String)

    The identifier of the Account Number where the funds will land.

  • :expires_at (String)

    The expiration time for this request, in UTC. The requestee will not be able to pay after this date.

  • :remittance_information (String)

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

  • :source_account_number (String)

    The account number the funds will be requested from.

  • :source_routing_number (String)

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

Returns:



26
27
28
29
30
31
32
33
# File 'lib/increase/resources/real_time_payments_request_for_payments.rb', line 26

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

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

List Real-Time Payments Request for Payments

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 Request for Payments to those destined to the specified Account.

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

    Return the page of entries after this one.

  • :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:



66
67
68
69
70
71
72
73
74
# File 'lib/increase/resources/real_time_payments_request_for_payments.rb', line 66

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

#retrieve(request_for_payment_id, opts = {}) ⇒ Increase::Models::RealTimePaymentsRequestForPayment

Retrieve a Real-Time Payments Request for Payment

Parameters:

  • request_for_payment_id (String)

    The identifier of the Real-Time Payments Request for Payment.

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

    Options to specify HTTP behaviour for this request.

Returns:



41
42
43
44
45
46
47
# File 'lib/increase/resources/real_time_payments_request_for_payments.rb', line 41

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