Class: Telnyx::Resources::PhoneNumbers::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::PhoneNumbers::Actions
- Defined in:
- lib/telnyx/resources/phone_numbers/actions.rb
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
Enable emergency for a 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.
88 89 90 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 88 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.
Change the bundle status for a phone number (set to being in a bundle or remove from a bundle)
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 25 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
Enable emergency for a phone number
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 51 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.
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/telnyx/resources/phone_numbers/actions.rb', line 74 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 |