Class: Increase::Resources::PhysicalCards
- Inherits:
-
Object
- Object
- Increase::Resources::PhysicalCards
- Defined in:
- lib/increase/resources/physical_cards.rb
Instance Method Summary collapse
-
#create(card_id: , cardholder: , shipment: , physical_card_profile_id: nil, request_options: {}) ⇒ Increase::Models::PhysicalCard
Some parameter documentations has been truncated, see Models::PhysicalCardCreateParams for more details.
-
#initialize(client:) ⇒ PhysicalCards
constructor
private
A new instance of PhysicalCards.
-
#list(card_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::PhysicalCard>
Some parameter documentations has been truncated, see Models::PhysicalCardListParams for more details.
-
#retrieve(physical_card_id, request_options: {}) ⇒ Increase::Models::PhysicalCard
Retrieve a Physical Card.
-
#update(physical_card_id, status: , request_options: {}) ⇒ Increase::Models::PhysicalCard
Update a Physical Card.
Constructor Details
#initialize(client:) ⇒ PhysicalCards
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 PhysicalCards.
118 119 120 |
# File 'lib/increase/resources/physical_cards.rb', line 118 def initialize(client:) @client = client end |
Instance Method Details
#create(card_id: , cardholder: , shipment: , physical_card_profile_id: nil, request_options: {}) ⇒ Increase::Models::PhysicalCard
Some parameter documentations has been truncated, see Models::PhysicalCardCreateParams for more details.
Create a Physical Card
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/increase/resources/physical_cards.rb', line 26 def create(params) parsed, = Increase::PhysicalCardCreateParams.dump_request(params) @client.request( method: :post, path: "physical_cards", body: parsed, model: Increase::PhysicalCard, options: ) end |
#list(card_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::PhysicalCard>
Some parameter documentations has been truncated, see Models::PhysicalCardListParams for more details.
List Physical Cards
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/increase/resources/physical_cards.rb', line 103 def list(params = {}) parsed, = Increase::PhysicalCardListParams.dump_request(params) @client.request( method: :get, path: "physical_cards", query: parsed, page: Increase::Internal::Page, model: Increase::PhysicalCard, options: ) end |
#retrieve(physical_card_id, request_options: {}) ⇒ Increase::Models::PhysicalCard
Retrieve a Physical Card
48 49 50 51 52 53 54 55 |
# File 'lib/increase/resources/physical_cards.rb', line 48 def retrieve(physical_card_id, params = {}) @client.request( method: :get, path: ["physical_cards/%1$s", physical_card_id], model: Increase::PhysicalCard, options: params[:request_options] ) end |
#update(physical_card_id, status: , request_options: {}) ⇒ Increase::Models::PhysicalCard
Update a Physical Card
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/increase/resources/physical_cards.rb', line 70 def update(physical_card_id, params) parsed, = Increase::PhysicalCardUpdateParams.dump_request(params) @client.request( method: :patch, path: ["physical_cards/%1$s", physical_card_id], body: parsed, model: Increase::PhysicalCard, options: ) end |