Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added specs for Agreements API in version 2018-11-01-preview #5546

Merged
merged 2 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3143,6 +3143,95 @@
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements": {
"get": {
"tags": [
"Agreements"
],
"x-ms-examples": {
"AgreementsListByBillingAccountName": {
"$ref": "./examples/AgreementsListByBillingAccountName.json"
}
},
"operationId": "Agreements_ListByBillingAccountName",
"description": "Lists all agreements for a billing account.",
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"name": "$expand",
"description": "May be used to expand the participants.",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/AgreementListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}": {
"get": {
"tags": [
"Agreements"
],
"x-ms-examples": {
"AgreementByName": {
"$ref": "./examples/AgreementByName.json"
}
},
"operationId": "Agreements_Get",
"description": "Get the agreement by name.",
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/agreementNameParameter"
},
{
"name": "$expand",
"description": "May be used to expand the participants.",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/Agreement"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -5141,6 +5230,95 @@
}
}
},
"AgreementListResult": {
"description": "Result of listing agreements.",
"properties": {
"value": {
"description": "The list of agreements.",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/Agreement"
}
},
"nextLink": {
"description": "The link (url) to the next page of results.",
"type": "string",
"readOnly": true
}
}
},
"Agreement": {
"description": "An agreement resource.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"properties": {
"properties": {
"description": "An agreement.",
"x-ms-client-flatten": true,
"$ref": "#/definitions/AgreementProperties"
}
}
},
"AgreementProperties": {
"description": "The properties of the agreement.",
"properties": {
"agreementLink": {
"description": "The link to the agreement.",
"type": "string",
"readOnly": true
},
"effectiveDate": {
"description": "Effective date.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"expirationDate": {
"description": "Expiration date.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"participants": {
"description": "Participants or signer of the agreement.",
"type": "array",
"items": {
"$ref": "#/definitions/Participants"
}
},
"status": {
"description": "The agreement status",
"type": "string",
"readOnly": true
}
}
},
"Participants": {
"description": "Details about the participant or signer.",
"properties": {
"status": {
"description": "The signing status",
"type": "string",
"readOnly": true
},
"statusDate": {
"description": "The date when status got changed.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"email": {
"description": "The email address of the participant or signer.",
"type": "string",
"readOnly": true
}
}
},
"Action": {
"description": "the action the caller allowed to do",
"type": "string",
Expand Down Expand Up @@ -5292,6 +5470,14 @@
"schema": {
"$ref": "#/definitions/AcceptTransferRequest"
}
},
"agreementNameParameter": {
"name": "agreementName",
"in": "path",
"description": "Agreement Id.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"security": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}",
"agreementName": "Agreement1"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement1",
"name": "Agreement1",
"type": "Microsoft.Billing/agreements",
"properties": {
"agreementLink": "https://agreementuri1.com",
"effectiveDate": "2018-12-05T00:00:00Z",
"expirationDate": "2018-12-05T00:00:00Z",
"participants": [
{
"status": "Accepted",
"statusDate": "2018-11-01T00:00:00Z",
"email": "abc@contoso.com"
},
{
"status": "Declined",
"statusDate": "xyz@contoso.com"
}
],
"status": "Published"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountName": "{billingAccountName}"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement1",
"name": "Agreement1",
"type": "Microsoft.Billing/agreements",
"properties": {
"agreementLink": "https://agreementuri1.com",
"effectiveDate": "2018-12-05T00:00:00Z",
"expirationDate": "2018-12-05T00:00:00Z",
"participants": [
{
"status": "Accepted",
"statusDate": "2018-11-01T00:00:00Z",
"email": "abc@contoso.com"
},
{
"status": "Declined",
"statusDate": "xyz@contoso.com"
}
],
"status": "Published"
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement2",
"name": "Agreement2",
"type": "Microsoft.Billing/agreements",
"properties": {
"agreementLink": "https://agreementuri2.com",
"effectiveDate": "2018-12-05T00:00:00Z",
"expirationDate": "2018-12-05T00:00:00Z",
"participants": [
{
"status": "Unknown",
"statusDate": "2018-11-01T00:00:00Z",
"email": "abc@contoso.com"
}
],
"status": "PendingSignature"
}
}
]
}
}
}
}