Class: Telnyx::Resources::Addresses::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::Addresses::Actions
- Defined in:
- lib/telnyx/resources/addresses/actions.rb,
sig/telnyx/resources/addresses/actions.rbs
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
Accept the validated address suggestion for this address, replacing the original values, and finish uploading the numbers associated with it to Microsoft for Operator Connect.
-
#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.
82 83 84 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 82 def initialize(client:) @client = client end |
Instance Method Details
#accept_suggestions(address_uuid, id: nil, request_options: {}) ⇒ Telnyx::Models::Addresses::ActionAcceptSuggestionsResponse
Accept the validated address suggestion for this address, replacing the original values, and finish uploading the numbers associated with it to Microsoft for Operator Connect.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 33 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.
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/telnyx/resources/addresses/actions.rb', line 68 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 |