@emilgroup/billing-sdk-node 1.20.0 → 1.20.2-beta.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 +18 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/billing-sdk-node@1.20.0 --save
|
|
20
|
+
npm install @emilgroup/billing-sdk-node@1.20.2-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk-node@1.20.0
|
|
24
|
+
yarn add @emilgroup/billing-sdk-node@1.20.2-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `InvoicesApi`.
|
|
@@ -47,6 +47,22 @@ export EMIL_USERNAME=XXXXX@XXXX.XXX
|
|
|
47
47
|
export EMIL_PASSWORD=XXXXXXXXXXXXXX
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
## Base path
|
|
51
|
+
|
|
52
|
+
To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { InvoicesApi, Environment } from '@emilgroup/billing-sdk-node'
|
|
56
|
+
|
|
57
|
+
const invoicesApi = new InvoicesApi();
|
|
58
|
+
|
|
59
|
+
// Allows you to simply choose environment. It will usually be Environment.Production.
|
|
60
|
+
invoicesApi.selectEnvironment(Environment.Production);
|
|
61
|
+
|
|
62
|
+
// For advanced users, use the custom baseUrl of the website you need to connect to.
|
|
63
|
+
invoicesApi.selectBasePath('https://my-custom-domain.com');
|
|
64
|
+
```
|
|
65
|
+
|
|
50
66
|
## Example
|
|
51
67
|
|
|
52
68
|
Here is a basic functionning example:
|