@paddle/paddle-node-sdk 0.1.5 → 0.1.6
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/dist/entities/subscription/subscription-includes.d.ts +1 -1
- package/dist/entities/subscription/subscription-includes.js +3 -1
- package/dist/entities/subscription/subscription.d.ts +1 -1
- package/dist/entities/subscription/subscription.js +3 -1
- package/dist/internal/base/logger.js +2 -2
- package/dist/types/subscription/subscription-response.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export declare class SubscriptionIncludes {
|
|
|
21
21
|
readonly current_billing_period?: SubscriptionTimePeriod | null | undefined;
|
|
22
22
|
readonly billing_cycle: TimePeriod;
|
|
23
23
|
readonly scheduled_change?: SubscriptionScheduledChange | null | undefined;
|
|
24
|
-
readonly management_urls
|
|
24
|
+
readonly management_urls?: SubscriptionManagement | null | undefined;
|
|
25
25
|
readonly items: SubscriptionItem[];
|
|
26
26
|
readonly custom_data?: CustomData | null | undefined;
|
|
27
27
|
readonly next_transaction?: NextTransaction | null | undefined;
|
|
@@ -27,7 +27,9 @@ class SubscriptionIncludes {
|
|
|
27
27
|
this.scheduled_change = subscription.scheduled_change
|
|
28
28
|
? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
|
|
29
29
|
: null;
|
|
30
|
-
this.management_urls =
|
|
30
|
+
this.management_urls = subscription.management_urls
|
|
31
|
+
? new index_1.SubscriptionManagement(subscription.management_urls)
|
|
32
|
+
: null;
|
|
31
33
|
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
32
34
|
this.custom_data = subscription.custom_data;
|
|
33
35
|
this.next_transaction = subscription.next_transaction ? new index_1.NextTransaction(subscription.next_transaction) : null;
|
|
@@ -21,7 +21,7 @@ export declare class Subscription {
|
|
|
21
21
|
readonly current_billing_period?: SubscriptionTimePeriod | undefined | null;
|
|
22
22
|
readonly billing_cycle: TimePeriod;
|
|
23
23
|
readonly scheduled_change?: SubscriptionScheduledChange | undefined | null;
|
|
24
|
-
readonly management_urls
|
|
24
|
+
readonly management_urls?: SubscriptionManagement | undefined | null;
|
|
25
25
|
readonly items: SubscriptionItem[];
|
|
26
26
|
readonly custom_data?: CustomData | undefined | null;
|
|
27
27
|
constructor(subscription: ISubscription);
|
|
@@ -27,7 +27,9 @@ class Subscription {
|
|
|
27
27
|
this.scheduled_change = subscription.scheduled_change
|
|
28
28
|
? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
|
|
29
29
|
: undefined;
|
|
30
|
-
this.management_urls =
|
|
30
|
+
this.management_urls = subscription.management_urls
|
|
31
|
+
? new index_1.SubscriptionManagement(subscription.management_urls)
|
|
32
|
+
: undefined;
|
|
31
33
|
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
32
34
|
this.custom_data = subscription.custom_data;
|
|
33
35
|
}
|
|
@@ -12,10 +12,10 @@ class Logger {
|
|
|
12
12
|
console.error('[Paddle] [ERROR]', ...args);
|
|
13
13
|
}
|
|
14
14
|
static logRequest(method, url, headers) {
|
|
15
|
-
Logger.log(method, url, 'Transaction ID:', headers['X-Transaction-ID']);
|
|
15
|
+
Logger.log('[Request]', method, url, 'Transaction ID:', headers['X-Transaction-ID']);
|
|
16
16
|
}
|
|
17
17
|
static logResponse(method, url, headers, promise) {
|
|
18
|
-
Logger.log(method, url, promise.status.toString(), 'Transaction ID:', headers['X-Transaction-ID'], 'Request ID:', promise.headers.get('Request-Id'));
|
|
18
|
+
Logger.log('[Response]', method, url, promise.status.toString(), 'Transaction ID:', headers['X-Transaction-ID'], 'Request ID:', promise.headers.get('Request-Id'));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.Logger = Logger;
|
|
@@ -20,7 +20,7 @@ export interface ISubscription {
|
|
|
20
20
|
current_billing_period?: ISubscriptionTimePeriod | undefined | null;
|
|
21
21
|
billing_cycle: ITimePeriod;
|
|
22
22
|
scheduled_change?: ISubscriptionScheduledChange | undefined | null;
|
|
23
|
-
management_urls: ISubscriptionManagement;
|
|
23
|
+
management_urls: ISubscriptionManagement | undefined | null;
|
|
24
24
|
items: ISubscriptionItem[];
|
|
25
25
|
custom_data?: ICustomData | undefined | null;
|
|
26
26
|
next_transaction?: INextTransaction | undefined | null;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.6";
|
package/dist/version.js
CHANGED