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

Returns a new instance of CheckDeposits.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Create a Check Deposit

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

    The identifier for the Account to deposit the check in.

  • :amount (Integer)

    The deposit amount in the minor unit of the account currency. For dollars, for example, this is 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.

Returns:



23
24
25
26
27
28
29
30
# File 'lib/increase/resources/check_deposits.rb', line 23

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

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

List Check Deposits

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

    Filter Check Deposits to those belonging to the specified Account.

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

Returns:



62
63
64
65
66
67
68
69
70
# File 'lib/increase/resources/check_deposits.rb', line 62

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

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

Retrieve a Check Deposit

Parameters:

  • check_deposit_id (String)

    The identifier of the Check Deposit to retrieve.

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

    Options to specify HTTP behaviour for this request.

Returns:



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

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