# `Twilio.Numbers.V2.HostedNumber.OrderService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/numbers/v2/hosted_number/order_service.ex#L2)

Service for Order API operations.

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@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

| Parameter | Type | Description |
|-----------|------|-------------|
# 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
| `ContactPhoneNumber` | string (phone-number) | The contact phone number of the person authorized to sign the Authorization Document. |
| `Email` | string | Optional. Email of the owner of this phone number that is being hosted. |
| `PhoneNumber` | string (phone-number) | The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# 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
| `ContactTitle` | string | The title of the person authorized to sign the Authorization Document for this phone number. |
| `FriendlyName` | string | A 128 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. |
| `SmsCapability` | boolean | Used 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`

```elixir
@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`

```elixir
@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`

```elixir
@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

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Status` | string | The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`. |
| `SmsCapability` | boolean | Whether the SMS capability will be hosted on our platform. Can be `true` of `false`. |
| `PhoneNumber` | string (phone-number) | An E164 formatted phone number hosted by this HostedNumberOrder. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `IncomingPhoneNumberSid` | string | A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. |
| `FriendlyName` | string | A human readable description of this resource, up to 128 characters. |

# `stream`

```elixir
@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`

```elixir
@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

| Parameter | Type | Description |
|-----------|------|-------------|
# 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

| Parameter | Type | Description |
|-----------|------|-------------|
# 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. |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
