@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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionScheduledChange = void 0;
|
|
4
|
+
class SubscriptionScheduledChange {
|
|
5
|
+
constructor(subscriptionScheduledChange) {
|
|
6
|
+
this.action = subscriptionScheduledChange.action;
|
|
7
|
+
this.effective_at = subscriptionScheduledChange.effective_at;
|
|
8
|
+
this.resume_at = subscriptionScheduledChange.resume_at;
|
|
9
|
+
}
|
|
10
|
+
toJson() {
|
|
11
|
+
return {
|
|
12
|
+
action: this.action,
|
|
13
|
+
effective_at: this.effective_at,
|
|
14
|
+
resume_at: this.resume_at,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.SubscriptionScheduledChange = SubscriptionScheduledChange;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ISubscriptionTimePeriod } from '../../types';
|
|
2
|
+
export declare class SubscriptionTimePeriod {
|
|
3
|
+
readonly starts_at: string;
|
|
4
|
+
readonly ends_at: string;
|
|
5
|
+
constructor(subscriptionTimePeriod: ISubscriptionTimePeriod);
|
|
6
|
+
toJson(): ISubscriptionTimePeriod;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionTimePeriod = void 0;
|
|
4
|
+
class SubscriptionTimePeriod {
|
|
5
|
+
constructor(subscriptionTimePeriod) {
|
|
6
|
+
this.starts_at = subscriptionTimePeriod.starts_at;
|
|
7
|
+
this.ends_at = subscriptionTimePeriod.ends_at;
|
|
8
|
+
}
|
|
9
|
+
toJson() {
|
|
10
|
+
return {
|
|
11
|
+
starts_at: this.starts_at,
|
|
12
|
+
ends_at: this.ends_at,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SubscriptionTimePeriod = SubscriptionTimePeriod;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BillingDetails, type CustomData, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod } from '../index';
|
|
2
|
+
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
|
+
import { type ISubscription } from '../../types';
|
|
4
|
+
export declare class Subscription {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly status: SubscriptionStatus;
|
|
7
|
+
readonly customer_id: string;
|
|
8
|
+
readonly address_id: string;
|
|
9
|
+
readonly business_id?: string | undefined | null;
|
|
10
|
+
readonly currency_code: CurrencyCode;
|
|
11
|
+
readonly created_at: string;
|
|
12
|
+
readonly updated_at: string;
|
|
13
|
+
readonly started_at?: string | undefined | null;
|
|
14
|
+
readonly first_billed_at?: string | undefined | null;
|
|
15
|
+
readonly next_billed_at?: string | undefined | null;
|
|
16
|
+
readonly paused_at?: string | undefined | null;
|
|
17
|
+
readonly canceled_at?: string | undefined | null;
|
|
18
|
+
readonly discount?: SubscriptionDiscount | undefined | null;
|
|
19
|
+
readonly collection_mode: CollectionMode;
|
|
20
|
+
readonly billing_details?: BillingDetails | undefined | null;
|
|
21
|
+
readonly current_billing_period?: SubscriptionTimePeriod | undefined | null;
|
|
22
|
+
readonly billing_cycle: TimePeriod;
|
|
23
|
+
readonly scheduled_change?: SubscriptionScheduledChange | undefined | null;
|
|
24
|
+
readonly management_urls: SubscriptionManagement;
|
|
25
|
+
readonly items: SubscriptionItem[];
|
|
26
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
27
|
+
constructor(subscription: ISubscription);
|
|
28
|
+
toJson(): ISubscription;
|
|
29
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Subscription = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class Subscription {
|
|
6
|
+
constructor(subscription) {
|
|
7
|
+
this.id = subscription.id;
|
|
8
|
+
this.status = subscription.status;
|
|
9
|
+
this.customer_id = subscription.customer_id;
|
|
10
|
+
this.address_id = subscription.address_id;
|
|
11
|
+
this.business_id = subscription.business_id;
|
|
12
|
+
this.currency_code = subscription.currency_code;
|
|
13
|
+
this.created_at = subscription.created_at;
|
|
14
|
+
this.updated_at = subscription.updated_at;
|
|
15
|
+
this.started_at = subscription.started_at;
|
|
16
|
+
this.first_billed_at = subscription.first_billed_at;
|
|
17
|
+
this.next_billed_at = subscription.next_billed_at;
|
|
18
|
+
this.paused_at = subscription.paused_at;
|
|
19
|
+
this.canceled_at = subscription.canceled_at;
|
|
20
|
+
this.discount = subscription.discount ? new index_1.SubscriptionDiscount(subscription.discount) : undefined;
|
|
21
|
+
this.collection_mode = subscription.collection_mode;
|
|
22
|
+
this.billing_details = subscription.billing_details ? new index_1.BillingDetails(subscription.billing_details) : undefined;
|
|
23
|
+
this.current_billing_period = subscription.current_billing_period
|
|
24
|
+
? new index_1.SubscriptionTimePeriod(subscription.current_billing_period)
|
|
25
|
+
: undefined;
|
|
26
|
+
this.billing_cycle = new index_1.TimePeriod(subscription.billing_cycle);
|
|
27
|
+
this.scheduled_change = subscription.scheduled_change
|
|
28
|
+
? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
|
|
29
|
+
: undefined;
|
|
30
|
+
this.management_urls = new index_1.SubscriptionManagement(subscription.management_urls);
|
|
31
|
+
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
32
|
+
this.custom_data = subscription.custom_data;
|
|
33
|
+
}
|
|
34
|
+
toJson() {
|
|
35
|
+
return {
|
|
36
|
+
id: this.id,
|
|
37
|
+
status: this.status,
|
|
38
|
+
customer_id: this.customer_id,
|
|
39
|
+
address_id: this.address_id,
|
|
40
|
+
business_id: this.business_id,
|
|
41
|
+
currency_code: this.currency_code,
|
|
42
|
+
created_at: this.created_at,
|
|
43
|
+
updated_at: this.updated_at,
|
|
44
|
+
started_at: this.started_at,
|
|
45
|
+
first_billed_at: this.first_billed_at,
|
|
46
|
+
next_billed_at: this.next_billed_at,
|
|
47
|
+
paused_at: this.paused_at,
|
|
48
|
+
canceled_at: this.canceled_at,
|
|
49
|
+
discount: this.discount,
|
|
50
|
+
collection_mode: this.collection_mode,
|
|
51
|
+
billing_details: this.billing_details,
|
|
52
|
+
current_billing_period: this.current_billing_period,
|
|
53
|
+
billing_cycle: this.billing_cycle,
|
|
54
|
+
scheduled_change: this.scheduled_change,
|
|
55
|
+
management_urls: this.management_urls,
|
|
56
|
+
items: this.items,
|
|
57
|
+
custom_data: this.custom_data,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.Subscription = Subscription;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ITransactionDetailsPreview } from '../../types';
|
|
2
|
+
import { TaxRatesUsed, TransactionTotals, TransactionLineItemPreview } from '../index';
|
|
3
|
+
export declare class TransactionDetailsPreview {
|
|
4
|
+
readonly tax_rates_used: TaxRatesUsed[];
|
|
5
|
+
readonly totals: TransactionTotals;
|
|
6
|
+
readonly line_items: TransactionLineItemPreview[];
|
|
7
|
+
constructor(transactionDetailsPreview: ITransactionDetailsPreview);
|
|
8
|
+
toJson(): ITransactionDetailsPreview;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionDetailsPreview = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionDetailsPreview {
|
|
6
|
+
constructor(transactionDetailsPreview) {
|
|
7
|
+
this.tax_rates_used = transactionDetailsPreview.tax_rates_used.map((tax_rates_used) => new index_1.TaxRatesUsed(tax_rates_used));
|
|
8
|
+
this.totals = new index_1.TransactionTotals(transactionDetailsPreview.totals);
|
|
9
|
+
this.line_items = transactionDetailsPreview.line_items.map((line_item) => new index_1.TransactionLineItemPreview(line_item));
|
|
10
|
+
}
|
|
11
|
+
toJson() {
|
|
12
|
+
return {
|
|
13
|
+
tax_rates_used: this.tax_rates_used,
|
|
14
|
+
totals: this.totals,
|
|
15
|
+
line_items: this.line_items,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.TransactionDetailsPreview = TransactionDetailsPreview;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ITransactionLineItemPreview } from '../../types';
|
|
2
|
+
import { UnitTotals, Totals, Product } from '../index';
|
|
3
|
+
export declare class TransactionLineItemPreview {
|
|
4
|
+
readonly price_id: string;
|
|
5
|
+
readonly quantity: unknown;
|
|
6
|
+
readonly tax_rate: string;
|
|
7
|
+
readonly unit_totals: UnitTotals;
|
|
8
|
+
readonly totals: Totals;
|
|
9
|
+
readonly product: Product;
|
|
10
|
+
constructor(transactionLineItemPreview: ITransactionLineItemPreview);
|
|
11
|
+
toJson(): ITransactionLineItemPreview;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionLineItemPreview = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionLineItemPreview {
|
|
6
|
+
constructor(transactionLineItemPreview) {
|
|
7
|
+
this.price_id = transactionLineItemPreview.price_id;
|
|
8
|
+
this.quantity = transactionLineItemPreview.quantity;
|
|
9
|
+
this.tax_rate = transactionLineItemPreview.tax_rate;
|
|
10
|
+
this.unit_totals = new index_1.UnitTotals(transactionLineItemPreview.unit_totals);
|
|
11
|
+
this.totals = new index_1.Totals(transactionLineItemPreview.totals);
|
|
12
|
+
this.product = new index_1.Product(transactionLineItemPreview.product);
|
|
13
|
+
}
|
|
14
|
+
toJson() {
|
|
15
|
+
return {
|
|
16
|
+
price_id: this.price_id,
|
|
17
|
+
quantity: this.quantity,
|
|
18
|
+
tax_rate: this.tax_rate,
|
|
19
|
+
unit_totals: this.unit_totals,
|
|
20
|
+
totals: this.totals,
|
|
21
|
+
product: this.product,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.TransactionLineItemPreview = TransactionLineItemPreview;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IAdjustmentTotalsBreakdown } from '../../types';
|
|
2
|
+
export declare class AdjustmentTotalsBreakdown {
|
|
3
|
+
readonly credit: string;
|
|
4
|
+
readonly refund: string;
|
|
5
|
+
readonly chargeback: string;
|
|
6
|
+
constructor(adjustmentTotalsBreakdown: IAdjustmentTotalsBreakdown);
|
|
7
|
+
toJson(): IAdjustmentTotalsBreakdown;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentTotalsBreakdown = void 0;
|
|
4
|
+
class AdjustmentTotalsBreakdown {
|
|
5
|
+
constructor(adjustmentTotalsBreakdown) {
|
|
6
|
+
this.credit = adjustmentTotalsBreakdown.credit;
|
|
7
|
+
this.refund = adjustmentTotalsBreakdown.refund;
|
|
8
|
+
this.chargeback = adjustmentTotalsBreakdown.chargeback;
|
|
9
|
+
}
|
|
10
|
+
toJson() {
|
|
11
|
+
return {
|
|
12
|
+
credit: this.credit,
|
|
13
|
+
refund: this.refund,
|
|
14
|
+
chargeback: this.chargeback,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AdjustmentTotalsBreakdown = AdjustmentTotalsBreakdown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type IAdjustmentTotals } from '../../types';
|
|
2
|
+
import { AdjustmentTotalsBreakdown } from '../index';
|
|
3
|
+
import { type CurrencyCode } from '../../enums';
|
|
4
|
+
export declare class AdjustmentTotals {
|
|
5
|
+
readonly subtotal: string;
|
|
6
|
+
readonly tax: string;
|
|
7
|
+
readonly total: string;
|
|
8
|
+
readonly fee: string;
|
|
9
|
+
readonly earnings: string;
|
|
10
|
+
readonly breakdown?: AdjustmentTotalsBreakdown | undefined | null;
|
|
11
|
+
readonly currency_code: CurrencyCode;
|
|
12
|
+
constructor(adjustmentTotals: IAdjustmentTotals);
|
|
13
|
+
toJson(): IAdjustmentTotals;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdjustmentTotals = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class AdjustmentTotals {
|
|
6
|
+
constructor(adjustmentTotals) {
|
|
7
|
+
this.subtotal = adjustmentTotals.subtotal;
|
|
8
|
+
this.tax = adjustmentTotals.tax;
|
|
9
|
+
this.total = adjustmentTotals.total;
|
|
10
|
+
this.fee = adjustmentTotals.fee;
|
|
11
|
+
this.earnings = adjustmentTotals.earnings;
|
|
12
|
+
this.breakdown = adjustmentTotals.breakdown ? new index_1.AdjustmentTotalsBreakdown(adjustmentTotals.breakdown) : undefined;
|
|
13
|
+
this.currency_code = adjustmentTotals.currency_code;
|
|
14
|
+
}
|
|
15
|
+
toJson() {
|
|
16
|
+
return {
|
|
17
|
+
subtotal: this.subtotal,
|
|
18
|
+
tax: this.tax,
|
|
19
|
+
total: this.total,
|
|
20
|
+
fee: this.fee,
|
|
21
|
+
earnings: this.earnings,
|
|
22
|
+
breakdown: this.breakdown,
|
|
23
|
+
currency_code: this.currency_code,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.AdjustmentTotals = AdjustmentTotals;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './transactions-time-period';
|
|
2
|
+
export * from './transaction-proration';
|
|
3
|
+
export * from './transaction-item';
|
|
4
|
+
export * from './transaction-line-item';
|
|
5
|
+
export * from './transaction-details';
|
|
6
|
+
export * from './transaction-adjustment-item';
|
|
7
|
+
export * from './transaction-adjustment';
|
|
8
|
+
export * from './adjustment-totals-breakdown';
|
|
9
|
+
export * from './adjustment-totals';
|
|
10
|
+
export * from './transaction-includes';
|
|
11
|
+
export * from './transaction';
|
|
12
|
+
export * from './transaction-collection';
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./transactions-time-period"), exports);
|
|
18
|
+
__exportStar(require("./transaction-proration"), exports);
|
|
19
|
+
__exportStar(require("./transaction-item"), exports);
|
|
20
|
+
__exportStar(require("./transaction-line-item"), exports);
|
|
21
|
+
__exportStar(require("./transaction-details"), exports);
|
|
22
|
+
__exportStar(require("./transaction-adjustment-item"), exports);
|
|
23
|
+
__exportStar(require("./transaction-adjustment"), exports);
|
|
24
|
+
__exportStar(require("./adjustment-totals-breakdown"), exports);
|
|
25
|
+
__exportStar(require("./adjustment-totals"), exports);
|
|
26
|
+
__exportStar(require("./transaction-includes"), exports);
|
|
27
|
+
__exportStar(require("./transaction"), exports);
|
|
28
|
+
__exportStar(require("./transaction-collection"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ITransactionAdjustmentItem } from '../../types';
|
|
2
|
+
import { TransactionProration, AdjustmentItemTotals } from '../index';
|
|
3
|
+
import { type PaymentType } from '../../enums';
|
|
4
|
+
export declare class TransactionAdjustmentItem {
|
|
5
|
+
readonly id?: string | undefined;
|
|
6
|
+
readonly item_id: string;
|
|
7
|
+
readonly type: PaymentType;
|
|
8
|
+
readonly amount?: string | undefined;
|
|
9
|
+
readonly proration?: TransactionProration | undefined;
|
|
10
|
+
readonly totals?: AdjustmentItemTotals | undefined;
|
|
11
|
+
constructor(transactionAdjustmentItem: ITransactionAdjustmentItem);
|
|
12
|
+
toJson(): ITransactionAdjustmentItem;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionAdjustmentItem = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionAdjustmentItem {
|
|
6
|
+
constructor(transactionAdjustmentItem) {
|
|
7
|
+
this.id = transactionAdjustmentItem.id;
|
|
8
|
+
this.item_id = transactionAdjustmentItem.item_id;
|
|
9
|
+
this.type = transactionAdjustmentItem.type;
|
|
10
|
+
this.amount = transactionAdjustmentItem.amount;
|
|
11
|
+
this.proration = transactionAdjustmentItem.proration
|
|
12
|
+
? new index_1.TransactionProration(transactionAdjustmentItem.proration)
|
|
13
|
+
: undefined;
|
|
14
|
+
this.totals = transactionAdjustmentItem.totals
|
|
15
|
+
? new index_1.AdjustmentItemTotals(transactionAdjustmentItem.totals)
|
|
16
|
+
: undefined;
|
|
17
|
+
}
|
|
18
|
+
toJson() {
|
|
19
|
+
return {
|
|
20
|
+
id: this.id,
|
|
21
|
+
item_id: this.item_id,
|
|
22
|
+
type: this.type,
|
|
23
|
+
amount: this.amount,
|
|
24
|
+
proration: this.proration,
|
|
25
|
+
totals: this.totals,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.TransactionAdjustmentItem = TransactionAdjustmentItem;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ITransactionAdjustment } from '../../types';
|
|
2
|
+
import { TransactionAdjustmentItem, TotalAdjustments, PayoutTotalsAdjustment } from '../index';
|
|
3
|
+
import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../enums';
|
|
4
|
+
export declare class TransactionAdjustment {
|
|
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: TransactionAdjustmentItem[];
|
|
15
|
+
readonly totals?: TotalAdjustments | undefined | null;
|
|
16
|
+
readonly payout_totals?: PayoutTotalsAdjustment | undefined | null;
|
|
17
|
+
readonly created_at: string;
|
|
18
|
+
readonly updated_at: string;
|
|
19
|
+
constructor(adjustment: ITransactionAdjustment);
|
|
20
|
+
toJson(): ITransactionAdjustment;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionAdjustment = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionAdjustment {
|
|
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.TransactionAdjustmentItem(item));
|
|
17
|
+
this.totals = adjustment.totals ? new index_1.TotalAdjustments(adjustment.totals) : undefined;
|
|
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.TransactionAdjustment = TransactionAdjustment;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransactionIncludes } from './transaction-includes';
|
|
2
|
+
import { type ITransaction } from '../../types';
|
|
3
|
+
import { Collection } from '../../internal/base';
|
|
4
|
+
export declare class TransactionCollection extends Collection<ITransaction, TransactionIncludes> {
|
|
5
|
+
fromJson(data: ITransaction): TransactionIncludes;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionCollection = void 0;
|
|
4
|
+
const transaction_includes_1 = require("./transaction-includes");
|
|
5
|
+
const base_1 = require("../../internal/base");
|
|
6
|
+
class TransactionCollection extends base_1.Collection {
|
|
7
|
+
fromJson(data) {
|
|
8
|
+
return new transaction_includes_1.TransactionIncludes(data);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.TransactionCollection = TransactionCollection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ITransactionDetails } from '../../types';
|
|
2
|
+
import { TaxRatesUsed, TransactionTotals, TransactionTotalsAdjusted, TransactionPayoutTotals, TransactionPayoutTotalsAdjusted, TransactionLineItem } from '../index';
|
|
3
|
+
export declare class TransactionDetails {
|
|
4
|
+
readonly tax_rates_used: TaxRatesUsed[];
|
|
5
|
+
readonly totals?: TransactionTotals | undefined | null;
|
|
6
|
+
readonly adjusted_totals?: TransactionTotalsAdjusted | undefined | null;
|
|
7
|
+
readonly payout_totals?: TransactionPayoutTotals | undefined | null;
|
|
8
|
+
readonly adjusted_payout_totals?: TransactionPayoutTotalsAdjusted | undefined | null;
|
|
9
|
+
readonly line_items: TransactionLineItem[];
|
|
10
|
+
constructor(transactionDetails: ITransactionDetails);
|
|
11
|
+
toJson(): ITransactionDetails;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionDetails = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionDetails {
|
|
6
|
+
constructor(transactionDetails) {
|
|
7
|
+
this.tax_rates_used = transactionDetails.tax_rates_used.map((tax_rates_used) => new index_1.TaxRatesUsed(tax_rates_used));
|
|
8
|
+
this.totals = transactionDetails.totals ? new index_1.TransactionTotals(transactionDetails.totals) : undefined;
|
|
9
|
+
this.adjusted_totals = transactionDetails.adjusted_totals
|
|
10
|
+
? new index_1.TransactionTotalsAdjusted(transactionDetails.adjusted_totals)
|
|
11
|
+
: undefined;
|
|
12
|
+
this.payout_totals = transactionDetails.payout_totals
|
|
13
|
+
? new index_1.TransactionPayoutTotals(transactionDetails.payout_totals)
|
|
14
|
+
: undefined;
|
|
15
|
+
this.adjusted_payout_totals = transactionDetails.adjusted_payout_totals
|
|
16
|
+
? new index_1.TransactionPayoutTotalsAdjusted(transactionDetails.adjusted_payout_totals)
|
|
17
|
+
: undefined;
|
|
18
|
+
this.line_items = transactionDetails.line_items.map((line_item) => new index_1.TransactionLineItem(line_item));
|
|
19
|
+
}
|
|
20
|
+
toJson() {
|
|
21
|
+
return {
|
|
22
|
+
tax_rates_used: this.tax_rates_used,
|
|
23
|
+
totals: this.totals,
|
|
24
|
+
adjusted_totals: this.adjusted_totals,
|
|
25
|
+
payout_totals: this.payout_totals,
|
|
26
|
+
adjusted_payout_totals: this.adjusted_payout_totals,
|
|
27
|
+
line_items: this.line_items,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TransactionDetails = TransactionDetails;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ITransaction } from '../../types';
|
|
2
|
+
import { Address, TransactionAdjustment, AdjustmentTotals, BillingDetails, Business, TransactionCheckout, type CustomData, Customer, TransactionDetails, Discount, TransactionItem, TransactionPaymentAttempt, TransactionsTimePeriod } from '../index';
|
|
3
|
+
import { type CollectionMode, type CurrencyCode, type TransactionStatus, type TransactionOrigin } from '../../enums';
|
|
4
|
+
export declare class TransactionIncludes {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly status: TransactionStatus;
|
|
7
|
+
readonly customer_id?: string | undefined | null;
|
|
8
|
+
readonly address_id?: string | undefined | null;
|
|
9
|
+
readonly business_id?: string | undefined | null;
|
|
10
|
+
readonly custom_data?: CustomData | undefined | null;
|
|
11
|
+
readonly currency_code: CurrencyCode;
|
|
12
|
+
readonly origin: TransactionOrigin;
|
|
13
|
+
readonly subscription_id?: string | undefined | null;
|
|
14
|
+
readonly invoice_id?: string | undefined | null;
|
|
15
|
+
readonly invoice_number?: string | undefined | null;
|
|
16
|
+
readonly collection_mode: CollectionMode;
|
|
17
|
+
readonly discount_id?: string | undefined | null;
|
|
18
|
+
readonly billing_details?: BillingDetails | undefined | null;
|
|
19
|
+
readonly billing_period?: TransactionsTimePeriod | undefined | null;
|
|
20
|
+
readonly items: TransactionItem[];
|
|
21
|
+
readonly details?: TransactionDetails | undefined | null;
|
|
22
|
+
readonly payments: TransactionPaymentAttempt[];
|
|
23
|
+
readonly checkout?: TransactionCheckout | undefined | null;
|
|
24
|
+
readonly created_at: string;
|
|
25
|
+
readonly updated_at: string;
|
|
26
|
+
readonly billed_at?: string | undefined | null;
|
|
27
|
+
readonly address?: Address | undefined | null;
|
|
28
|
+
readonly adjustments?: TransactionAdjustment[] | undefined | null;
|
|
29
|
+
readonly adjustments_totals?: AdjustmentTotals | undefined | null;
|
|
30
|
+
readonly business?: Business | undefined | null;
|
|
31
|
+
readonly customer?: Customer | undefined | null;
|
|
32
|
+
readonly discount?: Discount | undefined | null;
|
|
33
|
+
constructor(transaction: ITransaction);
|
|
34
|
+
toJson(): ITransaction;
|
|
35
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionIncludes = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionIncludes {
|
|
6
|
+
constructor(transaction) {
|
|
7
|
+
var _a;
|
|
8
|
+
this.id = transaction.id;
|
|
9
|
+
this.status = transaction.status;
|
|
10
|
+
this.customer_id = transaction.customer_id;
|
|
11
|
+
this.address_id = transaction.address_id;
|
|
12
|
+
this.business_id = transaction.business_id;
|
|
13
|
+
this.custom_data = transaction.custom_data;
|
|
14
|
+
this.currency_code = transaction.currency_code;
|
|
15
|
+
this.origin = transaction.origin;
|
|
16
|
+
this.subscription_id = transaction.subscription_id;
|
|
17
|
+
this.invoice_id = transaction.invoice_id;
|
|
18
|
+
this.invoice_number = transaction.invoice_number;
|
|
19
|
+
this.collection_mode = transaction.collection_mode;
|
|
20
|
+
this.discount_id = transaction.discount_id;
|
|
21
|
+
this.billing_details = transaction.billing_details ? new index_1.BillingDetails(transaction.billing_details) : undefined;
|
|
22
|
+
this.billing_period = transaction.billing_period
|
|
23
|
+
? new index_1.TransactionsTimePeriod(transaction.billing_period)
|
|
24
|
+
: undefined;
|
|
25
|
+
this.items = transaction.items.map((item) => new index_1.TransactionItem(item));
|
|
26
|
+
this.details = transaction.details ? new index_1.TransactionDetails(transaction.details) : undefined;
|
|
27
|
+
this.payments = transaction.payments.map((payment) => new index_1.TransactionPaymentAttempt(payment));
|
|
28
|
+
this.checkout = transaction.checkout ? new index_1.TransactionCheckout(transaction.checkout) : undefined;
|
|
29
|
+
this.created_at = transaction.created_at;
|
|
30
|
+
this.updated_at = transaction.updated_at;
|
|
31
|
+
this.billed_at = transaction.billed_at;
|
|
32
|
+
this.address = transaction.address ? new index_1.Address(transaction.address) : undefined;
|
|
33
|
+
this.adjustments = (_a = transaction.adjustments) === null || _a === void 0 ? void 0 : _a.map((adjustment) => new index_1.TransactionAdjustment(adjustment));
|
|
34
|
+
this.adjustments_totals = transaction.adjustments_totals
|
|
35
|
+
? new index_1.AdjustmentTotals(transaction.adjustments_totals)
|
|
36
|
+
: undefined;
|
|
37
|
+
this.business = transaction.business ? new index_1.Business(transaction.business) : undefined;
|
|
38
|
+
this.customer = transaction.customer ? new index_1.Customer(transaction.customer) : undefined;
|
|
39
|
+
this.discount = transaction.discount ? new index_1.Discount(transaction.discount) : undefined;
|
|
40
|
+
}
|
|
41
|
+
toJson() {
|
|
42
|
+
return {
|
|
43
|
+
id: this.id,
|
|
44
|
+
status: this.status,
|
|
45
|
+
customer_id: this.customer_id,
|
|
46
|
+
address_id: this.address_id,
|
|
47
|
+
business_id: this.business_id,
|
|
48
|
+
custom_data: this.custom_data,
|
|
49
|
+
currency_code: this.currency_code,
|
|
50
|
+
origin: this.origin,
|
|
51
|
+
subscription_id: this.subscription_id,
|
|
52
|
+
invoice_id: this.invoice_id,
|
|
53
|
+
invoice_number: this.invoice_number,
|
|
54
|
+
collection_mode: this.collection_mode,
|
|
55
|
+
discount_id: this.discount_id,
|
|
56
|
+
billing_details: this.billing_details,
|
|
57
|
+
billing_period: this.billing_period,
|
|
58
|
+
items: this.items,
|
|
59
|
+
details: this.details,
|
|
60
|
+
payments: this.payments,
|
|
61
|
+
checkout: this.checkout,
|
|
62
|
+
created_at: this.created_at,
|
|
63
|
+
updated_at: this.updated_at,
|
|
64
|
+
billed_at: this.billed_at,
|
|
65
|
+
address: this.address,
|
|
66
|
+
adjustments: this.adjustments,
|
|
67
|
+
adjustments_totals: this.adjustments_totals,
|
|
68
|
+
business: this.business,
|
|
69
|
+
customer: this.customer,
|
|
70
|
+
discount: this.discount,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.TransactionIncludes = TransactionIncludes;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ITransactionItem } from '../../types';
|
|
2
|
+
import { Price, TransactionProration } from '../index';
|
|
3
|
+
export declare class TransactionItem {
|
|
4
|
+
readonly price_id?: string | undefined | null;
|
|
5
|
+
readonly price?: Price | undefined | null;
|
|
6
|
+
readonly quantity: number;
|
|
7
|
+
readonly proration?: TransactionProration | undefined | null;
|
|
8
|
+
constructor(transactionItem: ITransactionItem);
|
|
9
|
+
toJson(): ITransactionItem;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionItem = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionItem {
|
|
6
|
+
constructor(transactionItem) {
|
|
7
|
+
this.price_id = transactionItem.price_id;
|
|
8
|
+
this.price = transactionItem.price ? new index_1.Price(transactionItem.price) : undefined;
|
|
9
|
+
this.quantity = transactionItem.quantity;
|
|
10
|
+
this.proration = transactionItem.proration ? new index_1.TransactionProration(transactionItem.proration) : undefined;
|
|
11
|
+
}
|
|
12
|
+
toJson() {
|
|
13
|
+
return {
|
|
14
|
+
price_id: this.price_id,
|
|
15
|
+
price: this.price,
|
|
16
|
+
quantity: this.quantity,
|
|
17
|
+
proration: this.proration,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TransactionItem = TransactionItem;
|