Class: Telnyx::Resources::MessagingNumbersBulkUpdates

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

Overview

Configure your phone numbers

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ MessagingNumbersBulkUpdates

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

Parameters:



59
60
61
# File 'lib/telnyx/resources/messaging_numbers_bulk_updates.rb', line 59

def initialize(client:)
  @client = client
end

Instance Method Details

#create(messaging_profile_id:, numbers:, assign_only: nil, request_options: {}) ⇒ Telnyx::Models::MessagingNumbersBulkUpdateCreateResponse

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

Bulk update phone number profiles

Parameters:

  • messaging_profile_id (String)

    Configure the messaging profile these phone numbers are assigned to:

  • numbers (Array<String>)

    The list of phone numbers to update.

  • assign_only (Boolean)

    If true, only assign numbers to the profile without changing other settings.

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

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
# File 'lib/telnyx/resources/messaging_numbers_bulk_updates.rb', line 25

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

#retrieve(order_id, request_options: {}) ⇒ Telnyx::Models::MessagingNumbersBulkUpdateRetrieveResponse

Retrieve bulk update status

Parameters:

  • order_id (String)

    Order ID to verify bulk update status.

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

Returns:

See Also:



47
48
49
50
51
52
53
54
# File 'lib/telnyx/resources/messaging_numbers_bulk_updates.rb', line 47

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