Class: Telnyx::Resources::PhoneNumbers::CsvDownloads
- Inherits:
-
Object
- Object
- Telnyx::Resources::PhoneNumbers::CsvDownloads
- Defined in:
- lib/telnyx/resources/phone_numbers/csv_downloads.rb,
sig/telnyx/resources/phone_numbers/csv_downloads.rbs
Instance Method Summary collapse
-
#create(csv_format: nil, filter: nil, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::CsvDownloadCreateResponse
Some parameter documentations has been truncated, see Models::PhoneNumbers::CsvDownloadCreateParams for more details.
-
#initialize(client:) ⇒ CsvDownloads
constructor
private
A new instance of CsvDownloads.
-
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PhoneNumbers::CsvDownload>
Returns CSV export jobs created for account phone numbers, including each export's current status and pagination metadata.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::CsvDownloadRetrieveResponse
Returns the current status and download details for the CSV export identified by
id.
Constructor Details
#initialize(client:) ⇒ CsvDownloads
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 CsvDownloads.
86 87 88 |
# File 'lib/telnyx/resources/phone_numbers/csv_downloads.rb', line 86 def initialize(client:) @client = client end |
Instance Method Details
#create(csv_format: nil, filter: nil, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::CsvDownloadCreateResponse
Some parameter documentations has been truncated, see Models::PhoneNumbers::CsvDownloadCreateParams for more details.
Starts generation of a CSV export for phone numbers matching the supplied
filters. The csv_format parameter selects the output format, and the response
contains the resulting download record.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/telnyx/resources/phone_numbers/csv_downloads.rb', line 25 def create(params = {}) parsed, = Telnyx::PhoneNumbers::CsvDownloadCreateParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :post, path: "phone_numbers/csv_downloads", query: query, model: Telnyx::Models::PhoneNumbers::CsvDownloadCreateResponse, options: ) end |
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PhoneNumbers::CsvDownload>
Returns CSV export jobs created for account phone numbers, including each export's current status and pagination metadata.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/telnyx/resources/phone_numbers/csv_downloads.rb', line 70 def list(params = {}) parsed, = Telnyx::PhoneNumbers::CsvDownloadListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "phone_numbers/csv_downloads", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::PhoneNumbers::CsvDownload, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::PhoneNumbers::CsvDownloadRetrieveResponse
Returns the current status and download details for the CSV export identified by
id.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/phone_numbers/csv_downloads.rb', line 49 def retrieve(id, params = {}) @client.request( method: :get, path: ["phone_numbers/csv_downloads/%1$s", id], model: Telnyx::Models::PhoneNumbers::CsvDownloadRetrieveResponse, options: params[:request_options] ) end |