@paddle/paddle-node-sdk 0.4.0 → 0.6.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/CHANGELOG.md +25 -0
- package/dist/entities/price/index.d.ts +0 -1
- package/dist/entities/price/index.js +0 -1
- package/dist/entities/price/price-collection.d.ts +3 -3
- package/dist/entities/price/price-collection.js +2 -2
- package/dist/entities/price/price.d.ts +9 -8
- package/dist/entities/price/price.js +5 -7
- package/dist/entities/pricing-preview/pricing-preview.d.ts +1 -2
- package/dist/entities/product/index.d.ts +0 -1
- package/dist/entities/product/index.js +0 -1
- package/dist/entities/product/product-collection.d.ts +3 -3
- package/dist/entities/product/product-collection.js +2 -2
- package/dist/entities/product/product.d.ts +5 -4
- package/dist/entities/product/product.js +1 -0
- package/dist/entities/subscription/index.d.ts +0 -3
- package/dist/entities/subscription/index.js +0 -3
- package/dist/entities/subscription/subscription-item.d.ts +2 -2
- package/dist/entities/subscription/subscription-item.js +1 -1
- package/dist/entities/subscription/subscription.d.ts +3 -1
- package/dist/entities/subscription/subscription.js +4 -0
- package/dist/entities/transaction/index.d.ts +0 -1
- package/dist/entities/transaction/index.js +0 -1
- package/dist/entities/transaction/transaction-collection.d.ts +3 -3
- package/dist/entities/transaction/transaction-collection.js +2 -2
- package/dist/entities/transaction/transaction-item-preview.d.ts +2 -2
- package/dist/entities/transaction/transaction-item-preview.js +1 -1
- package/dist/entities/transaction/transaction-preview.d.ts +1 -2
- package/dist/entities/transaction/transaction.d.ts +9 -2
- package/dist/entities/transaction/transaction.js +12 -0
- package/dist/enums/shared/index.d.ts +1 -0
- package/dist/enums/shared/index.js +1 -0
- package/dist/notifications/entities/address/address-notification.d.ts +19 -0
- package/dist/notifications/entities/address/address-notification.js +22 -0
- package/dist/notifications/entities/address/index.d.ts +1 -0
- package/dist/notifications/entities/address/index.js +17 -0
- package/dist/notifications/entities/adjustment/adjustment-item-notification.d.ts +12 -0
- package/dist/notifications/entities/adjustment/adjustment-item-notification.js +15 -0
- package/dist/notifications/entities/adjustment/adjustment-item-totals-notification.d.ts +7 -0
- package/dist/notifications/entities/adjustment/adjustment-item-totals-notification.js +11 -0
- package/dist/notifications/entities/adjustment/adjustment-notification.d.ts +20 -0
- package/dist/notifications/entities/adjustment/adjustment-notification.js +25 -0
- package/dist/notifications/entities/adjustment/adjustment-proration-notification.d.ts +7 -0
- package/dist/notifications/entities/adjustment/adjustment-proration-notification.js +13 -0
- package/dist/notifications/entities/adjustment/adjustment-time-period-notification.d.ts +6 -0
- package/dist/notifications/entities/adjustment/adjustment-time-period-notification.js +10 -0
- package/dist/notifications/entities/adjustment/index.d.ts +5 -0
- package/dist/notifications/entities/adjustment/index.js +21 -0
- package/dist/notifications/entities/business/business-notification.d.ts +17 -0
- package/dist/notifications/entities/business/business-notification.js +19 -0
- package/dist/notifications/entities/business/contacts-notification.d.ts +6 -0
- package/dist/notifications/entities/business/contacts-notification.js +10 -0
- package/dist/notifications/entities/business/index.d.ts +2 -0
- package/dist/notifications/entities/business/index.js +18 -0
- package/dist/notifications/entities/customer/customer-notification.d.ts +17 -0
- package/dist/notifications/entities/customer/customer-notification.js +19 -0
- package/dist/notifications/entities/customer/index.d.ts +1 -0
- package/dist/notifications/entities/customer/index.js +17 -0
- package/dist/notifications/entities/discount/discount-notification.d.ts +25 -0
- package/dist/notifications/entities/discount/discount-notification.js +28 -0
- package/dist/notifications/entities/discount/index.d.ts +1 -0
- package/dist/notifications/entities/discount/index.js +17 -0
- package/dist/notifications/entities/index.d.ts +12 -0
- package/dist/notifications/entities/index.js +28 -0
- package/dist/notifications/entities/payout/index.d.ts +1 -0
- package/dist/notifications/entities/payout/index.js +17 -0
- package/dist/notifications/entities/payout/payout-notification.d.ts +9 -0
- package/dist/notifications/entities/payout/payout-notification.js +12 -0
- package/dist/notifications/entities/price/index.d.ts +2 -0
- package/dist/notifications/entities/price/index.js +18 -0
- package/dist/notifications/entities/price/price-notification.d.ts +21 -0
- package/dist/{entities/price/price-with-includes.js → notifications/entities/price/price-notification.js} +10 -12
- package/dist/notifications/entities/price/price-quantity-notification.d.ts +6 -0
- package/dist/notifications/entities/price/price-quantity-notification.js +10 -0
- package/dist/notifications/entities/product/index.d.ts +1 -0
- package/dist/notifications/entities/product/index.js +17 -0
- package/dist/notifications/entities/product/product-notification.d.ts +17 -0
- package/dist/{entities/product/product-with-includes.js → notifications/entities/product/product-notification.js} +4 -5
- package/dist/notifications/entities/report/index.d.ts +2 -0
- package/dist/notifications/entities/report/index.js +18 -0
- package/dist/notifications/entities/report/report-filters-notification.d.ts +8 -0
- package/dist/notifications/entities/report/report-filters-notification.js +12 -0
- package/dist/notifications/entities/report/report-notification.d.ts +13 -0
- package/dist/notifications/entities/report/report-notification.js +17 -0
- package/dist/notifications/entities/shared/adjustment-original-amount-notification.d.ts +7 -0
- package/dist/notifications/entities/shared/adjustment-original-amount-notification.js +10 -0
- package/dist/notifications/entities/shared/billing-details-notification.d.ts +9 -0
- package/dist/notifications/entities/shared/billing-details-notification.js +14 -0
- package/dist/notifications/entities/shared/chargeback-fee-notification.d.ts +7 -0
- package/dist/notifications/entities/shared/chargeback-fee-notification.js +11 -0
- package/dist/notifications/entities/shared/import-meta-notification.d.ts +6 -0
- package/dist/notifications/entities/shared/import-meta-notification.js +10 -0
- package/dist/notifications/entities/shared/index.d.ts +20 -0
- package/dist/notifications/entities/shared/index.js +36 -0
- package/dist/notifications/entities/shared/money-notification.d.ts +7 -0
- package/dist/notifications/entities/shared/money-notification.js +10 -0
- package/dist/notifications/entities/shared/payment-card-notification.d.ts +10 -0
- package/dist/notifications/entities/shared/payment-card-notification.js +13 -0
- package/dist/notifications/entities/shared/payment-method-details-notification.d.ts +8 -0
- package/dist/notifications/entities/shared/payment-method-details-notification.js +11 -0
- package/dist/notifications/entities/shared/payout-totals-adjustment-notification.d.ts +13 -0
- package/dist/notifications/entities/shared/payout-totals-adjustment-notification.js +18 -0
- package/dist/notifications/entities/shared/tax-rates-used-notification.d.ts +7 -0
- package/dist/notifications/entities/shared/tax-rates-used-notification.js +11 -0
- package/dist/notifications/entities/shared/time-period-notification.d.ts +7 -0
- package/dist/notifications/entities/shared/time-period-notification.js +10 -0
- package/dist/notifications/entities/shared/total-adjustments-notification.d.ts +11 -0
- package/dist/notifications/entities/shared/total-adjustments-notification.js +14 -0
- package/dist/notifications/entities/shared/totals-notification.d.ts +8 -0
- package/dist/notifications/entities/shared/totals-notification.js +12 -0
- package/dist/notifications/entities/shared/transaction-checkout-notification.d.ts +5 -0
- package/dist/notifications/entities/shared/transaction-checkout-notification.js +9 -0
- package/dist/notifications/entities/shared/transaction-payment-attempt-notification.d.ts +15 -0
- package/dist/notifications/entities/shared/transaction-payment-attempt-notification.js +21 -0
- package/dist/notifications/entities/shared/transaction-payout-totals-adjusted-notification.d.ts +13 -0
- package/dist/notifications/entities/shared/transaction-payout-totals-adjusted-notification.js +18 -0
- package/dist/notifications/entities/shared/transaction-payout-totals-notification.d.ts +16 -0
- package/dist/notifications/entities/shared/transaction-payout-totals-notification.js +19 -0
- package/dist/notifications/entities/shared/transaction-totals-adjusted-notification.d.ts +12 -0
- package/dist/notifications/entities/shared/transaction-totals-adjusted-notification.js +15 -0
- package/dist/notifications/entities/shared/transaction-totals-notification.d.ts +16 -0
- package/dist/notifications/entities/shared/transaction-totals-notification.js +19 -0
- package/dist/notifications/entities/shared/unit-price-override-notification.d.ts +8 -0
- package/dist/notifications/entities/shared/unit-price-override-notification.js +11 -0
- package/dist/notifications/entities/shared/unit-totals-notification.d.ts +8 -0
- package/dist/notifications/entities/shared/unit-totals-notification.js +12 -0
- package/dist/notifications/entities/subscription/index.d.ts +6 -0
- package/dist/notifications/entities/subscription/index.js +22 -0
- package/dist/notifications/entities/subscription/subscription-discount-notification.d.ts +7 -0
- package/dist/notifications/entities/subscription/subscription-discount-notification.js +12 -0
- package/dist/notifications/entities/subscription/subscription-item-notification.d.ts +15 -0
- package/dist/notifications/entities/subscription/subscription-item-notification.js +20 -0
- package/dist/{entities → notifications/entities}/subscription/subscription-notification.d.ts +10 -9
- package/dist/{entities → notifications/entities}/subscription/subscription-notification.js +9 -7
- package/dist/notifications/entities/subscription/subscription-price-notification.d.ts +21 -0
- package/dist/notifications/entities/subscription/subscription-price-notification.js +27 -0
- package/dist/notifications/entities/subscription/subscription-scheduled-change-notification.d.ts +8 -0
- package/dist/notifications/entities/subscription/subscription-scheduled-change-notification.js +11 -0
- package/dist/notifications/entities/subscription/subscription-time-period-notification.d.ts +6 -0
- package/dist/notifications/entities/subscription/subscription-time-period-notification.js +10 -0
- package/dist/notifications/entities/transaction/index.d.ts +6 -0
- package/dist/notifications/entities/transaction/index.js +22 -0
- package/dist/notifications/entities/transaction/transaction-details-notification.d.ts +11 -0
- package/dist/notifications/entities/transaction/transaction-details-notification.js +21 -0
- package/dist/notifications/entities/transaction/transaction-item-notification.d.ts +8 -0
- package/dist/notifications/entities/transaction/transaction-item-notification.js +12 -0
- package/dist/notifications/entities/transaction/transaction-line-item-notification.d.ts +13 -0
- package/dist/notifications/entities/transaction/transaction-line-item-notification.js +21 -0
- package/dist/notifications/entities/transaction/transaction-notification.d.ts +29 -0
- package/dist/{entities/transaction/transaction-includes.js → notifications/entities/transaction/transaction-notification.js} +13 -21
- package/dist/notifications/entities/transaction/transaction-proration-notification.d.ts +7 -0
- package/dist/notifications/entities/transaction/transaction-proration-notification.js +13 -0
- package/dist/notifications/entities/transaction/transactions-time-period-notification.d.ts +6 -0
- package/dist/notifications/entities/transaction/transactions-time-period-notification.js +10 -0
- package/dist/notifications/events/address/address-created-event.d.ts +5 -4
- package/dist/notifications/events/address/address-created-event.js +2 -2
- package/dist/notifications/events/address/address-imported-event.d.ts +5 -4
- package/dist/notifications/events/address/address-imported-event.js +2 -2
- package/dist/notifications/events/address/address-updated-event.d.ts +5 -4
- package/dist/notifications/events/address/address-updated-event.js +2 -2
- package/dist/notifications/events/adjustment/adjustment-created-event.d.ts +5 -4
- package/dist/notifications/events/adjustment/adjustment-created-event.js +2 -2
- package/dist/notifications/events/adjustment/adjustment-updated-event.d.ts +5 -4
- package/dist/notifications/events/adjustment/adjustment-updated-event.js +2 -2
- package/dist/notifications/events/business/business-created-event.d.ts +5 -4
- package/dist/notifications/events/business/business-created-event.js +2 -2
- package/dist/notifications/events/business/business-imported-event.d.ts +5 -4
- package/dist/notifications/events/business/business-imported-event.js +2 -2
- package/dist/notifications/events/business/business-updated-event.d.ts +5 -4
- package/dist/notifications/events/business/business-updated-event.js +2 -2
- package/dist/notifications/events/customer/customer-created-event.d.ts +5 -4
- package/dist/notifications/events/customer/customer-created-event.js +2 -2
- package/dist/notifications/events/customer/customer-imported-event.d.ts +5 -4
- package/dist/notifications/events/customer/customer-imported-event.js +2 -2
- package/dist/notifications/events/customer/customer-updated-event.d.ts +5 -4
- package/dist/notifications/events/customer/customer-updated-event.js +2 -2
- package/dist/notifications/events/discount/discount-created-event.d.ts +5 -4
- package/dist/notifications/events/discount/discount-created-event.js +2 -2
- package/dist/notifications/events/discount/discount-imported-event.d.ts +5 -4
- package/dist/notifications/events/discount/discount-imported-event.js +2 -2
- package/dist/notifications/events/discount/discount-updated-event.d.ts +5 -4
- package/dist/notifications/events/discount/discount-updated-event.js +2 -2
- package/dist/notifications/events/payout/payout-created-event.d.ts +5 -4
- package/dist/notifications/events/payout/payout-created-event.js +2 -2
- package/dist/notifications/events/payout/payout-paid-event.d.ts +5 -4
- package/dist/notifications/events/payout/payout-paid-event.js +2 -2
- package/dist/notifications/events/price/price-created-event.d.ts +5 -4
- package/dist/notifications/events/price/price-created-event.js +2 -2
- package/dist/notifications/events/price/price-imported-event.d.ts +5 -4
- package/dist/notifications/events/price/price-imported-event.js +2 -2
- package/dist/notifications/events/price/price-updated-event.d.ts +5 -4
- package/dist/notifications/events/price/price-updated-event.js +2 -2
- package/dist/notifications/events/product/product-created-event.d.ts +5 -4
- package/dist/notifications/events/product/product-created-event.js +2 -2
- package/dist/notifications/events/product/product-imported-event.d.ts +5 -4
- package/dist/notifications/events/product/product-imported-event.js +2 -2
- package/dist/notifications/events/product/product-updated-event.d.ts +5 -4
- package/dist/notifications/events/product/product-updated-event.js +2 -2
- package/dist/notifications/events/report/report-created-event.d.ts +5 -4
- package/dist/notifications/events/report/report-created-event.js +2 -2
- package/dist/notifications/events/report/report-updated-event.d.ts +5 -4
- package/dist/notifications/events/report/report-updated-event.js +2 -2
- package/dist/notifications/events/subscription/subscription-activated-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-activated-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-canceled-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-canceled-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-created-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-created-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-imported-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-imported-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-past-due-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-past-due-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-paused-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-paused-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-resumed-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-resumed-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-trialing-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-trialing-event.js +1 -1
- package/dist/notifications/events/subscription/subscription-updated-event.d.ts +3 -2
- package/dist/notifications/events/subscription/subscription-updated-event.js +1 -1
- package/dist/notifications/events/transaction/transaction-billed-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-billed-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-canceled-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-canceled-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-completed-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-completed-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-created-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-created-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-paid-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-paid-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-past-due-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-past-due-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-payment-failed-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-payment-failed-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-ready-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-ready-event.js +2 -2
- package/dist/notifications/events/transaction/transaction-updated-event.d.ts +5 -4
- package/dist/notifications/events/transaction/transaction-updated-event.js +2 -2
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/types/address/address-notification-response.d.ts +17 -0
- package/dist/notifications/types/address/index.d.ts +1 -0
- package/dist/notifications/types/address/index.js +17 -0
- package/dist/notifications/types/adjustment/adjustment-item-notification-response.d.ts +10 -0
- package/dist/notifications/types/adjustment/adjustment-notification-response.d.ts +18 -0
- package/dist/notifications/types/adjustment/adjustment-notification-response.js +2 -0
- package/dist/notifications/types/adjustment/adjustment-totals-breakdown-notification.d.ts +5 -0
- package/dist/notifications/types/adjustment/adjustment-totals-breakdown-notification.js +2 -0
- package/dist/notifications/types/adjustment/adjustment-totals-notification-response.d.ts +11 -0
- package/dist/notifications/types/adjustment/adjustment-totals-notification-response.js +2 -0
- package/dist/notifications/types/adjustment/adjustments-proration-notification-response.d.ts +5 -0
- package/dist/notifications/types/adjustment/adjustments-proration-notification-response.js +2 -0
- package/dist/notifications/types/adjustment/adjustments-time-period-notification-response.d.ts +4 -0
- package/dist/notifications/types/adjustment/adjustments-time-period-notification-response.js +2 -0
- package/dist/notifications/types/adjustment/index.d.ts +6 -0
- package/dist/notifications/types/adjustment/index.js +22 -0
- package/dist/notifications/types/business/business-notification-response.d.ts +15 -0
- package/dist/notifications/types/business/business-notification-response.js +2 -0
- package/dist/notifications/types/business/businesses-contacts-notification.d.ts +4 -0
- package/dist/notifications/types/business/businesses-contacts-notification.js +2 -0
- package/dist/notifications/types/business/index.d.ts +2 -0
- package/dist/notifications/types/business/index.js +18 -0
- package/dist/notifications/types/customer/customer-notification-response.d.ts +15 -0
- package/dist/notifications/types/customer/customer-notification-response.js +2 -0
- package/dist/notifications/types/customer/index.d.ts +1 -0
- package/dist/notifications/types/customer/index.js +17 -0
- package/dist/notifications/types/discount/discount-notification-response.d.ts +23 -0
- package/dist/notifications/types/discount/discount-notification-response.js +2 -0
- package/dist/notifications/types/discount/index.d.ts +1 -0
- package/dist/notifications/types/discount/index.js +17 -0
- package/dist/notifications/types/index.d.ts +12 -0
- package/dist/notifications/types/index.js +28 -0
- package/dist/notifications/types/payout/index.d.ts +1 -0
- package/dist/notifications/types/payout/index.js +17 -0
- package/dist/notifications/types/payout/payout-notification-response.d.ts +7 -0
- package/dist/notifications/types/payout/payout-notification-response.js +2 -0
- package/dist/notifications/types/price/index.d.ts +2 -0
- package/dist/notifications/types/price/index.js +18 -0
- package/dist/notifications/types/price/price-notification-response.d.ts +20 -0
- package/dist/notifications/types/price/price-notification-response.js +2 -0
- package/dist/notifications/types/price/price-quantity-notification.d.ts +4 -0
- package/dist/notifications/types/price/price-quantity-notification.js +2 -0
- package/dist/notifications/types/product/index.d.ts +1 -0
- package/dist/notifications/types/product/index.js +17 -0
- package/dist/notifications/types/product/product-notification-response.d.ts +16 -0
- package/dist/notifications/types/product/product-notification-response.js +2 -0
- package/dist/notifications/types/report/index.d.ts +2 -0
- package/dist/notifications/types/report/index.js +18 -0
- package/dist/notifications/types/report/report-filters-notification-response.d.ts +6 -0
- package/dist/notifications/types/report/report-filters-notification-response.js +2 -0
- package/dist/notifications/types/report/report-notification-response.d.ts +11 -0
- package/dist/notifications/types/report/report-notification-response.js +2 -0
- package/dist/notifications/types/shared/adjustment-original-amount-notification-response.d.ts +5 -0
- package/dist/notifications/types/shared/adjustment-original-amount-notification-response.js +2 -0
- package/dist/notifications/types/shared/billing-details-notification-response.d.ts +7 -0
- package/dist/notifications/types/shared/billing-details-notification-response.js +2 -0
- package/dist/notifications/types/shared/chargeback-fee.d.ts +5 -0
- package/dist/notifications/types/shared/chargeback-fee.js +2 -0
- package/dist/notifications/types/shared/import-meta-notification-response.d.ts +4 -0
- package/dist/notifications/types/shared/import-meta-notification-response.js +2 -0
- package/dist/notifications/types/shared/index.d.ts +22 -0
- package/dist/notifications/types/shared/index.js +38 -0
- package/dist/notifications/types/shared/money-notification-response.d.ts +5 -0
- package/dist/notifications/types/shared/money-notification-response.js +2 -0
- package/dist/notifications/types/shared/payment-card-notification-response.d.ts +8 -0
- package/dist/notifications/types/shared/payment-card-notification-response.js +2 -0
- package/dist/notifications/types/shared/payment-method-details.d.ts +6 -0
- package/dist/notifications/types/shared/payment-method-details.js +2 -0
- package/dist/notifications/types/shared/payout-totals-adjustment-notification-response.d.ts +11 -0
- package/dist/notifications/types/shared/payout-totals-adjustment-notification-response.js +2 -0
- package/dist/notifications/types/shared/shared-price-notification-response.d.ts +19 -0
- package/dist/notifications/types/shared/shared-price-notification-response.js +2 -0
- package/dist/notifications/types/shared/shared-product-notification-response.d.ts +15 -0
- package/dist/notifications/types/shared/shared-product-notification-response.js +2 -0
- package/dist/notifications/types/shared/tax-rates-used-notification-response.d.ts +5 -0
- package/dist/notifications/types/shared/tax-rates-used-notification-response.js +2 -0
- package/dist/notifications/types/shared/time-period-notification.d.ts +5 -0
- package/dist/notifications/types/shared/time-period-notification.js +2 -0
- package/dist/notifications/types/shared/total-adjustments-notification-response.d.ts +9 -0
- package/dist/notifications/types/shared/total-adjustments-notification-response.js +2 -0
- package/dist/notifications/types/shared/totals.d.ts +6 -0
- package/dist/notifications/types/shared/totals.js +2 -0
- package/dist/notifications/types/shared/transaction-checkout-notification.d.ts +3 -0
- package/dist/notifications/types/shared/transaction-checkout-notification.js +2 -0
- package/dist/notifications/types/shared/transaction-payment-attempt-notification-response.d.ts +13 -0
- package/dist/notifications/types/shared/transaction-payment-attempt-notification-response.js +2 -0
- package/dist/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.d.ts +11 -0
- package/dist/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.js +2 -0
- package/dist/notifications/types/shared/transaction-payout-totals-notification-response.d.ts +14 -0
- package/dist/notifications/types/shared/transaction-payout-totals-notification-response.js +2 -0
- package/dist/notifications/types/shared/transaction-totals-adjusted-notification-response.d.ts +10 -0
- package/dist/notifications/types/shared/transaction-totals-adjusted-notification-response.js +2 -0
- package/dist/notifications/types/shared/transaction-totals-notification-response.d.ts +14 -0
- package/dist/notifications/types/shared/transaction-totals-notification-response.js +2 -0
- package/dist/notifications/types/shared/unit-price-override-notification-response.d.ts +6 -0
- package/dist/notifications/types/shared/unit-price-override-notification-response.js +2 -0
- package/dist/notifications/types/shared/unit-totals.d.ts +6 -0
- package/dist/notifications/types/shared/unit-totals.js +2 -0
- package/dist/notifications/types/subscription/index.d.ts +7 -0
- package/dist/notifications/types/subscription/index.js +23 -0
- package/dist/notifications/types/subscription/subscription-discount-notification-response.d.ts +5 -0
- package/dist/notifications/types/subscription/subscription-discount-notification-response.js +2 -0
- package/dist/notifications/types/subscription/subscription-item-notification-response.d.ts +13 -0
- package/dist/notifications/types/subscription/subscription-item-notification-response.js +2 -0
- package/dist/notifications/types/subscription/subscription-notification-response.d.ts +28 -0
- package/dist/notifications/types/subscription/subscription-notification-response.js +2 -0
- package/dist/notifications/types/subscription/subscription-price-notification-response.d.ts +20 -0
- package/dist/notifications/types/subscription/subscription-price-notification-response.js +2 -0
- package/dist/notifications/types/subscription/subscription-scheduled-change-notification-response.d.ts +6 -0
- package/dist/notifications/types/subscription/subscription-scheduled-change-notification-response.js +2 -0
- package/dist/notifications/types/subscription/subscription-time-period-notification-response.d.ts +4 -0
- package/dist/notifications/types/subscription/subscription-time-period-notification-response.js +2 -0
- package/dist/notifications/types/transaction/index.d.ts +6 -0
- package/dist/notifications/types/transaction/index.js +22 -0
- package/dist/notifications/types/transaction/transaction-details-notification-response.d.ts +9 -0
- package/dist/notifications/types/transaction/transaction-details-notification-response.js +2 -0
- package/dist/notifications/types/transaction/transaction-item-notification-response.d.ts +7 -0
- package/dist/notifications/types/transaction/transaction-item-notification-response.js +2 -0
- package/dist/notifications/types/transaction/transaction-line-item-notification-response.d.ts +11 -0
- package/dist/notifications/types/transaction/transaction-line-item-notification-response.js +2 -0
- package/dist/notifications/types/transaction/transaction-notification-response.d.ts +27 -0
- package/dist/notifications/types/transaction/transaction-notification-response.js +2 -0
- package/dist/notifications/types/transaction/transaction-proration-notification-response.d.ts +5 -0
- package/dist/notifications/types/transaction/transaction-proration-notification-response.js +2 -0
- package/dist/notifications/types/transaction/transactions-time-period-notification-response.d.ts +4 -0
- package/dist/notifications/types/transaction/transactions-time-period-notification-response.js +2 -0
- package/dist/resources/prices/index.d.ts +2 -2
- package/dist/resources/prices/index.js +1 -1
- package/dist/resources/products/index.d.ts +2 -2
- package/dist/resources/products/index.js +1 -1
- package/dist/resources/subscriptions/index.d.ts +3 -3
- package/dist/resources/subscriptions/index.js +2 -2
- package/dist/resources/transactions/index.d.ts +5 -5
- package/dist/resources/transactions/index.js +3 -3
- package/dist/types/events/events-response.d.ts +34 -45
- package/dist/types/price/price-response.d.ts +1 -1
- package/dist/types/pricing-preview/pricing-preview-response.d.ts +1 -2
- package/dist/types/shared/shared-price-response.d.ts +4 -4
- package/dist/types/subscription/index.d.ts +0 -2
- package/dist/types/subscription/index.js +0 -2
- package/dist/types/subscription/subscription-item-response.d.ts +2 -2
- package/dist/types/transaction/transaction-preview-response.d.ts +1 -2
- package/dist/types/transaction/transaction-response.d.ts +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/entities/price/price-with-includes.d.ts +0 -21
- package/dist/entities/product/product-with-includes.d.ts +0 -17
- package/dist/entities/subscription/subscription-includes.d.ts +0 -31
- package/dist/entities/subscription/subscription-includes.js +0 -42
- package/dist/entities/subscription/subscription-price.d.ts +0 -13
- package/dist/entities/subscription/subscription-price.js +0 -16
- package/dist/entities/transaction/transaction-includes.d.ts +0 -36
- package/dist/types/subscription/subscription-notification-response.d.ts +0 -29
- package/dist/types/subscription/subscription-price-response.d.ts +0 -11
- /package/dist/{types/subscription/subscription-notification-response.js → notifications/types/address/address-notification-response.js} +0 -0
- /package/dist/{types/subscription/subscription-price-response.js → notifications/types/adjustment/adjustment-item-notification-response.js} +0 -0
|
@@ -73,7 +73,7 @@ class SubscriptionsResource extends base_1.BaseResource {
|
|
|
73
73
|
}).deriveUrl();
|
|
74
74
|
const response = yield this.client.get(urlWithPathParams, queryParameters);
|
|
75
75
|
const data = this.handleResponse(response);
|
|
76
|
-
return new entities_1.
|
|
76
|
+
return new entities_1.Subscription(data);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
activate(subscriptionId) {
|
|
@@ -143,7 +143,7 @@ class SubscriptionsResource extends base_1.BaseResource {
|
|
|
143
143
|
}).deriveUrl();
|
|
144
144
|
const response = yield this.client.get(urlWithPathParams);
|
|
145
145
|
const data = this.handleResponse(response);
|
|
146
|
-
return new entities_1.
|
|
146
|
+
return new entities_1.Transaction(data);
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction, TransactionCollection, TransactionInvoicePDF, TransactionPreview } from '../../entities';
|
|
2
2
|
import { BaseResource } from '../../internal/base';
|
|
3
|
-
import { type CreateTransactionQueryParameters, type CreateTransactionRequestBody, type GetTransactionQueryParameters, type ListTransactionQueryParameters, type
|
|
3
|
+
import { type CreateTransactionQueryParameters, type CreateTransactionRequestBody, type GetTransactionQueryParameters, type ListTransactionQueryParameters, type TransactionPreviewRequestBody, type UpdateTransactionQueryParameters, type UpdateTransactionRequestBody } from './operations';
|
|
4
4
|
export * from './operations';
|
|
5
5
|
export declare class TransactionsResource extends BaseResource {
|
|
6
6
|
list(queryParams?: ListTransactionQueryParameters): TransactionCollection;
|
|
7
|
-
create(createTransactionParameters: CreateTransactionRequestBody, queryParams?: CreateTransactionQueryParameters): Promise<
|
|
8
|
-
update(transactionId: string, updateTransaction: UpdateTransactionRequestBody, queryParams?: UpdateTransactionQueryParameters): Promise<
|
|
9
|
-
get(transactionId: string, queryParams?: GetTransactionQueryParameters): Promise<
|
|
7
|
+
create(createTransactionParameters: CreateTransactionRequestBody, queryParams?: CreateTransactionQueryParameters): Promise<Transaction>;
|
|
8
|
+
update(transactionId: string, updateTransaction: UpdateTransactionRequestBody, queryParams?: UpdateTransactionQueryParameters): Promise<Transaction>;
|
|
9
|
+
get(transactionId: string, queryParams?: GetTransactionQueryParameters): Promise<Transaction>;
|
|
10
10
|
getInvoicePDF(transactionId: string): Promise<TransactionInvoicePDF>;
|
|
11
11
|
preview(previewTransactionParameters: TransactionPreviewRequestBody): Promise<TransactionPreview>;
|
|
12
12
|
}
|
|
@@ -45,7 +45,7 @@ class TransactionsResource extends base_1.BaseResource {
|
|
|
45
45
|
const queryParameters = new base_1.QueryParameters(queryParams);
|
|
46
46
|
const response = yield this.client.post(TransactionPaths.create + queryParameters.toQueryString(), createTransactionParameters);
|
|
47
47
|
const data = this.handleResponse(response);
|
|
48
|
-
return new entities_1.
|
|
48
|
+
return new entities_1.Transaction(data);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
update(transactionId, updateTransaction, queryParams) {
|
|
@@ -56,7 +56,7 @@ class TransactionsResource extends base_1.BaseResource {
|
|
|
56
56
|
}).deriveUrl();
|
|
57
57
|
const response = yield this.client.patch(urlWithPathParams + queryParameters.toQueryString(), updateTransaction);
|
|
58
58
|
const data = this.handleResponse(response);
|
|
59
|
-
return new entities_1.
|
|
59
|
+
return new entities_1.Transaction(data);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
get(transactionId, queryParams) {
|
|
@@ -67,7 +67,7 @@ class TransactionsResource extends base_1.BaseResource {
|
|
|
67
67
|
}).deriveUrl();
|
|
68
68
|
const response = yield this.client.get(urlWithPathParams, queryParameters);
|
|
69
69
|
const data = this.handleResponse(response);
|
|
70
|
-
return new entities_1.
|
|
70
|
+
return new entities_1.Transaction(data);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
getInvoicePDF(transactionId) {
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type IBusinessResponse } from '../business';
|
|
3
|
-
import { type EventName } from '../../notifications';
|
|
4
|
-
import { type IAdjustmentResponse } from '../adjustment';
|
|
5
|
-
import { type ICustomerResponse } from '../customer';
|
|
6
|
-
import { type IDiscountResponse } from '../discount';
|
|
7
|
-
import { type IPriceResponse } from '../price';
|
|
8
|
-
import { type IProductResponse } from '../product';
|
|
9
|
-
import { type ISubscriptionNotificationResponse } from '../subscription';
|
|
10
|
-
import { type ITransactionResponse } from '../transaction';
|
|
11
|
-
import { type IPayoutResponse } from '../payout';
|
|
12
|
-
import { type IReportResponse } from '../report';
|
|
1
|
+
import { type EventName, type IAddressNotificationResponse, type IAdjustmentNotificationResponse, type IBusinessNotificationResponse, type ICustomerNotificationResponse, type IDiscountNotificationResponse, type IPayoutNotificationResponse, type IPriceNotificationResponse, type IProductNotificationResponse, type IReportNotificationResponse, type ISubscriptionNotificationResponse, type ITransactionNotificationResponse } from '../../notifications';
|
|
13
2
|
export interface IEventsResponse<T = object> {
|
|
14
3
|
event_id: string;
|
|
15
4
|
notification_id: string;
|
|
@@ -17,70 +6,70 @@ export interface IEventsResponse<T = object> {
|
|
|
17
6
|
occurred_at: string;
|
|
18
7
|
data: T;
|
|
19
8
|
}
|
|
20
|
-
interface IAddressCreated extends IEventsResponse<
|
|
9
|
+
interface IAddressCreated extends IEventsResponse<IAddressNotificationResponse> {
|
|
21
10
|
event_type: EventName.AddressCreated;
|
|
22
11
|
}
|
|
23
|
-
interface IAddressUpdated extends IEventsResponse<
|
|
12
|
+
interface IAddressUpdated extends IEventsResponse<IAddressNotificationResponse> {
|
|
24
13
|
event_type: EventName.AddressUpdated;
|
|
25
14
|
}
|
|
26
|
-
interface IAddressImported extends IEventsResponse<
|
|
15
|
+
interface IAddressImported extends IEventsResponse<IAddressNotificationResponse> {
|
|
27
16
|
event_type: EventName.AddressImported;
|
|
28
17
|
}
|
|
29
|
-
interface IAdjustmentCreated extends IEventsResponse<
|
|
18
|
+
interface IAdjustmentCreated extends IEventsResponse<IAdjustmentNotificationResponse> {
|
|
30
19
|
event_type: EventName.AdjustmentCreated;
|
|
31
20
|
}
|
|
32
|
-
interface IAdjustmentUpdated extends IEventsResponse<
|
|
21
|
+
interface IAdjustmentUpdated extends IEventsResponse<IAdjustmentNotificationResponse> {
|
|
33
22
|
event_type: EventName.AdjustmentUpdated;
|
|
34
23
|
}
|
|
35
|
-
interface IBusinessCreated extends IEventsResponse<
|
|
24
|
+
interface IBusinessCreated extends IEventsResponse<IBusinessNotificationResponse> {
|
|
36
25
|
event_type: EventName.BusinessCreated;
|
|
37
26
|
}
|
|
38
|
-
interface IBusinessUpdated extends IEventsResponse<
|
|
27
|
+
interface IBusinessUpdated extends IEventsResponse<IBusinessNotificationResponse> {
|
|
39
28
|
event_type: EventName.BusinessUpdated;
|
|
40
29
|
}
|
|
41
|
-
interface IBusinessImported extends IEventsResponse<
|
|
30
|
+
interface IBusinessImported extends IEventsResponse<IBusinessNotificationResponse> {
|
|
42
31
|
event_type: EventName.BusinessImported;
|
|
43
32
|
}
|
|
44
|
-
interface ICustomerCreated extends IEventsResponse<
|
|
33
|
+
interface ICustomerCreated extends IEventsResponse<ICustomerNotificationResponse> {
|
|
45
34
|
event_type: EventName.CustomerCreated;
|
|
46
35
|
}
|
|
47
|
-
interface ICustomerUpdated extends IEventsResponse<
|
|
36
|
+
interface ICustomerUpdated extends IEventsResponse<ICustomerNotificationResponse> {
|
|
48
37
|
event_type: EventName.CustomerUpdated;
|
|
49
38
|
}
|
|
50
|
-
interface ICustomerImported extends IEventsResponse<
|
|
39
|
+
interface ICustomerImported extends IEventsResponse<ICustomerNotificationResponse> {
|
|
51
40
|
event_type: EventName.CustomerImported;
|
|
52
41
|
}
|
|
53
|
-
interface IDiscountCreated extends IEventsResponse<
|
|
42
|
+
interface IDiscountCreated extends IEventsResponse<IDiscountNotificationResponse> {
|
|
54
43
|
event_type: EventName.DiscountCreated;
|
|
55
44
|
}
|
|
56
|
-
interface IDiscountUpdated extends IEventsResponse<
|
|
45
|
+
interface IDiscountUpdated extends IEventsResponse<IDiscountNotificationResponse> {
|
|
57
46
|
event_type: EventName.DiscountUpdated;
|
|
58
47
|
}
|
|
59
|
-
interface IDiscountImported extends IEventsResponse<
|
|
48
|
+
interface IDiscountImported extends IEventsResponse<IDiscountNotificationResponse> {
|
|
60
49
|
event_type: EventName.DiscountImported;
|
|
61
50
|
}
|
|
62
|
-
interface IPayoutCreated extends IEventsResponse<
|
|
51
|
+
interface IPayoutCreated extends IEventsResponse<IPayoutNotificationResponse> {
|
|
63
52
|
event_type: EventName.PayoutCreated;
|
|
64
53
|
}
|
|
65
|
-
interface IPayoutPaid extends IEventsResponse<
|
|
54
|
+
interface IPayoutPaid extends IEventsResponse<IPayoutNotificationResponse> {
|
|
66
55
|
event_type: EventName.PayoutPaid;
|
|
67
56
|
}
|
|
68
|
-
interface IPriceCreated extends IEventsResponse<
|
|
57
|
+
interface IPriceCreated extends IEventsResponse<IPriceNotificationResponse> {
|
|
69
58
|
event_type: EventName.PriceCreated;
|
|
70
59
|
}
|
|
71
|
-
interface IPriceUpdated extends IEventsResponse<
|
|
60
|
+
interface IPriceUpdated extends IEventsResponse<IPriceNotificationResponse> {
|
|
72
61
|
event_type: EventName.PriceUpdated;
|
|
73
62
|
}
|
|
74
|
-
interface IPriceImported extends IEventsResponse<
|
|
63
|
+
interface IPriceImported extends IEventsResponse<IPriceNotificationResponse> {
|
|
75
64
|
event_type: EventName.PriceImported;
|
|
76
65
|
}
|
|
77
|
-
interface IProductCreated extends IEventsResponse<
|
|
66
|
+
interface IProductCreated extends IEventsResponse<IProductNotificationResponse> {
|
|
78
67
|
event_type: EventName.ProductCreated;
|
|
79
68
|
}
|
|
80
|
-
interface IProductUpdated extends IEventsResponse<
|
|
69
|
+
interface IProductUpdated extends IEventsResponse<IProductNotificationResponse> {
|
|
81
70
|
event_type: EventName.ProductUpdated;
|
|
82
71
|
}
|
|
83
|
-
interface IProductImported extends IEventsResponse<
|
|
72
|
+
interface IProductImported extends IEventsResponse<IProductNotificationResponse> {
|
|
84
73
|
event_type: EventName.ProductImported;
|
|
85
74
|
}
|
|
86
75
|
interface ISubscriptionActivated extends IEventsResponse<ISubscriptionNotificationResponse> {
|
|
@@ -110,37 +99,37 @@ interface ISubscriptionTrialing extends IEventsResponse<ISubscriptionNotificatio
|
|
|
110
99
|
interface ISubscriptionUpdated extends IEventsResponse<ISubscriptionNotificationResponse> {
|
|
111
100
|
event_type: EventName.SubscriptionUpdated;
|
|
112
101
|
}
|
|
113
|
-
interface ITransactionBilled extends IEventsResponse<
|
|
102
|
+
interface ITransactionBilled extends IEventsResponse<ITransactionNotificationResponse> {
|
|
114
103
|
event_type: EventName.TransactionBilled;
|
|
115
104
|
}
|
|
116
|
-
interface ITransactionCanceled extends IEventsResponse<
|
|
105
|
+
interface ITransactionCanceled extends IEventsResponse<ITransactionNotificationResponse> {
|
|
117
106
|
event_type: EventName.TransactionCanceled;
|
|
118
107
|
}
|
|
119
|
-
interface ITransactionCompleted extends IEventsResponse<
|
|
108
|
+
interface ITransactionCompleted extends IEventsResponse<ITransactionNotificationResponse> {
|
|
120
109
|
event_type: EventName.TransactionCompleted;
|
|
121
110
|
}
|
|
122
|
-
interface ITransactionCreated extends IEventsResponse<
|
|
111
|
+
interface ITransactionCreated extends IEventsResponse<ITransactionNotificationResponse> {
|
|
123
112
|
event_type: EventName.TransactionCreated;
|
|
124
113
|
}
|
|
125
|
-
interface ITransactionPaid extends IEventsResponse<
|
|
114
|
+
interface ITransactionPaid extends IEventsResponse<ITransactionNotificationResponse> {
|
|
126
115
|
event_type: EventName.TransactionPaid;
|
|
127
116
|
}
|
|
128
|
-
interface ITransactionPastDue extends IEventsResponse<
|
|
117
|
+
interface ITransactionPastDue extends IEventsResponse<ITransactionNotificationResponse> {
|
|
129
118
|
event_type: EventName.TransactionPastDue;
|
|
130
119
|
}
|
|
131
|
-
interface ITransactionPaymentFailed extends IEventsResponse<
|
|
120
|
+
interface ITransactionPaymentFailed extends IEventsResponse<ITransactionNotificationResponse> {
|
|
132
121
|
event_type: EventName.TransactionPaymentFailed;
|
|
133
122
|
}
|
|
134
|
-
interface ITransactionReady extends IEventsResponse<
|
|
123
|
+
interface ITransactionReady extends IEventsResponse<ITransactionNotificationResponse> {
|
|
135
124
|
event_type: EventName.TransactionReady;
|
|
136
125
|
}
|
|
137
|
-
interface ITransactionUpdated extends IEventsResponse<
|
|
126
|
+
interface ITransactionUpdated extends IEventsResponse<ITransactionNotificationResponse> {
|
|
138
127
|
event_type: EventName.TransactionUpdated;
|
|
139
128
|
}
|
|
140
|
-
interface IReportCreated extends IEventsResponse<
|
|
129
|
+
interface IReportCreated extends IEventsResponse<IReportNotificationResponse> {
|
|
141
130
|
event_type: EventName.ReportCreated;
|
|
142
131
|
}
|
|
143
|
-
interface IReportUpdated extends IEventsResponse<
|
|
132
|
+
interface IReportUpdated extends IEventsResponse<IReportNotificationResponse> {
|
|
144
133
|
event_type: EventName.ReportUpdated;
|
|
145
134
|
}
|
|
146
135
|
export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPayoutCreated | IPayoutPaid | IPriceCreated | IPriceUpdated | IPriceImported | IProductCreated | IProductUpdated | IProductImported | ISubscriptionActivated | ISubscriptionCanceled | ISubscriptionCreated | ISubscriptionImported | ISubscriptionPastDue | ISubscriptionPaused | ISubscriptionResumed | ISubscriptionTrialing | ISubscriptionUpdated | ITransactionBilled | ITransactionCanceled | ITransactionCompleted | ITransactionCreated | ITransactionPaid | ITransactionPastDue | ITransactionPaymentFailed | ITransactionReady | ITransactionUpdated | IReportCreated | IReportUpdated;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type CurrencyCode } from '../../enums';
|
|
1
|
+
import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums';
|
|
2
2
|
import { type IAddressPreviewResponse } from '../../resources';
|
|
3
3
|
import { type IPricingPreviewItemResponse } from './pricing-preview-item-response';
|
|
4
4
|
import { type IPricingPreviewDetailsResponse } from './pricing-preview-details-response';
|
|
5
|
-
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
6
5
|
export interface IPricingPreviewResponse {
|
|
7
6
|
customer_id?: string | null;
|
|
8
7
|
address_id?: string | null;
|
|
@@ -4,14 +4,14 @@ export interface ISharedPriceResponse {
|
|
|
4
4
|
id: string;
|
|
5
5
|
product_id: string;
|
|
6
6
|
description: string;
|
|
7
|
-
type
|
|
7
|
+
type: CatalogType;
|
|
8
8
|
name?: string | null;
|
|
9
9
|
billing_cycle?: ITimePeriod | null;
|
|
10
10
|
trial_period?: ITimePeriod | null;
|
|
11
11
|
tax_mode: TaxMode;
|
|
12
|
-
unit_price
|
|
13
|
-
unit_price_overrides
|
|
14
|
-
quantity
|
|
12
|
+
unit_price: IMoneyResponse;
|
|
13
|
+
unit_price_overrides: IUnitPriceOverrideResponse[];
|
|
14
|
+
quantity: IPriceQuantity;
|
|
15
15
|
status: Status;
|
|
16
16
|
custom_data?: ICustomData | null;
|
|
17
17
|
import_meta?: IImportMetaResponse | null;
|
|
@@ -2,7 +2,6 @@ export * from './subscription-discount-response';
|
|
|
2
2
|
export * from './subscription-time-period-response';
|
|
3
3
|
export * from './subscription-scheduled-change-response';
|
|
4
4
|
export * from './subscription-management-response';
|
|
5
|
-
export * from './subscription-price-response';
|
|
6
5
|
export * from './subscription-item-response';
|
|
7
6
|
export * from './next-transaction-response';
|
|
8
7
|
export * from './subscription-discount-response';
|
|
@@ -11,4 +10,3 @@ export * from './subscription-response';
|
|
|
11
10
|
export * from './subscription-preview-response';
|
|
12
11
|
export * from './subscription-preview-update-summary';
|
|
13
12
|
export * from './subscription-result-response';
|
|
14
|
-
export * from './subscription-notification-response';
|
|
@@ -18,7 +18,6 @@ __exportStar(require("./subscription-discount-response"), exports);
|
|
|
18
18
|
__exportStar(require("./subscription-time-period-response"), exports);
|
|
19
19
|
__exportStar(require("./subscription-scheduled-change-response"), exports);
|
|
20
20
|
__exportStar(require("./subscription-management-response"), exports);
|
|
21
|
-
__exportStar(require("./subscription-price-response"), exports);
|
|
22
21
|
__exportStar(require("./subscription-item-response"), exports);
|
|
23
22
|
__exportStar(require("./next-transaction-response"), exports);
|
|
24
23
|
__exportStar(require("./subscription-discount-response"), exports);
|
|
@@ -27,4 +26,3 @@ __exportStar(require("./subscription-response"), exports);
|
|
|
27
26
|
__exportStar(require("./subscription-preview-response"), exports);
|
|
28
27
|
__exportStar(require("./subscription-preview-update-summary"), exports);
|
|
29
28
|
__exportStar(require("./subscription-result-response"), exports);
|
|
30
|
-
__exportStar(require("./subscription-notification-response"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IPriceResponse, type ISubscriptionTimePeriodResponse } from '../index';
|
|
2
2
|
import { type SubscriptionItemStatus } from '../../enums';
|
|
3
3
|
export interface ISubscriptionItemResponse {
|
|
4
4
|
status: SubscriptionItemStatus;
|
|
@@ -9,5 +9,5 @@ export interface ISubscriptionItemResponse {
|
|
|
9
9
|
previously_billed_at?: string | null;
|
|
10
10
|
next_billed_at?: string | null;
|
|
11
11
|
trial_dates?: ISubscriptionTimePeriodResponse | null;
|
|
12
|
-
price?:
|
|
12
|
+
price?: IPriceResponse | null;
|
|
13
13
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type CurrencyCode } from '../../enums';
|
|
1
|
+
import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums';
|
|
2
2
|
import { type IAddressPreviewResponse } from '../../resources';
|
|
3
3
|
import { type ITransactionDetailsPreviewResponse } from '../shared';
|
|
4
4
|
import { type IPriceResponse } from '../price';
|
|
5
5
|
import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response';
|
|
6
|
-
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
7
6
|
export interface IProrationResponse {
|
|
8
7
|
rate: string;
|
|
9
8
|
billing_period: ITransactionsTimePeriodResponse;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ICustomData, type IBillingDetailsResponse, type ITransactionsTimePeriodResponse, type ITransactionItemResponse, type ITransactionDetailsResponse, type ITransactionPaymentAttemptResponse, type ITransactionCheckout, type IAddressResponse, type ITransactionAdjustmentResponse, type IAdjustmentTotalsResponse, type IBusinessResponse, type ICustomerResponse, type IDiscountResponse } from '../index';
|
|
2
|
-
import { type TransactionStatus, type CurrencyCode, type TransactionOrigin, type CollectionMode } from '../../enums';
|
|
3
|
-
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
2
|
+
import { type TransactionStatus, type CurrencyCode, type TransactionOrigin, type CollectionMode, type AvailablePaymentMethod } from '../../enums';
|
|
4
3
|
export interface ITransactionResponse {
|
|
5
4
|
id: string;
|
|
6
5
|
status: TransactionStatus;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.6.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type IPriceResponse } from '../../types';
|
|
2
|
-
import { type CustomData, ImportMeta, Money, PriceQuantity, Product, TimePeriod, UnitPriceOverride } from '../index';
|
|
3
|
-
import { type CatalogType, type Status, type TaxMode } from '../../enums';
|
|
4
|
-
export declare class PriceWithIncludes {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly productId: string;
|
|
7
|
-
readonly description: string;
|
|
8
|
-
readonly name: string | null;
|
|
9
|
-
readonly type: CatalogType | null;
|
|
10
|
-
readonly billingCycle: TimePeriod | null;
|
|
11
|
-
readonly trialPeriod: TimePeriod | null;
|
|
12
|
-
readonly taxMode: TaxMode;
|
|
13
|
-
readonly unitPrice: Money;
|
|
14
|
-
readonly unitPriceOverrides: UnitPriceOverride[];
|
|
15
|
-
readonly quantity: PriceQuantity;
|
|
16
|
-
readonly status: Status;
|
|
17
|
-
readonly customData: CustomData | null;
|
|
18
|
-
readonly importMeta: ImportMeta | null;
|
|
19
|
-
readonly product: Product | null;
|
|
20
|
-
constructor(price: IPriceResponse);
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type IProductResponse } from '../../types';
|
|
2
|
-
import { type CustomData, ImportMeta, Price } from '../index';
|
|
3
|
-
import { type CatalogType, type Status, type TaxCategory } from '../../enums';
|
|
4
|
-
export declare class ProductWithIncludes {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly type: CatalogType | null;
|
|
8
|
-
readonly description: string | null;
|
|
9
|
-
readonly taxCategory: TaxCategory;
|
|
10
|
-
readonly imageUrl: string | null;
|
|
11
|
-
readonly customData: CustomData | null;
|
|
12
|
-
readonly status: Status;
|
|
13
|
-
readonly createdAt: string;
|
|
14
|
-
readonly importMeta: ImportMeta | null;
|
|
15
|
-
readonly prices: Price[] | null;
|
|
16
|
-
constructor(product: IProductResponse);
|
|
17
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BillingDetails, type CustomData, ImportMeta, NextTransaction, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod, TransactionDetailsPreview } from '../index';
|
|
2
|
-
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
|
-
import { type ISubscriptionResponse } from '../../types';
|
|
4
|
-
export declare class SubscriptionIncludes {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly status: SubscriptionStatus;
|
|
7
|
-
readonly customerId: string;
|
|
8
|
-
readonly addressId: string;
|
|
9
|
-
readonly businessId: string | null;
|
|
10
|
-
readonly currencyCode: CurrencyCode;
|
|
11
|
-
readonly createdAt: string;
|
|
12
|
-
readonly updatedAt: string;
|
|
13
|
-
readonly startedAt: string | null;
|
|
14
|
-
readonly firstBilledAt: string | null;
|
|
15
|
-
readonly nextBilledAt: string | null;
|
|
16
|
-
readonly pausedAt: string | null;
|
|
17
|
-
readonly canceledAt: string | null;
|
|
18
|
-
readonly discount: SubscriptionDiscount | null;
|
|
19
|
-
readonly collectionMode: CollectionMode;
|
|
20
|
-
readonly billingDetails: BillingDetails | null;
|
|
21
|
-
readonly currentBillingPeriod: SubscriptionTimePeriod | null;
|
|
22
|
-
readonly billingCycle: TimePeriod;
|
|
23
|
-
readonly scheduledChange: SubscriptionScheduledChange | null;
|
|
24
|
-
readonly managementUrls: SubscriptionManagement | null;
|
|
25
|
-
readonly items: SubscriptionItem[];
|
|
26
|
-
readonly customData: CustomData | null;
|
|
27
|
-
readonly importMeta: ImportMeta | null;
|
|
28
|
-
readonly nextTransaction: NextTransaction | null;
|
|
29
|
-
readonly recurringTransactionDetails: TransactionDetailsPreview | null;
|
|
30
|
-
constructor(subscription: ISubscriptionResponse);
|
|
31
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionIncludes = void 0;
|
|
4
|
-
const index_1 = require("../index");
|
|
5
|
-
class SubscriptionIncludes {
|
|
6
|
-
constructor(subscription) {
|
|
7
|
-
this.id = subscription.id;
|
|
8
|
-
this.status = subscription.status;
|
|
9
|
-
this.customerId = subscription.customer_id;
|
|
10
|
-
this.addressId = subscription.address_id;
|
|
11
|
-
this.businessId = subscription.business_id ? subscription.business_id : null;
|
|
12
|
-
this.currencyCode = subscription.currency_code;
|
|
13
|
-
this.createdAt = subscription.created_at;
|
|
14
|
-
this.updatedAt = subscription.updated_at;
|
|
15
|
-
this.startedAt = subscription.started_at ? subscription.started_at : null;
|
|
16
|
-
this.firstBilledAt = subscription.first_billed_at ? subscription.first_billed_at : null;
|
|
17
|
-
this.nextBilledAt = subscription.next_billed_at ? subscription.next_billed_at : null;
|
|
18
|
-
this.pausedAt = subscription.paused_at ? subscription.paused_at : null;
|
|
19
|
-
this.canceledAt = subscription.canceled_at ? subscription.canceled_at : null;
|
|
20
|
-
this.discount = subscription.discount ? new index_1.SubscriptionDiscount(subscription.discount) : null;
|
|
21
|
-
this.collectionMode = subscription.collection_mode;
|
|
22
|
-
this.billingDetails = subscription.billing_details ? new index_1.BillingDetails(subscription.billing_details) : null;
|
|
23
|
-
this.currentBillingPeriod = subscription.current_billing_period
|
|
24
|
-
? new index_1.SubscriptionTimePeriod(subscription.current_billing_period)
|
|
25
|
-
: null;
|
|
26
|
-
this.billingCycle = new index_1.TimePeriod(subscription.billing_cycle);
|
|
27
|
-
this.scheduledChange = subscription.scheduled_change
|
|
28
|
-
? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
|
|
29
|
-
: null;
|
|
30
|
-
this.managementUrls = subscription.management_urls
|
|
31
|
-
? new index_1.SubscriptionManagement(subscription.management_urls)
|
|
32
|
-
: null;
|
|
33
|
-
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
34
|
-
this.customData = subscription.custom_data ? subscription.custom_data : null;
|
|
35
|
-
this.importMeta = subscription.import_meta ? new index_1.ImportMeta(subscription.import_meta) : null;
|
|
36
|
-
this.nextTransaction = subscription.next_transaction ? new index_1.NextTransaction(subscription.next_transaction) : null;
|
|
37
|
-
this.recurringTransactionDetails = subscription.recurring_transaction_details
|
|
38
|
-
? new index_1.TransactionDetailsPreview(subscription.recurring_transaction_details)
|
|
39
|
-
: null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.SubscriptionIncludes = SubscriptionIncludes;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ISubscriptionPriceResponse } from '../../types';
|
|
2
|
-
import { TimePeriod, Money } from '../index';
|
|
3
|
-
import { type TaxMode } from '../../enums';
|
|
4
|
-
export declare class SubscriptionPrice {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly description: string;
|
|
7
|
-
readonly productId: string;
|
|
8
|
-
readonly billingCycle: TimePeriod | null;
|
|
9
|
-
readonly trialPeriod: TimePeriod | null;
|
|
10
|
-
readonly taxMode: TaxMode;
|
|
11
|
-
readonly unitPrice: Money;
|
|
12
|
-
constructor(subscriptionPrice: ISubscriptionPriceResponse);
|
|
13
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionPrice = void 0;
|
|
4
|
-
const index_1 = require("../index");
|
|
5
|
-
class SubscriptionPrice {
|
|
6
|
-
constructor(subscriptionPrice) {
|
|
7
|
-
this.id = subscriptionPrice.id;
|
|
8
|
-
this.description = subscriptionPrice.description;
|
|
9
|
-
this.productId = subscriptionPrice.product_id;
|
|
10
|
-
this.billingCycle = subscriptionPrice.billing_cycle ? new index_1.TimePeriod(subscriptionPrice.billing_cycle) : null;
|
|
11
|
-
this.trialPeriod = subscriptionPrice.trial_period ? new index_1.TimePeriod(subscriptionPrice.trial_period) : null;
|
|
12
|
-
this.taxMode = subscriptionPrice.tax_mode;
|
|
13
|
-
this.unitPrice = new index_1.Money(subscriptionPrice.unit_price);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.SubscriptionPrice = SubscriptionPrice;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type ITransactionResponse } from '../../types';
|
|
2
|
-
import { Address, TransactionAdjustment, AdjustmentTotals, BillingDetails, Business, TransactionCheckout, type CustomData, Customer, TransactionDetails, Discount, TransactionItem, TransactionPaymentAttempt, TransactionsTimePeriod } from '../index';
|
|
3
|
-
import { type CollectionMode, type CurrencyCode, type TransactionStatus, type TransactionOrigin } from '../../enums';
|
|
4
|
-
import { type AvailablePaymentMethod } from '../../enums/shared/available-payment-methods';
|
|
5
|
-
export declare class TransactionIncludes {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
readonly status: TransactionStatus;
|
|
8
|
-
readonly customerId: string | null;
|
|
9
|
-
readonly addressId: string | null;
|
|
10
|
-
readonly businessId: string | null;
|
|
11
|
-
readonly customData: CustomData | null;
|
|
12
|
-
readonly currencyCode: CurrencyCode;
|
|
13
|
-
readonly origin: TransactionOrigin;
|
|
14
|
-
readonly subscriptionId: string | null;
|
|
15
|
-
readonly invoiceId: string | null;
|
|
16
|
-
readonly invoiceNumber: string | null;
|
|
17
|
-
readonly collectionMode: CollectionMode;
|
|
18
|
-
readonly discountId: string | null;
|
|
19
|
-
readonly billingDetails: BillingDetails | null;
|
|
20
|
-
readonly billingPeriod: TransactionsTimePeriod | null;
|
|
21
|
-
readonly items: TransactionItem[];
|
|
22
|
-
readonly details: TransactionDetails | null;
|
|
23
|
-
readonly payments: TransactionPaymentAttempt[];
|
|
24
|
-
readonly checkout: TransactionCheckout | null;
|
|
25
|
-
readonly createdAt: string;
|
|
26
|
-
readonly updatedAt: string;
|
|
27
|
-
readonly billedAt: string | null;
|
|
28
|
-
readonly address: Address | null;
|
|
29
|
-
readonly adjustments: TransactionAdjustment[] | null;
|
|
30
|
-
readonly adjustmentsTotals: AdjustmentTotals | null;
|
|
31
|
-
readonly business: Business | null;
|
|
32
|
-
readonly customer: Customer | null;
|
|
33
|
-
readonly discount: Discount | null;
|
|
34
|
-
readonly availablePaymentMethods: AvailablePaymentMethod[] | null;
|
|
35
|
-
constructor(transaction: ITransactionResponse);
|
|
36
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type IBillingDetailsResponse, type ICustomData, type IImportMetaResponse, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
|
|
2
|
-
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
|
-
export interface ISubscriptionNotificationResponse {
|
|
4
|
-
id: string;
|
|
5
|
-
status: SubscriptionStatus;
|
|
6
|
-
transaction_id: string;
|
|
7
|
-
customer_id: string;
|
|
8
|
-
address_id: string;
|
|
9
|
-
business_id?: string | null;
|
|
10
|
-
currency_code: CurrencyCode;
|
|
11
|
-
created_at: string;
|
|
12
|
-
updated_at: string;
|
|
13
|
-
started_at?: string | null;
|
|
14
|
-
first_billed_at?: string | null;
|
|
15
|
-
next_billed_at?: string | null;
|
|
16
|
-
paused_at?: string | null;
|
|
17
|
-
canceled_at?: string | null;
|
|
18
|
-
discount?: ISubscriptionDiscountResponse | null;
|
|
19
|
-
collection_mode: CollectionMode;
|
|
20
|
-
billing_details?: IBillingDetailsResponse | null;
|
|
21
|
-
current_billing_period?: ISubscriptionTimePeriodResponse | null;
|
|
22
|
-
billing_cycle: ITimePeriod;
|
|
23
|
-
scheduled_change?: ISubscriptionScheduledChangeResponse | null;
|
|
24
|
-
items: ISubscriptionItemResponse[];
|
|
25
|
-
custom_data?: ICustomData | null;
|
|
26
|
-
import_meta?: IImportMetaResponse | null;
|
|
27
|
-
next_transaction?: INextTransactionResponse | null;
|
|
28
|
-
recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
|
|
29
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ITimePeriod, type IMoneyResponse } from '../index';
|
|
2
|
-
import { type TaxMode } from '../../enums';
|
|
3
|
-
export interface ISubscriptionPriceResponse {
|
|
4
|
-
id: string;
|
|
5
|
-
description: string;
|
|
6
|
-
product_id: string;
|
|
7
|
-
billing_cycle?: ITimePeriod | null;
|
|
8
|
-
trial_period?: ITimePeriod | null;
|
|
9
|
-
tax_mode: TaxMode;
|
|
10
|
-
unit_price: IMoneyResponse;
|
|
11
|
-
}
|
|
File without changes
|