This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): added paths for Agora ordering
- Loading branch information
1 parent
aaadfc4
commit 84f75fc
Showing
21 changed files
with
814 additions
and
41 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,10 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesAccount", function ($injector) { | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiMsServicesAccountV6"); | ||
} | ||
}; | ||
}); |
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,23 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesAccountV6", function ($resource, $cacheFactory) { | ||
|
||
var cache = $cacheFactory("OvhApiMsServicesAccountV6"); | ||
|
||
var resource = $resource("/msServices/:serviceName/account/:userPrincipalName", { | ||
serviceName: "@serviceName", | ||
userPrincipalName: "@userPrincipalName" | ||
}, { | ||
getExchange: { method: "GET", cache: cache, isArray: false, url: "/msServices/:serviceName/account/:userPrincipalName/exchange" } | ||
}); | ||
|
||
resource.resetAllCache = function () { | ||
resource.resetCache(); | ||
}; | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
return resource; | ||
}); |
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,10 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesExchange", function ($injector) { | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiMsServicesExchangeV6"); | ||
} | ||
}; | ||
}); |
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,40 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesExchangeV6", function ($resource, $cacheFactory) { | ||
|
||
var cache = $cacheFactory("OvhApiMsServicesExchangeV6"); | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
cache.removeAll(); | ||
|
||
return response.data; | ||
} | ||
}; | ||
|
||
var resource = $resource("/msServices/:serviceName/exchange", { | ||
serviceName: "@serviceName" | ||
}, { | ||
get: { method: "GET", cache: cache, isArray: false }, | ||
edit: { method: "PUT", cache: cache, isArray: false, interceptor: interceptor }, | ||
doesServiceUseAgora: { | ||
url: "/msServices/:serviceName/exchange/billingMigrated ", | ||
method: "GET", | ||
cache: cache, | ||
isArray: false, | ||
transformResponse: function (response, headers, status) { | ||
return status === 200 ? { serviceUsesAgora: ("" + response).toUpperCase() === "TRUE" } : response; | ||
} | ||
} | ||
}); | ||
|
||
resource.resetAllCache = function () { | ||
resource.resetCache(); | ||
}; | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
return resource; | ||
}); |
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,16 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServices", function ($injector) { | ||
|
||
return { | ||
Account: function () { | ||
return $injector.get("OvhApiMsServicesAccount"); | ||
}, | ||
Exchange: function () { | ||
return $injector.get("OvhApiMsServicesExchange"); | ||
}, | ||
Sharepoint: function () { | ||
return $injector.get("OvhApiMsServicesSharepoint"); | ||
} | ||
}; | ||
}); |
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,39 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesV6", function ($resource, $cacheFactory) { | ||
"use strict"; | ||
|
||
var cache = $cacheFactory("OvhApiMsServicesV6"); | ||
var queryCache = $cacheFactory("OvhApiMsServicesV6Query"); | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
cache.remove(response.config.url); | ||
queryCache.removeAll(); | ||
return response.resource; | ||
} | ||
}; | ||
|
||
var resource = $resource("/msServices/:serviceName", { | ||
serviceName: "@serviceName" | ||
}, { | ||
query: { method: "GET", cache: cache, isArray: true, url: "/msServices" }, | ||
get: { method: "GET", cache: cache, isArray: false }, | ||
edit: { method: "PUT", cache: cache, isArray: false, interceptor: interceptor } | ||
}); | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
resource.resetQueryCache = function () { | ||
queryCache.removeAll(); | ||
}; | ||
|
||
resource.resetAllCache = function () { | ||
this.resetCache(); | ||
this.resetQueryCache(); | ||
}; | ||
|
||
return resource; | ||
}); |
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,10 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesSharepoint", function ($injector) { | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiMsServicesSharepointV6"); | ||
} | ||
}; | ||
}); |
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,31 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiMsServicesSharepointV6", function ($resource, $cacheFactory) { | ||
|
||
var cache = $cacheFactory("OvhApiMsServicesSharepointV6"); | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
cache.removeAll(); | ||
return response.data; | ||
} | ||
}; | ||
|
||
var resource = $resource("/msServices/:serviceName/sharepoint", { | ||
serviceName: "@serviceName" | ||
}, { | ||
get: { method: "GET", cache: cache, isArray: false }, | ||
edit: { method: "PUT", cache: cache, isArray: false, interceptor: interceptor }, | ||
doesServiceUseAgora: { url: "/msServices/:serviceName/sharepoint/billingMigrated ", method: "GET", cache: cache, isArray: false } | ||
}); | ||
|
||
resource.resetAllCache = function () { | ||
resource.resetCache(); | ||
}; | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
return resource; | ||
}); |
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
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,11 @@ | ||
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOption", function ($injector) { | ||
"use strict"; | ||
return { | ||
Microsoft: function () { | ||
return $injector.get("OvhApiOrderCartServiceOptionMicrosoft"); | ||
}, | ||
MicrosoftExchange: function () { | ||
return $injector.get("OvhApiOrderCartServiceOptionMicrosoftExchange"); | ||
} | ||
}; | ||
}); |
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,8 @@ | ||
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionMicrosoft", function ($injector) { | ||
"use strict"; | ||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiOrderCartServiceOptionMicrosoftV6"); | ||
} | ||
}; | ||
}); |
50 changes: 50 additions & 0 deletions
50
src/order/cartServiceOption/microsoft/microsoft.v6.service.js
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,50 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiOrderCartServiceOptionMicrosoftV6", function ($resource, $cacheFactory) { | ||
"use strict"; | ||
|
||
var queryCache = $cacheFactory("OvhApiOrderCartServiceOptionMicrosoftV6Query"); | ||
var cache = $cacheFactory("OvhApiOrderCartServiceOptionMicrosoftV6"); | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
cache.remove(response.config.url); | ||
queryCache.removeAll(); | ||
return response.data; | ||
} | ||
}; | ||
|
||
var resource = $resource("/order/cartServiceOption/microsoft/:serviceName", { | ||
serviceName: "@serviceName" | ||
}, { | ||
get: { method: "GET", isArray: true, cache: cache }, | ||
getAvailableServices: { method: "GET", isArray: true, cache: cache, url: "/order/cartServiceOption/microsoft" }, | ||
post: { | ||
method: "POST", | ||
cache: queryCache, | ||
interceptor: interceptor, | ||
params: { | ||
cartId: "@cartId", | ||
duration: "@duration", | ||
planCode: "@planCode", | ||
pricingMode: "@pricingMode", | ||
quantity: "@quantity" | ||
} | ||
} | ||
}); | ||
|
||
resource.resetAllCache = function () { | ||
resource.resetCache(); | ||
resource.resetQueryCache(); | ||
}; | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
resource.resetQueryCache = function () { | ||
queryCache.removeAll(); | ||
}; | ||
|
||
return resource; | ||
}); |
8 changes: 8 additions & 0 deletions
8
src/order/cartServiceOption/microsoftExchange/microsoftExchange.service.js
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,8 @@ | ||
angular.module("ovh-api-services").service("OvhApiOrderCartServiceOptionMicrosoftExchange", function ($injector) { | ||
"use strict"; | ||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiOrderCartServiceOptionMicrosoftExchangeV6"); | ||
} | ||
}; | ||
}); |
50 changes: 50 additions & 0 deletions
50
src/order/cartServiceOption/microsoftExchange/microsoftExchange.v6.service.js
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,50 @@ | ||
angular | ||
.module("ovh-api-services") | ||
.service("OvhApiOrderCartServiceOptionMicrosoftExchangeV6", function ($resource, $cacheFactory) { | ||
"use strict"; | ||
|
||
var queryCache = $cacheFactory("OvhApiOrderCartServiceOptionMicrosoftExchangeV6Query"); | ||
var cache = $cacheFactory("OvhApiOrderCartServiceOptionMicrosoftExchangeV6"); | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
cache.remove(response.config.url); | ||
queryCache.removeAll(); | ||
return response.data; | ||
} | ||
}; | ||
|
||
var resource = $resource("/order/cartServiceOption/microsoftExchange/:serviceName", { | ||
serviceName: "@serviceName" | ||
}, { | ||
getAvailableOffers: { method: "GET", isArray: true, cache: cache }, | ||
getServices: { method: "GET", isArray: true, cache: cache, url: "/order/cartServiceOption/microsoftExchange" }, | ||
orderOptions: { | ||
method: "POST", | ||
cache: queryCache, | ||
interceptor: interceptor, | ||
params: { | ||
cartId: "@cartId", | ||
duration: "@duration", | ||
planCode: "@planCode", | ||
pricingMode: "@pricingMode", | ||
quantity: "@quantity" | ||
} | ||
} | ||
}); | ||
|
||
resource.resetAllCache = function () { | ||
resource.resetCache(); | ||
resource.resetQueryCache(); | ||
}; | ||
|
||
resource.resetCache = function () { | ||
cache.removeAll(); | ||
}; | ||
|
||
resource.resetQueryCache = function () { | ||
queryCache.removeAll(); | ||
}; | ||
|
||
return resource; | ||
}); |
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
Oops, something went wrong.