Twilio.Numbers.V2.HostedNumber.OrderService (twilio_elixir v0.1.1)

Copy Markdown View Source

Service for Order API operations.

Operations: list, create, fetch, update, delete

Summary

Functions

Host a phone number's capability on Twilio's platform.

Cancel the HostedNumberOrder (only available when the status is in received).

Fetch a specific HostedNumberOrder.

Retrieve a list of HostedNumberOrders belonging to the account initiating the request.

Stream: Retrieve a list of HostedNumberOrders belonging to the account initiating the request. (lazy auto-pagination).

Updates a specific HostedNumberOrder.

Functions

create(client, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Numbers.V2.HostedNumber.Order.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Host a phone number's capability on Twilio's platform.

Operation: CreateHostedNumberOrder | Tags: NumbersV2HostedNumberOrder

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| AddressSid | string | Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

ContactPhoneNumberstring (phone-number)The contact phone number of the person authorized to sign the Authorization Document.
EmailstringOptional. Email of the owner of this phone number that is being hosted.
PhoneNumberstring (phone-number)The number to host in +E.164 format

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| AccountSid | string | This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| CcEmails | array | Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

ContactTitlestringThe title of the person authorized to sign the Authorization Document for this phone number.
FriendlyNamestringA 128 character string that is a human readable text that describes this resource.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

SmsApplicationSidstringOptional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a SmsApplicationSid is present, Twilio will ignore all of the SMS urls above and use those set on the application.
SmsCapabilitybooleanUsed to specify that the SMS capability will be hosted on Twilio's platform.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| SmsFallbackMethod | string (http-method) | The HTTP method that should be used to request the SmsFallbackUrl. Must be either GET or POST. This will be copied onto the IncomingPhoneNumber resource. Values: GET, POST |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| SmsFallbackUrl | string (uri) | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| SmsMethod | string (http-method) | The HTTP method that should be used to request the SmsUrl. Must be either GET or POST. This will be copied onto the IncomingPhoneNumber resource. Values: GET, POST |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| SmsUrl | string (uri) | The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| StatusCallbackMethod | string (http-method) | Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. Values: GET, POST |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| StatusCallbackUrl | string (uri) | Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. |

delete(client, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Cancel the HostedNumberOrder (only available when the status is in received).

Operation: DeleteHostedNumberOrder | Tags: NumbersV2HostedNumberOrder

fetch(client, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Numbers.V2.HostedNumber.Order.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Fetch a specific HostedNumberOrder.

Operation: FetchHostedNumberOrder | Tags: NumbersV2HostedNumberOrder

list(client, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieve a list of HostedNumberOrders belonging to the account initiating the request.

Operation: ListHostedNumberOrder | Tags: NumbersV2HostedNumberOrder

Query Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

StatusstringThe Status of this HostedNumberOrder. One of received, pending-verification, verified, pending-loa, carrier-processing, testing, completed, failed, or action-required.
SmsCapabilitybooleanWhether the SMS capability will be hosted on our platform. Can be true of false.
PhoneNumberstring (phone-number)An E164 formatted phone number hosted by this HostedNumberOrder.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

IncomingPhoneNumberSidstringA 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
FriendlyNamestringA human readable description of this resource, up to 128 characters.

stream(client, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()

Stream: Retrieve a list of HostedNumberOrders belonging to the account initiating the request. (lazy auto-pagination).

update(client, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Numbers.V2.HostedNumber.Order.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Updates a specific HostedNumberOrder.

Operation: UpdateHostedNumberOrder | Tags: NumbersV2HostedNumberOrder

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Status | string | Values: twilio-processing, received, pending-verification, verified, pending-loa, carrier-processing, testing, completed, failed, action-required |

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| VerificationCallDelay | integer | The number of seconds to wait before initiating the ownership verification call. Can be a value between 0 and 60, inclusive. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| VerificationCallExtension | string | The numerical extension to dial when making the ownership verification call. |