From 8294a8278689cce798718acfc497fe75f191ecad Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 14 Aug 2019 17:11:04 -0700 Subject: [PATCH 01/11] Billing RP spec changes for listInvoiceSectionsWithCreateSubscriptionPermission API --- .../preview/2019-10-01-preview/billing.json | 125 ++++++++++++------ ...ceSectionsListWithCreateSubPermission.json | 30 +++++ 2 files changed, 112 insertions(+), 43 deletions(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListWithCreateSubPermission.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 041933c43746..3ee1ce9628de 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -158,6 +158,42 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission": { + "get": { + "tags": [ + "BillingAccounts" + ], + "x-ms-examples": { + "InvoiceSectionsListWithCreateSubPermission": { + "$ref": "./examples/InvoiceSectionsListWithCreateSubPermission.json" + } + }, + "operationId": "InvoiceSections_ListByCreateSubscriptionPermission", + "description": "Lists all invoice sections with create subscription permission for a user.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/InvoiceSectionListWithCreateSubPermissionResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods": { "get": { "tags": [ @@ -2591,7 +2627,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default": { "get": { "tags": [ "BillingProperties" @@ -2630,48 +2666,6 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/updateAutoRenew": { - "post": { - "tags": [ - "Products" - ], - "operationId": "Products_UpdateAutoRenewByBillingAccount", - "description": "Cancel auto renew for product by product id and billing account name", - "x-ms-examples": { - "ProductsCancelByBillingAccount": { - "$ref": "./examples/ProductCancelByBillingAccount.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/billingAccountNameParameter" - }, - { - "$ref": "#/parameters/productNameParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/updateAutoRenewRequestParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/UpdateAutoRenewOperation" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew": { "post": { "tags": [ @@ -5529,6 +5523,51 @@ } } }, + "InvoiceSectionListWithCreateSubPermissionResult": { + "type": "object", + "description": "Result of listing invoice section properties with create subscription permission.", + "properties": { + "suggestedAddresses": { + "description": "The list of invoice section properties with create subscription permission.", + "type": "array", + "items": { + "$ref": "#/definitions/InvoiceSectionWithCreateSubPermission" + } + } + } + }, + "InvoiceSectionWithCreateSubPermission": { + "description": "Invoice section properties with create subscription permission.", + "properties": { + "invoiceSectionId": { + "description": "Invoice Section Id.", + "type": "string", + "readOnly": true + }, + "invoiceSectionDisplayName": { + "description": "Invoice Section display name.", + "type": "string", + "readOnly": true + }, + "billingProfileId": { + "description": "Billing profile Id.", + "type": "string", + "readOnly": true + }, + "billingProfileDisplayName": { + "description": "Billing profile display name.", + "type": "string", + "readOnly": true + }, + "enabledAzurePlans": { + "description": "Enabled azure plans for the associated billing profile.", + "type": "array", + "items": { + "$ref": "#/definitions/AzurePlan" + } + } + } + }, "AzurePlan": { "description": "Details about the azure plan.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListWithCreateSubPermission.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListWithCreateSubPermission.json new file mode 100644 index 000000000000..dfc97353d0d6 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoiceSectionsListWithCreateSubPermission.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000", + "invoiceSectionDisplayName": "invoiceSection1", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000", + "billingProfileDisplayName": "Contoso operations billing", + "enabledAzurePlans": [ + { + "skuId": "0001", + "skuDescription": "Microsoft Azure Plan" + }, + { + "skuId": "0002", + "skuDescription": "Microsoft Azure Plan for DevTest" + } + ] + } + ] + } + } + } +} From ea78887f9011f7a5af4496ef2e11e038b18a575d Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 14 Aug 2019 17:15:12 -0700 Subject: [PATCH 02/11] Updated the operation id --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 3ee1ce9628de..cf3e5b3dea36 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -168,7 +168,7 @@ "$ref": "./examples/InvoiceSectionsListWithCreateSubPermission.json" } }, - "operationId": "InvoiceSections_ListByCreateSubscriptionPermission", + "operationId": "BillingAccounts_ListInvoiceSectionsByCreateSubscriptionPermission", "description": "Lists all invoice sections with create subscription permission for a user.", "parameters": [ { From 8cc7de337c1af345f905a62a8b77b483a4e16307 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 14 Aug 2019 17:22:41 -0700 Subject: [PATCH 03/11] Added x-ms-pageable --- .../preview/2019-10-01-preview/billing.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index cf3e5b3dea36..a1383a4a3a84 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -191,6 +191,9 @@ "$ref": "#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -5527,7 +5530,7 @@ "type": "object", "description": "Result of listing invoice section properties with create subscription permission.", "properties": { - "suggestedAddresses": { + "value": { "description": "The list of invoice section properties with create subscription permission.", "type": "array", "items": { From 448fd07ff1c2b36023eab920f082403338aaccf4 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 14 Aug 2019 17:37:21 -0700 Subject: [PATCH 04/11] Added next link --- .../preview/2019-10-01-preview/billing.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index a1383a4a3a84..bb1906de2ead 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -5536,6 +5536,11 @@ "items": { "$ref": "#/definitions/InvoiceSectionWithCreateSubPermission" } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true } } }, From b5edf02127dc8816b52bea2d18772081f3b76be1 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 14 Aug 2019 17:55:02 -0700 Subject: [PATCH 05/11] Deleted unused file ProductCancelByBillingAccount --- .../ProductCancelByBillingAccount.json | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductCancelByBillingAccount.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductCancelByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductCancelByBillingAccount.json deleted file mode 100644 index f644c52ce463..000000000000 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/ProductCancelByBillingAccount.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "api-version": "2019-10-01-preview", - "billingAccountName": "{billingAccountName}", - "productName": "{productName}", - "body": { - "autoRenew": "false" - } - }, - "responses": { - "200": { - "body": { - "properties": { - "endDate": "2018-05-01T17:32:28Z" - } - } - } - } -} From fa4f267c091fe3a2f48f62e891d3860d1da71543 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 6 Sep 2019 20:54:15 -0700 Subject: [PATCH 06/11] Incorporated review comments Incorporated review comments --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index bb1906de2ead..fb69cd2d8e32 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -159,7 +159,7 @@ } }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission": { - "get": { + "post": { "tags": [ "BillingAccounts" ], From c173f145f18501ed1d4d71c505b5562e34915f5d Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Thu, 26 Sep 2019 20:07:56 -0700 Subject: [PATCH 07/11] Added new properties in Invoicing APIs Added new properties in Invoicing APIs --- .../preview/2019-10-01-preview/billing.json | 10 ++++++++++ .../examples/BillingAccountInvoicesList.json | 8 ++++++-- .../preview/2019-10-01-preview/examples/Invoice.json | 4 +++- .../examples/InvoicesListByBillingProfile.json | 8 ++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 90a4c329ae2b..e24586493082 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -5939,6 +5939,16 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "paymentMethodFamily": { + "description": "The payment method family.", + "type": "string", + "readOnly": true + }, + "paymentMethodType": { + "description": "The type of payment method.", + "type": "string", + "readOnly": true } } }, diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingAccountInvoicesList.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingAccountInvoicesList.json index f12d4ea01d35..a95b433064d3 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingAccountInvoicesList.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/BillingAccountInvoicesList.json @@ -44,7 +44,9 @@ "amount": { "currency": "USD", "value": 2000.00 - } + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" } ] } @@ -83,7 +85,9 @@ "amount": { "currency": "USD", "value": 2000.00 - } + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" } ] } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Invoice.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Invoice.json index 24f9fc2a1ba3..094ddb082c5a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Invoice.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/Invoice.json @@ -49,7 +49,9 @@ "amount": { "currency": "USD", "value": 2000.00 - } + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" } ] } diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoicesListByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoicesListByBillingProfile.json index f956758dfce4..5f62c236eeba 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoicesListByBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/InvoicesListByBillingProfile.json @@ -53,7 +53,9 @@ "amount": { "currency": "USD", "value": 2000.00 - } + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" } ] } @@ -100,7 +102,9 @@ "amount": { "currency": "USD", "value": 2000.00 - } + }, + "paymentMethodFamily": "CreditCard", + "paymentMethodType": "visa" } ] } From 9380490639467f8420674cfa8affd73e534531d6 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Fri, 27 Sep 2019 11:58:02 -0700 Subject: [PATCH 08/11] Incorporated review comments Incorporated review comments --- .../preview/2019-10-01-preview/billing.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index e24586493082..9767d8509ea9 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -5943,7 +5943,16 @@ "paymentMethodFamily": { "description": "The payment method family.", "type": "string", - "readOnly": true + "enum": [ + "Credits", + "CheckWire", + "CreditCard", + "None" + ], + "x-ms-enum": { + "name": "PaymentMethodFamily", + "modelAsString": true + } }, "paymentMethodType": { "description": "The type of payment method.", From cf244f279406ab555ddefabe8b9fec23223c88c0 Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 2 Oct 2019 20:54:08 -0700 Subject: [PATCH 09/11] Added invoiceEmailOptIn in the UpdateBillingProfile request Added invoiceEmailOptIn in the UpdateBillingProfile request --- .../2019-10-01-preview/examples/UpdateBillingProfile.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/UpdateBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/UpdateBillingProfile.json index e961486ce376..0ef3293b816f 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/UpdateBillingProfile.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/examples/UpdateBillingProfile.json @@ -6,6 +6,7 @@ "parameters": { "properties": { "displayName": "BillingProfile11", + "invoiceEmailOptIn": true, "poNumber": "ABC12345" } } From 00e9a8be83734f63f8dab70498c287bf2897dcfd Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 2 Oct 2019 21:02:59 -0700 Subject: [PATCH 10/11] Update billing.json --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 9767d8509ea9..69f44eb936eb 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -5530,8 +5530,7 @@ }, "invoiceEmailOptIn": { "description": "If the billing profile is opted in to receive invoices via email.", - "type": "boolean", - "readOnly": true + "type": "boolean" }, "invoiceDay": { "description": "Invoice day.", From 9ff123a05a77ee05cfec173ebbcb57417685ab6a Mon Sep 17 00:00:00 2001 From: asarkar84 <33848291+asarkar84@users.noreply.github.com> Date: Wed, 16 Oct 2019 11:58:19 -0700 Subject: [PATCH 11/11] Updating the verbs from Create BillingProfile and InvoiceSection entities Updating the verbs from Create BillingProfile and InvoiceSection entities --- .../Microsoft.Billing/preview/2019-10-01-preview/billing.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json index 69f44eb936eb..50946f431cad 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json @@ -461,7 +461,7 @@ } } }, - "put": { + "post": { "tags": [ "BillingProfiles" ], @@ -718,7 +718,7 @@ } } }, - "put": { + "post": { "tags": [ "InvoiceSections" ],