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

Commit 8b556d1

Browse files
committed
Add Code Snippets to Spec Files
1 parent 34b7cef commit 8b556d1

File tree

1 file changed

+184
-82
lines changed

1 file changed

+184
-82
lines changed

site/specs/numbers.yml

Lines changed: 184 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,11 @@ components:
11671167
schema:
11681168
type: string
11691169
requestBodies:
1170+
shortCodeJsonPatchShortCodeRequest:
1171+
content:
1172+
application/json-patch+json:
1173+
schema:
1174+
$ref: '#/components/schemas/jsonPatch'
11701175
verificationRequest:
11711176
content:
11721177
application/json:
@@ -13781,6 +13786,36 @@ components:
1378113786
type: string
1378213787
type: object
1378313788
type: object
13789+
jsonPatch:
13790+
items:
13791+
$ref: '#/components/schemas/jsonPatchItem'
13792+
type: array
13793+
jsonPatchItem:
13794+
properties:
13795+
from:
13796+
description: Used when the operation is copy or move.
13797+
type: string
13798+
op:
13799+
enum:
13800+
- add
13801+
- remove
13802+
- replace
13803+
- copy
13804+
- move
13805+
- test
13806+
example: replace
13807+
type: string
13808+
path:
13809+
example: /state
13810+
type: string
13811+
value:
13812+
description: Used when the operation is add, replace, or test.
13813+
example: MAINTENANCE
13814+
type: object
13815+
required:
13816+
- op
13817+
- path
13818+
type: object
1378413819
lnpPortInfoForGivenStatus:
1378513820
properties:
1378613821
ActualFOCDate:
@@ -13966,31 +14001,14 @@ components:
1396614001
lease.
1396714002
example: true
1396814003
type: boolean
13969-
leaseEndsDate:
13970-
description: >-
13971-
Date the short code lease ends. Customer managed leases may not have
13972-
lease start and end dates. Date is inclusive as it relates to
13973-
expiration.
13974-
example: '2024-01-29'
13975-
format: date
13976-
type: string
13977-
leaseStartsDate:
13978-
description: >-
13979-
Date the short code lease starts. Customer managed leases may not
13980-
have lease start and end dates. Date is inclusive as it relates to
13981-
expiration.
13982-
example: '2023-01-28'
13983-
format: date
13984-
type: string
14004+
lease:
14005+
$ref: '#/components/schemas/shortCodeLeaseInfo'
1398514006
modifiedDateTime:
1398614007
example: '2022-11-15T18:39:04.505Z'
1398714008
format: date-time
1398814009
type: string
13989-
orderedDate:
13990-
description: Date the short code was registered.
13991-
example: '2023-01-30'
13992-
format: date
13993-
type: string
14010+
notes:
14011+
$ref: '#/components/schemas/shortCodeNotes'
1399414012
shortCode:
1399514013
description: The short code.
1399614014
example: '12345'
@@ -14094,33 +14112,24 @@ components:
1409414112
- CAN
1409514113
example: USA
1409614114
type: string
14115+
createdDateTime:
14116+
example: '2022-11-14T18:39:04.505Z'
14117+
format: date-time
14118+
type: string
1409714119
customerManagedLease:
1409814120
description: >-
1409914121
Flag indicating whether the customer is managing the short code
1410014122
lease.
1410114123
example: true
1410214124
type: boolean
14103-
leaseEndsDate:
14104-
description: >-
14105-
Date the short code lease ends. Customer managed leases may not have
14106-
lease start and end dates. Date is inclusive as it relates to
14107-
expiration.
14108-
example: '2024-01-29'
14109-
format: date
14110-
type: string
14111-
leaseStartsDate:
14112-
description: >-
14113-
Date the short code lease starts. Customer managed leases may not
14114-
have lease start and end dates. Date is inclusive as it relates to
14115-
expiration.
14116-
example: '2023-01-28'
14117-
format: date
14118-
type: string
14119-
orderedDate:
14120-
description: Date the short code was registered.
14121-
example: '2023-01-30'
14122-
format: date
14125+
lease:
14126+
$ref: '#/components/schemas/shortCodeLeaseData'
14127+
modifiedDateTime:
14128+
example: '2022-11-15T18:39:04.505Z'
14129+
format: date-time
1412314130
type: string
14131+
notes:
14132+
$ref: '#/components/schemas/shortCodeNotes'
1412414133
shortCode:
1412514134
description: The short code.
1412614135
example: '12345'
@@ -14234,26 +14243,14 @@ components:
1423414243
lease.
1423514244
example: true
1423614245
type: boolean
14237-
leaseEndsDate:
14238-
description: >-
14239-
Date the short code lease ends. Customer managed leases may not have
14240-
lease start and end dates. Date is inclusive as it relates to
14241-
expiration.
14242-
example: '2024-01-29'
14243-
format: date
14244-
type: string
14245-
leaseStartsDate:
14246-
description: >-
14247-
Date the short code lease starts. Customer managed leases may not
14248-
have lease start and end dates. Date is inclusive as it relates to
14249-
expiration.
14250-
example: '2023-01-28'
14251-
format: date
14252-
type: string
14246+
lease:
14247+
$ref: '#/components/schemas/shortCodeLeaseInfo'
1425314248
modifiedDateTime:
1425414249
example: '2022-11-15T18:39:04.505Z'
1425514250
format: date-time
1425614251
type: string
14252+
notes:
14253+
$ref: '#/components/schemas/shortCodeNotes'
1425714254
operation:
1425814255
description: Operation executed over the short code.
1425914256
enum:
@@ -14262,11 +14259,6 @@ components:
1426214259
- DELETED
1426314260
example: UPDATED
1426414261
type: string
14265-
orderedDate:
14266-
description: Date the short code was registered.
14267-
example: '2023-01-30'
14268-
format: date
14269-
type: string
1427014262
shortCode:
1427114263
description: The short code.
1427214264
example: '12345'
@@ -14325,6 +14317,90 @@ components:
1432514317
page:
1432614318
$ref: '#/components/schemas/shortCodePage'
1432714319
type: object
14320+
shortCodeLeaseData:
14321+
description: >-
14322+
The lease information for the short code number. This information only
14323+
applies to Bandwidth managed short code leases (customerManagedLease set
14324+
to false).
14325+
properties:
14326+
autoRenew:
14327+
description: Flag indicating whether the lease should auto-renew.
14328+
example: true
14329+
type: boolean
14330+
autoRenewMonths:
14331+
description: >-
14332+
The number of months for which to renew the release when it auto
14333+
renews. Valid values are 3, 6, and 12. The default value, if not
14334+
supplied on creation, will be 3.
14335+
enum:
14336+
- 3
14337+
- 6
14338+
- 12
14339+
example: 6
14340+
type: integer
14341+
contactEmail:
14342+
description: Email address used for all lease renewal notifications.
14343+
14344+
type: string
14345+
endDate:
14346+
description: >-
14347+
Lease end date. This date is inclusive, e.g. 2022-02-15 means that
14348+
the short code is valid through 2/15.
14349+
example: '2023-01-28'
14350+
format: date
14351+
type: string
14352+
startDate:
14353+
description: >-
14354+
Lease start date. This date is inclusive, e.g. 2022-02-07 means that
14355+
the short code is valid on 2/7.
14356+
example: '2023-01-28'
14357+
format: date
14358+
type: string
14359+
type: object
14360+
shortCodeLeaseInfo:
14361+
description: >-
14362+
The lease information for the short code number. This information only
14363+
applies to Bandwidth managed short code leases (customerManagedLease set
14364+
to false).
14365+
properties:
14366+
autoRenew:
14367+
description: Flag indicating whether the lease should auto-renew.
14368+
example: true
14369+
type: boolean
14370+
autoRenewMonths:
14371+
description: >-
14372+
The number of months for which to renew the release when it auto
14373+
renews. Valid values are 3, 6, and 12. The default value, if not
14374+
supplied on creation, will be 3.
14375+
enum:
14376+
- 3
14377+
- 6
14378+
- 12
14379+
example: 6
14380+
type: integer
14381+
contactEmail:
14382+
description: Email address used for all lease renewal notifications.
14383+
14384+
type: string
14385+
endDate:
14386+
description: >-
14387+
Lease end date. This date is inclusive, e.g. 2022-02-15 means that
14388+
the short code is valid through 2/15.
14389+
example: '2023-01-28'
14390+
format: date
14391+
type: string
14392+
startDate:
14393+
description: >-
14394+
Lease start date. This date is inclusive, e.g. 2022-02-07 means that
14395+
the short code is valid on 2/7.
14396+
example: '2023-01-28'
14397+
format: date
14398+
type: string
14399+
type: object
14400+
shortCodeNotes:
14401+
description: Internal notes.
14402+
example: Notes example
14403+
type: string
1432814404
shortCodePage:
1432914405
description: Pagination object that represents the current page.
1433014406
properties:
@@ -14363,33 +14439,24 @@ components:
1436314439
items:
1436414440
$ref: '#/components/schemas/shortCodeCarrierInfo'
1436514441
type: array
14442+
createdDateTime:
14443+
example: '2022-11-14T18:39:04.505Z'
14444+
format: date-time
14445+
type: string
1436614446
customerManagedLease:
1436714447
description: >-
1436814448
Flag indicating whether the customer is managing the short code
1436914449
lease.
1437014450
example: true
1437114451
type: boolean
14372-
leaseEndsDate:
14373-
description: >-
14374-
Date the short code lease ends. Customer managed leases may not have
14375-
lease start and end dates. Date is inclusive as it relates to
14376-
expiration.
14377-
example: '2024-01-29'
14378-
format: date
14379-
type: string
14380-
leaseStartsDate:
14381-
description: >-
14382-
Date the short code lease starts. Customer managed leases may not
14383-
have lease start and end dates. Date is inclusive as it relates to
14384-
expiration.
14385-
example: '2023-01-28'
14386-
format: date
14387-
type: string
14388-
orderedDate:
14389-
description: Date the short code was registered.
14390-
example: '2023-01-30'
14391-
format: date
14452+
lease:
14453+
$ref: '#/components/schemas/shortCodeLeaseData'
14454+
modifiedDateTime:
14455+
example: '2022-11-15T18:39:04.505Z'
14456+
format: date-time
1439214457
type: string
14458+
notes:
14459+
$ref: '#/components/schemas/shortCodeNotes'
1439314460
sipPeerId:
1439414461
description: SIP Peer ID from Iris.
1439514462
example: '123321'
@@ -33843,6 +33910,41 @@ paths:
3384333910
summary: Retrieve short code details.
3384433911
tags:
3384533912
- Short Codes
33913+
patch:
33914+
description: >-
33915+
Update (field by field) an account's short code registration for a
33916+
country. This utilizes [Json Patch](https://jsonpatch.com/).
33917+
operationId: patchShortCodeLease
33918+
parameters:
33919+
- $ref: '#/components/parameters/AccountIdPathParam'
33920+
- $ref: '#/components/parameters/shortCodePathParam'
33921+
- $ref: '#/components/parameters/shortCodeCountryPathParam'
33922+
requestBody:
33923+
$ref: '#/components/requestBodies/shortCodeJsonPatchShortCodeRequest'
33924+
responses:
33925+
'200':
33926+
$ref: '#/components/responses/shortCodeUpdateShortCodeResponse'
33927+
'400':
33928+
$ref: '#/components/responses/shortCode400'
33929+
'401':
33930+
$ref: '#/components/responses/shortCode401'
33931+
'403':
33932+
$ref: '#/components/responses/shortCode403'
33933+
'404':
33934+
$ref: '#/components/responses/shortCode404'
33935+
'405':
33936+
$ref: '#/components/responses/shortCode405'
33937+
'409':
33938+
$ref: '#/components/responses/shortCode409'
33939+
'429':
33940+
$ref: '#/components/responses/shortCode429'
33941+
'500':
33942+
$ref: '#/components/responses/shortCode500'
33943+
summary: >-
33944+
Update the lease information of an account's short code registration for
33945+
a country.
33946+
tags:
33947+
- Short Codes
3384633948
/accounts/{accountId}/shortcodes/{shortCode}/{country}/history:
3384733949
get:
3384833950
description: >-

0 commit comments

Comments
 (0)