@dotdev/harmony-sdk 1.1.0 → 1.2.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.
package/README.md CHANGED
@@ -117,9 +117,6 @@ The Harmony SDK implements the following endpoints:
117
117
  4. Point of Sale Module
118
118
 
119
119
  - `processSalesOrder(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>`
120
- - `processReturns(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>`
121
- - `modifyExistingSalesOrder(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>`
122
- - `cancelExistingSalesOrder(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>`
123
120
 
124
121
  5. Carrier Module
125
122
 
@@ -2,7 +2,7 @@ import axios from "axios";
2
2
  import { ApiHelper, Utils } from "../../helpers";
3
3
  import { ServiceAlias } from "../shared";
4
4
  import { PointOfSaleModule } from "./point-of-sale.module";
5
- import { AccountSaleFlag, PosPaymentType, PosQueryMode, } from "./types";
5
+ import { AccountSaleFlag, CardName, PosPaymentType, PosQueryMode, } from "./types";
6
6
  jest.mock("axios");
7
7
  const mAxios = axios;
8
8
  describe("PointOfSaleModule", () => {
@@ -174,7 +174,7 @@ describe("PointOfSaleModule", () => {
174
174
  invoicePriceInc: 0.0,
175
175
  rounding: 0.0,
176
176
  totalTax: 0.0,
177
- cardName: "PPAL",
177
+ cardName: CardName.PAYPAL,
178
178
  cardNo: "ABC123",
179
179
  cardExpiryMonth: 0,
180
180
  cardExpiryYear: 0,
@@ -85,7 +85,7 @@ export interface PosQueryDebtor {
85
85
  paymentType: PosPaymentType;
86
86
  creditReference?: string;
87
87
  paymentAmount: number;
88
- cardName?: string;
88
+ cardName: CardName;
89
89
  cardNo?: string;
90
90
  cardHolder?: string;
91
91
  cardExpiryMonth?: number;
@@ -122,3 +122,15 @@ export declare enum LineOperation {
122
122
  ADD = "A",
123
123
  DELETE = "D"
124
124
  }
125
+ export declare enum CardName {
126
+ VISA = "VISA",
127
+ MASTERCARD = "MASTC",
128
+ AMEX = "AMEX",
129
+ DINER = "DINER",
130
+ EFTPOS = "EFPOS",
131
+ PAYPAL = "PPAL",
132
+ EWAY = "EWAY",
133
+ AFTERPAY = "AFTER",
134
+ SHOPIFY = "SHPFY",
135
+ OPEN = "OPEN"
136
+ }
@@ -29,3 +29,16 @@ export var LineOperation;
29
29
  LineOperation["ADD"] = "A";
30
30
  LineOperation["DELETE"] = "D";
31
31
  })(LineOperation || (LineOperation = {}));
32
+ export var CardName;
33
+ (function (CardName) {
34
+ CardName["VISA"] = "VISA";
35
+ CardName["MASTERCARD"] = "MASTC";
36
+ CardName["AMEX"] = "AMEX";
37
+ CardName["DINER"] = "DINER";
38
+ CardName["EFTPOS"] = "EFPOS";
39
+ CardName["PAYPAL"] = "PPAL";
40
+ CardName["EWAY"] = "EWAY";
41
+ CardName["AFTERPAY"] = "AFTER";
42
+ CardName["SHOPIFY"] = "SHPFY";
43
+ CardName["OPEN"] = "OPEN";
44
+ })(CardName || (CardName = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdev/harmony-sdk",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Harmony API SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",