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.
-
#create_details_iframe(card_id, physical_card_id: nil, request_options: {}) ⇒ Increase::Models::CardIframeURL
Some parameter documentations has been truncated, see Models::CardCreateDetailsIframeParams for more details.
-
#details(card_id, request_options: {}) ⇒ Increase::Models::CardDetails
Sensitive details for a Card include the primary account number, expiry, card verification code, and PIN.
-
#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.
-
#update_pin(card_id, pin: , request_options: {}) ⇒ Increase::Models::CardDetails
Update a Card’s PIN.
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.
201 202 203 |
# File 'lib/increase/resources/cards.rb', line 201 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 |
#create_details_iframe(card_id, physical_card_id: nil, request_options: {}) ⇒ Increase::Models::CardIframeURL
Some parameter documentations has been truncated, see Models::CardCreateDetailsIframeParams for more details.
Create an iframe URL for a Card to display the card details. More details about styling and usage can be found in the [documentation](/documentation/embedded-card-component).
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/increase/resources/cards.rb', line 142 def create_details_iframe(card_id, params = {}) parsed, = Increase::CardCreateDetailsIframeParams.dump_request(params) @client.request( method: :post, path: ["cards/%1$s/create_details_iframe", card_id], body: parsed, model: Increase::CardIframeURL, options: ) end |
#details(card_id, request_options: {}) ⇒ Increase::Models::CardDetails
Sensitive details for a Card include the primary account number, expiry, card verification code, and PIN.
165 166 167 168 169 170 171 172 |
# File 'lib/increase/resources/cards.rb', line 165 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 |
#update_pin(card_id, pin: , request_options: {}) ⇒ Increase::Models::CardDetails
Update a Card’s PIN
187 188 189 190 191 192 193 194 195 196 |
# File 'lib/increase/resources/cards.rb', line 187 def update_pin(card_id, params) parsed, = Increase::CardUpdatePinParams.dump_request(params) @client.request( method: :post, path: ["cards/%1$s/update_pin", card_id], body: parsed, model: Increase::CardDetails, options: ) end |