Skip to content

Commit

Permalink
Adding return/calculateRefund to Microsoft.Capacity 2022-03-01 (#20421)
Browse files Browse the repository at this point in the history
* Adding calculateRefund api

* Return path

* fix
  • Loading branch information
gaoyp830 authored Sep 7, 2022
1 parent f24de33 commit bc2806d
Show file tree
Hide file tree
Showing 4 changed files with 409 additions and 1 deletion.
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
}
}
}
}
}
}
}
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
}
}
}
}
}
}
}
Loading

0 comments on commit bc2806d

Please sign in to comment.