@esolve/ng-esolve-connect 0.74.0 → 0.76.0

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,3 +1,4 @@
1
+ import { EsolveStockUnitOfMeasure } from '../../stock/types';
1
2
  import { EsolveCartAlternativeRecord } from '../interfaces';
2
3
  export declare class EsolveCartAlternative {
3
4
  item_id: number;
@@ -9,6 +10,7 @@ export declare class EsolveCartAlternative {
9
10
  price: number;
10
11
  price_inclusive: number;
11
12
  vat_rate: number;
13
+ unit_of_measure: EsolveStockUnitOfMeasure;
12
14
  private image_name;
13
15
  /**
14
16
  * Path to tiny stock image
@@ -1,3 +1,4 @@
1
+ import { EsolveStockUnitOfMeasure } from '../../stock/types';
1
2
  import { EsolveCartItemRecord } from '../interfaces';
2
3
  export declare class EsolveCartStockItem {
3
4
  code: string;
@@ -6,8 +7,11 @@ export declare class EsolveCartStockItem {
6
7
  description: string;
7
8
  delivery_category: string;
8
9
  pack_description: string;
10
+ items_in_pack: number;
11
+ unit_of_measure: EsolveStockUnitOfMeasure;
9
12
  pack_size: number;
10
13
  onhand: number;
14
+ limit_per_transaction: number;
11
15
  active: boolean;
12
16
  private image_name;
13
17
  /**
@@ -1,3 +1,4 @@
1
+ import { EsolveStockUnitOfMeasure } from "../../stock/types";
1
2
  export interface EsolveCartAlternativeRecord {
2
3
  item_id: number;
3
4
  image_name: string;
@@ -9,4 +10,5 @@ export interface EsolveCartAlternativeRecord {
9
10
  price: number | string;
10
11
  price_inclusive: number | string;
11
12
  vat_rate: number | string;
13
+ unit_of_measure: EsolveStockUnitOfMeasure;
12
14
  }
@@ -1,3 +1,4 @@
1
+ import { EsolveStockUnitOfMeasure } from "../../stock/types";
1
2
  export interface EsolveCartItemRecord {
2
3
  id: number;
3
4
  code: string;
@@ -17,6 +18,7 @@ export interface EsolveCartItemRecord {
17
18
  discount: number;
18
19
  discount_interval: number;
19
20
  vat_rate: number;
21
+ unit_of_measure: EsolveStockUnitOfMeasure;
20
22
  delivery_category: string;
21
23
  type: string;
22
24
  must_collect: boolean;
@@ -2,6 +2,7 @@ import { Observable } from 'rxjs';
2
2
  import { EsolveResult } from '../shared';
3
3
  import { EsolvePaymentMethod, EsolvePaymentResult, EsolveVaultItem, EsolveVaultItemResult } from './classes';
4
4
  import { EsolveCardData, EsolvePaymentMethodOptions, EsolvePaymentRedirectLinks } from './interfaces';
5
+ import { EsolveStatementTransaction } from '../account/user-account';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class EsolvePaymentService {
7
8
  private readonly config;
@@ -60,6 +61,17 @@ export declare class EsolvePaymentService {
60
61
  * @returns An `Observable` with the result of the payment
61
62
  */
62
63
  setPayment(transaction_id: number, payment_methods_id: number, card?: EsolveCardData | number, links?: EsolvePaymentRedirectLinks): Observable<EsolvePaymentResult>;
64
+ /**
65
+ * Sets the payment for the specified transaction using selected payment
66
+ * method.
67
+ *
68
+ * @param transaction_id eSolve ID to the transaction
69
+ * @param payment_methods_id eSolve ID to the selected payment method
70
+ * @param card ID of selected card from the vault or information to a brand new card
71
+ *
72
+ * @returns An `Observable` with the result of the payment
73
+ */
74
+ setAccountPayment(clients_id: number, payment_methods_id: number, transactions: EsolveStatementTransaction[], links: EsolvePaymentRedirectLinks): Observable<EsolvePaymentResult>;
63
75
  /**
64
76
  * Processes the eSolve payment method records.
65
77
  *
@@ -1,8 +1,11 @@
1
+ import { EsolveStatementTransaction } from '../../account';
1
2
  import { EsolvePaymentRedirectLinks } from './esolve-payment-redirect-links.interface';
2
3
  export interface EsolvePaymentSetBody {
3
4
  payment: {
4
5
  cart_id: number;
6
+ clients_id?: number;
5
7
  payment_methods_id: number;
8
+ transactions?: EsolveStatementTransaction[];
6
9
  user_vault_id?: number;
7
10
  };
8
11
  card?: {
@@ -1,4 +1,4 @@
1
- import { EsolveStockImageSize } from '../../stock';
1
+ import { EsolveStockImageSize, EsolveStockUnitOfMeasure } from '../../stock';
2
2
  import { EsolveTransactionItemRecord } from '../interfaces';
3
3
  import { EsolveTransactionItemPrice } from './esolve-transaction-item-price.model';
4
4
  export declare class EsolveTransactionItem {
@@ -15,6 +15,7 @@ export declare class EsolveTransactionItem {
15
15
  qty: number;
16
16
  discount: number;
17
17
  vat_rate: number;
18
+ unit_of_measure: EsolveStockUnitOfMeasure;
18
19
  price: EsolveTransactionItemPrice;
19
20
  line_total: EsolveTransactionItemPrice;
20
21
  /**
@@ -1,3 +1,4 @@
1
+ import { EsolveStockUnitOfMeasure } from "../../stock/types";
1
2
  export interface EsolveTransactionItemRecord {
2
3
  id: number;
3
4
  code: string;
@@ -10,6 +11,7 @@ export interface EsolveTransactionItemRecord {
10
11
  pack_description: string;
11
12
  items_in_pack: number;
12
13
  qty: number;
14
+ unit_of_measure: EsolveStockUnitOfMeasure;
13
15
  discount: number;
14
16
  vat_rate: number;
15
17
  price: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esolve/ng-esolve-connect",
3
- "version": "0.74.0",
3
+ "version": "0.76.0",
4
4
  "homepage": "https://www.esolve.co.za/",
5
5
  "description": "An Angular library that speaks to an eSolve instance's API",
6
6
  "peerDependencies": {