Class: Increase::Resources::Simulations::PhysicalCards
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::PhysicalCards
- Defined in:
- lib/increase/resources/simulations/physical_cards.rb
Instance Method Summary collapse
-
#advance_shipment(physical_card_id, shipment_status: , request_options: {}) ⇒ Increase::Models::PhysicalCard
This endpoint allows you to simulate advancing the shipment status of a Physical Card, to simulate e.g., that a physical card was attempted shipped but then failed delivery.
-
#create(physical_card_id, category: , carrier_estimated_delivery_at: nil, city: nil, postal_code: nil, state: nil, request_options: {}) ⇒ Increase::Models::PhysicalCard
Some parameter documentations has been truncated, see Models::Simulations::PhysicalCardCreateParams for more details.
-
#initialize(client:) ⇒ PhysicalCards
constructor
private
A new instance of PhysicalCards.
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.
72 73 74 |
# File 'lib/increase/resources/simulations/physical_cards.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#advance_shipment(physical_card_id, shipment_status: , request_options: {}) ⇒ Increase::Models::PhysicalCard
This endpoint allows you to simulate advancing the shipment status of a Physical Card, to simulate e.g., that a physical card was attempted shipped but then failed delivery.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/increase/resources/simulations/physical_cards.rb', line 58 def advance_shipment(physical_card_id, params) parsed, = Increase::Simulations::PhysicalCardAdvanceShipmentParams.dump_request(params) @client.request( method: :post, path: ["simulations/physical_cards/%1$s/advance_shipment", physical_card_id], body: parsed, model: Increase::PhysicalCard, options: ) end |
#create(physical_card_id, category: , carrier_estimated_delivery_at: nil, city: nil, postal_code: nil, state: nil, request_options: {}) ⇒ Increase::Models::PhysicalCard
Some parameter documentations has been truncated, see Models::Simulations::PhysicalCardCreateParams for more details.
This endpoint allows you to simulate receiving a tracking update for a Physical Card, to simulate the progress of a shipment.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/increase/resources/simulations/physical_cards.rb', line 32 def create(physical_card_id, params) parsed, = Increase::Simulations::PhysicalCardCreateParams.dump_request(params) @client.request( method: :post, path: ["simulations/physical_cards/%1$s/tracking_updates", physical_card_id], body: parsed, model: Increase::PhysicalCard, options: ) end |