Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
BLAZE-833-Number_Selection (#755)
Browse files Browse the repository at this point in the history
* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

* Add Code Snippets to Spec Files

Co-authored-by: Cameron Koegel <[email protected]>
  • Loading branch information
DX-Bandwidth and ckoegel authored Nov 30, 2022
1 parent 439e0b8 commit c2c0c42
Showing 1 changed file with 128 additions and 87 deletions.
215 changes: 128 additions & 87 deletions site/specs/global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,29 @@ info:
|`TEST_DID_NOT_CANCELLABLE`|`418`|Dids that have been assigned to you in
test cannot be cancelled using this operation. Please contact your account
manager to cancel test dids.|
|`EXCEEDED_MAX_ALLOWED_QUANTITY`|`419`|Exceeded maximum allowed quantity for
number ordering.|
|`ORDERING_FORBIDDEN_FOR_NON_VALID_ACCOUNTS`|`420`|Sorry, DID is not
available for cancellation yet. Please check Cancellation Available dates.|
|`INVALID_CANCELLATION_NOT_AVAILABLE_CAPACITY_CUSTOMER`|`421`|Sorry, DID is
not available for cancellation yet. Please check Cancellation Available
dates.|
|`BOTH_PARAMS_CANNOT_BE_SELECTED`|`422`|Quantity and phoneNumbers cannot be
selected for removal at the same time. Please select only one option.|
|`ONE_PARAM_MUST_BE_SELECTED`|`423`|Either quantity or phoneNumbers must be
provided.|
|`INVALID_PHONE_NUMBERS`|`424`|The selected phoneNumbers do not exist in
your cart: |
|`QUANTITY_RELATED_NUMBERS_CANNOT_RELATE_TO_PHONE_NUMBERS`|`425`|Invalid DID
Request. The user has to indicate the phoneNumbers if the numbers being
removed were added via Number Selection.|
contact:
name: Bandwidth
version: '1.0'
Expand Down Expand Up @@ -771,7 +794,7 @@ tags:
2. To buy numbers, you can either:
* Get the associated didGroupId for a country/area code from listDidGroup method (Inventory module), and add a certain quantity of DIDs (didCartItem) from a didGroupId to the CartIdentifier using addToCart
* Coming Q2 2022: Provide a list of telephone numbers you've searched and found in the Voxbone inventory, for sale.
* Provide a list of telephone numbers you've searched and found in the Bandwidth inventory, for sale.
3. Check your funds with accountBalance
Expand All @@ -790,10 +813,6 @@ tags:
operation, the response contains a list of productCheckout elements. These
elements give you an orderReference for each product type contained in
your cart, which can be used as a filter for the listDid operation
Coming Q3 2022: Review the Number(s) and number information of the order
- name: Service Activation
description: >
Service activation module contains a list of operations that allow you to
Expand Down Expand Up @@ -1081,14 +1100,6 @@ paths:
in the query parameter.
- Response can return a maximum of 5000 numbers
- The ability to submit selected numbers available to your cart to
purchase will be available August 2022.
Coming Q3 2022:
- Ability to vanity search for a number in the Voxbone inventory
operationId: listDidGroup
parameters:
- name: countryCodeA3
Expand Down Expand Up @@ -1250,9 +1261,9 @@ paths:
name: VoxOUT National
description: Used to build the coverage pages in the public website
phoneNumbers:
- '+31208908115'
- '+31208908116'
- '+31208908117'
- phoneNumber: '+31208908115'
- phoneNumber: '+31208908116'
- phoneNumber: '+31208908117'
resultCount: 1
x-internal: false
x-summary: >-
Expand Down Expand Up @@ -1400,7 +1411,9 @@ paths:
always need to create at least one cart to place an order
(checkoutCart). You can place multiple orders per cart or you can create
separate carts for each order. Note that different product types (DID,
Capacity or prepaid credits) can be added into one single cart.
Capacity or prepaid credits) can be added into one single cart. You
cannot add a didGroup and quantity, and a list of phoneNumbers of the
same didGroup in the same cart.
operationId: createCart
requestBody:
content:
Expand All @@ -1416,7 +1429,6 @@ paths:
text/xml:
schema:
$ref: '#/components/schemas/CreateCartResponse'
examples: {}
application/json:
schema:
$ref: '#/components/schemas/CreateCartResponse'
Expand All @@ -1435,10 +1447,9 @@ paths:
Set quantity to 0 if you want to remove the product from the cart.
At present, you are able to see a list of numbers available (BETA). The
ability to submit selected numbers available to your cart to purchase
will be available August 2022. The ability to remove selected numbers in
your cart to purchase will be available August 2022.
If phoneNumbers exist in the cart - you will need to submit the E164 of
the phoneNumber to remove the number(s). Quantity of an OrderProductId
will not remove phoneNumbers, only a didGroup and quantity.
operationId: removeFromCart
parameters:
- name: cartIdentifier
Expand All @@ -1457,9 +1468,11 @@ paths:
format: int32
requestBody:
content:
'*/*':
application/json:
schema:
$ref: '#/components/schemas/RemoveFromCartRequest'
oneOf:
- $ref: '#/components/schemas/RemoveQuantityFromCartRequest'
- $ref: '#/components/schemas/RemovePhoneNumbersFromCartRequest'
required: true
responses:
'200':
Expand Down Expand Up @@ -1545,13 +1558,20 @@ paths:
team.
When adding numbers to your cart (to purchase) you will need to request
the didGroupId and quantity of.
When adding numbers to your cart (to purchase) you will need to either:
- Request the didGroupId and quantity of.
- Request the phoneNumbers to place in the cart via the phoneNumbers
object.
Numbers selected (not quantity and didGroup) will remain in cart for a
maximum of 10 minutes, holding. No other customer will be able to see
the number(s) you are holding in cart.
At present, you are able to see a list of numbers available (BETA). The
ability to submit selected numbers available to your cart to purchase
will be available August 2022.
You cannot add a didGroup and quantity, and a list of phoneNumbers of
the same didGroup in the same cart.
operationId: addToCart
parameters:
- name: cartIdentifier
Expand All @@ -1568,15 +1588,10 @@ paths:
application/json:
schema:
oneOf:
- allOf:
- $ref: '#/components/schemas/AddToCartRequest'
- type: object
properties:
didCartItem:
$ref: '#/components/schemas/DidCartItem'
- allOf:
- $ref: '#/components/schemas/AddToCartRequest'
- $ref: '#/components/schemas/PhoneNumberCartItem'
- $ref: '#/components/schemas/AddCreditPackageToCartRequest'
- $ref: '#/components/schemas/AddCapacityToCartRequest'
- $ref: '#/components/schemas/AddDidToCartRequest'
- $ref: '#/components/schemas/AddPhoneNumbersToCartRequest'
required: false
description: ''
responses:
Expand Down Expand Up @@ -5018,6 +5033,26 @@ components:
description: Zones configured in your account.
items:
type: string
phoneNumber:
type: object
properties:
phoneNumber:
type: string
description: The phone number digits in E.164 format
example: '+31208908115'
phoneNumberInCart:
type: object
properties:
digits:
type: string
description: The phone number digits in E.164 format
example: '+31208908115'
holdingUntil:
type: string
description: >-
The timestamp of the time until the phone number will be held in
cart in format "YYYY-MM-DD HH:MM:SS Z"
example: 2022-07-04 15:10:26 UTC
DidGroup:
type: object
x-examples:
Expand All @@ -5041,13 +5076,18 @@ components:
name: string
description: string
phoneNumbers:
- >-
[{phoneNumber: "+31208908115"}, {phoneNumber: "+31208908116"},
{phoneNumber: "+31208908117"}, {phoneNumber: "+31208908118"},
{phoneNumber: "+31208908119"}, {phoneNumber: "+31208908120"},
{phoneNumber: "+31208908121"}, {phoneNumber: "+31208908122"},
{phoneNumber: "+31208908123"}, {phoneNumber: "+31208908124"},
{phoneNumber: "+31208908125"}, {phoneNumber: "+31208908126"}]
- phoneNumber: '+31208908115'
- phoneNumber: '+31208908116'
- phoneNumber: '+31208908117'
- phoneNumber: '+31208908118'
- phoneNumber: '+31208908119'
- phoneNumber: '+31208908120'
- phoneNumber: '+31208908121'
- phoneNumber: '+31208908122'
- phoneNumber: '+31208908123'
- phoneNumber: '+31208908124'
- phoneNumber: '+31208908125'
- phoneNumber: '+31208908126'
x-internal: false
properties:
didGroupId:
Expand Down Expand Up @@ -5132,14 +5172,7 @@ components:
phoneNumbers:
type: array
items:
type: string
example: >-
[{phoneNumber: "+31208908115"}, {phoneNumber: "+31208908116"},
{phoneNumber: "+31208908117"}, {phoneNumber: "+31208908118"},
{phoneNumber: "+31208908119"}, {phoneNumber: "+31208908120"},
{phoneNumber: "+31208908121"}, {phoneNumber: "+31208908122"},
{phoneNumber: "+31208908123"}, {phoneNumber: "+31208908124"},
{phoneNumber: "+31208908125"}, {phoneNumber: "+31208908126"}]
$ref: '#/components/schemas/phoneNumber'
Feature:
type: object
properties:
Expand Down Expand Up @@ -5419,20 +5452,26 @@ components:
- WARNING
- ERROR
x-examples: {}
AddToCartRequest:
AddCapacityToCartRequest:
type: object
properties:
cartIdentifier:
type: integer
description: >-
Identifies the cart and is returned by the createCart method or can
be retrieved with the listCart method.
format: int32
capacityCartItem:
$ref: '#/components/schemas/CapacityCartItem'
AddCreditPackageToCartRequest:
type: object
properties:
creditPackageCartItem:
$ref: '#/components/schemas/CreditPackageCartItem'
x-examples: {}
AddDidToCartRequest:
type: object
properties:
didCartItem:
$ref: '#/components/schemas/DidCartItem'
AddPhoneNumbersToCartRequest:
type: object
properties:
phoneNumbers:
$ref: '#/components/schemas/PhoneNumberCartItem'
CapacityCartItem:
type: object
properties:
Expand Down Expand Up @@ -5483,14 +5522,10 @@ components:
format: int32
example: 0
PhoneNumberCartItem:
type: object
type: array
description: Corresponds to a list of Phone Numbers in a cart
properties:
phoneNumbers:
type: array
items:
type: string
example: '+19191234567'
items:
$ref: '#/components/schemas/phoneNumber'
RemoveFromCartResponse:
type: object
properties:
Expand All @@ -5505,25 +5540,12 @@ components:
- WARNING
- ERROR
x-examples: {}
RemoveFromCartRequest:
RemoveQuantityFromCartRequest:
type: object
x-examples:
example-1:
cartIdentifier: -2147483648
orderProductId: -2147483648
quantity: -2147483648
phoneNumbers:
phoneNumber:
- null
properties:
cartIdentifier:
type: integer
description: The identifier of the cart.
format: int32
orderProductId:
type: integer
description: The identifier of the product.
format: int32
quantity:
type: integer
description: >-
Expand All @@ -5532,13 +5554,28 @@ components:
orderProductId will be removed from the Cart. Note that capacity
must be removed in multiple of 10.
format: int32
required:
- quantity
RemovePhoneNumbersFromCartRequest:
type: object
x-examples:
example-1:
phoneNumbers:
- '+31208908115'
- '+31208908116'
- '+31208908117'
properties:
phoneNumbers:
type: array
items:
type: string
description: The phone number digits in E.164 format
example:
- '+31208908115'
- '+31208908116'
- '+31208908117'
required:
- cartIdentifier
- orderProductId
- phoneNumbers
AccountBalance:
type: object
properties:
Expand Down Expand Up @@ -5634,7 +5671,9 @@ components:
productDescription: string
quantity: 0
didgroupId: 0
phoneNumbers: null
phoneNumbers:
- digits: '+31208908115'
holdingUntil: 2022-07-04 15:10:26 UTC
ListCartResponse:
type: object
properties:
Expand All @@ -5658,7 +5697,9 @@ components:
productDescription: string
quantity: -2147483648
didgroupId: -2147483648
phoneNumbers: null
phoneNumbers:
- digits: '+31208908115'
holdingUntil: 2022-07-04 15:10:26 UTC
properties:
orderProductId:
type: integer
Expand Down Expand Up @@ -5687,7 +5728,7 @@ components:
phoneNumbers:
type: array
items:
type: string
$ref: '#/components/schemas/phoneNumberInCart'
ListOrderResponse:
type: object
properties:
Expand Down

0 comments on commit c2c0c42

Please sign in to comment.