Class: Increase::Resources::CardPurchaseSupplements

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardPurchaseSupplements

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

Parameters:



61
62
63
# File 'lib/increase/resources/card_purchase_supplements.rb', line 61

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

List Card Purchase Supplements

Parameters:

Returns:

See Also:



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/increase/resources/card_purchase_supplements.rb', line 46

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

#retrieve(card_purchase_supplement_id, request_options: {}) ⇒ Increase::Models::CardPurchaseSupplement

Retrieve a Card Purchase Supplement

Parameters:

  • card_purchase_supplement_id (String)

    The identifier of the Card Purchase Supplement.

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

Returns:

See Also:



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

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