Class: Increase::Resources::InboundCheckDeposits

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InboundCheckDeposits

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



112
113
114
# File 'lib/increase/resources/inbound_check_deposits.rb', line 112

def initialize(client:)
  @client = client
end

Instance Method Details

#decline(inbound_check_deposit_id, request_options: {}) ⇒ Increase::Models::InboundCheckDeposit

Decline an Inbound Check Deposit



75
76
77
78
79
80
81
82
# File 'lib/increase/resources/inbound_check_deposits.rb', line 75

def decline(inbound_check_deposit_id, params = {})
  @client.request(
    method: :post,
    path: ["inbound_check_deposits/%1$s/decline", inbound_check_deposit_id],
    model: Increase::InboundCheckDeposit,
    options: params[:request_options]
  )
end

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

List Inbound Check Deposits



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/increase/resources/inbound_check_deposits.rb', line 51

def list(params = {})
  parsed, options = Increase::InboundCheckDepositListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "inbound_check_deposits",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::InboundCheckDeposit,
    options: options
  )
end

#retrieve(inbound_check_deposit_id, request_options: {}) ⇒ Increase::Models::InboundCheckDeposit

Retrieve an Inbound Check Deposit



17
18
19
20
21
22
23
24
# File 'lib/increase/resources/inbound_check_deposits.rb', line 17

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

#return_(inbound_check_deposit_id, reason:, request_options: {}) ⇒ Increase::Models::InboundCheckDeposit

Return an Inbound Check Deposit



98
99
100
101
102
103
104
105
106
107
# File 'lib/increase/resources/inbound_check_deposits.rb', line 98

def return_(inbound_check_deposit_id, params)
  parsed, options = Increase::InboundCheckDepositReturnParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["inbound_check_deposits/%1$s/return", inbound_check_deposit_id],
    body: parsed,
    model: Increase::InboundCheckDeposit,
    options: options
  )
end