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

Returns a new instance of WireDrawdownRequests.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Create a Wire Drawdown Request

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_number_id (String)

    The Account Number to which the recipient should send funds.

  • :amount (Integer)

    The amount requested from the recipient, in cents.

  • :message_to_recipient (String)

    A message the recipient will see as part of the request.

  • :recipient_account_number (String)

    The drawdown request's recipient's account number.

  • :recipient_name (String)

    The drawdown request's recipient's name.

  • :recipient_routing_number (String)

    The drawdown request's recipient's routing number.

  • :originator_address_line1 (String)

    The drawdown request originator's address line 1. This is only necessary if you're requesting a payment to a commingled account. Otherwise, we'll use the associated entity's details.

  • :originator_address_line2 (String)

    The drawdown request originator's address line 2. This is only necessary if you're requesting a payment to a commingled account. Otherwise, we'll use the associated entity's details.

  • :originator_address_line3 (String)

    The drawdown request originator's address line 3. This is only necessary if you're requesting a payment to a commingled account. Otherwise, we'll use the associated entity's details.

  • :originator_name (String)

    The drawdown request originator's name. This is only necessary if you're requesting a payment to a commingled account. Otherwise, we'll use the associated entity's details.

  • :recipient_address_line1 (String)

    Line 1 of the drawdown request's recipient's address.

  • :recipient_address_line2 (String)

    Line 2 of the drawdown request's recipient's address.

  • :recipient_address_line3 (String)

    Line 3 of the drawdown request's recipient's address.

Returns:



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

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

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

List Wire Drawdown Requests

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

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

  • :status (Symbol)

    Filter Wire Drawdown Requests for those with the specified status.

Returns:



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

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

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

Retrieve a Wire Drawdown Request

Parameters:

  • wire_drawdown_request_id (String)

    The identifier of the Wire Drawdown Request to retrieve.

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

    Options to specify HTTP behaviour for this request.

Returns:



53
54
55
56
57
58
59
# File 'lib/increase/resources/wire_drawdown_requests.rb', line 53

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