File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " hawk.api" ,
3- "version" : " 1.1.4 " ,
3+ "version" : " 1.1.5 " ,
44 "main" : " index.ts" ,
55 "license" : " UNLICENSED" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ export default class WorkspaceModel extends AbstractModel<WorkspaceDBScheme> imp
7171 */
7272 public subscriptionId ! : string | undefined ;
7373
74+ /**
75+ * True if workspace is used for debugging
76+ */
77+ public isDebug ?: boolean ;
78+
7479 /**
7580 * Model's collection
7681 */
@@ -411,6 +416,10 @@ export default class WorkspaceModel extends AbstractModel<WorkspaceDBScheme> imp
411416 public getTariffPlanDueDate ( ) : Date {
412417 const lastChargeDate = new Date ( this . lastChargeDate ) ;
413418
419+ if ( this . isDebug ) {
420+ return new Date ( lastChargeDate . setDate ( lastChargeDate . getDate ( ) + 1 ) ) ;
421+ }
422+
414423 return new Date ( lastChargeDate . setMonth ( lastChargeDate . getMonth ( ) + 1 ) ) ;
415424 }
416425
Original file line number Diff line number Diff line change @@ -163,9 +163,11 @@ export default {
163163 const dueDate = workspace . getTariffPlanDueDate ( ) ;
164164
165165 if ( args . input . isRecurrent ) {
166+ const interval = workspace . isDebug ? 'Day' : 'Month' ;
167+
166168 jsonData . cloudPayments = {
167169 recurrent : {
168- interval : 'Month' ,
170+ interval,
169171 period : 1 ,
170172 } ,
171173 } ;
Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ export default gql`
116116 """
117117 subscriptionId: String
118118
119+ """ True if workspace is used for debugging """
120+ isDebug: Boolean
121+
119122 """
120123 Workspace projects array
121124 """
You can’t perform that action at this time.
0 commit comments