Class: Telnyx::Resources::Addresses::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::Addresses::Actions
- Defined in:
- lib/telnyx/resources/addresses/actions.rb
Overview
Operations to work with Address records. Address records are emergency-validated addresses meant to be associated with phone numbers. They are validated for emergency usage purposes at creation time, although you may validate them separately with a custom workflow using the ValidateAddress operation separately. Address records are not usable for physical orders, such as for Telnyx SIM cards, please use UserAddress for that. It is not possible to entirely skip emergency service validation for Address records; if an emergency provider for a phone number rejects the address then it cannot be used on a phone number. To prevent records from getting out of sync, Address records are immutable and cannot be altered once created. If you realize you need to alter an address, a new record must be created with the differing address.
Instance Method Summary collapse
-
#accept_suggestions(address_uuid, id: nil, request_options: {}) ⇒ Telnyx::Models::Addresses::ActionAcceptSuggestionsResponse
Accepts this address suggestion as a new emergency address for Operator Connect and finishes the uploads of the numbers associated with it to Microsoft.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#validate(country_code:, postal_code:, street_address:, administrative_area: nil, extended_address: nil, locality: nil, request_options: {}) ⇒ Telnyx::Models::Addresses::ActionValidateResponse
Some parameter documentations has been truncated, see Models::Addresses::ActionValidateParams for more details.
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.
81 82 83 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 81 def initialize(client:) @client = client end |
Instance Method Details
#accept_suggestions(address_uuid, id: nil, request_options: {}) ⇒ Telnyx::Models::Addresses::ActionAcceptSuggestionsResponse
Accepts this address suggestion as a new emergency address for Operator Connect and finishes the uploads of the numbers associated with it to Microsoft.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 32 def accept_suggestions(address_uuid, params = {}) parsed, = Telnyx::Addresses::ActionAcceptSuggestionsParams.dump_request(params) @client.request( method: :post, path: ["addresses/%1$s/actions/accept_suggestions", address_uuid], body: parsed, model: Telnyx::Models::Addresses::ActionAcceptSuggestionsResponse, options: ) end |
#validate(country_code:, postal_code:, street_address:, administrative_area: nil, extended_address: nil, locality: nil, request_options: {}) ⇒ Telnyx::Models::Addresses::ActionValidateResponse
Some parameter documentations has been truncated, see Models::Addresses::ActionValidateParams for more details.
Validates an address for emergency services.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 67 def validate(params) parsed, = Telnyx::Addresses::ActionValidateParams.dump_request(params) @client.request( method: :post, path: "addresses/actions/validate", body: parsed, model: Telnyx::Models::Addresses::ActionValidateResponse, options: ) end |