Class: Telnyx::Resources::PortingOrders::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::PortingOrders::Actions
- Defined in:
- lib/telnyx/resources/porting_orders/actions.rb
Overview
Endpoints related to porting orders management.
Instance Method Summary collapse
-
#activate(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionActivateResponse
Activate each number in a porting order asynchronously.
-
#cancel(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionCancelResponse
Cancel a porting order.
-
#confirm(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionConfirmResponse
Confirm and submit your porting order.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#share(id, expires_in_seconds: nil, permissions: nil, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionShareResponse
Creates a sharing token for a porting order.
Constructor Details
#initialize(client:) ⇒ Actions
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 Actions.
99 100 101 |
# File 'lib/telnyx/resources/porting_orders/actions.rb', line 99 def initialize(client:) @client = client end |
Instance Method Details
#activate(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionActivateResponse
Activate each number in a porting order asynchronously. This operation is limited to US FastPort orders only.
20 21 22 23 24 25 26 27 |
# File 'lib/telnyx/resources/porting_orders/actions.rb', line 20 def activate(id, params = {}) @client.request( method: :post, path: ["porting_orders/%1$s/actions/activate", id], model: Telnyx::Models::PortingOrders::ActionActivateResponse, options: params[:request_options] ) end |
#cancel(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionCancelResponse
Cancel a porting order
40 41 42 43 44 45 46 47 |
# File 'lib/telnyx/resources/porting_orders/actions.rb', line 40 def cancel(id, params = {}) @client.request( method: :post, path: ["porting_orders/%1$s/actions/cancel", id], model: Telnyx::Models::PortingOrders::ActionCancelResponse, options: params[:request_options] ) end |
#confirm(id, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionConfirmResponse
Confirm and submit your porting order.
60 61 62 63 64 65 66 67 |
# File 'lib/telnyx/resources/porting_orders/actions.rb', line 60 def confirm(id, params = {}) @client.request( method: :post, path: ["porting_orders/%1$s/actions/confirm", id], model: Telnyx::Models::PortingOrders::ActionConfirmResponse, options: params[:request_options] ) end |
#share(id, expires_in_seconds: nil, permissions: nil, request_options: {}) ⇒ Telnyx::Models::PortingOrders::ActionShareResponse
Creates a sharing token for a porting order. The token can be used to share the porting order with non-Telnyx users.
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/telnyx/resources/porting_orders/actions.rb', line 85 def share(id, params = {}) parsed, = Telnyx::PortingOrders::ActionShareParams.dump_request(params) @client.request( method: :post, path: ["porting_orders/%1$s/actions/share", id], body: parsed, model: Telnyx::Models::PortingOrders::ActionShareResponse, options: ) end |