taxtank-core 0.29.23 → 0.29.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,9 @@
1
1
  import { Collection } from '../collection';
2
2
  import { ServiceProduct, ServiceSubscriptionItem } from '../../models';
3
+ import { ServicePriceCollection } from './service-price.collection';
3
4
  export declare class SubscriptionItemCollection extends Collection<ServiceSubscriptionItem> {
4
5
  get propertiesItem(): ServiceSubscriptionItem;
5
6
  get propertyQuantity(): number;
6
7
  hasProduct(product: ServiceProduct): boolean;
8
+ getPrices(): ServicePriceCollection;
7
9
  }
@@ -12,4 +12,5 @@ export declare class ServiceSubscription extends ObservableModel {
12
12
  user?: User;
13
13
  items?: ServiceSubscriptionItem[];
14
14
  payments?: ServicePayment[];
15
+ isCancelAtPeriodEnd?: boolean;
15
16
  }
@@ -4,4 +4,5 @@ import { ServiceSubscriptionItem } from './service-subscription-item';
4
4
  export declare class ServicePrice extends BaseServicePrice {
5
5
  product: ServiceProduct;
6
6
  toSubscriptionItem(): ServiceSubscriptionItem;
7
+ isAnnual(): boolean;
7
8
  }
@@ -7,6 +7,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
7
7
  endDate: Date;
8
8
  items: ServiceSubscriptionItem[];
9
9
  lastTrialDays: number;
10
+ get frequency(): 'month' | 'year';
10
11
  get isTrial(): boolean;
11
12
  get isPaid(): boolean;
12
13
  get price(): number;
@@ -49,6 +50,7 @@ export declare class ServiceSubscription extends ServiceSubscriptionBase {
49
50
  hasItem(itemToCheck: ServiceSubscriptionItem): boolean;
50
51
  hasProduct(product: ServiceProduct): boolean;
51
52
  isPackage(): boolean;
53
+ isAnnual(): boolean;
52
54
  /**
53
55
  * Recommended number of properties to buy,
54
56
  * based on the property service product and the number of properties the user has
@@ -28,10 +28,12 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
28
28
  getTrials(): Observable<ServiceSubscriptionCollection>;
29
29
  getActiveTrials(): Observable<ServiceSubscriptionCollection>;
30
30
  /**
31
+ * @TODO remove
31
32
  * redirect to stripe payment page
32
33
  */
33
34
  checkoutRedirect(subscription: ServiceSubscription): Promise<any>;
34
35
  /**
36
+ * @TODO remove
35
37
  * redirect to stripe billing page
36
38
  */
37
39
  billingRedirect(returnUrl: string): void;
@@ -43,6 +45,7 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
43
45
  * Change subscription plan
44
46
  */
45
47
  changeSubscription(subscription: ServiceSubscription): Observable<object>;
48
+ cancel(subscription: ServiceSubscription): Observable<object>;
46
49
  private listenSubscriptions;
47
50
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
48
51
  static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.29.23",
3
+ "version": "0.29.25",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",