taxtank-core 0.30.7 → 0.30.8

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.
Files changed (23) hide show
  1. package/esm2020/lib/db/Enums/subscription/service-payment-method-card-brand.enum.mjs +12 -0
  2. package/esm2020/lib/db/Enums/subscription/service-payment-method-type.enum.mjs +6 -0
  3. package/esm2020/lib/db/Models/subscription/service-payment-method.mjs +4 -0
  4. package/esm2020/lib/models/endpoint/endpoints.const.mjs +6 -1
  5. package/esm2020/lib/models/service-subscription/index.mjs +2 -1
  6. package/esm2020/lib/models/service-subscription/payment-method-brand.enum.mjs +12 -0
  7. package/esm2020/lib/models/service-subscription/service-payment-method.mjs +21 -0
  8. package/esm2020/lib/services/http/subscription/index.mjs +3 -2
  9. package/esm2020/lib/services/http/subscription/service-payment-method/service-payment-method.service.mjs +62 -0
  10. package/fesm2015/taxtank-core.mjs +128 -23
  11. package/fesm2015/taxtank-core.mjs.map +1 -1
  12. package/fesm2020/taxtank-core.mjs +126 -23
  13. package/fesm2020/taxtank-core.mjs.map +1 -1
  14. package/lib/db/Enums/subscription/service-payment-method-card-brand.enum.d.ts +10 -0
  15. package/lib/db/Enums/subscription/service-payment-method-type.enum.d.ts +4 -0
  16. package/lib/db/Models/subscription/service-payment-method.d.ts +16 -0
  17. package/lib/models/endpoint/endpoints.const.d.ts +1 -0
  18. package/lib/models/service-subscription/index.d.ts +1 -0
  19. package/lib/models/service-subscription/payment-method-brand.enum.d.ts +10 -0
  20. package/lib/models/service-subscription/service-payment-method.d.ts +10 -0
  21. package/lib/services/http/subscription/index.d.ts +2 -1
  22. package/lib/services/http/subscription/service-payment-method/service-payment-method.service.d.ts +27 -0
  23. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ export declare enum ServicePaymentMethodCardBrandEnum {
2
+ UNKNOWN = 0,
3
+ AMEX = 1,
4
+ DINERS = 2,
5
+ DISCOVER = 3,
6
+ JCB = 4,
7
+ MASTERCARD = 5,
8
+ UNIONPAY = 6,
9
+ VISA = 7
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ServicePaymentMethodTypeEnum {
2
+ AU_BECS_DEBIT = 1,
3
+ CARD = 2
4
+ }
@@ -0,0 +1,16 @@
1
+ import { ServicePaymentMethodTypeEnum } from '../../Enums/subscription/service-payment-method-type.enum';
2
+ import { ServicePaymentMethodCardBrandEnum } from '../../Enums/subscription/service-payment-method-card-brand.enum';
3
+ import { User } from '../user/user';
4
+ import { AbstractModel } from '../abstract-model';
5
+ export declare class ServicePaymentMethod extends AbstractModel {
6
+ stripeId?: string;
7
+ type?: ServicePaymentMethodTypeEnum;
8
+ lastFourDigits?: string;
9
+ cardBrand?: ServicePaymentMethodCardBrandEnum;
10
+ cardExpirationMonth?: number;
11
+ cardExpirationYear?: number;
12
+ isDefault?: boolean;
13
+ id?: number;
14
+ deletedAt?: Date;
15
+ user?: User;
16
+ }
@@ -1,6 +1,7 @@
1
1
  import { Endpoint } from './endpoint';
2
2
  /**
3
3
  * List of all app endpoints
4
+ * @TODO Alex/Vik: Create some smart system for preloader endpoints.
4
5
  */
5
6
  export declare const ENDPOINTS: {
6
7
  [key: string]: Endpoint;
@@ -1,4 +1,5 @@
1
1
  export * from './service-payment';
2
+ export * from './service-payment-method';
2
3
  export * from './service-price';
3
4
  export * from './service-product';
4
5
  export * from './service-subscription';
@@ -0,0 +1,10 @@
1
+ export declare enum PaymentMethodBrandEnum {
2
+ UNKNOWN = "Unknown",
3
+ AMEX = "American Express",
4
+ DINERS = "Diners Club",
5
+ DISCOVER = "Discover",
6
+ JCB = "JCB",
7
+ MASTERCARD = "Mastercard",
8
+ UNIONPAY = "UnionPay",
9
+ VISA = "Visa"
10
+ }
@@ -0,0 +1,10 @@
1
+ import { ServicePaymentMethod as ServicePaymentMethodBase } from '../../db/Models/subscription/service-payment-method';
2
+ export declare class ServicePaymentMethod extends ServicePaymentMethodBase {
3
+ get logo(): string;
4
+ get brandName(): string;
5
+ /**
6
+ * Get expiration date formatted string (MM/YY)
7
+ */
8
+ get expirationDate(): string;
9
+ get description(): string;
10
+ }
@@ -1,4 +1,5 @@
1
- export * from './service-price/service-price.service';
2
1
  export * from './service-payment/service-payment.service';
2
+ export * from './service-payment-method/service-payment-method.service';
3
+ export * from './service-price/service-price.service';
3
4
  export * from './service-subscription/subscription.service';
4
5
  export * from './service-product/service-product.service';
@@ -0,0 +1,27 @@
1
+ import { RestService } from '../../rest';
2
+ import { ServicePaymentMethod as ServicePaymentMethodBase } from '../../../../db/Models/subscription/service-payment-method';
3
+ import { ServicePaymentMethod } from '../../../../models';
4
+ import { Collection } from '../../../../collections';
5
+ import { Observable } from 'rxjs';
6
+ import { EventDispatcherService, SseService } from '../../../event';
7
+ import { HttpClient } from '@angular/common/http';
8
+ import * as i0 from "@angular/core";
9
+ export declare class ServicePaymentMethodService extends RestService<ServicePaymentMethodBase, ServicePaymentMethod, Collection<ServicePaymentMethod>> {
10
+ protected http: HttpClient;
11
+ protected eventDispatcherService: EventDispatcherService;
12
+ protected environment: any;
13
+ private sseService;
14
+ protected endpointUri: string;
15
+ collectionClass: typeof Collection;
16
+ modelClass: typeof ServicePaymentMethod;
17
+ isApiPlatform: boolean;
18
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, sseService: SseService);
19
+ /**
20
+ * Get Stripe client secret required for Payment form initialization
21
+ */
22
+ getSecret(): Observable<string>;
23
+ setAsDefault(paymentMethod: ServicePaymentMethod): Observable<ServicePaymentMethod>;
24
+ listenPaymentMethods(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<ServicePaymentMethodService, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<ServicePaymentMethodService>;
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.30.7",
3
+ "version": "0.30.8",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/compiler": "^15.1.5",