Class: Increase::Resources::CheckDeposits

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

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.

Parameters:



96
97
98
# File 'lib/increase/resources/check_deposits.rb', line 96

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

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

Create a Check Deposit

Parameters:

  • account_id (String)

    The identifier for the Account to deposit the check in.

  • amount (Integer)

    The deposit amount in USD cents.

  • back_image_file_id (String)

    The File containing the check’s back image.

  • front_image_file_id (String)

    The File containing the check’s front image.

  • description (String)

    The description you choose to give the Check Deposit, for display purposes only.

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

Returns:

See Also:



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

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>

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

List Check Deposits

Parameters:

  • account_id (String)

    Filter Check Deposits to those belonging to the specified Account.

  • created_at (Increase::Models::CheckDepositListParams::CreatedAt)
  • 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 tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

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

Returns:

See Also:



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/increase/resources/check_deposits.rb', line 81

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

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

Retrieve a Check Deposit

Parameters:

  • check_deposit_id (String)

    The identifier of the Check Deposit to retrieve.

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

Returns:

See Also:



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

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