Class: Increase::Resources::CardPayments

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardPayments

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

Parameters:



63
64
65
# File 'lib/increase/resources/card_payments.rb', line 63

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

List Card Payments

Parameters:

  • account_id (String)

    Filter Card Payments to ones belonging to the specified Account.

  • card_id (String)

    Filter Card Payments to ones belonging to the specified Card.

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

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

Returns:

See Also:



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/increase/resources/card_payments.rb', line 48

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

#retrieve(card_payment_id, request_options: {}) ⇒ Increase::Models::CardPayment

Retrieve a Card Payment

Parameters:

  • card_payment_id (String)

    The identifier of the Card Payment.

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

Returns:

See Also:



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

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