Skip to content

Commit

Permalink
GA payment method APIs (Azure#15886)
Browse files Browse the repository at this point in the history
* GA payment method APIs

* changed version

* added Delete PaymentMethodLink API

* fix status enum case

* added new version to readme files

* fix readme.azureresourceschema.md

* merge ValidateDetachPaymentMethod API into detach API

* fix LintDiff check

* fix LintDiff checks

* x-ms-error-response with 409

* detach eligibility error mirror arm error schema

* suppress systemData LintDiff check
  • Loading branch information
deep9c authored and LeiWang3 committed Mar 31, 2022
1 parent 0efc33a commit c9f7c5a
Show file tree
Hide file tree
Showing 12 changed files with 1,225 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
"paymentMethodName": "21dd9edc-af71-4d62-80ce-37151d475326"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/paymentMethods/21dd9edc-af71-4d62-80ce-37151d475326",
"name": "21dd9edc-af71-4d62-80ce-37151d475326",
"type": "Microsoft.Billing/billingAccounts/paymentMethods",
"properties": {
"family": "CheckWire",
"type": "check",
"displayName": "Check/wire transfer"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/paymentMethods/21dd9edc-af71-4d62-80ce-37151d475326",
"name": "21dd9edc-af71-4d62-80ce-37151d475326",
"type": "Microsoft.Billing/billingAccounts/paymentMethods",
"properties": {
"family": "CheckWire",
"type": "check",
"displayName": "Check/wire transfer"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
"billingProfileName": "ABC1-A1CD-AB1-BP1",
"paymentMethodName": "ABCDABCDABC0"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/billingProfiles/ABC1-A1CD-AB1-BP1/paymentMethodLinks/ABCDABCDABC0",
"name": "ABCDABCDABC0",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/paymentMethodLinks",
"properties": {
"paymentMethod": {
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
"accountHolderName": "abc",
"expiration": "1/2035",
"lastFourDigits": "1270",
"family": "CreditCard",
"type": "mc",
"displayName": "Master Card",
"logos": [
{
"mimeType": "image/png",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
},
{
"mimeType": "image/svg+xml",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
}
],
"status": "active"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
"billingProfileName": "ABC1-A1CD-AB1-BP1"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/billingProfiles/ABC1-A1CD-AB1-BP1/paymentMethodLinks/ABCDABCDABC0",
"name": "ABCDABCDABC0",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/paymentMethodLinks",
"properties": {
"paymentMethod": {
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
"accountHolderName": "abc",
"expiration": "1/2035",
"lastFourDigits": "1270",
"family": "CreditCard",
"type": "mc",
"displayName": "Master Card",
"logos": [
{
"mimeType": "image/png",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
},
{
"mimeType": "image/svg+xml",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
}
],
"status": "active"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
"billingProfileName": "ABC1-A1CD-AB1-BP1",
"paymentMethodName": "ABCDABCDABC0"
},
"responses": {
"202": {
"headers": {
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2021-10-01",
"Retry-After": "60"
}
},
"200": {},
"204": {},
"409": {
"body": {
"error": {
"code": "PaymentMethodNotEligibleForDetach",
"message": "Payment method cannot be detached from billing group.",
"details": [
{
"code": "AzureSubscriptions",
"message": "Payment method cannot be detached as there are active or disabled azure subscriptions on this billing profile."
},
{
"code": "RecurringCharges",
"message": "Payment method cannot be detached as there are recurring charges on this billing profile."
},
{
"code": "ReservedInstances",
"message": "Payment method cannot be detached as there are reserved instances on this billing profile."
},
{
"code": "OutstandingCharges",
"message": "Payment method cannot be detached as there are unpaid outstanding charges on this billing profile."
},
{
"code": "PendingCharges",
"message": "Payment method cannot be detached as there are pending charges accumulating on this billing profile."
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2021-10-01",
"paymentMethodName": "ABCDABCDABC0"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2021-10-01",
"paymentMethodName": "ABCDABCDABC0"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
"name": "ABCDABCDABC0",
"type": "Microsoft.Billing/paymentMethods",
"properties": {
"accountHolderName": "abc",
"expiration": "1/2035",
"lastFourDigits": "1270",
"family": "CreditCard",
"type": "mc",
"displayName": "Master Card",
"logos": [
{
"mimeType": "image/png",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
},
{
"mimeType": "image/svg+xml",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
}
],
"status": "active"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"parameters": {
"api-version": "2021-10-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
"name": "ABCDABCDABC0",
"type": "Microsoft.Billing/paymentMethods",
"properties": {
"accountHolderName": "abc",
"expiration": "1/2035",
"lastFourDigits": "1270",
"family": "CreditCard",
"type": "mc",
"displayName": "Master Card",
"logos": [
{
"mimeType": "image/png",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_mc_rect.png"
},
{
"mimeType": "image/svg+xml",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_mc.svg"
}
],
"status": "active"
}
},
{
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC1",
"name": "ABCDABCDABC1",
"type": "Microsoft.Billing/paymentMethods",
"properties": {
"accountHolderName": "abc",
"expiration": "1/2025",
"lastFourDigits": "7373",
"family": "CreditCard",
"type": "visa",
"displayName": "Visa",
"logos": [
{
"mimeType": "image/png",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
},
{
"mimeType": "image/svg+xml",
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
}
],
"status": "active"
}
}
]
}
}
}
}
Loading

0 comments on commit c9f7c5a

Please sign in to comment.