Class: Increase::Resources::PhysicalCards
- Inherits:
-
Object
- Object
- Increase::Resources::PhysicalCards
- Defined in:
- lib/increase/resources/physical_cards.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::PhysicalCard
Create a Physical Card.
-
#initialize(client:) ⇒ PhysicalCards
constructor
A new instance of PhysicalCards.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::PhysicalCard>
List Physical Cards.
-
#retrieve(physical_card_id, opts = {}) ⇒ Increase::Models::PhysicalCard
Retrieve a Physical Card.
-
#update(physical_card_id, params = {}, opts = {}) ⇒ Increase::Models::PhysicalCard
Update a Physical Card.
Constructor Details
#initialize(client:) ⇒ PhysicalCards
Returns a new instance of PhysicalCards.
6 7 8 |
# File 'lib/increase/resources/physical_cards.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::PhysicalCard
Create a Physical Card
22 23 24 25 26 27 28 29 |
# File 'lib/increase/resources/physical_cards.rb', line 22 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/physical_cards" req[:body] = params req[:model] = Increase::Models::PhysicalCard @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::PhysicalCard>
List Physical Cards
80 81 82 83 84 85 86 87 88 |
# File 'lib/increase/resources/physical_cards.rb', line 80 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/physical_cards" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::PhysicalCard @client.request(req, opts) end |
#retrieve(physical_card_id, opts = {}) ⇒ Increase::Models::PhysicalCard
Retrieve a Physical Card
37 38 39 40 41 42 43 |
# File 'lib/increase/resources/physical_cards.rb', line 37 def retrieve(physical_card_id, opts = {}) req = {} req[:method] = :get req[:path] = "/physical_cards/#{physical_card_id}" req[:model] = Increase::Models::PhysicalCard @client.request(req, opts) end |
#update(physical_card_id, params = {}, opts = {}) ⇒ Increase::Models::PhysicalCard
Update a Physical Card
55 56 57 58 59 60 61 62 |
# File 'lib/increase/resources/physical_cards.rb', line 55 def update(physical_card_id, params = {}, opts = {}) req = {} req[:method] = :patch req[:path] = "/physical_cards/#{physical_card_id}" req[:body] = params req[:model] = Increase::Models::PhysicalCard @client.request(req, opts) end |