Class: Increase::Resources::WireDrawdownRequests

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ WireDrawdownRequests

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

Parameters:



104
105
106
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 104

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_number_id: , amount: , creditor_address: , creditor_name: , debtor_address: , debtor_name: , unstructured_remittance_information: , debtor_account_number: nil, debtor_external_account_id: nil, debtor_routing_number: nil, request_options: {}) ⇒ Increase::Models::WireDrawdownRequest

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

Create a Wire Drawdown Request

Parameters:

  • account_number_id (String)

    The Account Number to which the debtor should send funds.

  • amount (Integer)

    The amount requested from the debtor, in USD cents.

  • creditor_address (Increase::Models::WireDrawdownRequestCreateParams::CreditorAddress)

    The creditor’s address.

  • creditor_name (String)

    The creditor’s name.

  • debtor_address (Increase::Models::WireDrawdownRequestCreateParams::DebtorAddress)

    The debtor’s address.

  • debtor_name (String)

    The debtor’s name.

  • unstructured_remittance_information (String)

    Remittance information the debtor will see as part of the request.

  • debtor_account_number (String)

    The debtor’s account number.

  • debtor_external_account_id (String)

    The ID of an External Account to initiate a transfer to. If this parameter is pr

  • debtor_routing_number (String)

    The debtor’s routing number.

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

Returns:

See Also:



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

def create(params)
  parsed, options = Increase::WireDrawdownRequestCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "wire_drawdown_requests",
    body: parsed,
    model: Increase::WireDrawdownRequest,
    options: options
  )
end

#list(cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::WireDrawdownRequest>

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

List Wire Drawdown Requests

Parameters:

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

  • limit (Integer)

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

  • status (Increase::Models::WireDrawdownRequestListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



89
90
91
92
93
94
95
96
97
98
99
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 89

def list(params = {})
  parsed, options = Increase::WireDrawdownRequestListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "wire_drawdown_requests",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::WireDrawdownRequest,
    options: options
  )
end

#retrieve(wire_drawdown_request_id, request_options: {}) ⇒ Increase::Models::WireDrawdownRequest

Retrieve a Wire Drawdown Request

Parameters:

  • wire_drawdown_request_id (String)

    The identifier of the Wire Drawdown Request to retrieve.

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

Returns:

See Also:



60
61
62
63
64
65
66
67
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 60

def retrieve(wire_drawdown_request_id, params = {})
  @client.request(
    method: :get,
    path: ["wire_drawdown_requests/%1$s", wire_drawdown_request_id],
    model: Increase::WireDrawdownRequest,
    options: params[:request_options]
  )
end