Twilio.Preview.HostedNumber.HostedNumberOrderService (twilio_elixir v0.1.1)

Copy Markdown View Source

Service for HostedNumberOrder 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.Preview.HostedNumber.HostedNumberOrder.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

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

Operation: CreateHostedNumbersHostedNumberOrder | Tags: PreviewHostedNumbersHostedNumberOrder

Required Parameters

ParameterTypeDescription
PhoneNumberstring (phone-number)The number to host in +E.164 format
SmsCapabilitybooleanUsed to specify that the SMS capability will be hosted on Twilio's platform.

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

| 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

CcEmailsarrayOptional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
EmailstringOptional. Email of the owner of this phone number that is being hosted.
FriendlyNamestringA 64 character string that is a human readable text that describes this resource.

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

| SmsApplicationSid | string | Optional. 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. |

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

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

| UniqueName | string | Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. |

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

VerificationDocumentSidstringOptional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
VerificationTypestringValues: phone-call, phone-bill

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: DeleteHostedNumbersHostedNumberOrder | Tags: PreviewHostedNumbersHostedNumberOrder

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

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

Fetch a specific HostedNumberOrder.

Operation: FetchHostedNumbersHostedNumberOrder | Tags: PreviewHostedNumbersHostedNumberOrder

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: ListHostedNumbersHostedNumberOrder | Tags: PreviewHostedNumbersHostedNumberOrder

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.
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 64 characters.

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

| UniqueName | string | Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. |

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.Preview.HostedNumber.HostedNumberOrder.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Updates a specific HostedNumberOrder.

Operation: UpdateHostedNumbersHostedNumberOrder | Tags: PreviewHostedNumbersHostedNumberOrder

Optional Parameters

ParameterTypeDescription

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

| CallDelay | integer | The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. |

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

CcEmailsarrayOptional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
EmailstringEmail of the owner of this phone number that is being hosted.
ExtensionstringDigits to dial after connecting the verification call.
FriendlyNamestringA 64 character string that is a human readable text that describes this resource.

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 |

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

| UniqueName | string | Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. |

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

| VerificationCode | string | A verification code that is given to the user via a phone call to the phone number that is being hosted. |

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

VerificationDocumentSidstringOptional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
VerificationTypestringValues: phone-call, phone-bill