Class: Telnyx::Resources::Addresses::Actions

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

Instance Method Summary collapse

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.

Parameters:



70
71
72
# File 'lib/telnyx/resources/addresses/actions.rb', line 70

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.

Parameters:

  • address_uuid (String)

    The UUID of the address that should be accepted.

  • id (String)

    The ID of the address.

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

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
# File 'lib/telnyx/resources/addresses/actions.rb', line 21

def accept_suggestions(address_uuid, params = {})
  parsed, options = 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: 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.

Parameters:

  • country_code (String)

    The two-character (ISO 3166-1 alpha-2) country code of the address.

  • postal_code (String)

    The postal code of the address.

  • street_address (String)

    The primary street address information about the address.

  • administrative_area (String)

    The locality of the address. For US addresses, this corresponds to the state of

  • extended_address (String)

    Additional street address information about the address such as, but not limited

  • locality (String)

    The locality of the address. For US addresses, this corresponds to the city of t

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

Returns:

See Also:



56
57
58
59
60
61
62
63
64
65
# File 'lib/telnyx/resources/addresses/actions.rb', line 56

def validate(params)
  parsed, options = Telnyx::Addresses::ActionValidateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "addresses/actions/validate",
    body: parsed,
    model: Telnyx::Models::Addresses::ActionValidateResponse,
    options: options
  )
end