Skip to content

Commit c9f7c5a

Browse files
deep9cLeiwang3SQL
authored andcommitted
GA payment method APIs (Azure#15886)
* 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
1 parent 0efc33a commit c9f7c5a

12 files changed

+1225
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
5+
"paymentMethodName": "21dd9edc-af71-4d62-80ce-37151d475326"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/paymentMethods/21dd9edc-af71-4d62-80ce-37151d475326",
11+
"name": "21dd9edc-af71-4d62-80ce-37151d475326",
12+
"type": "Microsoft.Billing/billingAccounts/paymentMethods",
13+
"properties": {
14+
"family": "CheckWire",
15+
"type": "check",
16+
"displayName": "Check/wire transfer"
17+
}
18+
}
19+
}
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31/paymentMethods/21dd9edc-af71-4d62-80ce-37151d475326",
12+
"name": "21dd9edc-af71-4d62-80ce-37151d475326",
13+
"type": "Microsoft.Billing/billingAccounts/paymentMethods",
14+
"properties": {
15+
"family": "CheckWire",
16+
"type": "check",
17+
"displayName": "Check/wire transfer"
18+
}
19+
}
20+
]
21+
}
22+
}
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
5+
"billingProfileName": "ABC1-A1CD-AB1-BP1",
6+
"paymentMethodName": "ABCDABCDABC0"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"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",
12+
"name": "ABCDABCDABC0",
13+
"type": "Microsoft.Billing/billingAccounts/billingProfiles/paymentMethodLinks",
14+
"properties": {
15+
"paymentMethod": {
16+
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
17+
"accountHolderName": "abc",
18+
"expiration": "1/2035",
19+
"lastFourDigits": "1270",
20+
"family": "CreditCard",
21+
"type": "mc",
22+
"displayName": "Master Card",
23+
"logos": [
24+
{
25+
"mimeType": "image/png",
26+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
27+
},
28+
{
29+
"mimeType": "image/svg+xml",
30+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
31+
}
32+
],
33+
"status": "active"
34+
}
35+
}
36+
}
37+
}
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
5+
"billingProfileName": "ABC1-A1CD-AB1-BP1"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"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",
13+
"name": "ABCDABCDABC0",
14+
"type": "Microsoft.Billing/billingAccounts/billingProfiles/paymentMethodLinks",
15+
"properties": {
16+
"paymentMethod": {
17+
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
18+
"accountHolderName": "abc",
19+
"expiration": "1/2035",
20+
"lastFourDigits": "1270",
21+
"family": "CreditCard",
22+
"type": "mc",
23+
"displayName": "Master Card",
24+
"logos": [
25+
{
26+
"mimeType": "image/png",
27+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
28+
},
29+
{
30+
"mimeType": "image/svg+xml",
31+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
32+
}
33+
],
34+
"status": "active"
35+
}
36+
}
37+
}
38+
]
39+
}
40+
}
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountName": "00000000-0000-0000-0000-000000000032:00000000-0000-0000-0000-000000000099_2019-05-31",
5+
"billingProfileName": "ABC1-A1CD-AB1-BP1",
6+
"paymentMethodName": "ABCDABCDABC0"
7+
},
8+
"responses": {
9+
"202": {
10+
"headers": {
11+
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2021-10-01",
12+
"Retry-After": "60"
13+
}
14+
},
15+
"200": {},
16+
"204": {},
17+
"409": {
18+
"body": {
19+
"error": {
20+
"code": "PaymentMethodNotEligibleForDetach",
21+
"message": "Payment method cannot be detached from billing group.",
22+
"details": [
23+
{
24+
"code": "AzureSubscriptions",
25+
"message": "Payment method cannot be detached as there are active or disabled azure subscriptions on this billing profile."
26+
},
27+
{
28+
"code": "RecurringCharges",
29+
"message": "Payment method cannot be detached as there are recurring charges on this billing profile."
30+
},
31+
{
32+
"code": "ReservedInstances",
33+
"message": "Payment method cannot be detached as there are reserved instances on this billing profile."
34+
},
35+
{
36+
"code": "OutstandingCharges",
37+
"message": "Payment method cannot be detached as there are unpaid outstanding charges on this billing profile."
38+
},
39+
{
40+
"code": "PendingCharges",
41+
"message": "Payment method cannot be detached as there are pending charges accumulating on this billing profile."
42+
}
43+
]
44+
}
45+
}
46+
}
47+
}
48+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"paymentMethodName": "ABCDABCDABC0"
5+
},
6+
"responses": {
7+
"200": {},
8+
"204": {}
9+
}
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"paymentMethodName": "ABCDABCDABC0"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
10+
"name": "ABCDABCDABC0",
11+
"type": "Microsoft.Billing/paymentMethods",
12+
"properties": {
13+
"accountHolderName": "abc",
14+
"expiration": "1/2035",
15+
"lastFourDigits": "1270",
16+
"family": "CreditCard",
17+
"type": "mc",
18+
"displayName": "Master Card",
19+
"logos": [
20+
{
21+
"mimeType": "image/png",
22+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
23+
},
24+
{
25+
"mimeType": "image/svg+xml",
26+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
27+
}
28+
],
29+
"status": "active"
30+
}
31+
}
32+
}
33+
}
34+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0",
11+
"name": "ABCDABCDABC0",
12+
"type": "Microsoft.Billing/paymentMethods",
13+
"properties": {
14+
"accountHolderName": "abc",
15+
"expiration": "1/2035",
16+
"lastFourDigits": "1270",
17+
"family": "CreditCard",
18+
"type": "mc",
19+
"displayName": "Master Card",
20+
"logos": [
21+
{
22+
"mimeType": "image/png",
23+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_mc_rect.png"
24+
},
25+
{
26+
"mimeType": "image/svg+xml",
27+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_mc.svg"
28+
}
29+
],
30+
"status": "active"
31+
}
32+
},
33+
{
34+
"id": "/providers/Microsoft.Billing/paymentMethods/ABCDABCDABC1",
35+
"name": "ABCDABCDABC1",
36+
"type": "Microsoft.Billing/paymentMethods",
37+
"properties": {
38+
"accountHolderName": "abc",
39+
"expiration": "1/2025",
40+
"lastFourDigits": "7373",
41+
"family": "CreditCard",
42+
"type": "visa",
43+
"displayName": "Visa",
44+
"logos": [
45+
{
46+
"mimeType": "image/png",
47+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa_rect.png"
48+
},
49+
{
50+
"mimeType": "image/svg+xml",
51+
"url": "https://contoso.com/staticresourceservice/images/v4/logo_visa.svg"
52+
}
53+
],
54+
"status": "active"
55+
}
56+
}
57+
]
58+
}
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)