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

Commit c2c0c42

Browse files
BLAZE-833-Number_Selection (#755)
* 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]>
1 parent 439e0b8 commit c2c0c42

File tree

1 file changed

+128
-87
lines changed

1 file changed

+128
-87
lines changed

site/specs/global.yml

Lines changed: 128 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,29 @@ info:
732732
|`TEST_DID_NOT_CANCELLABLE`|`418`|Dids that have been assigned to you in
733733
test cannot be cancelled using this operation. Please contact your account
734734
manager to cancel test dids.|
735+
736+
|`EXCEEDED_MAX_ALLOWED_QUANTITY`|`419`|Exceeded maximum allowed quantity for
737+
number ordering.|
738+
739+
|`ORDERING_FORBIDDEN_FOR_NON_VALID_ACCOUNTS`|`420`|Sorry, DID is not
740+
available for cancellation yet. Please check Cancellation Available dates.|
741+
742+
|`INVALID_CANCELLATION_NOT_AVAILABLE_CAPACITY_CUSTOMER`|`421`|Sorry, DID is
743+
not available for cancellation yet. Please check Cancellation Available
744+
dates.|
745+
746+
|`BOTH_PARAMS_CANNOT_BE_SELECTED`|`422`|Quantity and phoneNumbers cannot be
747+
selected for removal at the same time. Please select only one option.|
748+
749+
|`ONE_PARAM_MUST_BE_SELECTED`|`423`|Either quantity or phoneNumbers must be
750+
provided.|
751+
752+
|`INVALID_PHONE_NUMBERS`|`424`|The selected phoneNumbers do not exist in
753+
your cart: |
754+
755+
|`QUANTITY_RELATED_NUMBERS_CANNOT_RELATE_TO_PHONE_NUMBERS`|`425`|Invalid DID
756+
Request. The user has to indicate the phoneNumbers if the numbers being
757+
removed were added via Number Selection.|
735758
contact:
736759
name: Bandwidth
737760
version: '1.0'
@@ -771,7 +794,7 @@ tags:
771794
772795
2. To buy numbers, you can either:
773796
* 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
774-
* Coming Q2 2022: Provide a list of telephone numbers you've searched and found in the Voxbone inventory, for sale.
797+
* Provide a list of telephone numbers you've searched and found in the Bandwidth inventory, for sale.
775798
776799
3. Check your funds with accountBalance
777800
@@ -790,10 +813,6 @@ tags:
790813
operation, the response contains a list of productCheckout elements. These
791814
elements give you an orderReference for each product type contained in
792815
your cart, which can be used as a filter for the listDid operation
793-
794-
795-
796-
Coming Q3 2022: Review the Number(s) and number information of the order
797816
- name: Service Activation
798817
description: >
799818
Service activation module contains a list of operations that allow you to
@@ -1081,14 +1100,6 @@ paths:
10811100
in the query parameter.
10821101
10831102
- Response can return a maximum of 5000 numbers
1084-
1085-
- The ability to submit selected numbers available to your cart to
1086-
purchase will be available August 2022.
1087-
1088-
1089-
Coming Q3 2022:
1090-
1091-
- Ability to vanity search for a number in the Voxbone inventory
10921103
operationId: listDidGroup
10931104
parameters:
10941105
- name: countryCodeA3
@@ -1250,9 +1261,9 @@ paths:
12501261
name: VoxOUT National
12511262
description: Used to build the coverage pages in the public website
12521263
phoneNumbers:
1253-
- '+31208908115'
1254-
- '+31208908116'
1255-
- '+31208908117'
1264+
- phoneNumber: '+31208908115'
1265+
- phoneNumber: '+31208908116'
1266+
- phoneNumber: '+31208908117'
12561267
resultCount: 1
12571268
x-internal: false
12581269
x-summary: >-
@@ -1400,7 +1411,9 @@ paths:
14001411
always need to create at least one cart to place an order
14011412
(checkoutCart). You can place multiple orders per cart or you can create
14021413
separate carts for each order. Note that different product types (DID,
1403-
Capacity or prepaid credits) can be added into one single cart.
1414+
Capacity or prepaid credits) can be added into one single cart. You
1415+
cannot add a didGroup and quantity, and a list of phoneNumbers of the
1416+
same didGroup in the same cart.
14041417
operationId: createCart
14051418
requestBody:
14061419
content:
@@ -1416,7 +1429,6 @@ paths:
14161429
text/xml:
14171430
schema:
14181431
$ref: '#/components/schemas/CreateCartResponse'
1419-
examples: {}
14201432
application/json:
14211433
schema:
14221434
$ref: '#/components/schemas/CreateCartResponse'
@@ -1435,10 +1447,9 @@ paths:
14351447
Set quantity to 0 if you want to remove the product from the cart.
14361448
14371449
1438-
At present, you are able to see a list of numbers available (BETA). The
1439-
ability to submit selected numbers available to your cart to purchase
1440-
will be available August 2022. The ability to remove selected numbers in
1441-
your cart to purchase will be available August 2022.
1450+
If phoneNumbers exist in the cart - you will need to submit the E164 of
1451+
the phoneNumber to remove the number(s). Quantity of an OrderProductId
1452+
will not remove phoneNumbers, only a didGroup and quantity.
14421453
operationId: removeFromCart
14431454
parameters:
14441455
- name: cartIdentifier
@@ -1457,9 +1468,11 @@ paths:
14571468
format: int32
14581469
requestBody:
14591470
content:
1460-
'*/*':
1471+
application/json:
14611472
schema:
1462-
$ref: '#/components/schemas/RemoveFromCartRequest'
1473+
oneOf:
1474+
- $ref: '#/components/schemas/RemoveQuantityFromCartRequest'
1475+
- $ref: '#/components/schemas/RemovePhoneNumbersFromCartRequest'
14631476
required: true
14641477
responses:
14651478
'200':
@@ -1545,13 +1558,20 @@ paths:
15451558
team.
15461559
15471560
1548-
When adding numbers to your cart (to purchase) you will need to request
1549-
the didGroupId and quantity of.
1561+
When adding numbers to your cart (to purchase) you will need to either:
1562+
1563+
- Request the didGroupId and quantity of.
1564+
1565+
- Request the phoneNumbers to place in the cart via the phoneNumbers
1566+
object.
1567+
15501568
1569+
Numbers selected (not quantity and didGroup) will remain in cart for a
1570+
maximum of 10 minutes, holding. No other customer will be able to see
1571+
the number(s) you are holding in cart.
15511572
1552-
At present, you are able to see a list of numbers available (BETA). The
1553-
ability to submit selected numbers available to your cart to purchase
1554-
will be available August 2022.
1573+
You cannot add a didGroup and quantity, and a list of phoneNumbers of
1574+
the same didGroup in the same cart.
15551575
operationId: addToCart
15561576
parameters:
15571577
- name: cartIdentifier
@@ -1568,15 +1588,10 @@ paths:
15681588
application/json:
15691589
schema:
15701590
oneOf:
1571-
- allOf:
1572-
- $ref: '#/components/schemas/AddToCartRequest'
1573-
- type: object
1574-
properties:
1575-
didCartItem:
1576-
$ref: '#/components/schemas/DidCartItem'
1577-
- allOf:
1578-
- $ref: '#/components/schemas/AddToCartRequest'
1579-
- $ref: '#/components/schemas/PhoneNumberCartItem'
1591+
- $ref: '#/components/schemas/AddCreditPackageToCartRequest'
1592+
- $ref: '#/components/schemas/AddCapacityToCartRequest'
1593+
- $ref: '#/components/schemas/AddDidToCartRequest'
1594+
- $ref: '#/components/schemas/AddPhoneNumbersToCartRequest'
15801595
required: false
15811596
description: ''
15821597
responses:
@@ -5018,6 +5033,26 @@ components:
50185033
description: Zones configured in your account.
50195034
items:
50205035
type: string
5036+
phoneNumber:
5037+
type: object
5038+
properties:
5039+
phoneNumber:
5040+
type: string
5041+
description: The phone number digits in E.164 format
5042+
example: '+31208908115'
5043+
phoneNumberInCart:
5044+
type: object
5045+
properties:
5046+
digits:
5047+
type: string
5048+
description: The phone number digits in E.164 format
5049+
example: '+31208908115'
5050+
holdingUntil:
5051+
type: string
5052+
description: >-
5053+
The timestamp of the time until the phone number will be held in
5054+
cart in format "YYYY-MM-DD HH:MM:SS Z"
5055+
example: 2022-07-04 15:10:26 UTC
50215056
DidGroup:
50225057
type: object
50235058
x-examples:
@@ -5041,13 +5076,18 @@ components:
50415076
name: string
50425077
description: string
50435078
phoneNumbers:
5044-
- >-
5045-
[{phoneNumber: "+31208908115"}, {phoneNumber: "+31208908116"},
5046-
{phoneNumber: "+31208908117"}, {phoneNumber: "+31208908118"},
5047-
{phoneNumber: "+31208908119"}, {phoneNumber: "+31208908120"},
5048-
{phoneNumber: "+31208908121"}, {phoneNumber: "+31208908122"},
5049-
{phoneNumber: "+31208908123"}, {phoneNumber: "+31208908124"},
5050-
{phoneNumber: "+31208908125"}, {phoneNumber: "+31208908126"}]
5079+
- phoneNumber: '+31208908115'
5080+
- phoneNumber: '+31208908116'
5081+
- phoneNumber: '+31208908117'
5082+
- phoneNumber: '+31208908118'
5083+
- phoneNumber: '+31208908119'
5084+
- phoneNumber: '+31208908120'
5085+
- phoneNumber: '+31208908121'
5086+
- phoneNumber: '+31208908122'
5087+
- phoneNumber: '+31208908123'
5088+
- phoneNumber: '+31208908124'
5089+
- phoneNumber: '+31208908125'
5090+
- phoneNumber: '+31208908126'
50515091
x-internal: false
50525092
properties:
50535093
didGroupId:
@@ -5132,14 +5172,7 @@ components:
51325172
phoneNumbers:
51335173
type: array
51345174
items:
5135-
type: string
5136-
example: >-
5137-
[{phoneNumber: "+31208908115"}, {phoneNumber: "+31208908116"},
5138-
{phoneNumber: "+31208908117"}, {phoneNumber: "+31208908118"},
5139-
{phoneNumber: "+31208908119"}, {phoneNumber: "+31208908120"},
5140-
{phoneNumber: "+31208908121"}, {phoneNumber: "+31208908122"},
5141-
{phoneNumber: "+31208908123"}, {phoneNumber: "+31208908124"},
5142-
{phoneNumber: "+31208908125"}, {phoneNumber: "+31208908126"}]
5175+
$ref: '#/components/schemas/phoneNumber'
51435176
Feature:
51445177
type: object
51455178
properties:
@@ -5419,20 +5452,26 @@ components:
54195452
- WARNING
54205453
- ERROR
54215454
x-examples: {}
5422-
AddToCartRequest:
5455+
AddCapacityToCartRequest:
54235456
type: object
54245457
properties:
5425-
cartIdentifier:
5426-
type: integer
5427-
description: >-
5428-
Identifies the cart and is returned by the createCart method or can
5429-
be retrieved with the listCart method.
5430-
format: int32
54315458
capacityCartItem:
54325459
$ref: '#/components/schemas/CapacityCartItem'
5460+
AddCreditPackageToCartRequest:
5461+
type: object
5462+
properties:
54335463
creditPackageCartItem:
54345464
$ref: '#/components/schemas/CreditPackageCartItem'
5435-
x-examples: {}
5465+
AddDidToCartRequest:
5466+
type: object
5467+
properties:
5468+
didCartItem:
5469+
$ref: '#/components/schemas/DidCartItem'
5470+
AddPhoneNumbersToCartRequest:
5471+
type: object
5472+
properties:
5473+
phoneNumbers:
5474+
$ref: '#/components/schemas/PhoneNumberCartItem'
54365475
CapacityCartItem:
54375476
type: object
54385477
properties:
@@ -5483,14 +5522,10 @@ components:
54835522
format: int32
54845523
example: 0
54855524
PhoneNumberCartItem:
5486-
type: object
5525+
type: array
54875526
description: Corresponds to a list of Phone Numbers in a cart
5488-
properties:
5489-
phoneNumbers:
5490-
type: array
5491-
items:
5492-
type: string
5493-
example: '+19191234567'
5527+
items:
5528+
$ref: '#/components/schemas/phoneNumber'
54945529
RemoveFromCartResponse:
54955530
type: object
54965531
properties:
@@ -5505,25 +5540,12 @@ components:
55055540
- WARNING
55065541
- ERROR
55075542
x-examples: {}
5508-
RemoveFromCartRequest:
5543+
RemoveQuantityFromCartRequest:
55095544
type: object
55105545
x-examples:
55115546
example-1:
5512-
cartIdentifier: -2147483648
5513-
orderProductId: -2147483648
55145547
quantity: -2147483648
5515-
phoneNumbers:
5516-
phoneNumber:
5517-
- null
55185548
properties:
5519-
cartIdentifier:
5520-
type: integer
5521-
description: The identifier of the cart.
5522-
format: int32
5523-
orderProductId:
5524-
type: integer
5525-
description: The identifier of the product.
5526-
format: int32
55275549
quantity:
55285550
type: integer
55295551
description: >-
@@ -5532,13 +5554,28 @@ components:
55325554
orderProductId will be removed from the Cart. Note that capacity
55335555
must be removed in multiple of 10.
55345556
format: int32
5557+
required:
5558+
- quantity
5559+
RemovePhoneNumbersFromCartRequest:
5560+
type: object
5561+
x-examples:
5562+
example-1:
5563+
phoneNumbers:
5564+
- '+31208908115'
5565+
- '+31208908116'
5566+
- '+31208908117'
5567+
properties:
55355568
phoneNumbers:
55365569
type: array
55375570
items:
55385571
type: string
5572+
description: The phone number digits in E.164 format
5573+
example:
5574+
- '+31208908115'
5575+
- '+31208908116'
5576+
- '+31208908117'
55395577
required:
5540-
- cartIdentifier
5541-
- orderProductId
5578+
- phoneNumbers
55425579
AccountBalance:
55435580
type: object
55445581
properties:
@@ -5634,7 +5671,9 @@ components:
56345671
productDescription: string
56355672
quantity: 0
56365673
didgroupId: 0
5637-
phoneNumbers: null
5674+
phoneNumbers:
5675+
- digits: '+31208908115'
5676+
holdingUntil: 2022-07-04 15:10:26 UTC
56385677
ListCartResponse:
56395678
type: object
56405679
properties:
@@ -5658,7 +5697,9 @@ components:
56585697
productDescription: string
56595698
quantity: -2147483648
56605699
didgroupId: -2147483648
5661-
phoneNumbers: null
5700+
phoneNumbers:
5701+
- digits: '+31208908115'
5702+
holdingUntil: 2022-07-04 15:10:26 UTC
56625703
properties:
56635704
orderProductId:
56645705
type: integer
@@ -5687,7 +5728,7 @@ components:
56875728
phoneNumbers:
56885729
type: array
56895730
items:
5690-
type: string
5731+
$ref: '#/components/schemas/phoneNumberInCart'
56915732
ListOrderResponse:
56925733
type: object
56935734
properties:

0 commit comments

Comments
 (0)