Skip to content

Commit

Permalink
Diverge Notification and API entities (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayasingam-paddle authored Feb 16, 2024
1 parent 401d57c commit 1be29ff
Show file tree
Hide file tree
Showing 206 changed files with 3,103 additions and 424 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-node-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.

## 0.5.0 - 2024-02-16

> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below.
### Changed

- We removed the shared entities between API and Notification as we foresee them diverging. No Action required for this change

## 0.4.0 - 2024-02-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paddle/paddle-node-sdk",
"version": "0.4.0",
"version": "0.5.0",
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
17 changes: 16 additions & 1 deletion src/__tests__/mocks/notifications/subscription-activated.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
import { type IEventsResponse } from '../../../types';
import { ISubscriptionNotificationResponse } from '../../../notifications';

export const SubscriptionActivatedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
event_id: 'evt_01h7ht60mmw6d4sf4h38g3t4yq',
Expand Down Expand Up @@ -109,15 +110,22 @@ export const SubscriptionActivatedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (per seat)',
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
importMeta: null,
name: null,
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '3240',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 10,
recurring: true,
Expand All @@ -134,15 +142,22 @@ export const SubscriptionActivatedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '10800',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand Down
24 changes: 23 additions & 1 deletion src/__tests__/mocks/notifications/subscription-canceled.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
import { type IEventsResponse } from '../../../types';
import { ISubscriptionNotificationResponse } from '../../../notifications';

export const SubscriptionCanceledMock: IEventsResponse<ISubscriptionNotificationResponse> = {
event_id: 'evt_01h7jk37p1ezj1k5b4kt83t35j',
Expand Down Expand Up @@ -124,15 +125,22 @@ export const SubscriptionCanceledMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (per seat)',
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
importMeta: null,
name: null,
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '3240',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 10,
recurring: true,
Expand All @@ -149,15 +157,22 @@ export const SubscriptionCanceledMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '10800',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand All @@ -174,15 +189,22 @@ export const SubscriptionCanceledMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01gsz95g2zrkagg294kpstx54r',
productId: 'pro_01gsz92krfzy3hcx5h5rtgnfwz',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '30000',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand Down
17 changes: 16 additions & 1 deletion src/__tests__/mocks/notifications/subscription-created.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
import { type IEventsResponse } from '../../../types';
import { ISubscriptionNotificationResponse } from '../../../notifications';

export const SubscriptionCreatedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
event_id: 'evt_01h7ht60jy5hpdv5x8tfsaxje4',
Expand Down Expand Up @@ -109,15 +110,22 @@ export const SubscriptionCreatedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (per seat)',
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
importMeta: null,
name: null,
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '3240',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 10,
recurring: true,
Expand All @@ -134,15 +142,22 @@ export const SubscriptionCreatedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '10800',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand Down
24 changes: 23 additions & 1 deletion src/__tests__/mocks/notifications/subscription-imported.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
import { type IEventsResponse } from '../../../types';
import { ISubscriptionNotificationResponse } from '../../../notifications';

export const SubscriptionImportedMock: IEventsResponse<ISubscriptionNotificationResponse> = {
event_id: 'evt_01gxwxwnghn8xa7amfwqb0992q',
Expand Down Expand Up @@ -124,15 +125,22 @@ export const SubscriptionImportedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (per seat)',
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
importMeta: null,
name: null,
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '3600',
currencyCode: 'GBP',
},
unitPriceOverrides: [],
},
quantity: 10,
recurring: true,
Expand All @@ -149,15 +157,22 @@ export const SubscriptionImportedMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01gsz95g2zrkagg294kpstx54r',
productId: 'pro_01gsz92krfzy3hcx5h5rtgnfwz',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '30000',
currencyCode: 'GBP',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand All @@ -171,15 +186,22 @@ export const SubscriptionImportedMockExpectation = {
previouslyBilledAt: '2023-04-13T09:07:04.730931Z',
price: {
billingCycle: null,
customData: null,
description: 'One-time charge',
importMeta: null,
name: null,
id: 'pri_01gsz98e27ak2tyhexptwc58yk',
productId: 'pro_01gsz97mq9pa4fkyy0wqenepkz',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '23880',
currencyCode: 'GBP',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: false,
Expand Down
17 changes: 16 additions & 1 deletion src/__tests__/mocks/notifications/subscription-past-due.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
import { type IEventsResponse } from '../../../types';
import { ISubscriptionNotificationResponse } from '../../../notifications';

export const SubscriptionPastDueMock: IEventsResponse<ISubscriptionNotificationResponse> = {
event_id: 'evt_01h7jagte1wnq80w5bw5gbmrwk',
Expand Down Expand Up @@ -109,15 +110,22 @@ export const SubscriptionPastDueMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (per seat)',
id: 'pri_01gsz8x8sawmvhz1pv30nge1ke',
importMeta: null,
name: null,
productId: 'pro_01gsz4t5hdjse780zja8vvr7jg',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '3240',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 10,
recurring: true,
Expand All @@ -134,15 +142,22 @@ export const SubscriptionPastDueMockExpectation = {
frequency: 1,
interval: 'month',
},
customData: null,
description: 'Monthly (recurring addon)',
importMeta: null,
name: null,
id: 'pri_01h1vjfevh5etwq3rb416a23h2',
productId: 'pro_01h1vjes1y163xfj1rh1tkfb65',
quantity: null,
status: null,
taxMode: 'account_setting',
trialPeriod: null,
type: null,
unitPrice: {
amount: '10800',
currencyCode: 'USD',
},
unitPriceOverrides: [],
},
quantity: 1,
recurring: true,
Expand Down
Loading

0 comments on commit 1be29ff

Please sign in to comment.