Class: Telnyx::Resources::ExternalConnections::CivicAddresses

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/external_connections/civic_addresses.rb,
sig/telnyx/resources/external_connections/civic_addresses.rbs

Overview

External Connections operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CivicAddresses

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 CivicAddresses.



67
68
69
# File 'lib/telnyx/resources/external_connections/civic_addresses.rb', line 67

def initialize(client:)
  @client = client
end

Instance Method Details

#list(id, filter: nil, request_options: {}) ⇒ Telnyx::Models::ExternalConnections::CivicAddressListResponse

Some parameter documentations has been truncated, see Models::ExternalConnections::CivicAddressListParams for more details.

Returns the civic addresses and locations from Microsoft Teams.



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/telnyx/resources/external_connections/civic_addresses.rb', line 52

def list(id, params = {})
  parsed, options = Telnyx::ExternalConnections::CivicAddressListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["external_connections/%1$s/civic_addresses", id],
    query: query,
    model: Telnyx::Models::ExternalConnections::CivicAddressListResponse,
    options: options
  )
end

#retrieve(address_id, id:, request_options: {}) ⇒ Telnyx::Models::ExternalConnections::CivicAddressRetrieveResponse

Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response.



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/telnyx/resources/external_connections/civic_addresses.rb', line 22

def retrieve(address_id, params)
  parsed, options = Telnyx::ExternalConnections::CivicAddressRetrieveParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["external_connections/%1$s/civic_addresses/%2$s", id, address_id],
    model: Telnyx::Models::ExternalConnections::CivicAddressRetrieveResponse,
    options: options
  )
end