Class: Increase::Resources::Simulations::PhysicalCards

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/physical_cards.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PhysicalCards

Returns a new instance of PhysicalCards.



7
8
9
# File 'lib/increase/resources/simulations/physical_cards.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#advance_shipment(physical_card_id, params = {}, opts = {}) ⇒ 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.

Parameters:

  • physical_card_id (String)

    The Physical Card you would like to action.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :shipment_status (Symbol)

    The shipment status to move the Physical Card to.

Returns:



23
24
25
26
27
28
29
30
# File 'lib/increase/resources/simulations/physical_cards.rb', line 23

def advance_shipment(physical_card_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/simulations/physical_cards/#{physical_card_id}/advance_shipment"
  req[:body] = params
  req[:model] = Increase::Models::PhysicalCard
  @client.request(req, opts)
end