Skip to content

Commit 008ee6f

Browse files
authored
Merge pull request #1675 from CodeNow/SAN-4781-payments-integration-v2
SAN-4781 Payments Integration - Cleanup Stubs
2 parents ce48d37 + 7e6b616 commit 008ee6f

2 files changed

Lines changed: 3 additions & 26 deletions

File tree

client/config/routes.js

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,12 @@ module.exports = [
125125
},
126126
activeOrg: function (
127127
$stateParams,
128-
whitelists,
129-
moment
128+
whitelists
130129
) {
131130
var lowerAccountName = $stateParams.userName.toLowerCase();
132-
var activeOrg = whitelists.find(function (whitelist) {
131+
return whitelists.find(function (whitelist) {
133132
return whitelist.attrs.lowerName === lowerAccountName;
134133
});
135-
// All of this should be moved to inside @runnable/api-client
136-
activeOrg.attrs.trialEnd = moment().add(2, 'days').toISOString();
137-
activeOrg.attrs.activePeriodEnd = moment().subtract(1, 'days').toISOString();
138-
activeOrg.attrs.gracePeriodEnd = moment().add(5, 'days').toISOString();
139-
activeOrg.attrs.stripeCustomerId = 1234;
140-
activeOrg.attrs.hasPaymentMethod = false;
141-
activeOrg.isInTrial = function () {
142-
return moment(activeOrg.attrs.trialEnd) > moment().utc();
143-
};
144-
activeOrg.isInGrace = function () {
145-
return !activeOrg.isInTrial() && moment(activeOrg.attrs.gracePeriodEnd) > moment().utc();
146-
};
147-
activeOrg.isInActivePeriod = function () {
148-
return moment(activeOrg.attrs.activePeriodEnd) > moment().utc();
149-
};
150-
activeOrg.isGraceExpired = function () {
151-
return !activeOrg.isInTrial() && moment.utc(activeOrg.attrs.gracePeriodEnd) < moment().utc();
152-
};
153-
activeOrg.trialDaysRemaining = function () {
154-
return moment(activeOrg.attrs.trialEnd).diff(moment.utc(), 'days');
155-
};
156-
return activeOrg;
157134
},
158135
activeAccount: function (
159136
$q,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
],
5151
"dependencies": {
5252
"101": "0.14.1",
53-
"@runnable/api-client": "^9.0.0",
53+
"@runnable/api-client": "v9.1.0",
5454
"angular": "1.3.15",
5555
"angular-animate": "1.3.15",
5656
"angular-clipboard": "^1.1.1",

0 commit comments

Comments
 (0)