Skip to content

Commit f69b68e

Browse files
asarkar84sarangan12
authored andcommitted
Added specs for Agreements API in version 2018-11-01-preview (#5546)
* Added specs for Agreements API in version 2018-11-01-preview Added specs for Agreements API in version 2018-11-01-preview * Updated as per naming convension Updated as per naming convension
1 parent dbc082d commit f69b68e

File tree

3 files changed

+273
-0
lines changed

3 files changed

+273
-0
lines changed

specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3143,6 +3143,95 @@
31433143
}
31443144
}
31453145
}
3146+
},
3147+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements": {
3148+
"get": {
3149+
"tags": [
3150+
"Agreements"
3151+
],
3152+
"x-ms-examples": {
3153+
"AgreementsListByBillingAccountName": {
3154+
"$ref": "./examples/AgreementsListByBillingAccountName.json"
3155+
}
3156+
},
3157+
"operationId": "Agreements_ListByBillingAccountName",
3158+
"description": "Lists all agreements for a billing account.",
3159+
"parameters": [
3160+
{
3161+
"$ref": "#/parameters/apiVersionParameter"
3162+
},
3163+
{
3164+
"$ref": "#/parameters/billingAccountNameParameter"
3165+
},
3166+
{
3167+
"name": "$expand",
3168+
"description": "May be used to expand the participants.",
3169+
"in": "query",
3170+
"required": false,
3171+
"type": "string"
3172+
}
3173+
],
3174+
"responses": {
3175+
"200": {
3176+
"description": "OK. The request has succeeded.",
3177+
"schema": {
3178+
"$ref": "#/definitions/AgreementListResult"
3179+
}
3180+
},
3181+
"default": {
3182+
"description": "Error response describing why the operation failed.",
3183+
"schema": {
3184+
"$ref": "#/definitions/ErrorResponse"
3185+
}
3186+
}
3187+
}
3188+
}
3189+
},
3190+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}": {
3191+
"get": {
3192+
"tags": [
3193+
"Agreements"
3194+
],
3195+
"x-ms-examples": {
3196+
"AgreementByName": {
3197+
"$ref": "./examples/AgreementByName.json"
3198+
}
3199+
},
3200+
"operationId": "Agreements_Get",
3201+
"description": "Get the agreement by name.",
3202+
"parameters": [
3203+
{
3204+
"$ref": "#/parameters/apiVersionParameter"
3205+
},
3206+
{
3207+
"$ref": "#/parameters/billingAccountNameParameter"
3208+
},
3209+
{
3210+
"$ref": "#/parameters/agreementNameParameter"
3211+
},
3212+
{
3213+
"name": "$expand",
3214+
"description": "May be used to expand the participants.",
3215+
"in": "query",
3216+
"required": false,
3217+
"type": "string"
3218+
}
3219+
],
3220+
"responses": {
3221+
"200": {
3222+
"description": "OK. The request has succeeded.",
3223+
"schema": {
3224+
"$ref": "#/definitions/Agreement"
3225+
}
3226+
},
3227+
"default": {
3228+
"description": "Error response describing why the operation failed.",
3229+
"schema": {
3230+
"$ref": "#/definitions/ErrorResponse"
3231+
}
3232+
}
3233+
}
3234+
}
31463235
}
31473236
},
31483237
"definitions": {
@@ -5141,6 +5230,95 @@
51415230
}
51425231
}
51435232
},
5233+
"AgreementListResult": {
5234+
"description": "Result of listing agreements.",
5235+
"properties": {
5236+
"value": {
5237+
"description": "The list of agreements.",
5238+
"type": "array",
5239+
"readOnly": true,
5240+
"items": {
5241+
"$ref": "#/definitions/Agreement"
5242+
}
5243+
},
5244+
"nextLink": {
5245+
"description": "The link (url) to the next page of results.",
5246+
"type": "string",
5247+
"readOnly": true
5248+
}
5249+
}
5250+
},
5251+
"Agreement": {
5252+
"description": "An agreement resource.",
5253+
"type": "object",
5254+
"allOf": [
5255+
{
5256+
"$ref": "#/definitions/Resource"
5257+
}
5258+
],
5259+
"properties": {
5260+
"properties": {
5261+
"description": "An agreement.",
5262+
"x-ms-client-flatten": true,
5263+
"$ref": "#/definitions/AgreementProperties"
5264+
}
5265+
}
5266+
},
5267+
"AgreementProperties": {
5268+
"description": "The properties of the agreement.",
5269+
"properties": {
5270+
"agreementLink": {
5271+
"description": "The link to the agreement.",
5272+
"type": "string",
5273+
"readOnly": true
5274+
},
5275+
"effectiveDate": {
5276+
"description": "Effective date.",
5277+
"type": "string",
5278+
"format": "date-time",
5279+
"readOnly": true
5280+
},
5281+
"expirationDate": {
5282+
"description": "Expiration date.",
5283+
"type": "string",
5284+
"format": "date-time",
5285+
"readOnly": true
5286+
},
5287+
"participants": {
5288+
"description": "Participants or signer of the agreement.",
5289+
"type": "array",
5290+
"items": {
5291+
"$ref": "#/definitions/Participants"
5292+
}
5293+
},
5294+
"status": {
5295+
"description": "The agreement status",
5296+
"type": "string",
5297+
"readOnly": true
5298+
}
5299+
}
5300+
},
5301+
"Participants": {
5302+
"description": "Details about the participant or signer.",
5303+
"properties": {
5304+
"status": {
5305+
"description": "The signing status",
5306+
"type": "string",
5307+
"readOnly": true
5308+
},
5309+
"statusDate": {
5310+
"description": "The date when status got changed.",
5311+
"type": "string",
5312+
"format": "date-time",
5313+
"readOnly": true
5314+
},
5315+
"email": {
5316+
"description": "The email address of the participant or signer.",
5317+
"type": "string",
5318+
"readOnly": true
5319+
}
5320+
}
5321+
},
51445322
"Action": {
51455323
"description": "the action the caller allowed to do",
51465324
"type": "string",
@@ -5292,6 +5470,14 @@
52925470
"schema": {
52935471
"$ref": "#/definitions/AcceptTransferRequest"
52945472
}
5473+
},
5474+
"agreementNameParameter": {
5475+
"name": "agreementName",
5476+
"in": "path",
5477+
"description": "Agreement Id.",
5478+
"required": true,
5479+
"type": "string",
5480+
"x-ms-parameter-location": "method"
52955481
}
52965482
},
52975483
"security": [
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"api-version": "2018-11-01-preview",
4+
"billingAccountName": "{billingAccountName}",
5+
"agreementName": "Agreement1"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement1",
11+
"name": "Agreement1",
12+
"type": "Microsoft.Billing/agreements",
13+
"properties": {
14+
"agreementLink": "https://agreementuri1.com",
15+
"effectiveDate": "2018-12-05T00:00:00Z",
16+
"expirationDate": "2018-12-05T00:00:00Z",
17+
"participants": [
18+
{
19+
"status": "Accepted",
20+
"statusDate": "2018-11-01T00:00:00Z",
21+
"email": "[email protected]"
22+
},
23+
{
24+
"status": "Declined",
25+
"statusDate": "[email protected]"
26+
}
27+
],
28+
"status": "Published"
29+
}
30+
}
31+
}
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"parameters": {
3+
"api-version": "2018-11-01-preview",
4+
"billingAccountName": "{billingAccountName}"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement1",
12+
"name": "Agreement1",
13+
"type": "Microsoft.Billing/agreements",
14+
"properties": {
15+
"agreementLink": "https://agreementuri1.com",
16+
"effectiveDate": "2018-12-05T00:00:00Z",
17+
"expirationDate": "2018-12-05T00:00:00Z",
18+
"participants": [
19+
{
20+
"status": "Accepted",
21+
"statusDate": "2018-11-01T00:00:00Z",
22+
"email": "[email protected]"
23+
},
24+
{
25+
"status": "Declined",
26+
"statusDate": "[email protected]"
27+
}
28+
],
29+
"status": "Published"
30+
}
31+
},
32+
{
33+
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement2",
34+
"name": "Agreement2",
35+
"type": "Microsoft.Billing/agreements",
36+
"properties": {
37+
"agreementLink": "https://agreementuri2.com",
38+
"effectiveDate": "2018-12-05T00:00:00Z",
39+
"expirationDate": "2018-12-05T00:00:00Z",
40+
"participants": [
41+
{
42+
"status": "Unknown",
43+
"statusDate": "2018-11-01T00:00:00Z",
44+
"email": "[email protected]"
45+
}
46+
],
47+
"status": "PendingSignature"
48+
}
49+
}
50+
]
51+
}
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)