Skip to content

Commit

Permalink
GTM billing api for getting reservation Transactions by invoice secti…
Browse files Browse the repository at this point in the history
…on. (#5475)

* swagger for Get{Reservation}TransactionsByInvoiceSection.

* gtm rest apis for Get{Reservation}TransactionsByInvoiceSection.

* updating operationId for tansactions to Noun_verb as per feedback.

* fixing examples

* fix bugs in examples.

* remove more duplicates

* fix example
  • Loading branch information
msft-adrianma authored and veronicagg committed Apr 3, 2019
1 parent e7ed198 commit 6a66711
Show file tree
Hide file tree
Showing 75 changed files with 944 additions and 994 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@
},
"BillingAccountWithExpand": {
"$ref": "./examples/BillingAccountWithExpand.json"
},
"BillingAccountsListWithExpandForEnrollmentDetails": {
"$ref": "./examples/BillingAccountsListWithExpandForEnrollmentDetails.json"
}
},
"operationId": "BillingAccounts_Get",
Expand Down Expand Up @@ -1636,7 +1633,7 @@
"tags": [
"Transactions"
],
"operationId": "TransactionsByBillingProfile",
"operationId": "TransactionsByBillingProfile_List",
"description": "Lists the transactions by billingProfileName for given start date and end date.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
Expand Down Expand Up @@ -1697,6 +1694,72 @@
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/transactions": {
"get": {
"tags": [
"Transactions"
],
"operationId": "TransactionsByInvoiceSection_List",
"description": "Lists the transactions by invoiceSectionName for given start date and end date.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"TransactionsListByInvoiceSection": {
"$ref": "./examples/TransactionsListByInvoiceSection.json"
},
"ReservationTransactionsListByInvoiceSection": {
"$ref": "./examples/ReservationTransactionsListByInvoiceSection.json"
}
},
"parameters": [
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/invoiceSectionNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"name": "startDate",
"in": "query",
"description": "Start date",
"required": true,
"type": "string"
},
{
"name": "endDate",
"in": "query",
"description": "End date",
"required": true,
"type": "string"
},
{
"name": "$filter",
"description": "May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/TransactionsListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default": {
"get": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,13 @@
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/transfers/transferName",
"type": "Microsoft.Billing/transfers",
"name": "transferName",
"properties": {
"creationTime": "10/10/2018 9:40:01 PM",
"expirationTime": "11/5/2018 4:47:08 AM",
"allowedSubscriptionType": [
"DevTestAzureSubscription",
"StandardAzureSubscription",
"AzureReservation"
],
"creationTime": "2018-10-10T17:32:28Z",
"expirationTime": "2018-11-05T17:32:28Z",
"transferStatus": "InProgress",
"recipientEmailId": "user@contoso.com",
"initiatorEmailId": "user@contoso.com",
"lastModifiedTime": "10/10/2018 9:45:01 PM",
"lastModifiedTime": "2018-10-10T17:32:28Z",
"detailedTransferStatus": [
{
"productType": "AzureSubscription",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"billingAccountName": "{billingAccountName}",
"parameters": {
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"billingRoleDefinitionId": "10000000-aaaa-bbbb-cccc-100000000000"
"billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000"
}
},
"responses":{
Expand All @@ -20,7 +20,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand All @@ -34,7 +33,6 @@
"createdByPrincipalId": "46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1",
"name": "10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47",
"principalId": "b1839933-b3ac-42ca-8112-d29c43f3ab47",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand All @@ -48,7 +46,6 @@
"createdByPrincipalId": "b1839933-b3ac-42ca-8112-d29c43f3ab47",
"name": "10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959",
"principalId": "129db794-64a5-44e0-9838-002780478959",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000002",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand All @@ -62,7 +59,6 @@
"createdByPrincipalId": "b1839933-b3ac-42ca-8112-d29c43f3ab47",
"name": "10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7",
"principalId": "d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000001",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand All @@ -76,7 +72,6 @@
"createdByPrincipalId": "b1839933-b3ac-42ca-8112-d29c43f3ab47",
"name": "10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c",
"principalId": "c4f54fd2-d920-4c49-9b4d-9f09387b881c",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"billingProfileName": "{billingProfileName}",
"parameters": {
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"billingRoleDefinitionId": "10000000-aaaa-bbbb-cccc-100000000000"
"billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000"
}
},
"responses": {
Expand All @@ -21,7 +21,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/billingProfiles/123/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/billingProfiles/123/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"invoiceSectionName": "{invoiceSectionName}",
"parameters": {
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"billingRoleDefinitionId": "10000000-aaaa-bbbb-cccc-100000000000"
"billingRoleDefinitionName": "10000000-aaaa-bbbb-cccc-100000000000"
}
},
"responses": {
Expand All @@ -21,7 +21,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/invoiceSections/123/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/invoiceSections/123/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountId": "04e9d123-ae03-5621-6c17-e70da00924ee",
"billingProfileId": "2291f7a6-e97a-4bb8-83d7-6090beb137e1"
"billingAccountName": "04e9d123-ae03-5621-6c17-e70da00924ee",
"billingProfileName": "2291f7a6-e97a-4bb8-83d7-6090beb137e1"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountId": "2000100"
"billingAccountName": "2000100"
},
"responses": {
"200": {
Expand All @@ -14,19 +14,15 @@
"company": "Test Account",
"accountType": "Organization",
"address": {
"AddressLine1": "Test Address",
"AddressLine2": "Test Address",
"AddressLine3": "Test Address",
"City": "City",
"PostalCode": "00000",
"Region": "WA",
"Country": "US",
"PhoneNumber": "000-000-0000"
"addressLine1": "Test Address",
"addressLine2": "Test Address",
"addressLine3": "Test Address",
"city": "City",
"postalCode": "00000",
"region": "WA",
"country": "US"
},
"country": "United States",
"agreements": [
"wwww.contoso.com/agreements"
]
"country": "United States"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"api-version": "2018-11-01-preview",
"billingAccountId": "2000200",
"billingAccountName": "2000200",
"periodStartDate": "2018-01-01",
"periodEndDate": "2018-06-30",
"$filter": "invoicePeriodStartDate le 2018-06-01"
Expand All @@ -15,8 +15,8 @@
"name": "1383723",
"type": "Microsoft.Billing/invoices",
"properties": {
"dueDate": "2018-01-16",
"invoiceDate": "2018-01-01",
"dueDate": "2018-01-16T17:32:28Z",
"invoiceDate": "2018-01-01T17:32:28Z",
"status": "Due",
"amountDue": {
"currency": "USD",
Expand All @@ -26,8 +26,8 @@
"currency": "USD",
"value": 2000.00
},
"invoicePeriodStartDate": "2018-01-01",
"invoicePeriodEndDate": "2018-01-15",
"invoicePeriodStartDate": "2018-01-01T17:32:28Z",
"invoicePeriodEndDate": "2018-01-15T17:32:28Z",
"billingProfile": "345986",
"billingProfileName": "Contoso Operations Billing",
"purchaseOrderNumber": "123456",
Expand All @@ -39,7 +39,7 @@
],
"payments": [
{
"date": "2018-01-14",
"date": "2018-01-14T17:32:28Z",
"paymentType": "credited",
"amount": {
"currency": "USD",
Expand All @@ -54,8 +54,8 @@
"name": "1383724",
"type": "Microsoft.Billing/invoices",
"properties": {
"dueDate": "2018-03-01",
"invoiceDate": "2018-02-01",
"dueDate": "2018-03-01T17:32:28Z",
"invoiceDate": "2018-02-01T17:32:28Z",
"status": "PastDue",
"amountDue": {
"currency": "USD",
Expand All @@ -65,8 +65,8 @@
"currency": "USD",
"value": 2000.00
},
"invoicePeriodStartDate": "2018-02-01",
"invoicePeriodEndDate": "2018-02-30",
"invoicePeriodStartDate": "2018-02-01T17:32:28Z",
"invoicePeriodEndDate": "2018-02-30T17:32:28Z",
"billingProfile": "345987",
"billingProfileName": "Contoso Operations Billing",
"purchaseOrderNumber": "123456",
Expand All @@ -78,7 +78,7 @@
],
"payments": [
{
"date": "2018-01-14",
"date": "2018-01-14T17:32:28Z",
"paymentType": "credited",
"amount": {
"currency": "USD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"api-version": "2018-08-01-preview",
"billingAccountName": "2000100",
"billingRoleAssignmentId": "{billingRoleAssignmentId}"
"billingRoleAssignmentName": "{billingRoleAssignmentId}"
},
"responses": {
"200": {
Expand All @@ -15,7 +15,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"api-version": "2018-08-01-preview",
"billingAccountName": "2000100",
"roleAssignmentId":"10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9"
"billingRoleAssignmentName":"10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9"
},
"responses": {
"200": {
Expand All @@ -16,7 +16,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"createdByPrincipalId": "",
"name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"principalId": "6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand All @@ -30,7 +29,6 @@
"createdByPrincipalId": "46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1",
"name": "10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47",
"principalId": "b1839933-b3ac-42ca-8112-d29c43f3ab47",
"roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671/providers/Microsoft.Billing/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000",
"scope": "/providers/Microsoft.Billing/billingAccounts/ee4241f3-de74-5631-3e6b-5df2c3d66671"
},
"type": "Microsoft.Billing/billingRoleAssignments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"api-version": "2018-08-01-preview",
"billingAccountName": "2000100",
"billingRoleDefinitionId": "{billingRoleDefinitionId}"
"billingRoleDefinitionName": "{billingRoleDefinitionId}"
},
"responses": {
"200": {
Expand Down
Loading

0 comments on commit 6a66711

Please sign in to comment.