Class: Increase::Resources::Cards
- Inherits:
-
Object
- Object
- Increase::Resources::Cards
- Defined in:
- lib/increase/resources/cards.rb
Instance Method Summary collapse
-
#create(account_id: , billing_address: nil, description: nil, digital_wallet: nil, entity_id: nil, request_options: {}) ⇒ Increase::Models::Card
Some parameter documentations has been truncated, see Models::CardCreateParams for more details.
-
#initialize(client:) ⇒ Cards
constructor
private
A new instance of Cards.
-
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Card>
Some parameter documentations has been truncated, see Models::CardListParams for more details.
-
#retrieve(card_id, request_options: {}) ⇒ Increase::Models::Card
Retrieve a Card.
-
#update(card_id, billing_address: nil, description: nil, digital_wallet: nil, entity_id: nil, pin: nil, status: nil, request_options: {}) ⇒ Increase::Models::Card
Some parameter documentations has been truncated, see Models::CardUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Cards
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 Cards.
129 130 131 |
# File 'lib/increase/resources/cards.rb', line 129 def initialize(client:) @client = client end |
Instance Method Details
#create(account_id: , billing_address: nil, description: nil, digital_wallet: nil, entity_id: nil, request_options: {}) ⇒ Increase::Models::Card
Some parameter documentations has been truncated, see Models::CardCreateParams for more details.
Create a Card
28 29 30 31 |
# File 'lib/increase/resources/cards.rb', line 28 def create(params) parsed, = Increase::CardCreateParams.dump_request(params) @client.request(method: :post, path: "cards", body: parsed, model: Increase::Card, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Card>
Some parameter documentations has been truncated, see Models::CardListParams for more details.
List Cards
114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/increase/resources/cards.rb', line 114 def list(params = {}) parsed, = Increase::CardListParams.dump_request(params) @client.request( method: :get, path: "cards", query: parsed, page: Increase::Internal::Page, model: Increase::Card, options: ) end |
#retrieve(card_id, request_options: {}) ⇒ Increase::Models::Card
Retrieve a Card
44 45 46 47 48 49 50 51 |
# File 'lib/increase/resources/cards.rb', line 44 def retrieve(card_id, params = {}) @client.request( method: :get, path: ["cards/%1$s", card_id], model: Increase::Card, options: params[:request_options] ) end |
#update(card_id, billing_address: nil, description: nil, digital_wallet: nil, entity_id: nil, pin: nil, status: nil, request_options: {}) ⇒ Increase::Models::Card
Some parameter documentations has been truncated, see Models::CardUpdateParams for more details.
Update a Card
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/increase/resources/cards.rb', line 79 def update(card_id, params = {}) parsed, = Increase::CardUpdateParams.dump_request(params) @client.request( method: :patch, path: ["cards/%1$s", card_id], body: parsed, model: Increase::Card, options: ) end |