@paddle/paddle-node-sdk 0.1.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/LICENSE +201 -0
- package/README.md +270 -0
- package/dist/entities/address/address-collection.d.ts +6 -0
- package/dist/entities/address/address-collection.js +11 -0
- package/dist/entities/address/address.d.ts +19 -0
- package/dist/entities/address/address.js +36 -0
- package/dist/entities/address/index.d.ts +2 -0
- package/dist/entities/address/index.js +18 -0
- package/dist/entities/adjustment/adjustment-collection.d.ts +6 -0
- package/dist/entities/adjustment/adjustment-collection.js +11 -0
- package/dist/entities/adjustment/adjustment-item-totals.d.ts +8 -0
- package/dist/entities/adjustment/adjustment-item-totals.js +18 -0
- package/dist/entities/adjustment/adjustment-item.d.ts +13 -0
- package/dist/entities/adjustment/adjustment-item.js +25 -0
- package/dist/entities/adjustment/adjustment-proration.d.ts +8 -0
- package/dist/entities/adjustment/adjustment-proration.js +19 -0
- package/dist/entities/adjustment/adjustment-time-period.d.ts +7 -0
- package/dist/entities/adjustment/adjustment-time-period.js +16 -0
- package/dist/entities/adjustment/adjustment.d.ts +21 -0
- package/dist/entities/adjustment/adjustment.js +41 -0
- package/dist/entities/adjustment/index.d.ts +6 -0
- package/dist/entities/adjustment/index.js +22 -0
- package/dist/entities/business/business-collection.d.ts +6 -0
- package/dist/entities/business/business-collection.js +11 -0
- package/dist/entities/business/business.d.ts +16 -0
- package/dist/entities/business/business.js +31 -0
- package/dist/entities/business/contacts.d.ts +7 -0
- package/dist/entities/business/contacts.js +16 -0
- package/dist/entities/business/index.d.ts +3 -0
- package/dist/entities/business/index.js +19 -0
- package/dist/entities/customer/customer-collection.d.ts +6 -0
- package/dist/entities/customer/customer-collection.js +11 -0
- package/dist/entities/customer/customer.d.ts +16 -0
- package/dist/entities/customer/customer.js +30 -0
- package/dist/entities/customer/index.d.ts +2 -0
- package/dist/entities/customer/index.js +18 -0
- package/dist/entities/discount/discount-collection.d.ts +6 -0
- package/dist/entities/discount/discount-collection.js +11 -0
- package/dist/entities/discount/discount.d.ts +22 -0
- package/dist/entities/discount/discount.js +44 -0
- package/dist/entities/discount/index.d.ts +2 -0
- package/dist/entities/discount/index.js +18 -0
- package/dist/entities/index.d.ts +12 -0
- package/dist/entities/index.js +26 -0
- package/dist/entities/price/index.d.ts +4 -0
- package/dist/entities/price/index.js +20 -0
- package/dist/entities/price/price-collection.d.ts +6 -0
- package/dist/entities/price/price-collection.js +11 -0
- package/dist/entities/price/price-quantity.d.ts +7 -0
- package/dist/entities/price/price-quantity.js +16 -0
- package/dist/entities/price/price-with-includes.d.ts +19 -0
- package/dist/entities/price/price-with-includes.js +37 -0
- package/dist/entities/price/price.d.ts +18 -0
- package/dist/entities/price/price.js +35 -0
- package/dist/entities/product/index.d.ts +3 -0
- package/dist/entities/product/index.js +19 -0
- package/dist/entities/product/product-collection.d.ts +6 -0
- package/dist/entities/product/product-collection.js +11 -0
- package/dist/entities/product/product-with-includes.d.ts +16 -0
- package/dist/entities/product/product-with-includes.js +32 -0
- package/dist/entities/product/product.d.ts +15 -0
- package/dist/entities/product/product.js +28 -0
- package/dist/entities/shared/adjustment-original-amount.d.ts +8 -0
- package/dist/entities/shared/adjustment-original-amount.js +16 -0
- package/dist/entities/shared/billing-details.d.ts +10 -0
- package/dist/entities/shared/billing-details.js +21 -0
- package/dist/entities/shared/chargeback-fee.d.ts +8 -0
- package/dist/entities/shared/chargeback-fee.js +17 -0
- package/dist/entities/shared/index.d.ts +19 -0
- package/dist/entities/shared/index.js +35 -0
- package/dist/entities/shared/money.d.ts +8 -0
- package/dist/entities/shared/money.js +16 -0
- package/dist/entities/shared/payment-card.d.ts +11 -0
- package/dist/entities/shared/payment-card.js +22 -0
- package/dist/entities/shared/payment-method-details.d.ts +9 -0
- package/dist/entities/shared/payment-method-details.js +17 -0
- package/dist/entities/shared/payout-totals-adjustment.d.ts +14 -0
- package/dist/entities/shared/payout-totals-adjustment.js +29 -0
- package/dist/entities/shared/tax-rates-used.d.ts +8 -0
- package/dist/entities/shared/tax-rates-used.js +17 -0
- package/dist/entities/shared/time-period.d.ts +8 -0
- package/dist/entities/shared/time-period.js +16 -0
- package/dist/entities/shared/total-adjustments.d.ts +12 -0
- package/dist/entities/shared/total-adjustments.js +24 -0
- package/dist/entities/shared/totals.d.ts +9 -0
- package/dist/entities/shared/totals.js +20 -0
- package/dist/entities/shared/transaction-checkout.d.ts +6 -0
- package/dist/entities/shared/transaction-checkout.js +14 -0
- package/dist/entities/shared/transaction-payment-attempt.d.ts +15 -0
- package/dist/entities/shared/transaction-payment-attempt.js +31 -0
- package/dist/entities/shared/transaction-payout-totals-adjusted.d.ts +14 -0
- package/dist/entities/shared/transaction-payout-totals-adjusted.js +29 -0
- package/dist/entities/shared/transaction-payout-totals.d.ts +16 -0
- package/dist/entities/shared/transaction-payout-totals.js +32 -0
- package/dist/entities/shared/transaction-totals-adjusted.d.ts +13 -0
- package/dist/entities/shared/transaction-totals-adjusted.js +26 -0
- package/dist/entities/shared/transaction-totals.d.ts +16 -0
- package/dist/entities/shared/transaction-totals.js +32 -0
- package/dist/entities/shared/unit-price-override.d.ts +9 -0
- package/dist/entities/shared/unit-price-override.js +17 -0
- package/dist/entities/shared/unit-totals.d.ts +9 -0
- package/dist/entities/shared/unit-totals.js +20 -0
- package/dist/entities/subscription/index.d.ts +12 -0
- package/dist/entities/subscription/index.js +28 -0
- package/dist/entities/subscription/next-transaction.d.ts +9 -0
- package/dist/entities/subscription/next-transaction.js +19 -0
- package/dist/entities/subscription/subscription-collection.d.ts +6 -0
- package/dist/entities/subscription/subscription-collection.js +11 -0
- package/dist/entities/subscription/subscription-discount.d.ts +8 -0
- package/dist/entities/subscription/subscription-discount.js +18 -0
- package/dist/entities/subscription/subscription-includes.d.ts +31 -0
- package/dist/entities/subscription/subscription-includes.js +67 -0
- package/dist/entities/subscription/subscription-item.d.ts +16 -0
- package/dist/entities/subscription/subscription-item.js +33 -0
- package/dist/entities/subscription/subscription-management.d.ts +7 -0
- package/dist/entities/subscription/subscription-management.js +16 -0
- package/dist/entities/subscription/subscription-price.d.ts +14 -0
- package/dist/entities/subscription/subscription-price.js +27 -0
- package/dist/entities/subscription/subscription-scheduled-change.d.ts +9 -0
- package/dist/entities/subscription/subscription-scheduled-change.js +18 -0
- package/dist/entities/subscription/subscription-time-period.d.ts +7 -0
- package/dist/entities/subscription/subscription-time-period.js +16 -0
- package/dist/entities/subscription/subscription.d.ts +29 -0
- package/dist/entities/subscription/subscription.js +61 -0
- package/dist/entities/subscription/transaction-details-preview.d.ts +9 -0
- package/dist/entities/subscription/transaction-details-preview.js +19 -0
- package/dist/entities/subscription/transaction-line-item-preview.d.ts +12 -0
- package/dist/entities/subscription/transaction-line-item-preview.js +25 -0
- package/dist/entities/transaction/adjustment-totals-breakdown.d.ts +8 -0
- package/dist/entities/transaction/adjustment-totals-breakdown.js +18 -0
- package/dist/entities/transaction/adjustment-totals.d.ts +14 -0
- package/dist/entities/transaction/adjustment-totals.js +27 -0
- package/dist/entities/transaction/index.d.ts +12 -0
- package/dist/entities/transaction/index.js +28 -0
- package/dist/entities/transaction/transaction-adjustment-item.d.ts +13 -0
- package/dist/entities/transaction/transaction-adjustment-item.js +29 -0
- package/dist/entities/transaction/transaction-adjustment.d.ts +21 -0
- package/dist/entities/transaction/transaction-adjustment.js +41 -0
- package/dist/entities/transaction/transaction-collection.d.ts +6 -0
- package/dist/entities/transaction/transaction-collection.js +11 -0
- package/dist/entities/transaction/transaction-details.d.ts +12 -0
- package/dist/entities/transaction/transaction-details.js +31 -0
- package/dist/entities/transaction/transaction-includes.d.ts +35 -0
- package/dist/entities/transaction/transaction-includes.js +74 -0
- package/dist/entities/transaction/transaction-item.d.ts +10 -0
- package/dist/entities/transaction/transaction-item.js +21 -0
- package/dist/entities/transaction/transaction-line-item.d.ts +14 -0
- package/dist/entities/transaction/transaction-line-item.js +31 -0
- package/dist/entities/transaction/transaction-proration.d.ts +8 -0
- package/dist/entities/transaction/transaction-proration.js +19 -0
- package/dist/entities/transaction/transaction.d.ts +29 -0
- package/dist/entities/transaction/transaction.js +59 -0
- package/dist/entities/transaction/transactions-time-period.d.ts +7 -0
- package/dist/entities/transaction/transactions-time-period.js +16 -0
- package/dist/enums/adjustment/adjustment-action.d.ts +1 -0
- package/dist/enums/adjustment/adjustment-action.js +2 -0
- package/dist/enums/adjustment/adjustment-currency-code.d.ts +1 -0
- package/dist/enums/adjustment/adjustment-currency-code.js +2 -0
- package/dist/enums/adjustment/adjustment-status.d.ts +1 -0
- package/dist/enums/adjustment/adjustment-status.js +2 -0
- package/dist/enums/adjustment/adjustment-type.d.ts +1 -0
- package/dist/enums/adjustment/adjustment-type.js +2 -0
- package/dist/enums/adjustment/index.d.ts +4 -0
- package/dist/enums/adjustment/index.js +20 -0
- package/dist/enums/discount/discount-status.d.ts +1 -0
- package/dist/enums/discount/discount-status.js +2 -0
- package/dist/enums/discount/discount-type.d.ts +1 -0
- package/dist/enums/discount/discount-type.js +2 -0
- package/dist/enums/discount/index.d.ts +2 -0
- package/dist/enums/discount/index.js +18 -0
- package/dist/enums/index.d.ts +5 -0
- package/dist/enums/index.js +21 -0
- package/dist/enums/shared/collection-mode.d.ts +1 -0
- package/dist/enums/shared/collection-mode.js +2 -0
- package/dist/enums/shared/country-code.d.ts +1 -0
- package/dist/enums/shared/country-code.js +2 -0
- package/dist/enums/shared/currency-code.d.ts +1 -0
- package/dist/enums/shared/currency-code.js +2 -0
- package/dist/enums/shared/error-code.d.ts +1 -0
- package/dist/enums/shared/error-code.js +2 -0
- package/dist/enums/shared/index.d.ts +13 -0
- package/dist/enums/shared/index.js +29 -0
- package/dist/enums/shared/interval.d.ts +1 -0
- package/dist/enums/shared/interval.js +2 -0
- package/dist/enums/shared/payment-attempt-status.d.ts +1 -0
- package/dist/enums/shared/payment-attempt-status.js +2 -0
- package/dist/enums/shared/payment-type.d.ts +1 -0
- package/dist/enums/shared/payment-type.js +2 -0
- package/dist/enums/shared/payout-currency-code.d.ts +1 -0
- package/dist/enums/shared/payout-currency-code.js +2 -0
- package/dist/enums/shared/status.d.ts +1 -0
- package/dist/enums/shared/status.js +2 -0
- package/dist/enums/shared/tax-category.d.ts +1 -0
- package/dist/enums/shared/tax-category.js +2 -0
- package/dist/enums/shared/tax-mode.d.ts +1 -0
- package/dist/enums/shared/tax-mode.js +2 -0
- package/dist/enums/shared/transaction-origin.d.ts +1 -0
- package/dist/enums/shared/transaction-origin.js +2 -0
- package/dist/enums/shared/transaction-status.d.ts +1 -0
- package/dist/enums/shared/transaction-status.js +2 -0
- package/dist/enums/subscription/index.d.ts +5 -0
- package/dist/enums/subscription/index.js +21 -0
- package/dist/enums/subscription/proration-billing-mode.d.ts +1 -0
- package/dist/enums/subscription/proration-billing-mode.js +2 -0
- package/dist/enums/subscription/scheduled-change-action.d.ts +1 -0
- package/dist/enums/subscription/scheduled-change-action.js +2 -0
- package/dist/enums/subscription/subscription-effective-from.d.ts +1 -0
- package/dist/enums/subscription/subscription-effective-from.js +2 -0
- package/dist/enums/subscription/subscription-item-status.d.ts +1 -0
- package/dist/enums/subscription/subscription-item-status.js +2 -0
- package/dist/enums/subscription/subscription-status.d.ts +1 -0
- package/dist/enums/subscription/subscription-status.js +2 -0
- package/dist/enums/transaction/index.d.ts +1 -0
- package/dist/enums/transaction/index.js +17 -0
- package/dist/enums/transaction/payment-card-type.d.ts +1 -0
- package/dist/enums/transaction/payment-card-type.js +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +28 -0
- package/dist/internal/api/client.d.ts +13 -0
- package/dist/internal/api/client.js +69 -0
- package/dist/internal/api/constants.d.ts +2 -0
- package/dist/internal/api/constants.js +8 -0
- package/dist/internal/api/environment.d.ts +4 -0
- package/dist/internal/api/environment.js +8 -0
- package/dist/internal/base/base-resource.d.ts +8 -0
- package/dist/internal/base/base-resource.js +21 -0
- package/dist/internal/base/collection.d.ts +13 -0
- package/dist/internal/base/collection.js +65 -0
- package/dist/internal/base/index.d.ts +4 -0
- package/dist/internal/base/index.js +20 -0
- package/dist/internal/base/path-parameters.d.ts +6 -0
- package/dist/internal/base/path-parameters.js +20 -0
- package/dist/internal/base/query-parameters.d.ts +5 -0
- package/dist/internal/base/query-parameters.js +19 -0
- package/dist/internal/errors/generic.d.ts +12 -0
- package/dist/internal/errors/generic.js +25 -0
- package/dist/internal/index.d.ts +3 -0
- package/dist/internal/index.js +5 -0
- package/dist/internal/types/config.d.ts +4 -0
- package/dist/internal/types/config.js +2 -0
- package/dist/internal/types/response.d.ts +31 -0
- package/dist/internal/types/response.js +2 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +17 -0
- package/dist/notifications/validator/notifications-validator.d.ts +5 -0
- package/dist/notifications/validator/notifications-validator.js +41 -0
- package/dist/paddle.d.ts +16 -0
- package/dist/paddle.js +24 -0
- package/dist/resources/addresses/index.d.ts +10 -0
- package/dist/resources/addresses/index.js +79 -0
- package/dist/resources/addresses/operations/create-address-path-parameters.d.ts +3 -0
- package/dist/resources/addresses/operations/create-address-path-parameters.js +2 -0
- package/dist/resources/addresses/operations/create-address-request-body.d.ts +12 -0
- package/dist/resources/addresses/operations/create-address-request-body.js +2 -0
- package/dist/resources/addresses/operations/get-address-path-parameters.d.ts +4 -0
- package/dist/resources/addresses/operations/get-address-path-parameters.js +2 -0
- package/dist/resources/addresses/operations/index.d.ts +7 -0
- package/dist/resources/addresses/operations/index.js +23 -0
- package/dist/resources/addresses/operations/list-address-path-parameters.d.ts +3 -0
- package/dist/resources/addresses/operations/list-address-path-parameters.js +2 -0
- package/dist/resources/addresses/operations/list-address-query-parameters.d.ts +9 -0
- package/dist/resources/addresses/operations/list-address-query-parameters.js +2 -0
- package/dist/resources/addresses/operations/update-address-path-parameters.d.ts +4 -0
- package/dist/resources/addresses/operations/update-address-path-parameters.js +2 -0
- package/dist/resources/addresses/operations/update-address-request-body.d.ts +13 -0
- package/dist/resources/addresses/operations/update-address-request-body.js +2 -0
- package/dist/resources/adjustments/index.d.ts +8 -0
- package/dist/resources/adjustments/index.js +49 -0
- package/dist/resources/adjustments/operations/create-adjustment-request-body.d.ts +12 -0
- package/dist/resources/adjustments/operations/create-adjustment-request-body.js +2 -0
- package/dist/resources/adjustments/operations/index.d.ts +2 -0
- package/dist/resources/adjustments/operations/index.js +18 -0
- package/dist/resources/adjustments/operations/list-adjustment-query-parameters.d.ts +12 -0
- package/dist/resources/adjustments/operations/list-adjustment-query-parameters.js +2 -0
- package/dist/resources/businesses/index.d.ts +10 -0
- package/dist/resources/businesses/index.js +79 -0
- package/dist/resources/businesses/operations/create-business-path-parameters.d.ts +3 -0
- package/dist/resources/businesses/operations/create-business-path-parameters.js +2 -0
- package/dist/resources/businesses/operations/create-business-request-body.d.ts +8 -0
- package/dist/resources/businesses/operations/create-business-request-body.js +2 -0
- package/dist/resources/businesses/operations/get-business-path-parameters.d.ts +4 -0
- package/dist/resources/businesses/operations/get-business-path-parameters.js +2 -0
- package/dist/resources/businesses/operations/index.d.ts +7 -0
- package/dist/resources/businesses/operations/index.js +23 -0
- package/dist/resources/businesses/operations/list-business-path-parameters.d.ts +3 -0
- package/dist/resources/businesses/operations/list-business-path-parameters.js +2 -0
- package/dist/resources/businesses/operations/list-business-query-parameters.d.ts +9 -0
- package/dist/resources/businesses/operations/list-business-query-parameters.js +2 -0
- package/dist/resources/businesses/operations/update-business-path-parameters.d.ts +4 -0
- package/dist/resources/businesses/operations/update-business-path-parameters.js +2 -0
- package/dist/resources/businesses/operations/update-business-request-body.d.ts +10 -0
- package/dist/resources/businesses/operations/update-business-request-body.js +2 -0
- package/dist/resources/customers/index.d.ts +10 -0
- package/dist/resources/customers/index.js +71 -0
- package/dist/resources/customers/operations/create-customer-request-body.d.ts +7 -0
- package/dist/resources/customers/operations/create-customer-request-body.js +2 -0
- package/dist/resources/customers/operations/get-customer-path-parameters.d.ts +3 -0
- package/dist/resources/customers/operations/get-customer-path-parameters.js +2 -0
- package/dist/resources/customers/operations/index.d.ts +5 -0
- package/dist/resources/customers/operations/index.js +21 -0
- package/dist/resources/customers/operations/list-customer-query-parameters.d.ts +9 -0
- package/dist/resources/customers/operations/list-customer-query-parameters.js +2 -0
- package/dist/resources/customers/operations/update-customer-path-parameters.d.ts +3 -0
- package/dist/resources/customers/operations/update-customer-path-parameters.js +2 -0
- package/dist/resources/customers/operations/update-customer-request-body.d.ts +9 -0
- package/dist/resources/customers/operations/update-customer-request-body.js +2 -0
- package/dist/resources/discounts/index.d.ts +10 -0
- package/dist/resources/discounts/index.js +71 -0
- package/dist/resources/discounts/operations/create-discount-request-body.d.ts +14 -0
- package/dist/resources/discounts/operations/create-discount-request-body.js +2 -0
- package/dist/resources/discounts/operations/get-discount-path-parameters.d.ts +3 -0
- package/dist/resources/discounts/operations/get-discount-path-parameters.js +2 -0
- package/dist/resources/discounts/operations/index.d.ts +5 -0
- package/dist/resources/discounts/operations/index.js +21 -0
- package/dist/resources/discounts/operations/list-discount-query-parameters.d.ts +9 -0
- package/dist/resources/discounts/operations/list-discount-query-parameters.js +2 -0
- package/dist/resources/discounts/operations/update-discount-path-parameters.d.ts +3 -0
- package/dist/resources/discounts/operations/update-discount-path-parameters.js +2 -0
- package/dist/resources/discounts/operations/update-discount-request-body.d.ts +15 -0
- package/dist/resources/discounts/operations/update-discount-request-body.js +2 -0
- package/dist/resources/index.d.ts +9 -0
- package/dist/resources/index.js +25 -0
- package/dist/resources/prices/index.d.ts +10 -0
- package/dist/resources/prices/index.js +72 -0
- package/dist/resources/prices/operations/create-price-request-body.d.ts +13 -0
- package/dist/resources/prices/operations/create-price-request-body.js +2 -0
- package/dist/resources/prices/operations/get-price-path-parameters.d.ts +3 -0
- package/dist/resources/prices/operations/get-price-path-parameters.js +2 -0
- package/dist/resources/prices/operations/get-price-query-parameters.d.ts +3 -0
- package/dist/resources/prices/operations/get-price-query-parameters.js +2 -0
- package/dist/resources/prices/operations/index.d.ts +6 -0
- package/dist/resources/prices/operations/index.js +22 -0
- package/dist/resources/prices/operations/list-price-query-parameters.d.ts +11 -0
- package/dist/resources/prices/operations/list-price-query-parameters.js +2 -0
- package/dist/resources/prices/operations/update-price-path-parameters.d.ts +3 -0
- package/dist/resources/prices/operations/update-price-path-parameters.js +2 -0
- package/dist/resources/prices/operations/update-price-request-body.d.ts +13 -0
- package/dist/resources/prices/operations/update-price-request-body.js +2 -0
- package/dist/resources/products/index.d.ts +10 -0
- package/dist/resources/products/index.js +72 -0
- package/dist/resources/products/operations/create-product-request-body.d.ts +9 -0
- package/dist/resources/products/operations/create-product-request-body.js +2 -0
- package/dist/resources/products/operations/get-product-path-parameters.d.ts +3 -0
- package/dist/resources/products/operations/get-product-path-parameters.js +2 -0
- package/dist/resources/products/operations/get-product-query-parameters.d.ts +3 -0
- package/dist/resources/products/operations/get-product-query-parameters.js +2 -0
- package/dist/resources/products/operations/index.d.ts +6 -0
- package/dist/resources/products/operations/index.js +22 -0
- package/dist/resources/products/operations/list-product-query-parameters.d.ts +10 -0
- package/dist/resources/products/operations/list-product-query-parameters.js +2 -0
- package/dist/resources/products/operations/update-product-path-parameters.d.ts +3 -0
- package/dist/resources/products/operations/update-product-path-parameters.js +2 -0
- package/dist/resources/products/operations/update-product-request-body.d.ts +10 -0
- package/dist/resources/products/operations/update-product-request-body.js +2 -0
- package/dist/resources/subscriptions/index.d.ts +9 -0
- package/dist/resources/subscriptions/index.js +64 -0
- package/dist/resources/subscriptions/operations/get-subscription-path-parameters.d.ts +3 -0
- package/dist/resources/subscriptions/operations/get-subscription-path-parameters.js +2 -0
- package/dist/resources/subscriptions/operations/get-subscription-query-parameters.d.ts +3 -0
- package/dist/resources/subscriptions/operations/get-subscription-query-parameters.js +2 -0
- package/dist/resources/subscriptions/operations/index.d.ts +5 -0
- package/dist/resources/subscriptions/operations/index.js +21 -0
- package/dist/resources/subscriptions/operations/list-subscription-query-parameters.d.ts +13 -0
- package/dist/resources/subscriptions/operations/list-subscription-query-parameters.js +2 -0
- package/dist/resources/subscriptions/operations/update-subscription-path-parameters.d.ts +3 -0
- package/dist/resources/subscriptions/operations/update-subscription-path-parameters.js +2 -0
- package/dist/resources/subscriptions/operations/update-subscription-request-body.d.ts +16 -0
- package/dist/resources/subscriptions/operations/update-subscription-request-body.js +2 -0
- package/dist/resources/transactions/index.d.ts +10 -0
- package/dist/resources/transactions/index.js +73 -0
- package/dist/resources/transactions/operations/create-transaction-query-parameters.d.ts +3 -0
- package/dist/resources/transactions/operations/create-transaction-query-parameters.js +2 -0
- package/dist/resources/transactions/operations/create-transaction-request-body.d.ts +21 -0
- package/dist/resources/transactions/operations/create-transaction-request-body.js +2 -0
- package/dist/resources/transactions/operations/get-transaction-path-parameters.d.ts +3 -0
- package/dist/resources/transactions/operations/get-transaction-path-parameters.js +2 -0
- package/dist/resources/transactions/operations/get-transaction-query-parameters.d.ts +3 -0
- package/dist/resources/transactions/operations/get-transaction-query-parameters.js +2 -0
- package/dist/resources/transactions/operations/index.d.ts +7 -0
- package/dist/resources/transactions/operations/index.js +23 -0
- package/dist/resources/transactions/operations/list-transaction-query-parameters.d.ts +16 -0
- package/dist/resources/transactions/operations/list-transaction-query-parameters.js +2 -0
- package/dist/resources/transactions/operations/update-transaction-path-parameters.d.ts +3 -0
- package/dist/resources/transactions/operations/update-transaction-path-parameters.js +2 -0
- package/dist/resources/transactions/operations/update-transaction-request-body.d.ts +21 -0
- package/dist/resources/transactions/operations/update-transaction-request-body.js +2 -0
- package/dist/types/address/address.d.ts +16 -0
- package/dist/types/address/address.js +2 -0
- package/dist/types/address/index.d.ts +1 -0
- package/dist/types/address/index.js +17 -0
- package/dist/types/adjustment/adjustment-item.d.ts +10 -0
- package/dist/types/adjustment/adjustment-item.js +2 -0
- package/dist/types/adjustment/adjustment.d.ts +18 -0
- package/dist/types/adjustment/adjustment.js +2 -0
- package/dist/types/adjustment/adjustments-proration.d.ts +5 -0
- package/dist/types/adjustment/adjustments-proration.js +2 -0
- package/dist/types/adjustment/adjustments-time-period.d.ts +4 -0
- package/dist/types/adjustment/adjustments-time-period.js +2 -0
- package/dist/types/adjustment/index.d.ts +4 -0
- package/dist/types/adjustment/index.js +20 -0
- package/dist/types/business/business.d.ts +13 -0
- package/dist/types/business/business.js +2 -0
- package/dist/types/business/businesses-contacts.d.ts +4 -0
- package/dist/types/business/businesses-contacts.js +2 -0
- package/dist/types/business/index.d.ts +2 -0
- package/dist/types/business/index.js +18 -0
- package/dist/types/customer/customer.d.ts +13 -0
- package/dist/types/customer/customer.js +2 -0
- package/dist/types/customer/index.d.ts +1 -0
- package/dist/types/customer/index.js +17 -0
- package/dist/types/discount/discount.d.ts +19 -0
- package/dist/types/discount/discount.js +2 -0
- package/dist/types/discount/index.d.ts +1 -0
- package/dist/types/discount/index.js +17 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +26 -0
- package/dist/types/price/index.d.ts +1 -0
- package/dist/types/price/index.js +17 -0
- package/dist/types/price/price.d.ts +16 -0
- package/dist/types/price/price.js +2 -0
- package/dist/types/product/index.d.ts +1 -0
- package/dist/types/product/index.js +17 -0
- package/dist/types/product/product.d.ts +13 -0
- package/dist/types/product/product.js +2 -0
- package/dist/types/shared/adjustment-item-totals.d.ts +5 -0
- package/dist/types/shared/adjustment-item-totals.js +2 -0
- package/dist/types/shared/adjustment-original-amount.d.ts +5 -0
- package/dist/types/shared/adjustment-original-amount.js +2 -0
- package/dist/types/shared/billing-details-update.d.ts +7 -0
- package/dist/types/shared/billing-details-update.js +2 -0
- package/dist/types/shared/billing-details.d.ts +7 -0
- package/dist/types/shared/billing-details.js +2 -0
- package/dist/types/shared/chargeback-fee.d.ts +5 -0
- package/dist/types/shared/chargeback-fee.js +2 -0
- package/dist/types/shared/custom-data.d.ts +1 -0
- package/dist/types/shared/custom-data.js +2 -0
- package/dist/types/shared/index.d.ts +27 -0
- package/dist/types/shared/index.js +43 -0
- package/dist/types/shared/money.d.ts +5 -0
- package/dist/types/shared/money.js +2 -0
- package/dist/types/shared/payment-card.d.ts +8 -0
- package/dist/types/shared/payment-card.js +2 -0
- package/dist/types/shared/payment-method-details.d.ts +6 -0
- package/dist/types/shared/payment-method-details.js +2 -0
- package/dist/types/shared/payout-totals-adjustment.d.ts +11 -0
- package/dist/types/shared/payout-totals-adjustment.js +2 -0
- package/dist/types/shared/price-quantity.d.ts +4 -0
- package/dist/types/shared/price-quantity.js +2 -0
- package/dist/types/shared/shared-price.d.ts +15 -0
- package/dist/types/shared/shared-price.js +2 -0
- package/dist/types/shared/shared-product.d.ts +12 -0
- package/dist/types/shared/shared-product.js +2 -0
- package/dist/types/shared/tax-rates-used.d.ts +5 -0
- package/dist/types/shared/tax-rates-used.js +2 -0
- package/dist/types/shared/time-period.d.ts +5 -0
- package/dist/types/shared/time-period.js +2 -0
- package/dist/types/shared/total-adjustments.d.ts +9 -0
- package/dist/types/shared/total-adjustments.js +2 -0
- package/dist/types/shared/totals.d.ts +6 -0
- package/dist/types/shared/totals.js +2 -0
- package/dist/types/shared/transaction-checkout.d.ts +3 -0
- package/dist/types/shared/transaction-checkout.js +2 -0
- package/dist/types/shared/transaction-details-preview.d.ts +6 -0
- package/dist/types/shared/transaction-details-preview.js +2 -0
- package/dist/types/shared/transaction-line-item-preview.d.ts +9 -0
- package/dist/types/shared/transaction-line-item-preview.js +2 -0
- package/dist/types/shared/transaction-payment-attempt.d.ts +12 -0
- package/dist/types/shared/transaction-payment-attempt.js +2 -0
- package/dist/types/shared/transaction-payout-totals-adjusted.d.ts +11 -0
- package/dist/types/shared/transaction-payout-totals-adjusted.js +2 -0
- package/dist/types/shared/transaction-payout-totals.d.ts +13 -0
- package/dist/types/shared/transaction-payout-totals.js +2 -0
- package/dist/types/shared/transaction-totals-adjusted.d.ts +10 -0
- package/dist/types/shared/transaction-totals-adjusted.js +2 -0
- package/dist/types/shared/transaction-totals.d.ts +13 -0
- package/dist/types/shared/transaction-totals.js +2 -0
- package/dist/types/shared/unit-price-override.d.ts +6 -0
- package/dist/types/shared/unit-price-override.js +2 -0
- package/dist/types/shared/unit-totals.d.ts +6 -0
- package/dist/types/shared/unit-totals.js +2 -0
- package/dist/types/subscription/index.d.ts +10 -0
- package/dist/types/subscription/index.js +26 -0
- package/dist/types/subscription/next-transaction.d.ts +6 -0
- package/dist/types/subscription/next-transaction.js +2 -0
- package/dist/types/subscription/subscription-discount.d.ts +5 -0
- package/dist/types/subscription/subscription-discount.js +2 -0
- package/dist/types/subscription/subscription-item.d.ts +13 -0
- package/dist/types/subscription/subscription-item.js +2 -0
- package/dist/types/subscription/subscription-management.d.ts +4 -0
- package/dist/types/subscription/subscription-management.js +2 -0
- package/dist/types/subscription/subscription-price.d.ts +11 -0
- package/dist/types/subscription/subscription-price.js +2 -0
- package/dist/types/subscription/subscription-response.d.ts +28 -0
- package/dist/types/subscription/subscription-response.js +2 -0
- package/dist/types/subscription/subscription-scheduled-change.d.ts +6 -0
- package/dist/types/subscription/subscription-scheduled-change.js +2 -0
- package/dist/types/subscription/subscription-time-period.d.ts +4 -0
- package/dist/types/subscription/subscription-time-period.js +2 -0
- package/dist/types/subscription/subscription-update-item.d.ts +4 -0
- package/dist/types/subscription/subscription-update-item.js +2 -0
- package/dist/types/transaction/adjustment-totals-breakdown.d.ts +5 -0
- package/dist/types/transaction/adjustment-totals-breakdown.js +2 -0
- package/dist/types/transaction/adjustment-totals.d.ts +11 -0
- package/dist/types/transaction/adjustment-totals.js +2 -0
- package/dist/types/transaction/index.d.ts +10 -0
- package/dist/types/transaction/index.js +26 -0
- package/dist/types/transaction/transaction-adjustment-item.d.ts +10 -0
- package/dist/types/transaction/transaction-adjustment-item.js +2 -0
- package/dist/types/transaction/transaction-adjustment.d.ts +18 -0
- package/dist/types/transaction/transaction-adjustment.js +2 -0
- package/dist/types/transaction/transaction-details.d.ts +9 -0
- package/dist/types/transaction/transaction-details.js +2 -0
- package/dist/types/transaction/transaction-item.d.ts +7 -0
- package/dist/types/transaction/transaction-item.js +2 -0
- package/dist/types/transaction/transaction-line-item.d.ts +11 -0
- package/dist/types/transaction/transaction-line-item.js +2 -0
- package/dist/types/transaction/transaction-proration.d.ts +5 -0
- package/dist/types/transaction/transaction-proration.js +2 -0
- package/dist/types/transaction/transaction.d.ts +32 -0
- package/dist/types/transaction/transaction.js +2 -0
- package/dist/types/transaction/transactions-time-period.d.ts +4 -0
- package/dist/types/transaction/transactions-time-period.js +2 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Paddle Node.js SDK
|
|
2
|
+
|
|
3
|
+
[Paddle Billing](https://www.paddle.com/billing?utm_source=dx&utm_medium=paddle-node-sdk) is a complete digital product sales and subscription management platform, designed for modern software businesses. It helps you increase your revenue, retain customers, and scale your operations.
|
|
4
|
+
|
|
5
|
+
This is a [Node.js](https://nodejs.org/) SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
|
|
6
|
+
|
|
7
|
+
For working with Paddle in your frontend, use [Paddle.js](https://developer.paddle.com/paddlejs/overview?utm_source=dx&utm_medium=paddle-node-sdk). You can open checkouts, securely collect payment information, build pricing pages, and integrate with Paddle Retain.
|
|
8
|
+
|
|
9
|
+
> **Important:** This package works with Paddle Billing. It does not support Paddle Classic. To work with Paddle Classic, see: [Paddle Classic API reference](https://developer.paddle.com/classic/api-reference/1384a288aca7a-api-reference?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Before you begin
|
|
13
|
+
|
|
14
|
+
This SDK is in early access, which means that we're actively developing it based on feedback from our developer community. **We don't recommend that you use it in production.**
|
|
15
|
+
|
|
16
|
+
If you've used this SDK, we'd love to hear how you found it! Email us at [team-dx@paddle.com](mailto:team-dx@paddle.com) with any thoughts.
|
|
17
|
+
|
|
18
|
+
While in early access, we may introduce breaking changes. Where we can, we'll tag breaking changes and communicate ahead of time.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Install using `npm`:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm install @paddle/paddle-node-sdk
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Install using `yarn`:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
yarn add @paddle/paddle-node-sdk
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Install using `pnpm`:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pnpm add @paddle/paddle-node-sdk
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
To authenticate, you'll need an API key. You can create and manage API keys in **Paddle > Developer tools > Authentication**.
|
|
43
|
+
|
|
44
|
+
Pass your API key while initializing a new Paddle client.
|
|
45
|
+
|
|
46
|
+
``` typescript
|
|
47
|
+
import { Environment, Paddle } from '@paddle/paddle-node-sdk';
|
|
48
|
+
|
|
49
|
+
...
|
|
50
|
+
const paddle = new Paddle('API_KEY')
|
|
51
|
+
...
|
|
52
|
+
|
|
53
|
+
async function getProducts() {
|
|
54
|
+
const products = await paddle.products.list()
|
|
55
|
+
return products.next()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const products = await getProducts()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You can also pass an environment to work with the sandbox:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const paddle = new Paddle('API_KEY', {
|
|
65
|
+
environment: 'production' | 'sandbox'
|
|
66
|
+
})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Keep in mind that API keys are separate for your sandbox and live accounts, so you'll need to generate keys for each environment.
|
|
70
|
+
|
|
71
|
+
## Work with TypeScript
|
|
72
|
+
|
|
73
|
+
This SDK comes with TypeScript definitions for the Paddle API. We recommend that you update frequently to keep the TypeScript definitions up-to-date with the API. Use `// @ts-ignore` to prevent any type error if you don't want to update.
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
### List entities
|
|
78
|
+
|
|
79
|
+
You can list supported entities with the `list` function in the resource. It returns an iterator to help when working with multiple pages.
|
|
80
|
+
|
|
81
|
+
``` typescript
|
|
82
|
+
import { Environment, Paddle } from '@paddle/paddle-node-sdk';
|
|
83
|
+
|
|
84
|
+
...
|
|
85
|
+
const paddle = new Paddle('API_KEY')
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
async function getProducts() {
|
|
89
|
+
// creates an iterator instance
|
|
90
|
+
const products = await paddle.products.list();
|
|
91
|
+
return products;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Creates an iterator to loop through paginated data.
|
|
95
|
+
// At this point, It does not hold any data.
|
|
96
|
+
const products = await getProducts();
|
|
97
|
+
|
|
98
|
+
// Call `next()` to retrieve first page of the dataset
|
|
99
|
+
const firstPage = await products.next()
|
|
100
|
+
|
|
101
|
+
// Calling `next()` again will retrieve subsequent pages.
|
|
102
|
+
const secondPage = await products.next()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Create an entity
|
|
106
|
+
|
|
107
|
+
You can create a supported entity with the `create` function in the resource. It accepts the body to be created. The created entity is returned.
|
|
108
|
+
|
|
109
|
+
``` typescript
|
|
110
|
+
import { Environment, Paddle, CreateProductRequestBody } from '@paddle/paddle-node-sdk';
|
|
111
|
+
|
|
112
|
+
...
|
|
113
|
+
const paddle = new Paddle('API_KEY')
|
|
114
|
+
...
|
|
115
|
+
|
|
116
|
+
async function createProduct(requestBody: CreateProductRequestBody) {
|
|
117
|
+
// Pass the request body with the attributes required to create
|
|
118
|
+
const product = await paddle.products.create(requestBody)
|
|
119
|
+
// Returns a product entity
|
|
120
|
+
return product
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const product = await createProduct({... object with required attributes})
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Update an entity
|
|
127
|
+
|
|
128
|
+
You can update a supported entity with the `update` function in the resource. It accepts the `id` of the entity to update and an object with the attributes to be updated. The updated entity is returned.
|
|
129
|
+
|
|
130
|
+
``` typescript
|
|
131
|
+
import { Environment, Paddle, UpdateProductRequestBody } from '@paddle/paddle-node-sdk';
|
|
132
|
+
|
|
133
|
+
...
|
|
134
|
+
const paddle = new Paddle('API_KEY')
|
|
135
|
+
...
|
|
136
|
+
|
|
137
|
+
async function updateProduct(productId: string, requestBody: UpdateProductRequestBody) {
|
|
138
|
+
// Pass the product id and request body with the attributes to update
|
|
139
|
+
const product = await paddle.products.update(productId, requestBody)
|
|
140
|
+
// Returns an updated product entity
|
|
141
|
+
return product
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const product = await updateProduct('id', {... object with attributes to be updated})
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Where operations require more than one `id`, the `update` function accepts multiple arguments. For example, to update an address for a customer, pass the `customerId` and the `addressId`:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
const address = await paddle.addresses.update(customerId, addressId, requestBody)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Get an entity
|
|
154
|
+
|
|
155
|
+
You can get an entity with the `get` function in the resource. It accepts the `id` of the entity to get. The entity is returned.
|
|
156
|
+
|
|
157
|
+
``` typescript
|
|
158
|
+
import { Environment, Paddle } from '@paddle/paddle-node-sdk';
|
|
159
|
+
|
|
160
|
+
...
|
|
161
|
+
const paddle = new Paddle('API_KEY')
|
|
162
|
+
...
|
|
163
|
+
|
|
164
|
+
async function getProduct(productId: string) {
|
|
165
|
+
// Pass the product id get
|
|
166
|
+
const product = await paddle.products.get(productId)
|
|
167
|
+
// Returns an updated product entity
|
|
168
|
+
return product
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const product = await getProduct('id')
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Resources
|
|
175
|
+
|
|
176
|
+
### Webhook signature verification
|
|
177
|
+
|
|
178
|
+
The SDK includes a helper function to verify webhook signatures sent by Notifications from Paddle.
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import { NotificationsValidator } from '@paddle/paddle-node-sdk';
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
const isValid = new NotificationsValidator().isValidSignature('RAW_UNFORMATTED_REQUEST_BODY', 'PRIVATE_KEY_FROM_DASHBOARD', 'SIGNATURE_FROM_RESPONSE_HEADER')
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Feature parity
|
|
188
|
+
|
|
189
|
+
While in early access, not all operations in the Paddle API are available in our Node.js SDK. We're working on complete feature parity for our final release.
|
|
190
|
+
|
|
191
|
+
This table shows which operations are available as of the latest release.
|
|
192
|
+
|
|
193
|
+
| Paddle API operation | Support |
|
|
194
|
+
|----------------------------------------------|:-----------:|
|
|
195
|
+
| **Products** | **Full** |
|
|
196
|
+
| List products | ✅ |
|
|
197
|
+
| Create a product | ✅ |
|
|
198
|
+
| Get a product | ✅ |
|
|
199
|
+
| Update a product | ✅ |
|
|
200
|
+
| **Prices** | **Full** |
|
|
201
|
+
| List prices | ✅ |
|
|
202
|
+
| Create a price | ✅ |
|
|
203
|
+
| Get a price | ✅ |
|
|
204
|
+
| Update a price | ✅ |
|
|
205
|
+
| **Discounts** | **Full** |
|
|
206
|
+
| List discounts | ✅ |
|
|
207
|
+
| Create a discount | ✅ |
|
|
208
|
+
| Get a discount | ✅ |
|
|
209
|
+
| Update a discount | ✅ |
|
|
210
|
+
| **Customers** | **Partial** |
|
|
211
|
+
| List customers | ✅ |
|
|
212
|
+
| Create a customer | ✅ |
|
|
213
|
+
| Get a customer | ✅ |
|
|
214
|
+
| Update a customer | ✅ |
|
|
215
|
+
| List credit balances for a customer | ❌ |
|
|
216
|
+
| **Addresses** | **Full** |
|
|
217
|
+
| List addresses for a customer | ✅ |
|
|
218
|
+
| Create an addresses for a customer | ✅ |
|
|
219
|
+
| Get an address for a customer | ✅ |
|
|
220
|
+
| Update an address for a customer | ✅ |
|
|
221
|
+
| **Businesses** | ✅ |
|
|
222
|
+
| List businesses for a customer | ✅ |
|
|
223
|
+
| Create a business for a customer | ✅ |
|
|
224
|
+
| Get a business for a customer | ✅ |
|
|
225
|
+
| Update a business for a customer | ✅ |
|
|
226
|
+
| **Transactions** | **Partial** |
|
|
227
|
+
| List transactions | ✅ |
|
|
228
|
+
| Create a transaction | ✅ |
|
|
229
|
+
| Get a transaction | ✅ |
|
|
230
|
+
| Update a transaction | ✅ |
|
|
231
|
+
| Preview a transaction | ❌ |
|
|
232
|
+
| Get a PDF invoice for a transaction | ❌ |
|
|
233
|
+
| **Subscriptions** | **Partial** |
|
|
234
|
+
| List subscriptions | ✅ |
|
|
235
|
+
| Get a subscription | ✅ |
|
|
236
|
+
| Preview an update to a subscription | ❌ |
|
|
237
|
+
| Update a subscription | ✅ |
|
|
238
|
+
| Get a transaction to update payment method | ❌ |
|
|
239
|
+
| Preview a one-time charge for a subscription | ❌ |
|
|
240
|
+
| Create a one-time charge for a subscription | ❌ |
|
|
241
|
+
| Activate a trialing subscription | ❌ |
|
|
242
|
+
| Pause a subscription | ❌ |
|
|
243
|
+
| Resume a paused subscription | ❌ |
|
|
244
|
+
| Cancel a subscription | ❌ |
|
|
245
|
+
| **Adjustments** | **Full** |
|
|
246
|
+
| List adjustments | ✅ |
|
|
247
|
+
| Create an adjustment | ✅ |
|
|
248
|
+
| **Pricing preview** | **None** |
|
|
249
|
+
| Preview prices | ❌ |
|
|
250
|
+
| **Event types** | **None** |
|
|
251
|
+
| List event types | ❌ |
|
|
252
|
+
| **Events** | **None** |
|
|
253
|
+
| List events | ❌ |
|
|
254
|
+
| **Notification settings** | **None** |
|
|
255
|
+
| List notification settings | ❌ |
|
|
256
|
+
| Create a notification setting | ❌ |
|
|
257
|
+
| Get a notification setting | ❌ |
|
|
258
|
+
| Update a notification setting | ❌ |
|
|
259
|
+
| Delete a notification setting | ❌ |
|
|
260
|
+
| **Notifications** | **None** |
|
|
261
|
+
| List notifications | ❌ |
|
|
262
|
+
| Get a notification | ❌ |
|
|
263
|
+
| Replay a notification | ❌ |
|
|
264
|
+
| **Notification logs** | **None** |
|
|
265
|
+
| List logs for a notification | ❌ |
|
|
266
|
+
|
|
267
|
+
## Learn more
|
|
268
|
+
|
|
269
|
+
- [Paddle API reference](https://developer.paddle.com/api-reference/overview?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
270
|
+
- [Sign up for Paddle Billing](https://login.paddle.com/signup?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressCollection = void 0;
|
|
4
|
+
const address_1 = require("./address");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class AddressCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new address_1.Address(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.AddressCollection = AddressCollection;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CustomData } from '../index';
|
|
2
|
+
import { type CountryCode, type Status } from '../../enums';
|
|
3
|
+
import { type IAddress } from '../../types';
|
|
4
|
+
export declare class Address {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly description?: string | undefined | null;
|
|
7
|
+
readonly first_line?: string | undefined | null;
|
|
8
|
+
readonly second_line?: string | undefined | null;
|
|
9
|
+
readonly city?: string | undefined | null;
|
|
10
|
+
readonly postal_code?: string | undefined | null;
|
|
11
|
+
readonly region?: string | undefined | null;
|
|
12
|
+
readonly country_code: CountryCode;
|
|
13
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
14
|
+
readonly status: Status;
|
|
15
|
+
readonly created_at: string;
|
|
16
|
+
readonly updated_at: string;
|
|
17
|
+
constructor(address: IAddress);
|
|
18
|
+
toJson(): IAddress;
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Address = void 0;
|
|
4
|
+
class Address {
|
|
5
|
+
constructor(address) {
|
|
6
|
+
this.id = address.id;
|
|
7
|
+
this.description = address.description;
|
|
8
|
+
this.first_line = address.first_line;
|
|
9
|
+
this.second_line = address.second_line;
|
|
10
|
+
this.city = address.city;
|
|
11
|
+
this.postal_code = address.postal_code;
|
|
12
|
+
this.region = address.region;
|
|
13
|
+
this.country_code = address.country_code;
|
|
14
|
+
this.custom_data = address.custom_data;
|
|
15
|
+
this.status = address.status;
|
|
16
|
+
this.created_at = address.created_at;
|
|
17
|
+
this.updated_at = address.updated_at;
|
|
18
|
+
}
|
|
19
|
+
toJson() {
|
|
20
|
+
return {
|
|
21
|
+
id: this.id,
|
|
22
|
+
description: this.description,
|
|
23
|
+
first_line: this.first_line,
|
|
24
|
+
second_line: this.second_line,
|
|
25
|
+
city: this.city,
|
|
26
|
+
postal_code: this.postal_code,
|
|
27
|
+
region: this.region,
|
|
28
|
+
country_code: this.country_code,
|
|
29
|
+
custom_data: this.custom_data,
|
|
30
|
+
status: this.status,
|
|
31
|
+
created_at: this.created_at,
|
|
32
|
+
updated_at: this.updated_at,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Address = Address;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./address-collection"), exports);
|
|
18
|
+
__exportStar(require("./address"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Adjustment } from './adjustment';
|
|
2
|
+
import { type IAdjustment } from '../../types';
|
|
3
|
+
import { Collection } from '../../internal/base';
|
|
4
|
+
export declare class AdjustmentCollection extends Collection<IAdjustment, Adjustment> {
|
|
5
|
+
fromJson(data: IAdjustment): Adjustment;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentCollection = void 0;
|
|
4
|
+
const adjustment_1 = require("./adjustment");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class AdjustmentCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new adjustment_1.Adjustment(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.AdjustmentCollection = AdjustmentCollection;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IAdjustmentItemTotals } from '../../types';
|
|
2
|
+
export declare class AdjustmentItemTotals {
|
|
3
|
+
readonly subtotal: string;
|
|
4
|
+
readonly tax: string;
|
|
5
|
+
readonly total: string;
|
|
6
|
+
constructor(adjustmentItemTotals: IAdjustmentItemTotals);
|
|
7
|
+
toJson(): IAdjustmentItemTotals;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentItemTotals = void 0;
|
|
4
|
+
class AdjustmentItemTotals {
|
|
5
|
+
constructor(adjustmentItemTotals) {
|
|
6
|
+
this.subtotal = adjustmentItemTotals.subtotal;
|
|
7
|
+
this.tax = adjustmentItemTotals.tax;
|
|
8
|
+
this.total = adjustmentItemTotals.total;
|
|
9
|
+
}
|
|
10
|
+
toJson() {
|
|
11
|
+
return {
|
|
12
|
+
subtotal: this.subtotal,
|
|
13
|
+
tax: this.tax,
|
|
14
|
+
total: this.total,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AdjustmentItemTotals = AdjustmentItemTotals;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IAdjustmentItem } from '../../types';
|
|
2
|
+
import { AdjustmentItemTotals, AdjustmentProration } from '../index';
|
|
3
|
+
import { type AdjustmentType } from '../../enums';
|
|
4
|
+
export declare class AdjustmentItem {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly item_id: string;
|
|
7
|
+
readonly type: AdjustmentType;
|
|
8
|
+
readonly amount?: string | undefined | null;
|
|
9
|
+
readonly proration?: AdjustmentProration | undefined | null;
|
|
10
|
+
readonly totals?: AdjustmentItemTotals | undefined;
|
|
11
|
+
constructor(adjustmentItem: IAdjustmentItem);
|
|
12
|
+
toJson(): IAdjustmentItem;
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentItem = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class AdjustmentItem {
|
|
6
|
+
constructor(adjustmentItem) {
|
|
7
|
+
this.id = adjustmentItem.id;
|
|
8
|
+
this.item_id = adjustmentItem.item_id;
|
|
9
|
+
this.type = adjustmentItem.type;
|
|
10
|
+
this.amount = adjustmentItem.amount;
|
|
11
|
+
this.proration = adjustmentItem.proration ? new index_1.AdjustmentProration(adjustmentItem.proration) : undefined;
|
|
12
|
+
this.totals = adjustmentItem.totals ? new index_1.AdjustmentItemTotals(adjustmentItem.totals) : undefined;
|
|
13
|
+
}
|
|
14
|
+
toJson() {
|
|
15
|
+
return {
|
|
16
|
+
id: this.id,
|
|
17
|
+
item_id: this.item_id,
|
|
18
|
+
type: this.type,
|
|
19
|
+
amount: this.amount,
|
|
20
|
+
proration: this.proration,
|
|
21
|
+
totals: this.totals,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.AdjustmentItem = AdjustmentItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IAdjustmentsProration } from '../../types';
|
|
2
|
+
import { AdjustmentTimePeriod } from '../index';
|
|
3
|
+
export declare class AdjustmentProration {
|
|
4
|
+
readonly rate: string;
|
|
5
|
+
readonly billing_period?: AdjustmentTimePeriod | undefined;
|
|
6
|
+
constructor(adjustmentsProration: IAdjustmentsProration);
|
|
7
|
+
toJson(): IAdjustmentsProration;
|
|
8
|
+
}
|