Class: Telnyx::Resources::InexplicitNumberOrders

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/inexplicit_number_orders.rb,
sig/telnyx/resources/inexplicit_number_orders.rbs

Overview

Inexplicit number orders for bulk purchasing without specifying exact numbers

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InexplicitNumberOrders

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 InexplicitNumberOrders.

Parameters:

API:

  • private



90
91
92
# File 'lib/telnyx/resources/inexplicit_number_orders.rb', line 90

def initialize(client:)
  @client = client
end

Instance Method Details

#create(ordering_groups:, billing_group_id: nil, connection_id: nil, customer_reference: nil, messaging_profile_id: nil, request_options: {}) ⇒ Telnyx::Models::InexplicitNumberOrderCreateResponse

Some parameter documentations has been truncated, see Models::InexplicitNumberOrderCreateParams for more details.

Create an inexplicit number order to programmatically purchase phone numbers without specifying exact numbers.

Parameters:

  • Group(s) of numbers to order. You can have multiple ordering_groups objects adde

  • Billing group id to apply to phone numbers that are purchased

  • Connection id to apply to phone numbers that are purchased

  • Reference label for the customer

  • Messaging profile id to apply to phone numbers that are purchased

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
# File 'lib/telnyx/resources/inexplicit_number_orders.rb', line 30

def create(params)
  parsed, options = Telnyx::InexplicitNumberOrderCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "inexplicit_number_orders",
    body: parsed,
    model: Telnyx::Models::InexplicitNumberOrderCreateResponse,
    options: options
  )
end

#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPaginationForInexplicitNumberOrders<Telnyx::Models::InexplicitNumberOrderResponse>

Get a paginated list of inexplicit number orders.

Parameters:

  • The page number to load

  • The size of the page

Returns:

See Also:



74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/telnyx/resources/inexplicit_number_orders.rb', line 74

def list(params = {})
  parsed, options = Telnyx::InexplicitNumberOrderListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "inexplicit_number_orders",
    query: query,
    page: Telnyx::Internal::DefaultFlatPaginationForInexplicitNumberOrders,
    model: Telnyx::InexplicitNumberOrderResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::InexplicitNumberOrderRetrieveResponse

Get an existing inexplicit number order by ID.

Parameters:

  • Identifies the inexplicit number order

Returns:

See Also:



52
53
54
55
56
57
58
59
# File 'lib/telnyx/resources/inexplicit_number_orders.rb', line 52

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["inexplicit_number_orders/%1$s", id],
    model: Telnyx::Models::InexplicitNumberOrderRetrieveResponse,
    options: params[:request_options]
  )
end