Class: Telnyx::Resources::PhoneNumbers::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::PhoneNumbers::Actions
- Defined in:
- lib/telnyx/resources/phone_numbers/actions.rb,
sig/telnyx/resources/phone_numbers/actions.rbs
Overview
Configure your phone numbers
Instance Method Summary collapse
-
#change_bundle_status(id, bundle_id:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionChangeBundleStatusResponse
Some parameter documentations has been truncated, see Models::PhoneNumbers::ActionChangeBundleStatusParams for more details.
-
#enable_emergency(id, emergency_address_id:, emergency_enabled:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionEnableEmergencyResponse
Associates emergency-service settings with the specified phone number.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#verify_ownership(phone_numbers:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionVerifyOwnershipResponse
Verifies ownership of the provided phone numbers and returns a mapping of numbers to their IDs, plus a list of numbers not found in the account.
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.
91 92 93 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#change_bundle_status(id, bundle_id:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionChangeBundleStatusResponse
Some parameter documentations has been truncated, see Models::PhoneNumbers::ActionChangeBundleStatusParams for more details.
Adds the specified phone number to a bundle or removes it from a bundle according to the requested status change. The response contains the phone number with its updated bundle state.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 26 def change_bundle_status(id, params) parsed, = Telnyx::PhoneNumbers::ActionChangeBundleStatusParams.dump_request(params) @client.request( method: :patch, path: ["phone_numbers/%1$s/actions/bundle_status_change", id], body: parsed, model: Telnyx::Models::PhoneNumbers::ActionChangeBundleStatusResponse, options: ) end |
#enable_emergency(id, emergency_address_id:, emergency_enabled:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionEnableEmergencyResponse
Associates emergency-service settings with the specified phone number. The operation returns the updated phone-number configuration when completed immediately or an accepted state when processing continues asynchronously.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 54 def enable_emergency(id, params) parsed, = Telnyx::PhoneNumbers::ActionEnableEmergencyParams.dump_request(params) @client.request( method: :post, path: ["phone_numbers/%1$s/actions/enable_emergency", id], body: parsed, model: Telnyx::Models::PhoneNumbers::ActionEnableEmergencyResponse, options: ) end |
#verify_ownership(phone_numbers:, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::ActionVerifyOwnershipResponse
Verifies ownership of the provided phone numbers and returns a mapping of numbers to their IDs, plus a list of numbers not found in the account.
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 77 def verify_ownership(params) parsed, = Telnyx::PhoneNumbers::ActionVerifyOwnershipParams.dump_request(params) @client.request( method: :post, path: "phone_numbers/actions/verify_ownership", body: parsed, model: Telnyx::Models::PhoneNumbers::ActionVerifyOwnershipResponse, options: ) end |