Class: Telnyx::Resources::InexplicitNumberOrders

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

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:



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:

  • ordering_groups (Array<Telnyx::Models::InexplicitNumberOrderCreateParams::OrderingGroup>)

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

  • billing_group_id (String)

    Billing group id to apply to phone numbers that are purchased

  • connection_id (String)

    Connection id to apply to phone numbers that are purchased

  • customer_reference (String)

    Reference label for the customer

  • messaging_profile_id (String)

    Messaging profile id to apply to phone numbers that are purchased

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

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:

  • page_number (Integer)

    The page number to load

  • page_size (Integer)

    The size of the page

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

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:

  • id (String)

    Identifies the inexplicit number order

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

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