Class: Increase::Resources::CheckTransfers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CheckTransfers

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

Parameters:



170
171
172
# File 'lib/increase/resources/check_transfers.rb', line 170

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer

Approve a Check Transfer

Parameters:

  • check_transfer_id (String)

    The identifier of the Check Transfer to approve.

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

Returns:

See Also:



114
115
116
117
118
119
120
121
# File 'lib/increase/resources/check_transfers.rb', line 114

def approve(check_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["check_transfers/%1$s/approve", check_transfer_id],
    model: Increase::CheckTransfer,
    options: params[:request_options]
  )
end

#cancel(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer

Cancel a pending Check Transfer

Parameters:

  • check_transfer_id (String)

    The identifier of the pending Check Transfer to cancel.

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

Returns:

See Also:



134
135
136
137
138
139
140
141
# File 'lib/increase/resources/check_transfers.rb', line 134

def cancel(check_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["check_transfers/%1$s/cancel", check_transfer_id],
    model: Increase::CheckTransfer,
    options: params[:request_options]
  )
end

#create(account_id: , amount: , fulfillment_method: , source_account_number_id: , balance_check: nil, check_number: nil, physical_check: nil, require_approval: nil, third_party: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer

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

Create a Check Transfer

Parameters:

Returns:

See Also:



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

def create(params)
  parsed, options = Increase::CheckTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "check_transfers",
    body: parsed,
    model: Increase::CheckTransfer,
    options: options
  )
end

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

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

List Check Transfers

Parameters:

Returns:

See Also:



91
92
93
94
95
96
97
98
99
100
101
# File 'lib/increase/resources/check_transfers.rb', line 91

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

#retrieve(check_transfer_id, request_options: {}) ⇒ Increase::Models::CheckTransfer

Retrieve a Check Transfer

Parameters:

  • check_transfer_id (String)

    The identifier of the Check Transfer.

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

Returns:

See Also:



58
59
60
61
62
63
64
65
# File 'lib/increase/resources/check_transfers.rb', line 58

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

#stop_payment(check_transfer_id, reason: nil, request_options: {}) ⇒ Increase::Models::CheckTransfer

Stop payment on a Check Transfer

Parameters:

Returns:

See Also:



156
157
158
159
160
161
162
163
164
165
# File 'lib/increase/resources/check_transfers.rb', line 156

def stop_payment(check_transfer_id, params = {})
  parsed, options = Increase::CheckTransferStopPaymentParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["check_transfers/%1$s/stop_payment", check_transfer_id],
    body: parsed,
    model: Increase::CheckTransfer,
    options: options
  )
end