@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentProration = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class AdjustmentProration {
|
|
6
|
+
constructor(adjustmentsProration) {
|
|
7
|
+
this.rate = adjustmentsProration.rate;
|
|
8
|
+
this.billing_period = adjustmentsProration.billing_period
|
|
9
|
+
? new index_1.AdjustmentTimePeriod(adjustmentsProration.billing_period)
|
|
10
|
+
: undefined;
|
|
11
|
+
}
|
|
12
|
+
toJson() {
|
|
13
|
+
return {
|
|
14
|
+
rate: this.rate,
|
|
15
|
+
billing_period: this.billing_period,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AdjustmentProration = AdjustmentProration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentTimePeriod = void 0;
|
|
4
|
+
class AdjustmentTimePeriod {
|
|
5
|
+
constructor(adjustmentsTimePeriod) {
|
|
6
|
+
this.starts_at = adjustmentsTimePeriod.starts_at;
|
|
7
|
+
this.ends_at = adjustmentsTimePeriod.ends_at;
|
|
8
|
+
}
|
|
9
|
+
toJson() {
|
|
10
|
+
return {
|
|
11
|
+
starts_at: this.starts_at,
|
|
12
|
+
ends_at: this.ends_at,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.AdjustmentTimePeriod = AdjustmentTimePeriod;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AdjustmentItem, PayoutTotalsAdjustment, TotalAdjustments } from '../index';
|
|
2
|
+
import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums';
|
|
3
|
+
import { type IAdjustment } from '../../types';
|
|
4
|
+
export declare class Adjustment {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly action: AdjustmentAction;
|
|
7
|
+
readonly transaction_id: string;
|
|
8
|
+
readonly subscription_id?: string | undefined | null;
|
|
9
|
+
readonly customer_id: string;
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
readonly credit_applied_to_balance: boolean;
|
|
12
|
+
readonly currency_code: CurrencyCode;
|
|
13
|
+
readonly status: AdjustmentStatus;
|
|
14
|
+
readonly items: AdjustmentItem[];
|
|
15
|
+
readonly totals: TotalAdjustments;
|
|
16
|
+
readonly payout_totals?: PayoutTotalsAdjustment | undefined;
|
|
17
|
+
readonly created_at: string;
|
|
18
|
+
readonly updated_at: string;
|
|
19
|
+
constructor(adjustment: IAdjustment);
|
|
20
|
+
toJson(): IAdjustment;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Adjustment = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class Adjustment {
|
|
6
|
+
constructor(adjustment) {
|
|
7
|
+
this.id = adjustment.id;
|
|
8
|
+
this.action = adjustment.action;
|
|
9
|
+
this.transaction_id = adjustment.transaction_id;
|
|
10
|
+
this.subscription_id = adjustment.subscription_id;
|
|
11
|
+
this.customer_id = adjustment.customer_id;
|
|
12
|
+
this.reason = adjustment.reason;
|
|
13
|
+
this.credit_applied_to_balance = adjustment.credit_applied_to_balance;
|
|
14
|
+
this.currency_code = adjustment.currency_code;
|
|
15
|
+
this.status = adjustment.status;
|
|
16
|
+
this.items = adjustment.items.map((item) => new index_1.AdjustmentItem(item));
|
|
17
|
+
this.totals = new index_1.TotalAdjustments(adjustment.totals);
|
|
18
|
+
this.payout_totals = adjustment.payout_totals ? new index_1.PayoutTotalsAdjustment(adjustment.payout_totals) : undefined;
|
|
19
|
+
this.created_at = adjustment.created_at;
|
|
20
|
+
this.updated_at = adjustment.updated_at;
|
|
21
|
+
}
|
|
22
|
+
toJson() {
|
|
23
|
+
return {
|
|
24
|
+
id: this.id,
|
|
25
|
+
action: this.action,
|
|
26
|
+
transaction_id: this.transaction_id,
|
|
27
|
+
subscription_id: this.subscription_id,
|
|
28
|
+
customer_id: this.customer_id,
|
|
29
|
+
reason: this.reason,
|
|
30
|
+
credit_applied_to_balance: this.credit_applied_to_balance,
|
|
31
|
+
currency_code: this.currency_code,
|
|
32
|
+
status: this.status,
|
|
33
|
+
items: this.items,
|
|
34
|
+
totals: this.totals,
|
|
35
|
+
payout_totals: this.payout_totals,
|
|
36
|
+
created_at: this.created_at,
|
|
37
|
+
updated_at: this.updated_at,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Adjustment = Adjustment;
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./adjustment-time-period"), exports);
|
|
18
|
+
__exportStar(require("./adjustment-proration"), exports);
|
|
19
|
+
__exportStar(require("./adjustment-item"), exports);
|
|
20
|
+
__exportStar(require("./adjustment"), exports);
|
|
21
|
+
__exportStar(require("./adjustment-collection"), exports);
|
|
22
|
+
__exportStar(require("./adjustment-item-totals"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessCollection = void 0;
|
|
4
|
+
const business_1 = require("./business");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class BusinessCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new business_1.Business(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.BusinessCollection = BusinessCollection;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Contacts, type CustomData } from '../index';
|
|
2
|
+
import { type Status } from '../../enums';
|
|
3
|
+
import { type IBusiness } from '../../types';
|
|
4
|
+
export declare class Business {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly company_number?: string | undefined | null;
|
|
8
|
+
readonly tax_identifier?: string | undefined | null;
|
|
9
|
+
readonly status: Status;
|
|
10
|
+
readonly contacts: Contacts[];
|
|
11
|
+
readonly created_at: string;
|
|
12
|
+
readonly updated_at: string;
|
|
13
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
14
|
+
constructor(business: IBusiness);
|
|
15
|
+
toJson(): IBusiness;
|
|
16
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Business = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class Business {
|
|
6
|
+
constructor(business) {
|
|
7
|
+
this.id = business.id;
|
|
8
|
+
this.name = business.name;
|
|
9
|
+
this.company_number = business.company_number;
|
|
10
|
+
this.tax_identifier = business.tax_identifier;
|
|
11
|
+
this.status = business.status;
|
|
12
|
+
this.contacts = business.contacts.map((contact) => new index_1.Contacts(contact));
|
|
13
|
+
this.created_at = business.created_at;
|
|
14
|
+
this.updated_at = business.updated_at;
|
|
15
|
+
this.custom_data = business.custom_data;
|
|
16
|
+
}
|
|
17
|
+
toJson() {
|
|
18
|
+
return {
|
|
19
|
+
id: this.id,
|
|
20
|
+
name: this.name,
|
|
21
|
+
company_number: this.company_number,
|
|
22
|
+
tax_identifier: this.tax_identifier,
|
|
23
|
+
status: this.status,
|
|
24
|
+
contacts: this.contacts,
|
|
25
|
+
created_at: this.created_at,
|
|
26
|
+
updated_at: this.updated_at,
|
|
27
|
+
custom_data: this.custom_data,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Business = Business;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Contacts = void 0;
|
|
4
|
+
class Contacts {
|
|
5
|
+
constructor(contacts) {
|
|
6
|
+
this.name = contacts.name;
|
|
7
|
+
this.email = contacts.email;
|
|
8
|
+
}
|
|
9
|
+
toJson() {
|
|
10
|
+
return {
|
|
11
|
+
name: this.name,
|
|
12
|
+
email: this.email,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Contacts = Contacts;
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./business-collection"), exports);
|
|
18
|
+
__exportStar(require("./contacts"), exports);
|
|
19
|
+
__exportStar(require("./business"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerCollection = void 0;
|
|
4
|
+
const customer_1 = require("./customer");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class CustomerCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new customer_1.Customer(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.CustomerCollection = CustomerCollection;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CustomData } from '../index';
|
|
2
|
+
import { type Status } from '../../enums';
|
|
3
|
+
import { type ICustomer } from '../../types';
|
|
4
|
+
export declare class Customer {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name?: string | undefined | null;
|
|
7
|
+
readonly email: string;
|
|
8
|
+
readonly marketing_consent: boolean;
|
|
9
|
+
readonly status: Status;
|
|
10
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
11
|
+
readonly locale: string;
|
|
12
|
+
readonly created_at: string;
|
|
13
|
+
readonly updated_at: string;
|
|
14
|
+
constructor(customer: ICustomer);
|
|
15
|
+
toJson(): ICustomer;
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Customer = void 0;
|
|
4
|
+
class Customer {
|
|
5
|
+
constructor(customer) {
|
|
6
|
+
this.id = customer.id;
|
|
7
|
+
this.name = customer.name;
|
|
8
|
+
this.email = customer.email;
|
|
9
|
+
this.marketing_consent = customer.marketing_consent;
|
|
10
|
+
this.status = customer.status;
|
|
11
|
+
this.custom_data = customer.custom_data;
|
|
12
|
+
this.locale = customer.locale;
|
|
13
|
+
this.created_at = customer.created_at;
|
|
14
|
+
this.updated_at = customer.updated_at;
|
|
15
|
+
}
|
|
16
|
+
toJson() {
|
|
17
|
+
return {
|
|
18
|
+
id: this.id,
|
|
19
|
+
name: this.name,
|
|
20
|
+
email: this.email,
|
|
21
|
+
marketing_consent: this.marketing_consent,
|
|
22
|
+
status: this.status,
|
|
23
|
+
custom_data: this.custom_data,
|
|
24
|
+
locale: this.locale,
|
|
25
|
+
created_at: this.created_at,
|
|
26
|
+
updated_at: this.updated_at,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Customer = Customer;
|
|
@@ -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("./customer-collection"), exports);
|
|
18
|
+
__exportStar(require("./customer"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscountCollection = void 0;
|
|
4
|
+
const discount_1 = require("./discount");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class DiscountCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new discount_1.Discount(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DiscountCollection = DiscountCollection;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums';
|
|
2
|
+
import { type IDiscount } from '../../types';
|
|
3
|
+
export declare class Discount {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly status: DiscountStatus;
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly enabled_for_checkout: boolean;
|
|
8
|
+
readonly code?: string | undefined | null;
|
|
9
|
+
readonly type: DiscountType;
|
|
10
|
+
readonly amount: string;
|
|
11
|
+
readonly currency_code?: CurrencyCode | undefined | null;
|
|
12
|
+
readonly recur: boolean;
|
|
13
|
+
readonly maximum_recurring_intervals?: number | undefined | null;
|
|
14
|
+
readonly usage_limit?: number | undefined | null;
|
|
15
|
+
readonly restrict_to?: string[] | undefined | null;
|
|
16
|
+
readonly expires_at?: string | undefined | null;
|
|
17
|
+
readonly times_used: number;
|
|
18
|
+
readonly created_at: string;
|
|
19
|
+
readonly updated_at: string;
|
|
20
|
+
constructor(discount: IDiscount);
|
|
21
|
+
toJson(): IDiscount;
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Discount = void 0;
|
|
4
|
+
class Discount {
|
|
5
|
+
constructor(discount) {
|
|
6
|
+
this.id = discount.id;
|
|
7
|
+
this.status = discount.status;
|
|
8
|
+
this.description = discount.description;
|
|
9
|
+
this.enabled_for_checkout = discount.enabled_for_checkout;
|
|
10
|
+
this.code = discount.code;
|
|
11
|
+
this.type = discount.type;
|
|
12
|
+
this.amount = discount.amount;
|
|
13
|
+
this.currency_code = discount.currency_code;
|
|
14
|
+
this.recur = discount.recur;
|
|
15
|
+
this.maximum_recurring_intervals = discount.maximum_recurring_intervals;
|
|
16
|
+
this.usage_limit = discount.usage_limit;
|
|
17
|
+
this.restrict_to = discount.restrict_to;
|
|
18
|
+
this.expires_at = discount.expires_at;
|
|
19
|
+
this.times_used = discount.times_used;
|
|
20
|
+
this.created_at = discount.created_at;
|
|
21
|
+
this.updated_at = discount.updated_at;
|
|
22
|
+
}
|
|
23
|
+
toJson() {
|
|
24
|
+
return {
|
|
25
|
+
id: this.id,
|
|
26
|
+
status: this.status,
|
|
27
|
+
description: this.description,
|
|
28
|
+
enabled_for_checkout: this.enabled_for_checkout,
|
|
29
|
+
code: this.code,
|
|
30
|
+
type: this.type,
|
|
31
|
+
amount: this.amount,
|
|
32
|
+
currency_code: this.currency_code,
|
|
33
|
+
recur: this.recur,
|
|
34
|
+
maximum_recurring_intervals: this.maximum_recurring_intervals,
|
|
35
|
+
usage_limit: this.usage_limit,
|
|
36
|
+
restrict_to: this.restrict_to,
|
|
37
|
+
expires_at: this.expires_at,
|
|
38
|
+
times_used: this.times_used,
|
|
39
|
+
created_at: this.created_at,
|
|
40
|
+
updated_at: this.updated_at,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.Discount = Discount;
|
|
@@ -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("./discount-collection"), exports);
|
|
18
|
+
__exportStar(require("./discount"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './shared';
|
|
2
|
+
export * from './product';
|
|
3
|
+
export * from './price';
|
|
4
|
+
export * from './transaction';
|
|
5
|
+
export * from './adjustment';
|
|
6
|
+
export * from './customer';
|
|
7
|
+
export * from './business';
|
|
8
|
+
export * from './subscription';
|
|
9
|
+
export * from './address';
|
|
10
|
+
export * from './discount';
|
|
11
|
+
export type CustomData = Record<string, unknown>;
|
|
12
|
+
export type Data = Record<string, unknown>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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("./shared"), exports);
|
|
18
|
+
__exportStar(require("./product"), exports);
|
|
19
|
+
__exportStar(require("./price"), exports);
|
|
20
|
+
__exportStar(require("./transaction"), exports);
|
|
21
|
+
__exportStar(require("./adjustment"), exports);
|
|
22
|
+
__exportStar(require("./customer"), exports);
|
|
23
|
+
__exportStar(require("./business"), exports);
|
|
24
|
+
__exportStar(require("./subscription"), exports);
|
|
25
|
+
__exportStar(require("./address"), exports);
|
|
26
|
+
__exportStar(require("./discount"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./price-with-includes"), exports);
|
|
18
|
+
__exportStar(require("./price-collection"), exports);
|
|
19
|
+
__exportStar(require("./price-quantity"), exports);
|
|
20
|
+
__exportStar(require("./price"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PriceWithIncludes } from './price-with-includes';
|
|
2
|
+
import { type IPrice } from '../../types';
|
|
3
|
+
import { Collection } from '../../internal/base';
|
|
4
|
+
export declare class PriceCollection extends Collection<IPrice, PriceWithIncludes> {
|
|
5
|
+
fromJson(data: IPrice): PriceWithIncludes;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriceCollection = void 0;
|
|
4
|
+
const price_with_includes_1 = require("./price-with-includes");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class PriceCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new price_with_includes_1.PriceWithIncludes(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.PriceCollection = PriceCollection;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriceQuantity = void 0;
|
|
4
|
+
class PriceQuantity {
|
|
5
|
+
constructor(priceQuantity) {
|
|
6
|
+
this.minimum = priceQuantity.minimum;
|
|
7
|
+
this.maximum = priceQuantity.maximum;
|
|
8
|
+
}
|
|
9
|
+
toJson() {
|
|
10
|
+
return {
|
|
11
|
+
minimum: this.minimum,
|
|
12
|
+
maximum: this.maximum,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.PriceQuantity = PriceQuantity;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type IPrice } from '../../types';
|
|
2
|
+
import { type CustomData, Money, PriceQuantity, Product, TimePeriod, UnitPriceOverride } from '../index';
|
|
3
|
+
import { type Status, type TaxMode } from '../../enums';
|
|
4
|
+
export declare class PriceWithIncludes {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly product_id: string;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly billing_cycle?: TimePeriod | undefined | null;
|
|
9
|
+
readonly trial_period?: TimePeriod | undefined | null;
|
|
10
|
+
readonly tax_mode: TaxMode;
|
|
11
|
+
readonly unit_price: Money;
|
|
12
|
+
readonly unit_price_overrides: UnitPriceOverride[];
|
|
13
|
+
readonly quantity: PriceQuantity;
|
|
14
|
+
readonly status: Status;
|
|
15
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
16
|
+
readonly product?: Product | undefined | null;
|
|
17
|
+
constructor(price: IPrice);
|
|
18
|
+
toJson(): IPrice;
|
|
19
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriceWithIncludes = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class PriceWithIncludes {
|
|
6
|
+
constructor(price) {
|
|
7
|
+
this.id = price.id;
|
|
8
|
+
this.product_id = price.product_id;
|
|
9
|
+
this.description = price.description;
|
|
10
|
+
this.billing_cycle = price.billing_cycle ? new index_1.TimePeriod(price.billing_cycle) : undefined;
|
|
11
|
+
this.trial_period = price.trial_period ? new index_1.TimePeriod(price.trial_period) : undefined;
|
|
12
|
+
this.tax_mode = price.tax_mode;
|
|
13
|
+
this.unit_price = new index_1.Money(price.unit_price);
|
|
14
|
+
this.unit_price_overrides = price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverride(unit_price_override));
|
|
15
|
+
this.quantity = new index_1.PriceQuantity(price.quantity);
|
|
16
|
+
this.status = price.status;
|
|
17
|
+
this.custom_data = price.custom_data;
|
|
18
|
+
this.product = price.product ? new index_1.Product(price.product) : undefined;
|
|
19
|
+
}
|
|
20
|
+
toJson() {
|
|
21
|
+
return {
|
|
22
|
+
id: this.id,
|
|
23
|
+
product_id: this.product_id,
|
|
24
|
+
description: this.description,
|
|
25
|
+
billing_cycle: this.billing_cycle,
|
|
26
|
+
trial_period: this.trial_period,
|
|
27
|
+
tax_mode: this.tax_mode,
|
|
28
|
+
unit_price: this.unit_price,
|
|
29
|
+
unit_price_overrides: this.unit_price_overrides,
|
|
30
|
+
quantity: this.quantity,
|
|
31
|
+
status: this.status,
|
|
32
|
+
custom_data: this.custom_data,
|
|
33
|
+
product: this.product,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.PriceWithIncludes = PriceWithIncludes;
|