Class: Increase::Resources::AccountStatements

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountStatements

Returns a new instance of AccountStatements.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

List Account Statements

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 Account Statements to those belonging to the specified Account.

  • :cursor (String)

    Return the page of entries after this one.

  • :limit (Integer)

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

  • :statement_period_start (StatementPeriodStart)

Returns:



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

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

#retrieve(account_statement_id, opts = {}) ⇒ Increase::Models::AccountStatement

Retrieve an Account Statement

Parameters:

  • account_statement_id (String)

    The identifier of the Account Statement to retrieve.

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

    Options to specify HTTP behaviour for this request.

Returns:



16
17
18
19
20
21
22
# File 'lib/increase/resources/account_statements.rb', line 16

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