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.
-
#details(card_id, request_options: {}) ⇒ Increase::Models::CardDetails
Retrieve sensitive details for a Card.
-
#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, 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.
147 148 149 |
# File 'lib/increase/resources/cards.rb', line 147 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 |
#details(card_id, request_options: {}) ⇒ Increase::Models::CardDetails
Retrieve sensitive details for a Card
135 136 137 138 139 140 141 142 |
# File 'lib/increase/resources/cards.rb', line 135 def details(card_id, params = {}) @client.request( method: :get, path: ["cards/%1$s/details", card_id], model: Increase::CardDetails, options: params[:request_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
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/increase/resources/cards.rb', line 112 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, status: nil, request_options: {}) ⇒ Increase::Models::Card
Some parameter documentations has been truncated, see Models::CardUpdateParams for more details.
Update a Card
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/increase/resources/cards.rb', line 77 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 |