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:



109
110
111
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 109

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:, charge_bearer: nil, debtor_account_number: nil, debtor_external_account_id: nil, debtor_routing_number: nil, end_to_end_identification: 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.

  • charge_bearer (Symbol, Increase::Models::WireDrawdownRequestCreateParams::ChargeBearer)

    Determines who bears the cost of the drawdown request. Defaults to ‘shared` if n

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

  • end_to_end_identification (String)

    A free-form reference string set by the sender mirrored back in the subsequent w

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

Returns:

See Also:



42
43
44
45
46
47
48
49
50
51
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 42

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:



93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 93

def list(params = {})
  parsed, options = Increase::WireDrawdownRequestListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "wire_drawdown_requests",
    query: query,
    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:



64
65
66
67
68
69
70
71
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 64

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