-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding return/calculateRefund to Microsoft.Capacity 2022-03-01 (#20421)
* Adding calculateRefund api * Return path * fix
- Loading branch information
Showing
4 changed files
with
409 additions
and
1 deletion.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
...tions/resource-manager/Microsoft.Capacity/stable/2022-03-01/examples/CalculateRefund.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2022-03-01", | ||
"body": { | ||
"id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004", | ||
"properties": { | ||
"scope": "Reservation", | ||
"reservationToReturn": { | ||
"reservationId": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", | ||
"quantity": 1 | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", | ||
"properties": { | ||
"sessionId": "10000000-aaaa-bbbb-cccc-200000000000", | ||
"quantity": 1, | ||
"billingRefundAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 20.72 | ||
}, | ||
"pricingRefundAmount": { | ||
"currencyCode": "USD", | ||
"amount": 24.92 | ||
}, | ||
"policyResult": { | ||
"properties": { | ||
"consumedRefundsTotal": { | ||
"currencyCode": "USD", | ||
"amount": 83.69 | ||
}, | ||
"maxRefundLimit": { | ||
"currencyCode": "USD", | ||
"amount": 50000.0 | ||
}, | ||
"policyErrors": [ | ||
{ | ||
"code": "SelfServiceRefundNotSupported", | ||
"message": "Self Service refunds are currently not supported for this resource, please contact support." | ||
} | ||
] | ||
} | ||
}, | ||
"billingInformation": { | ||
"billingPlan": "Upfront", | ||
"completedTransactions": 1, | ||
"totalTransactions": 1, | ||
"billingCurrencyTotalPaidAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 24.0 | ||
}, | ||
"billingCurrencyProratedAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 3.28 | ||
}, | ||
"billingCurrencyRemainingCommitmentAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 0.0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
...n/reservations/resource-manager/Microsoft.Capacity/stable/2022-03-01/examples/Return.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2022-03-01", | ||
"body": { | ||
"properties": { | ||
"sessionId": "10000000-aaaa-bbbb-cccc-200000000000", | ||
"scope": "Reservation", | ||
"reservationToReturn": { | ||
"reservationId": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", | ||
"quantity": 1 | ||
}, | ||
"returnReason": "PurchasedWrongProduct" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"body": { | ||
"id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", | ||
"properties": { | ||
"sessionId": "10000000-aaaa-bbbb-cccc-200000000000", | ||
"quantity": 1, | ||
"billingRefundAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 20.52 | ||
}, | ||
"pricingRefundAmount": { | ||
"currencyCode": "USD", | ||
"amount": 24.68 | ||
}, | ||
"policyResult": { | ||
"properties": { | ||
"consumedRefundsTotal": { | ||
"currencyCode": "USD", | ||
"amount": 83.69 | ||
}, | ||
"maxRefundLimit": { | ||
"currencyCode": "USD", | ||
"amount": 50000.0 | ||
}, | ||
"policyErrors": [] | ||
} | ||
}, | ||
"billingInformation": { | ||
"billingPlan": "Upfront", | ||
"completedTransactions": 1, | ||
"totalTransactions": 1, | ||
"billingCurrencyTotalPaidAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 24.0 | ||
}, | ||
"billingCurrencyProratedAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 3.48 | ||
}, | ||
"billingCurrencyRemainingCommitmentAmount": { | ||
"currencyCode": "GBP", | ||
"amount": 0.0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.