Class: Increase::Resources::CheckDeposits

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CheckDeposits

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



100
101
102
# File 'lib/increase/resources/check_deposits.rb', line 100

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id:, amount:, back_image_file_id:, front_image_file_id:, description: nil, request_options: {}) ⇒ Increase::Models::CheckDeposit

Create a Check Deposit



26
27
28
29
30
31
32
33
34
35
# File 'lib/increase/resources/check_deposits.rb', line 26

def create(params)
  parsed, options = Increase::CheckDepositCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "check_deposits",
    body: parsed,
    model: Increase::CheckDeposit,
    options: options
  )
end

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

List Check Deposits



84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/increase/resources/check_deposits.rb', line 84

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

#retrieve(check_deposit_id, request_options: {}) ⇒ Increase::Models::CheckDeposit

Retrieve a Check Deposit



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

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