Class: Telnyx::Resources::MessagingHostedNumberOrders::Actions

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

Overview

Manage your messaging hosted numbers

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:



42
43
44
# File 'lib/telnyx/resources/messaging_hosted_number_orders/actions.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#upload_file(id, bill: nil, loa: nil, request_options: {}) ⇒ Telnyx::Models::MessagingHostedNumberOrders::ActionUploadFileResponse

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

Upload hosted number document

Parameters:

  • id (String)

    Identifies the type of resource.

  • bill (Pathname, StringIO, IO, String, Telnyx::FilePart)

    Must be the last month’s bill with proof of ownership of all of the numbers in t

  • loa (Pathname, StringIO, IO, String, Telnyx::FilePart)

    Must be a signed LOA for the numbers in the order in PDF format.

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

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/telnyx/resources/messaging_hosted_number_orders/actions.rb', line 27

def upload_file(id, params = {})
  parsed, options = Telnyx::MessagingHostedNumberOrders::ActionUploadFileParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["messaging_hosted_number_orders/%1$s/actions/file_upload", id],
    headers: {"content-type" => "multipart/form-data"},
    body: parsed,
    model: Telnyx::Models::MessagingHostedNumberOrders::ActionUploadFileResponse,
    options: options
  )
end