Class: Telnyx::Resources::AdvancedOrders
- Inherits:
-
Object
- Object
- Telnyx::Resources::AdvancedOrders
- Defined in:
- lib/telnyx/resources/advanced_orders.rb,
sig/telnyx/resources/advanced_orders.rbs
Instance Method Summary collapse
-
#create(area_code: nil, comments: nil, country_code: nil, customer_reference: nil, features: nil, phone_number_type: nil, quantity: nil, requirement_group_id: nil, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Creates an advanced number order from the requested order configuration.
-
#initialize(client:) ⇒ AdvancedOrders
constructor
private
A new instance of AdvancedOrders.
-
#list(request_options: {}) ⇒ Telnyx::Models::AdvancedOrderListResponse
Returns the advanced number orders associated with the account.
-
#retrieve(order_id, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Returns the advanced number order identified by
order_id, including its configuration and current state. -
#update_requirement_group(advanced_order_id, area_code: nil, comments: nil, country_code: nil, customer_reference: nil, features: nil, phone_number_type: nil, quantity: nil, requirement_group_id: nil, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Updates the requirement-group configuration for the specified advanced number order.
Constructor Details
#initialize(client:) ⇒ AdvancedOrders
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 AdvancedOrders.
125 126 127 |
# File 'lib/telnyx/resources/advanced_orders.rb', line 125 def initialize(client:) @client = client end |
Instance Method Details
#create(area_code: nil, comments: nil, country_code: nil, customer_reference: nil, features: nil, phone_number_type: nil, quantity: nil, requirement_group_id: nil, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Creates an advanced number order from the requested order configuration. The response contains the resulting advanced order and its initial state.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/telnyx/resources/advanced_orders.rb', line 32 def create(params = {}) parsed, = Telnyx::AdvancedOrderCreateParams.dump_request(params) @client.request( method: :post, path: "advanced_orders", body: parsed, model: Telnyx::AdvancedOrder, options: ) end |
#list(request_options: {}) ⇒ Telnyx::Models::AdvancedOrderListResponse
Returns the advanced number orders associated with the account. Each result includes the order configuration and its current state.
74 75 76 77 78 79 80 81 |
# File 'lib/telnyx/resources/advanced_orders.rb', line 74 def list(params = {}) @client.request( method: :get, path: "advanced_orders", model: Telnyx::Models::AdvancedOrderListResponse, options: params[:request_options] ) end |
#retrieve(order_id, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Returns the advanced number order identified by order_id, including its
configuration and current state.
55 56 57 58 59 60 61 62 |
# File 'lib/telnyx/resources/advanced_orders.rb', line 55 def retrieve(order_id, params = {}) @client.request( method: :get, path: ["advanced_orders/%1$s", order_id], model: Telnyx::AdvancedOrder, options: params[:request_options] ) end |
#update_requirement_group(advanced_order_id, area_code: nil, comments: nil, country_code: nil, customer_reference: nil, features: nil, phone_number_type: nil, quantity: nil, requirement_group_id: nil, request_options: {}) ⇒ Telnyx::Models::AdvancedOrder
Updates the requirement-group configuration for the specified advanced number order. The response contains the updated advanced order.
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/telnyx/resources/advanced_orders.rb', line 111 def update_requirement_group(advanced_order_id, params = {}) parsed, = Telnyx::AdvancedOrderUpdateRequirementGroupParams.dump_request(params) @client.request( method: :patch, path: ["advanced_orders/%1$s/requirement_group", advanced_order_id], body: parsed, model: Telnyx::AdvancedOrder, options: ) end |