Skip to content

Commit 20f08db

Browse files
authored
Merge pull request awslabs#26 from Sylistron/patch-4
Adds function to confirm a marketplace subscription
2 parents 598c93d + 67533d2 commit 20f08db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dev-portal/src/services/api-catalog.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ export function addSubscription(usagePlanId) {
7070
})
7171
}
7272

73+
export function confirmMarketplaceSubscription(usagePlanId, token) {
74+
if (!usagePlanId) {
75+
return
76+
}
77+
78+
return getApiGatewayClient().then(apiGatewayClient => {
79+
return apiGatewayClient.put('/marketplace-subscriptions/' + usagePlanId, {}, {"token" : token})
80+
})
81+
}
82+
7383
export function unsubscribe(usagePlanId) {
7484
return getApiGatewayClient().then(apiGatewayClient => {
7585
return apiGatewayClient.delete(`/subscriptions/${usagePlanId}`, {}, {}).then(function(result) {

0 commit comments

Comments
 (0)