Class: Telnyx::Resources::Actions::Purchase
- Inherits:
-
Object
- Object
- Telnyx::Resources::Actions::Purchase
- Defined in:
- lib/telnyx/resources/actions/purchase.rb,
sig/telnyx/resources/actions/purchase.rbs
Overview
SIM Cards operations
Instance Method Summary collapse
-
#create(amount:, product: nil, sim_card_group_id: nil, status: nil, tags: nil, whitelabel_name: nil, request_options: {}) ⇒ Telnyx::Models::Actions::PurchaseCreateResponse
Some parameter documentations has been truncated, see Models::Actions::PurchaseCreateParams for more details.
-
#initialize(client:) ⇒ Purchase
constructor
private
A new instance of Purchase.
Constructor Details
#initialize(client:) ⇒ Purchase
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 Purchase.
49 50 51 |
# File 'lib/telnyx/resources/actions/purchase.rb', line 49 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, product: nil, sim_card_group_id: nil, status: nil, tags: nil, whitelabel_name: nil, request_options: {}) ⇒ Telnyx::Models::Actions::PurchaseCreateResponse
Some parameter documentations has been truncated, see Models::Actions::PurchaseCreateParams for more details.
Purchases and registers the specified amount of eSIMs to the current user's
account.
If sim_card_group_id is provided, the eSIMs will
be associated with that group. Otherwise, the default group for the current user
will be used.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/telnyx/resources/actions/purchase.rb', line 35 def create(params) parsed, = Telnyx::Actions::PurchaseCreateParams.dump_request(params) @client.request( method: :post, path: "actions/purchase/esims", body: parsed, model: Telnyx::Models::Actions::PurchaseCreateResponse, options: ) end |