Class: Increase::Resources::WireDrawdownRequests

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

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:

API:

  • private



120
121
122
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 120

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

Create a Wire Drawdown Request

See Also:

Parameters:

  • The Account Number to which the debtor should send funds.

  • The amount requested from the debtor, in USD cents.

  • The creditor's address.

  • The creditor's name.

  • The debtor's address.

  • The debtor's name.

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

  • Determines who bears the cost of the drawdown request. Defaults to shared if not specified.

  • The debtor's account number.

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

  • The debtor's routing number.

  • A free-form reference string set by the sender mirrored back in the subsequent wire transfer.

Returns:



48
49
50
51
52
53
54
55
56
57
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 48

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>

List Wire Drawdown Requests

See Also:

Parameters:

  • Return the page of entries after this one.

  • 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 the size of the list that is returned. The default (and maximum) is 100 objects.

    Defaults to 100.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 104

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

See Also:

Parameters:

  • The identifier of the Wire Drawdown Request to retrieve.

Returns:



70
71
72
73
74
75
76
77
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 70

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