Class: Telnyx::Resources::OtaUpdates

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

Overview

OTA updates operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ OtaUpdates

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

Parameters:



61
62
63
# File 'lib/telnyx/resources/ota_updates.rb', line 61

def initialize(client:)
  @client = client
end

Instance Method Details

#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::OtaUpdateListResponse>

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

List OTA updates

Parameters:

Returns:

See Also:



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/telnyx/resources/ota_updates.rb', line 45

def list(params = {})
  parsed, options = Telnyx::OtaUpdateListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "ota_updates",
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::Models::OtaUpdateListResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::OtaUpdateRetrieveResponse

This API returns the details of an Over the Air (OTA) update.

Parameters:

  • id (String)

    Identifies the resource.

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

Returns:

See Also:



18
19
20
21
22
23
24
25
# File 'lib/telnyx/resources/ota_updates.rb', line 18

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["ota_updates/%1$s", id],
    model: Telnyx::Models::OtaUpdateRetrieveResponse,
    options: params[:request_options]
  )
end