Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(vps): add route for agora upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisay committed Feb 7, 2019
1 parent ee4a27b commit 822263e
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 8 deletions.
83 changes: 83 additions & 0 deletions dist/ovh-api-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -11382,6 +11382,11 @@ angular.module("ovh-api-services").service("OvhApiOrderCartProductV6", ["$resour
return orderCartProduct;
}]);

/**
* @deprecated
* Use order/cartServiceOptions/cartServiceOptions.service.js instead
* as this service is overrided by the same name in this file.
*/
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOption", ["$injector", function ($injector) {

"use strict";
Expand All @@ -11392,6 +11397,11 @@ angular.module("ovh-api-services").service("OvhApiOrderCartServiceOption", ["$in
};
}]);

/**
* @deprecated
* Use order/cartServiceOptions/cartServiceOptions.service.v6.js instead
* as this service is not reachable as there is a duplicate of the OvhApiOrderCartServiceOption service.
*/
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionV6", ["$resource", "$cacheFactory", function ($resource, $cacheFactory) {

"use strict";
Expand Down Expand Up @@ -11429,6 +11439,9 @@ angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionV6", ["$
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOption", ["$injector", function ($injector) {
"use strict";
return {
v6: function () {
return $injector.get("OvhApiOrderCartServiceOptionV6");
},
Microsoft: function () {
return $injector.get("OvhApiOrderCartServiceOptionMicrosoft");
},
Expand All @@ -11438,6 +11451,40 @@ angular.module("ovh-api-services").service("OvhApiOrderCartServiceOption", ["$in
};
}]);

angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionV6", ["$resource", "$cacheFactory", function ($resource, $cacheFactory) {

"use strict";

// Cache to invalidate
var queryCache = $cacheFactory("OvhApiOrderCartServiceOptionV6Query");
var cache = $cacheFactory("OvhApiOrderCartServiceOptionV6");

var interceptor = {
response: function (response) {
orderCartServiceOption.resetQueryCache();
return response.data;
}
};

var orderCartServiceOption = $resource("/order/cartServiceOption/:productName/:serviceName", {
productName: "@productName",
serviceName: "@serviceName"
}, {
get: { method: "GET", cache: cache, isArray: true },
post: { method: "POST", interceptor: interceptor }
});

orderCartServiceOption.resetCache = function () {
cache.removeAll();
};

orderCartServiceOption.resetQueryCache = function () {
queryCache.removeAll();
};

return orderCartServiceOption;
}]);

angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionMicrosoft", ["$injector", function ($injector) {
"use strict";
return {
Expand Down Expand Up @@ -12364,10 +12411,41 @@ angular
return {
MicrosoftExchange: function () {
return $injector.get("OvhApiOrderUpgradeMicrosoftExchange");
},
Vps: function () {
return $injector.get("OvhApiOrderVps");
}
};
}]);

angular
.module("ovh-api-services")
.service("OvhApiOrderVps", ["$injector", function ($injector) {

"use strict";
return {
v6: function () {
return $injector.get("OvhApiOrderVpsV6");
}
};
}]);

angular
.module("ovh-api-services")
.service("OvhApiOrderVpsV6", ["$resource", function ($resource) {
"use strict";

return $resource("/order/upgrade/vps/:serviceName/:planCode", {
serviceName: "@serviceName",
planCode: "@planCode"
}, {
getAvailableOffers: {
method: "GET",
isArray: true
}
});
}]);

angular.module("ovh-api-services").service("OvhApiOrderVrackNew", ["$injector", function ($injector) {

"use strict";
Expand Down Expand Up @@ -22253,6 +22331,11 @@ angular.module("ovh-api-services").service("OvhApiVpsV6", ["$resource", "$cacheF
period: "@period",
type: "@type",
cache: cache
},
availableUpgrade: {
url: "/vps/:serviceName/availableUpgrade",
method: "GET",
isArray: true
}
});

Expand Down
17 changes: 9 additions & 8 deletions dist/ovh-api-services.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/order/upgrade/order-upgrade.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ angular
return {
MicrosoftExchange: function () {
return $injector.get("OvhApiOrderUpgradeMicrosoftExchange");
},
Vps: function () {
return $injector.get("OvhApiOrderVps");
}
};
});
11 changes: 11 additions & 0 deletions src/order/upgrade/vps/order-upgrade-vps.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
angular
.module("ovh-api-services")
.service("OvhApiOrderVps", function ($injector) {

"use strict";
return {
v6: function () {
return $injector.get("OvhApiOrderVpsV6");
}
};
});
15 changes: 15 additions & 0 deletions src/order/upgrade/vps/order-upgrade-vps.v6.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
angular
.module("ovh-api-services")
.service("OvhApiOrderVpsV6", function ($resource) {
"use strict";

return $resource("/order/upgrade/vps/:serviceName/:planCode", {
serviceName: "@serviceName",
planCode: "@planCode"
}, {
getAvailableOffers: {
method: "GET",
isArray: true
}
});
});
5 changes: 5 additions & 0 deletions src/vps/vps.v6.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ angular.module("ovh-api-services").service("OvhApiVpsV6", function ($resource, $
period: "@period",
type: "@type",
cache: cache
},
availableUpgrade: {
url: "/vps/:serviceName/availableUpgrade",
method: "GET",
isArray: true
}
});

Expand Down

0 comments on commit 822263e

Please sign in to comment.