@paddle/paddle-node-sdk 1.2.1 → 1.2.2
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/CHANGELOG.md +8 -0
- package/dist/entities/pricing-preview/pricing-preview.d.ts +3 -3
- package/dist/entities/pricing-preview/pricing-preview.js +6 -6
- package/dist/types/pricing-preview/pricing-preview-response.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,14 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
|
|
|
12
12
|
|
|
13
13
|
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.
|
|
14
14
|
|
|
15
|
+
## 1.2.2 - 2024-04-03
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Updated the optional properties returned by `pricingPreview.preview` operation to match the API response.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
15
23
|
## 1.2.1 - 2024-03-20
|
|
16
24
|
|
|
17
25
|
### Fixed
|
|
@@ -6,11 +6,11 @@ export declare class PricingPreview {
|
|
|
6
6
|
readonly customerId: string | null;
|
|
7
7
|
readonly addressId: string | null;
|
|
8
8
|
readonly businessId: string | null;
|
|
9
|
-
readonly currencyCode: CurrencyCode
|
|
9
|
+
readonly currencyCode: CurrencyCode;
|
|
10
10
|
readonly discountId: string | null;
|
|
11
11
|
readonly address: AddressPreview | null;
|
|
12
12
|
readonly customerIpAddress: string | null;
|
|
13
|
-
readonly details: PricingPreviewDetails
|
|
14
|
-
readonly availablePaymentMethods: AvailablePaymentMethod
|
|
13
|
+
readonly details: PricingPreviewDetails;
|
|
14
|
+
readonly availablePaymentMethods: AvailablePaymentMethod[];
|
|
15
15
|
constructor(pricePreview: IPricingPreviewResponse);
|
|
16
16
|
}
|
|
@@ -5,16 +5,16 @@ const transaction_1 = require("../transaction");
|
|
|
5
5
|
const pricing_preview_details_1 = require("./pricing-preview-details");
|
|
6
6
|
class PricingPreview {
|
|
7
7
|
constructor(pricePreview) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f
|
|
8
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9
9
|
this.customerId = (_a = pricePreview.customer_id) !== null && _a !== void 0 ? _a : null;
|
|
10
10
|
this.addressId = (_b = pricePreview.address_id) !== null && _b !== void 0 ? _b : null;
|
|
11
11
|
this.businessId = (_c = pricePreview.business_id) !== null && _c !== void 0 ? _c : null;
|
|
12
|
-
this.currencyCode =
|
|
13
|
-
this.discountId = (
|
|
12
|
+
this.currencyCode = pricePreview.currency_code;
|
|
13
|
+
this.discountId = (_d = pricePreview.discount_id) !== null && _d !== void 0 ? _d : null;
|
|
14
14
|
this.address = pricePreview.address ? new transaction_1.AddressPreview(pricePreview.address) : null;
|
|
15
|
-
this.customerIpAddress = (
|
|
16
|
-
this.details =
|
|
17
|
-
this.availablePaymentMethods = (
|
|
15
|
+
this.customerIpAddress = (_e = pricePreview.customer_ip_address) !== null && _e !== void 0 ? _e : null;
|
|
16
|
+
this.details = new pricing_preview_details_1.PricingPreviewDetails(pricePreview.details);
|
|
17
|
+
this.availablePaymentMethods = (_f = pricePreview.available_payment_methods) !== null && _f !== void 0 ? _f : [];
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.PricingPreview = PricingPreview;
|
|
@@ -6,11 +6,11 @@ export interface IPricingPreviewResponse {
|
|
|
6
6
|
customer_id?: string | null;
|
|
7
7
|
address_id?: string | null;
|
|
8
8
|
business_id?: string | null;
|
|
9
|
-
currency_code
|
|
9
|
+
currency_code: CurrencyCode;
|
|
10
10
|
discount_id?: string | null;
|
|
11
11
|
address?: IAddressPreviewResponse | null;
|
|
12
12
|
customer_ip_address?: string | null;
|
|
13
13
|
items: IPricingPreviewItemResponse[];
|
|
14
|
-
details
|
|
15
|
-
|
|
14
|
+
details: IPricingPreviewDetailsResponse;
|
|
15
|
+
available_payment_methods: AvailablePaymentMethod[];
|
|
16
16
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.2";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|