taxtank-core 0.30.8 → 0.30.10

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.
@@ -4,3 +4,4 @@ export * from './service-price';
4
4
  export * from './service-product';
5
5
  export * from './service-subscription';
6
6
  export * from './service-subscription-item';
7
+ export * from './stripe-promo-code';
@@ -7,4 +7,5 @@ export declare class ServicePaymentMethod extends ServicePaymentMethodBase {
7
7
  */
8
8
  get expirationDate(): string;
9
9
  get description(): string;
10
+ isCard(): boolean;
10
11
  }
@@ -2,10 +2,16 @@ import { ServiceSubscription as ServiceSubscriptionBase } from '../../db/Models/
2
2
  import { ServiceSubscriptionItem } from './service-subscription-item';
3
3
  import { ServiceProduct } from './service-product';
4
4
  import { SubscriptionItemCollection } from '../../collections';
5
+ import { StripePromoCode } from './stripe-promo-code';
5
6
  export declare class ServiceSubscription extends ServiceSubscriptionBase {
6
7
  startDate: Date;
7
8
  endDate: Date;
8
9
  items: ServiceSubscriptionItem[];
10
+ /**
11
+ * @TODO Alex: waiting for backend will keep coupons
12
+ */
13
+ stripePromoCode: StripePromoCode;
14
+ get promoCodeId(): string;
9
15
  get frequency(): 'month' | 'year';
10
16
  get isTrial(): boolean;
11
17
  get isPaid(): boolean;
@@ -0,0 +1,8 @@
1
+ export declare class StripePromoCode {
2
+ id: string;
3
+ amountOff: number;
4
+ percentOff: number;
5
+ code: string;
6
+ get description(): string;
7
+ isAmount(): boolean;
8
+ }
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import { ServiceSubscription } from '../../../../models/service-subscription/service-subscription';
4
3
  import { EventDispatcherService, SseService } from '../../../event';
4
+ import { ServiceSubscription } from '../../../../models';
5
5
  import { ToastService } from '../../../toast';
6
6
  import { RestMethod, RestService } from '../../rest';
7
7
  import { ServiceSubscription as ServiceSubscriptionBase } from '../../../../db/Models';
@@ -47,6 +47,7 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
47
47
  changeSubscription(subscription: ServiceSubscription): Observable<object>;
48
48
  cancel(subscription: ServiceSubscription): Observable<object>;
49
49
  renew(subscription: ServiceSubscription): Observable<object>;
50
+ getCoupon(code: string): Observable<any>;
50
51
  private listenSubscriptions;
51
52
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
52
53
  static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.30.8",
3
+ "version": "0.30.10",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/compiler": "^15.1.5",