@paddle/paddle-node-sdk 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -2
- package/README.md +47 -7
- package/dist/entities/address/address-collection.d.ts +3 -3
- package/dist/entities/address/address.d.ts +12 -13
- package/dist/entities/address/address.js +10 -26
- package/dist/entities/adjustment/adjustment-collection.d.ts +3 -3
- package/dist/entities/adjustment/adjustment-item-totals.d.ts +0 -1
- package/dist/entities/adjustment/adjustment-item-totals.js +0 -7
- package/dist/entities/adjustment/adjustment-item.d.ts +6 -7
- package/dist/entities/adjustment/adjustment-item.js +4 -14
- package/dist/entities/adjustment/adjustment-proration.d.ts +3 -4
- package/dist/entities/adjustment/adjustment-proration.js +2 -8
- package/dist/entities/adjustment/adjustment-time-period.d.ts +4 -5
- package/dist/entities/adjustment/adjustment-time-period.js +2 -8
- package/dist/entities/adjustment/adjustment.d.ts +10 -11
- package/dist/entities/adjustment/adjustment.js +8 -26
- package/dist/entities/business/business-collection.d.ts +3 -3
- package/dist/entities/business/business.d.ts +8 -9
- package/dist/entities/business/business.js +6 -19
- package/dist/entities/business/contacts.d.ts +1 -2
- package/dist/entities/business/contacts.js +1 -7
- package/dist/entities/customer/credit-balance.d.ts +5 -6
- package/dist/entities/customer/credit-balance.js +2 -9
- package/dist/entities/customer/customer-balance.d.ts +1 -2
- package/dist/entities/customer/customer-balance.js +4 -11
- package/dist/entities/customer/customer-collection.d.ts +3 -3
- package/dist/entities/customer/customer.d.ts +7 -8
- package/dist/entities/customer/customer.js +5 -18
- package/dist/entities/discount/discount-collection.d.ts +3 -3
- package/dist/entities/discount/discount.d.ts +14 -13
- package/dist/entities/discount/discount.js +11 -30
- package/dist/entities/index.d.ts +1 -2
- package/dist/entities/price/price-collection.d.ts +3 -3
- package/dist/entities/price/price-quantity.d.ts +0 -1
- package/dist/entities/price/price-quantity.js +0 -6
- package/dist/entities/price/price-with-includes.d.ts +13 -12
- package/dist/entities/price/price-with-includes.js +10 -24
- package/dist/entities/price/price.d.ts +13 -12
- package/dist/entities/price/price.js +10 -23
- package/dist/entities/pricing-preview/index.d.ts +4 -0
- package/dist/entities/pricing-preview/index.js +20 -0
- package/dist/entities/pricing-preview/pricing-preview-details.d.ts +6 -0
- package/dist/entities/pricing-preview/pricing-preview-details.js +10 -0
- package/dist/entities/pricing-preview/pricing-preview-discounts.d.ts +8 -0
- package/dist/entities/pricing-preview/pricing-preview-discounts.js +12 -0
- package/dist/entities/pricing-preview/pricing-preview-line-item.d.ts +17 -0
- package/dist/entities/pricing-preview/pricing-preview-line-item.js +21 -0
- package/dist/entities/pricing-preview/pricing-preview.d.ts +15 -0
- package/dist/entities/pricing-preview/pricing-preview.js +19 -0
- package/dist/entities/product/product-collection.d.ts +3 -3
- package/dist/entities/product/product-with-includes.d.ts +10 -10
- package/dist/entities/product/product-with-includes.js +7 -20
- package/dist/entities/product/product.d.ts +9 -9
- package/dist/entities/product/product.js +7 -17
- package/dist/entities/shared/adjustment-original-amount.d.ts +3 -4
- package/dist/entities/shared/adjustment-original-amount.js +1 -7
- package/dist/entities/shared/billing-details.d.ts +6 -7
- package/dist/entities/shared/billing-details.js +5 -12
- package/dist/entities/shared/chargeback-fee.d.ts +1 -2
- package/dist/entities/shared/chargeback-fee.js +1 -7
- package/dist/entities/shared/import-meta.d.ts +6 -0
- package/dist/entities/shared/import-meta.js +10 -0
- package/dist/entities/shared/index.d.ts +1 -0
- package/dist/entities/shared/index.js +1 -0
- package/dist/entities/shared/money.d.ts +3 -4
- package/dist/entities/shared/money.js +1 -7
- package/dist/entities/shared/payment-card.d.ts +5 -6
- package/dist/entities/shared/payment-card.js +3 -12
- package/dist/entities/shared/payment-method-details.d.ts +1 -2
- package/dist/entities/shared/payment-method-details.js +1 -7
- package/dist/entities/shared/payout-totals-adjustment.d.ts +4 -5
- package/dist/entities/shared/payout-totals-adjustment.js +3 -14
- package/dist/entities/shared/tax-rates-used.d.ts +4 -5
- package/dist/entities/shared/tax-rates-used.js +2 -8
- package/dist/entities/shared/time-period.d.ts +0 -1
- package/dist/entities/shared/time-period.js +0 -6
- package/dist/entities/shared/total-adjustments.d.ts +3 -4
- package/dist/entities/shared/total-adjustments.js +1 -11
- package/dist/entities/shared/totals.d.ts +0 -1
- package/dist/entities/shared/totals.js +0 -8
- package/dist/entities/shared/transaction-checkout.d.ts +1 -2
- package/dist/entities/shared/transaction-checkout.js +1 -6
- package/dist/entities/shared/transaction-payment-attempt.d.ts +8 -9
- package/dist/entities/shared/transaction-payment-attempt.js +7 -19
- package/dist/entities/shared/transaction-payout-totals-adjusted.d.ts +4 -5
- package/dist/entities/shared/transaction-payout-totals-adjusted.js +3 -14
- package/dist/entities/shared/transaction-payout-totals.d.ts +4 -5
- package/dist/entities/shared/transaction-payout-totals.js +2 -16
- package/dist/entities/shared/transaction-totals-adjusted.d.ts +6 -7
- package/dist/entities/shared/transaction-totals-adjusted.js +4 -15
- package/dist/entities/shared/transaction-totals.d.ts +6 -7
- package/dist/entities/shared/transaction-totals.js +4 -18
- package/dist/entities/shared/unit-price-override.d.ts +4 -5
- package/dist/entities/shared/unit-price-override.js +2 -8
- package/dist/entities/shared/unit-totals.d.ts +0 -1
- package/dist/entities/shared/unit-totals.js +0 -8
- package/dist/entities/subscription/index.d.ts +2 -0
- package/dist/entities/subscription/index.js +2 -0
- package/dist/entities/subscription/next-transaction-adjustment-item.d.ts +11 -0
- package/dist/entities/subscription/next-transaction-adjustment-item.js +14 -0
- package/dist/entities/subscription/next-transaction-adjustment-preview.d.ts +9 -0
- package/dist/entities/subscription/next-transaction-adjustment-preview.js +13 -0
- package/dist/entities/subscription/next-transaction.d.ts +5 -6
- package/dist/entities/subscription/next-transaction.js +2 -9
- package/dist/entities/subscription/subscription-collection.d.ts +3 -3
- package/dist/entities/subscription/subscription-discount.d.ts +4 -5
- package/dist/entities/subscription/subscription-discount.js +2 -9
- package/dist/entities/subscription/subscription-includes.d.ts +23 -24
- package/dist/entities/subscription/subscription-includes.js +20 -48
- package/dist/entities/subscription/subscription-item.d.ts +8 -9
- package/dist/entities/subscription/subscription-item.js +6 -21
- package/dist/entities/subscription/subscription-management.d.ts +3 -4
- package/dist/entities/subscription/subscription-management.js +3 -7
- package/dist/entities/subscription/subscription-preview-summary-result.d.ts +3 -4
- package/dist/entities/subscription/subscription-preview-summary-result.js +1 -8
- package/dist/entities/subscription/subscription-preview-update-summary.d.ts +0 -1
- package/dist/entities/subscription/subscription-preview-update-summary.js +0 -7
- package/dist/entities/subscription/subscription-preview.d.ts +25 -26
- package/dist/entities/subscription/subscription-preview.js +22 -51
- package/dist/entities/subscription/subscription-price.d.ts +7 -8
- package/dist/entities/subscription/subscription-price.js +5 -16
- package/dist/entities/subscription/subscription-scheduled-change.d.ts +4 -5
- package/dist/entities/subscription/subscription-scheduled-change.js +2 -9
- package/dist/entities/subscription/subscription-time-period.d.ts +4 -5
- package/dist/entities/subscription/subscription-time-period.js +2 -8
- package/dist/entities/subscription/subscription.d.ts +21 -22
- package/dist/entities/subscription/subscription.js +22 -48
- package/dist/entities/subscription/transaction-details-preview.d.ts +4 -5
- package/dist/entities/subscription/transaction-details-preview.js +2 -9
- package/dist/entities/subscription/transaction-line-item-preview.d.ts +5 -6
- package/dist/entities/subscription/transaction-line-item-preview.js +3 -13
- package/dist/entities/transaction/address-preview.d.ts +4 -5
- package/dist/entities/transaction/address-preview.js +2 -8
- package/dist/entities/transaction/adjustment-totals.d.ts +4 -5
- package/dist/entities/transaction/adjustment-totals.js +2 -13
- package/dist/entities/transaction/proration.d.ts +3 -4
- package/dist/entities/transaction/proration.js +1 -7
- package/dist/entities/transaction/transaction-adjustment-item.d.ts +7 -8
- package/dist/entities/transaction/transaction-adjustment-item.js +5 -17
- package/dist/entities/transaction/transaction-adjustment.d.ts +11 -12
- package/dist/entities/transaction/transaction-adjustment.js +9 -27
- package/dist/entities/transaction/transaction-collection.d.ts +3 -3
- package/dist/entities/transaction/transaction-details.d.ts +8 -9
- package/dist/entities/transaction/transaction-details.js +9 -19
- package/dist/entities/transaction/transaction-includes.d.ts +25 -26
- package/dist/entities/transaction/transaction-includes.js +26 -58
- package/dist/entities/transaction/transaction-invoice-pdf.d.ts +0 -1
- package/dist/entities/transaction/transaction-invoice-pdf.js +0 -5
- package/dist/entities/transaction/transaction-item-preview.d.ts +3 -4
- package/dist/entities/transaction/transaction-item-preview.js +2 -9
- package/dist/entities/transaction/transaction-item.d.ts +4 -6
- package/dist/entities/transaction/transaction-item.js +2 -11
- package/dist/entities/transaction/transaction-line-item.d.ts +8 -9
- package/dist/entities/transaction/transaction-line-item.js +6 -20
- package/dist/entities/transaction/transaction-preview.d.ts +10 -11
- package/dist/entities/transaction/transaction-preview.js +7 -21
- package/dist/entities/transaction/transaction-proration.d.ts +3 -4
- package/dist/entities/transaction/transaction-proration.js +2 -8
- package/dist/entities/transaction/transaction.d.ts +19 -20
- package/dist/entities/transaction/transaction.js +17 -45
- package/dist/entities/transaction/transactions-time-period.d.ts +4 -5
- package/dist/entities/transaction/transactions-time-period.js +2 -8
- package/dist/internal/api/case-helpers.d.ts +1 -0
- package/dist/internal/api/case-helpers.js +55 -0
- package/dist/internal/api/client.js +3 -2
- package/dist/internal/api/index.d.ts +2 -0
- package/dist/internal/api/index.js +7 -0
- package/dist/internal/base/path-parameters.d.ts +2 -2
- package/dist/internal/base/query-parameters.js +5 -1
- package/dist/internal/errors/generic.d.ts +6 -7
- package/dist/internal/errors/generic.js +1 -10
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +15 -3
- package/dist/paddle.d.ts +2 -1
- package/dist/paddle.js +1 -0
- package/dist/resources/addresses/index.d.ts +2 -1
- package/dist/resources/addresses/index.js +10 -7
- package/dist/resources/addresses/operations/create-address-request-body.d.ts +8 -8
- package/dist/resources/addresses/operations/index.d.ts +0 -4
- package/dist/resources/addresses/operations/index.js +0 -4
- package/dist/resources/addresses/operations/list-address-query-parameters.d.ts +2 -2
- package/dist/resources/addresses/operations/update-address-request-body.d.ts +8 -8
- package/dist/resources/adjustments/index.d.ts +1 -1
- package/dist/resources/adjustments/index.js +2 -4
- package/dist/resources/adjustments/operations/create-adjustment-request-body.d.ts +3 -3
- package/dist/resources/adjustments/operations/list-adjustment-query-parameters.d.ts +5 -5
- package/dist/resources/businesses/index.d.ts +2 -1
- package/dist/resources/businesses/index.js +10 -7
- package/dist/resources/businesses/operations/create-business-request-body.d.ts +4 -4
- package/dist/resources/businesses/operations/index.d.ts +0 -4
- package/dist/resources/businesses/operations/index.js +0 -4
- package/dist/resources/businesses/operations/list-business-query-parameters.d.ts +2 -2
- package/dist/resources/businesses/operations/update-business-request-body.d.ts +4 -4
- package/dist/resources/customers/index.d.ts +4 -3
- package/dist/resources/customers/index.js +8 -5
- package/dist/resources/customers/operations/create-customer-request-body.d.ts +2 -2
- package/dist/resources/customers/operations/get-credit-balance-query-parameters.d.ts +1 -1
- package/dist/resources/customers/operations/index.d.ts +0 -3
- package/dist/resources/customers/operations/index.js +0 -3
- package/dist/resources/customers/operations/list-customer-query-parameters.d.ts +2 -2
- package/dist/resources/customers/operations/update-customer-request-body.d.ts +2 -2
- package/dist/resources/discounts/index.d.ts +3 -2
- package/dist/resources/discounts/index.js +7 -4
- package/dist/resources/discounts/operations/create-discount-request-body.d.ts +9 -7
- package/dist/resources/discounts/operations/index.d.ts +0 -2
- package/dist/resources/discounts/operations/index.js +0 -2
- package/dist/resources/discounts/operations/list-discount-query-parameters.d.ts +2 -2
- package/dist/resources/discounts/operations/update-discount-request-body.d.ts +11 -9
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.js +1 -0
- package/dist/resources/prices/index.d.ts +3 -2
- package/dist/resources/prices/index.js +7 -4
- package/dist/resources/prices/operations/create-price-request-body.d.ts +10 -9
- package/dist/resources/prices/operations/index.d.ts +0 -2
- package/dist/resources/prices/operations/index.js +0 -2
- package/dist/resources/prices/operations/list-price-query-parameters.d.ts +3 -3
- package/dist/resources/prices/operations/update-price-request-body.d.ts +9 -8
- package/dist/resources/pricing-preview/index.d.ts +7 -0
- package/dist/resources/pricing-preview/index.js +42 -0
- package/dist/resources/pricing-preview/operations/index.d.ts +1 -0
- package/dist/resources/pricing-preview/operations/index.js +17 -0
- package/dist/resources/pricing-preview/operations/pricing-preview-request-body.d.ts +17 -0
- package/dist/resources/products/index.d.ts +2 -1
- package/dist/resources/products/index.js +7 -4
- package/dist/resources/products/operations/create-product-request-body.d.ts +4 -4
- package/dist/resources/products/operations/index.d.ts +0 -2
- package/dist/resources/products/operations/index.js +0 -2
- package/dist/resources/products/operations/list-product-query-parameters.d.ts +3 -3
- package/dist/resources/products/operations/update-product-request-body.d.ts +4 -4
- package/dist/resources/subscriptions/index.d.ts +2 -2
- package/dist/resources/subscriptions/index.js +2 -4
- package/dist/resources/subscriptions/operations/cancel-subscription-request-object.d.ts +1 -1
- package/dist/resources/subscriptions/operations/create-subscription-charge-request-object.d.ts +3 -6
- package/dist/resources/subscriptions/operations/index.d.ts +0 -2
- package/dist/resources/subscriptions/operations/index.js +0 -2
- package/dist/resources/subscriptions/operations/list-subscription-query-parameters.d.ts +7 -7
- package/dist/resources/subscriptions/operations/pause-subscription-request-object.d.ts +2 -2
- package/dist/resources/subscriptions/operations/resume-subscription-request-object.d.ts +1 -1
- package/dist/resources/subscriptions/operations/update-subscription-request-body.d.ts +17 -12
- package/dist/resources/transactions/index.d.ts +1 -1
- package/dist/resources/transactions/index.js +2 -4
- package/dist/resources/transactions/operations/create-transaction-request-body.d.ts +13 -18
- package/dist/resources/transactions/operations/index.d.ts +0 -2
- package/dist/resources/transactions/operations/index.js +0 -2
- package/dist/resources/transactions/operations/list-transaction-query-parameters.d.ts +21 -21
- package/dist/resources/transactions/operations/transaction-preview-request-body.d.ts +14 -10
- package/dist/resources/transactions/operations/update-transaction-request-body.d.ts +12 -17
- package/dist/types/address/address-response.d.ts +16 -0
- package/dist/types/address/index.d.ts +1 -1
- package/dist/types/address/index.js +1 -1
- package/dist/types/adjustment/adjustment-item-response.d.ts +10 -0
- package/dist/types/adjustment/{adjustment.d.ts → adjustment-response.d.ts} +6 -6
- package/dist/types/adjustment/adjustments-proration-response.d.ts +5 -0
- package/dist/types/adjustment/adjustments-time-period-response.d.ts +4 -0
- package/dist/types/adjustment/index.d.ts +4 -4
- package/dist/types/adjustment/index.js +4 -4
- package/dist/types/business/{business.d.ts → business-response.d.ts} +5 -5
- package/dist/types/business/businesses-contacts.d.ts +1 -1
- package/dist/types/business/index.d.ts +1 -1
- package/dist/types/business/index.js +1 -1
- package/dist/types/customer/credit-balance-response.d.ts +7 -0
- package/dist/types/customer/{customer.d.ts → customer-response.d.ts} +3 -3
- package/dist/types/customer/index.d.ts +2 -2
- package/dist/types/customer/index.js +2 -2
- package/dist/types/discount/discount-response.d.ts +21 -0
- package/dist/types/discount/index.d.ts +1 -1
- package/dist/types/discount/index.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/price/index.d.ts +1 -1
- package/dist/types/price/index.js +1 -1
- package/dist/types/price/price-response.d.ts +18 -0
- package/dist/types/pricing-preview/index.d.ts +5 -0
- package/dist/types/pricing-preview/index.js +21 -0
- package/dist/types/pricing-preview/pricing-preview-details-response.d.ts +4 -0
- package/dist/types/pricing-preview/pricing-preview-discounts-response.d.ts +6 -0
- package/dist/types/pricing-preview/pricing-preview-item-response.d.ts +4 -0
- package/dist/types/pricing-preview/pricing-preview-line-item-response.d.ts +15 -0
- package/dist/types/pricing-preview/pricing-preview-response.d.ts +15 -0
- package/dist/types/product/index.d.ts +1 -1
- package/dist/types/product/index.js +1 -1
- package/dist/types/product/product-response.d.ts +14 -0
- package/dist/types/shared/{adjustment-original-amount.d.ts → adjustment-original-amount-response.d.ts} +1 -1
- package/dist/types/shared/billing-details-create.d.ts +7 -0
- package/dist/types/shared/billing-details-response.d.ts +7 -0
- package/dist/types/shared/billing-details-update.d.ts +4 -4
- package/dist/types/shared/chargeback-fee.d.ts +2 -2
- package/dist/types/shared/custom-data.d.ts +1 -1
- package/dist/types/shared/import-meta-response.d.ts +4 -0
- package/dist/types/shared/index.d.ts +19 -15
- package/dist/types/shared/index.js +19 -15
- package/dist/types/shared/money-response.d.ts +5 -0
- package/dist/types/shared/money.d.ts +1 -1
- package/dist/types/shared/{payment-card.d.ts → payment-card-response.d.ts} +3 -3
- package/dist/types/shared/payment-method-details.d.ts +2 -2
- package/dist/types/shared/{payout-totals-adjustment.d.ts → payout-totals-adjustment-response.d.ts} +2 -2
- package/dist/types/shared/shared-price-response.d.ts +17 -0
- package/dist/types/shared/shared-product-response.d.ts +13 -0
- package/dist/types/shared/tax-rates-used-response.d.ts +5 -0
- package/dist/types/shared/{total-adjustments.d.ts → total-adjustments-response.d.ts} +1 -1
- package/dist/types/shared/transaction-checkout.d.ts +1 -1
- package/dist/types/shared/transaction-details-preview-response.d.ts +6 -0
- package/dist/types/shared/transaction-line-item-preview-response.d.ts +9 -0
- package/dist/types/shared/{transaction-payment-attempt.d.ts → transaction-payment-attempt-response.d.ts} +4 -4
- package/dist/types/shared/{transaction-payout-totals-adjusted.d.ts → transaction-payout-totals-adjusted-response.d.ts} +2 -2
- package/dist/types/shared/{transaction-payout-totals.d.ts → transaction-payout-totals-response.d.ts} +1 -1
- package/dist/types/shared/{transaction-totals-adjusted.d.ts → transaction-totals-adjusted-response.d.ts} +3 -3
- package/dist/types/shared/{transaction-totals.d.ts → transaction-totals-response.d.ts} +3 -3
- package/dist/types/shared/unit-price-override-response.d.ts +6 -0
- package/dist/types/shared/unit-price-override.d.ts +2 -2
- package/dist/types/subscription/index.d.ts +10 -10
- package/dist/types/subscription/index.js +10 -10
- package/dist/types/subscription/next-transaction-response.d.ts +11 -0
- package/dist/types/subscription/{subscription-discount.d.ts → subscription-discount-response.d.ts} +1 -1
- package/dist/types/subscription/subscription-item-response.d.ts +13 -0
- package/dist/types/subscription/subscription-management-response.d.ts +4 -0
- package/dist/types/subscription/subscription-preview-response.d.ts +29 -0
- package/dist/types/subscription/subscription-preview-update-summary.d.ts +4 -4
- package/dist/types/subscription/subscription-price-response.d.ts +11 -0
- package/dist/types/subscription/subscription-response.d.ts +17 -17
- package/dist/types/subscription/subscription-result-response.d.ts +4 -0
- package/dist/types/subscription/{subscription-scheduled-change.d.ts → subscription-scheduled-change-response.d.ts} +2 -2
- package/dist/types/subscription/subscription-time-period-response.d.ts +4 -0
- package/dist/types/subscription/subscription-update-item.d.ts +2 -2
- package/dist/types/transaction/{adjustment-totals.d.ts → adjustment-totals-response.d.ts} +2 -2
- package/dist/types/transaction/index.d.ts +10 -8
- package/dist/types/transaction/index.js +10 -8
- package/dist/types/transaction/transaction-adjustment-item-response.d.ts +10 -0
- package/dist/types/transaction/transaction-adjustment-response.d.ts +18 -0
- package/dist/types/transaction/transaction-details-response.d.ts +9 -0
- package/dist/types/transaction/transaction-item-response.d.ts +7 -0
- package/dist/types/transaction/transaction-item.d.ts +1 -4
- package/dist/types/transaction/transaction-line-item-response.d.ts +11 -0
- package/dist/types/transaction/transaction-preview-item.d.ts +2 -2
- package/dist/types/transaction/transaction-preview-response.d.ts +27 -0
- package/dist/types/transaction/transaction-proration-response.d.ts +5 -0
- package/dist/types/transaction/transaction-response.d.ts +32 -0
- package/dist/types/transaction/transactions-time-period-response.d.ts +4 -0
- package/dist/types/transaction/transactions-time-period.d.ts +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -1
- package/dist/resources/addresses/operations/create-address-path-parameters.d.ts +0 -3
- package/dist/resources/addresses/operations/get-address-path-parameters.d.ts +0 -4
- package/dist/resources/addresses/operations/list-address-path-parameters.d.ts +0 -3
- package/dist/resources/addresses/operations/update-address-path-parameters.d.ts +0 -4
- package/dist/resources/businesses/operations/create-business-path-parameters.d.ts +0 -3
- package/dist/resources/businesses/operations/get-business-path-parameters.d.ts +0 -4
- package/dist/resources/businesses/operations/list-business-path-parameters.d.ts +0 -3
- package/dist/resources/businesses/operations/update-business-path-parameters.d.ts +0 -4
- package/dist/resources/customers/operations/get-credit-balance-path-parameters.d.ts +0 -3
- package/dist/resources/customers/operations/get-customer-path-parameters.d.ts +0 -3
- package/dist/resources/customers/operations/update-customer-path-parameters.d.ts +0 -3
- package/dist/resources/discounts/operations/get-discount-path-parameters.d.ts +0 -3
- package/dist/resources/discounts/operations/update-discount-path-parameters.d.ts +0 -3
- package/dist/resources/prices/operations/get-price-path-parameters.d.ts +0 -3
- package/dist/resources/prices/operations/update-price-path-parameters.d.ts +0 -3
- package/dist/resources/products/operations/get-product-path-parameters.d.ts +0 -3
- package/dist/resources/products/operations/update-product-path-parameters.d.ts +0 -3
- package/dist/resources/subscriptions/operations/get-subscription-path-parameters.d.ts +0 -3
- package/dist/resources/subscriptions/operations/update-subscription-path-parameters.d.ts +0 -3
- package/dist/resources/transactions/operations/get-transaction-path-parameters.d.ts +0 -3
- package/dist/resources/transactions/operations/update-transaction-path-parameters.d.ts +0 -3
- package/dist/types/address/address.d.ts +0 -16
- package/dist/types/adjustment/adjustment-item.d.ts +0 -10
- package/dist/types/adjustment/adjustments-proration.d.ts +0 -5
- package/dist/types/adjustment/adjustments-time-period.d.ts +0 -4
- package/dist/types/customer/credit-balance.d.ts +0 -7
- package/dist/types/discount/discount.d.ts +0 -19
- package/dist/types/price/price.d.ts +0 -16
- package/dist/types/product/product.d.ts +0 -13
- package/dist/types/shared/billing-details.d.ts +0 -7
- package/dist/types/shared/shared-price.d.ts +0 -15
- package/dist/types/shared/shared-product.d.ts +0 -12
- package/dist/types/shared/tax-rates-used.d.ts +0 -5
- package/dist/types/shared/transaction-details-preview.d.ts +0 -6
- package/dist/types/shared/transaction-line-item-preview.d.ts +0 -9
- package/dist/types/subscription/next-transaction.d.ts +0 -6
- package/dist/types/subscription/subscription-item.d.ts +0 -13
- package/dist/types/subscription/subscription-management.d.ts +0 -4
- package/dist/types/subscription/subscription-preview.d.ts +0 -29
- package/dist/types/subscription/subscription-price.d.ts +0 -11
- package/dist/types/subscription/subscription-result.d.ts +0 -4
- package/dist/types/subscription/subscription-time-period.d.ts +0 -4
- package/dist/types/subscription/subscription-time-period.js +0 -2
- package/dist/types/transaction/adjustment-totals.js +0 -2
- package/dist/types/transaction/transaction-adjustment-item.d.ts +0 -10
- package/dist/types/transaction/transaction-adjustment-item.js +0 -2
- package/dist/types/transaction/transaction-adjustment.d.ts +0 -18
- package/dist/types/transaction/transaction-adjustment.js +0 -2
- package/dist/types/transaction/transaction-details.d.ts +0 -9
- package/dist/types/transaction/transaction-details.js +0 -2
- package/dist/types/transaction/transaction-line-item.d.ts +0 -11
- package/dist/types/transaction/transaction-line-item.js +0 -2
- package/dist/types/transaction/transaction-preview.d.ts +0 -27
- package/dist/types/transaction/transaction-preview.js +0 -2
- package/dist/types/transaction/transaction-proration.d.ts +0 -5
- package/dist/types/transaction/transaction-proration.js +0 -2
- package/dist/types/transaction/transaction.d.ts +0 -32
- package/dist/types/transaction/transaction.js +0 -2
- /package/dist/resources/{addresses/operations/create-address-path-parameters.js → pricing-preview/operations/pricing-preview-request-body.js} +0 -0
- /package/dist/{resources/addresses/operations/get-address-path-parameters.js → types/address/address-response.js} +0 -0
- /package/dist/{resources/addresses/operations/list-address-path-parameters.js → types/adjustment/adjustment-item-response.js} +0 -0
- /package/dist/{resources/addresses/operations/update-address-path-parameters.js → types/adjustment/adjustment-response.js} +0 -0
- /package/dist/{resources/businesses/operations/create-business-path-parameters.js → types/adjustment/adjustments-proration-response.js} +0 -0
- /package/dist/{resources/businesses/operations/get-business-path-parameters.js → types/adjustment/adjustments-time-period-response.js} +0 -0
- /package/dist/{resources/businesses/operations/list-business-path-parameters.js → types/business/business-response.js} +0 -0
- /package/dist/{resources/businesses/operations/update-business-path-parameters.js → types/customer/credit-balance-response.js} +0 -0
- /package/dist/{resources/customers/operations/get-credit-balance-path-parameters.js → types/customer/customer-response.js} +0 -0
- /package/dist/{resources/customers/operations/get-customer-path-parameters.js → types/discount/discount-response.js} +0 -0
- /package/dist/{resources/customers/operations/update-customer-path-parameters.js → types/price/price-response.js} +0 -0
- /package/dist/{resources/discounts/operations/get-discount-path-parameters.js → types/pricing-preview/pricing-preview-details-response.js} +0 -0
- /package/dist/{resources/discounts/operations/update-discount-path-parameters.js → types/pricing-preview/pricing-preview-discounts-response.js} +0 -0
- /package/dist/{resources/prices/operations/get-price-path-parameters.js → types/pricing-preview/pricing-preview-item-response.js} +0 -0
- /package/dist/{resources/prices/operations/update-price-path-parameters.js → types/pricing-preview/pricing-preview-line-item-response.js} +0 -0
- /package/dist/{resources/products/operations/get-product-path-parameters.js → types/pricing-preview/pricing-preview-response.js} +0 -0
- /package/dist/{resources/products/operations/update-product-path-parameters.js → types/product/product-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/get-subscription-path-parameters.js → types/shared/adjustment-original-amount-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/update-subscription-path-parameters.js → types/shared/billing-details-create.js} +0 -0
- /package/dist/{resources/transactions/operations/get-transaction-path-parameters.js → types/shared/billing-details-response.js} +0 -0
- /package/dist/{resources/transactions/operations/update-transaction-path-parameters.js → types/shared/import-meta-response.js} +0 -0
- /package/dist/types/{address/address.js → shared/money-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment-item.js → shared/payment-card-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment.js → shared/payout-totals-adjustment-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-proration.js → shared/shared-price-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-time-period.js → shared/shared-product-response.js} +0 -0
- /package/dist/types/{business/business.js → shared/tax-rates-used-response.js} +0 -0
- /package/dist/types/{customer/credit-balance.js → shared/total-adjustments-response.js} +0 -0
- /package/dist/types/{customer/customer.js → shared/transaction-details-preview-response.js} +0 -0
- /package/dist/types/{discount/discount.js → shared/transaction-line-item-preview-response.js} +0 -0
- /package/dist/types/{price/price.js → shared/transaction-payment-attempt-response.js} +0 -0
- /package/dist/types/{product/product.js → shared/transaction-payout-totals-adjusted-response.js} +0 -0
- /package/dist/types/shared/{adjustment-original-amount.js → transaction-payout-totals-response.js} +0 -0
- /package/dist/types/shared/{billing-details.js → transaction-totals-adjusted-response.js} +0 -0
- /package/dist/types/shared/{payment-card.js → transaction-totals-response.js} +0 -0
- /package/dist/types/shared/{payout-totals-adjustment.js → unit-price-override-response.js} +0 -0
- /package/dist/types/{shared/shared-price.js → subscription/next-transaction-response.js} +0 -0
- /package/dist/types/{shared/shared-product.js → subscription/subscription-discount-response.js} +0 -0
- /package/dist/types/{shared/tax-rates-used.js → subscription/subscription-item-response.js} +0 -0
- /package/dist/types/{shared/total-adjustments.js → subscription/subscription-management-response.js} +0 -0
- /package/dist/types/{shared/transaction-details-preview.js → subscription/subscription-preview-response.js} +0 -0
- /package/dist/types/{shared/transaction-line-item-preview.js → subscription/subscription-price-response.js} +0 -0
- /package/dist/types/{shared/transaction-payment-attempt.js → subscription/subscription-result-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals-adjusted.js → subscription/subscription-scheduled-change-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals.js → subscription/subscription-time-period-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals-adjusted.js → transaction/adjustment-totals-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals.js → transaction/transaction-adjustment-item-response.js} +0 -0
- /package/dist/types/{subscription/next-transaction.js → transaction/transaction-adjustment-response.js} +0 -0
- /package/dist/types/{subscription/subscription-discount.js → transaction/transaction-details-response.js} +0 -0
- /package/dist/types/{subscription/subscription-item.js → transaction/transaction-item-response.js} +0 -0
- /package/dist/types/{subscription/subscription-management.js → transaction/transaction-line-item-response.js} +0 -0
- /package/dist/types/{subscription/subscription-preview.js → transaction/transaction-preview-response.js} +0 -0
- /package/dist/types/{subscription/subscription-price.js → transaction/transaction-proration-response.js} +0 -0
- /package/dist/types/{subscription/subscription-result.js → transaction/transaction-response.js} +0 -0
- /package/dist/types/{subscription/subscription-scheduled-change.js → transaction/transactions-time-period-response.js} +0 -0
|
@@ -5,75 +5,46 @@ const index_1 = require("../index");
|
|
|
5
5
|
class SubscriptionPreview {
|
|
6
6
|
constructor(subscriptionPreview) {
|
|
7
7
|
this.status = subscriptionPreview.status;
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
8
|
+
this.customerId = subscriptionPreview.customer_id;
|
|
9
|
+
this.addressId = subscriptionPreview.address_id;
|
|
10
|
+
this.businessId = subscriptionPreview.business_id ? subscriptionPreview.business_id : null;
|
|
11
|
+
this.currencyCode = subscriptionPreview.currency_code;
|
|
12
|
+
this.createdAt = subscriptionPreview.created_at;
|
|
13
|
+
this.updatedAt = subscriptionPreview.updated_at;
|
|
14
|
+
this.startedAt = subscriptionPreview.started_at ? subscriptionPreview.started_at : null;
|
|
15
|
+
this.firstBilledAt = subscriptionPreview.first_billed_at ? subscriptionPreview.first_billed_at : null;
|
|
16
|
+
this.nextBilledAt = subscriptionPreview.next_billed_at ? subscriptionPreview.next_billed_at : null;
|
|
17
|
+
this.pausedAt = subscriptionPreview.paused_at ? subscriptionPreview.paused_at : null;
|
|
18
|
+
this.canceledAt = subscriptionPreview.canceled_at ? subscriptionPreview.canceled_at : null;
|
|
19
19
|
this.discount = subscriptionPreview.discount ? new index_1.SubscriptionDiscount(subscriptionPreview.discount) : null;
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
20
|
+
this.collectionMode = subscriptionPreview.collection_mode;
|
|
21
|
+
this.billingDetails = subscriptionPreview.billing_details
|
|
22
22
|
? new index_1.BillingDetails(subscriptionPreview.billing_details)
|
|
23
23
|
: null;
|
|
24
|
-
this.
|
|
24
|
+
this.currentBillingPeriod = subscriptionPreview.current_billing_period
|
|
25
25
|
? new index_1.SubscriptionTimePeriod(subscriptionPreview.current_billing_period)
|
|
26
26
|
: null;
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
27
|
+
this.billingCycle = subscriptionPreview.billing_cycle ? new index_1.TimePeriod(subscriptionPreview.billing_cycle) : null;
|
|
28
|
+
this.scheduledChange = subscriptionPreview.scheduled_change
|
|
29
29
|
? new index_1.SubscriptionScheduledChange(subscriptionPreview.scheduled_change)
|
|
30
30
|
: null;
|
|
31
|
-
this.
|
|
31
|
+
this.managementUrls = subscriptionPreview.management_urls
|
|
32
32
|
? new index_1.SubscriptionManagement(subscriptionPreview.management_urls)
|
|
33
33
|
: null;
|
|
34
34
|
this.items = subscriptionPreview.items.map((item) => new index_1.SubscriptionItem(item));
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
35
|
+
this.customData = subscriptionPreview.custom_data ? subscriptionPreview.custom_data : null;
|
|
36
|
+
this.immediateTransaction = subscriptionPreview.immediate_transaction
|
|
37
37
|
? new index_1.NextTransaction(subscriptionPreview.immediate_transaction)
|
|
38
38
|
: null;
|
|
39
|
-
this.
|
|
39
|
+
this.nextTransaction = subscriptionPreview.next_transaction
|
|
40
40
|
? new index_1.NextTransaction(subscriptionPreview.next_transaction)
|
|
41
41
|
: null;
|
|
42
|
-
this.
|
|
42
|
+
this.recurringTransactionDetails = subscriptionPreview.recurring_transaction_details
|
|
43
43
|
? new index_1.TransactionDetailsPreview(subscriptionPreview.recurring_transaction_details)
|
|
44
44
|
: null;
|
|
45
|
-
this.
|
|
45
|
+
this.updateSummary = subscriptionPreview.update_summary
|
|
46
46
|
? new index_1.SubscriptionPreviewUpdateSummary(subscriptionPreview.update_summary)
|
|
47
47
|
: null;
|
|
48
48
|
}
|
|
49
|
-
toJson() {
|
|
50
|
-
return {
|
|
51
|
-
status: this.status,
|
|
52
|
-
customer_id: this.customer_id,
|
|
53
|
-
address_id: this.address_id,
|
|
54
|
-
business_id: this.business_id,
|
|
55
|
-
currency_code: this.currency_code,
|
|
56
|
-
created_at: this.created_at,
|
|
57
|
-
updated_at: this.updated_at,
|
|
58
|
-
started_at: this.started_at,
|
|
59
|
-
first_billed_at: this.first_billed_at,
|
|
60
|
-
next_billed_at: this.next_billed_at,
|
|
61
|
-
paused_at: this.paused_at,
|
|
62
|
-
canceled_at: this.canceled_at,
|
|
63
|
-
discount: this.discount,
|
|
64
|
-
collection_mode: this.collection_mode,
|
|
65
|
-
billing_details: this.billing_details,
|
|
66
|
-
current_billing_period: this.current_billing_period,
|
|
67
|
-
billing_cycle: this.billing_cycle,
|
|
68
|
-
scheduled_change: this.scheduled_change,
|
|
69
|
-
management_urls: this.management_urls,
|
|
70
|
-
items: this.items,
|
|
71
|
-
custom_data: this.custom_data,
|
|
72
|
-
immediate_transaction: this.immediate_transaction,
|
|
73
|
-
next_transaction: this.next_transaction,
|
|
74
|
-
recurring_transaction_details: this.recurring_transaction_details,
|
|
75
|
-
update_summary: this.update_summary,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
49
|
}
|
|
79
50
|
exports.SubscriptionPreview = SubscriptionPreview;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ISubscriptionPriceResponse } from '../../types';
|
|
2
2
|
import { TimePeriod, Money } from '../index';
|
|
3
3
|
import { type TaxMode } from '../../enums';
|
|
4
4
|
export declare class SubscriptionPrice {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly description: string;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
constructor(subscriptionPrice:
|
|
13
|
-
toJson(): ISubscriptionPrice;
|
|
7
|
+
readonly productId: string;
|
|
8
|
+
readonly billingCycle: TimePeriod | null;
|
|
9
|
+
readonly trialPeriod: TimePeriod | null;
|
|
10
|
+
readonly taxMode: TaxMode;
|
|
11
|
+
readonly unitPrice: Money;
|
|
12
|
+
constructor(subscriptionPrice: ISubscriptionPriceResponse);
|
|
14
13
|
}
|
|
@@ -6,22 +6,11 @@ class SubscriptionPrice {
|
|
|
6
6
|
constructor(subscriptionPrice) {
|
|
7
7
|
this.id = subscriptionPrice.id;
|
|
8
8
|
this.description = subscriptionPrice.description;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
}
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
id: this.id,
|
|
18
|
-
description: this.description,
|
|
19
|
-
product_id: this.product_id,
|
|
20
|
-
billing_cycle: this.billing_cycle,
|
|
21
|
-
trial_period: this.trial_period,
|
|
22
|
-
tax_mode: this.tax_mode,
|
|
23
|
-
unit_price: this.unit_price,
|
|
24
|
-
};
|
|
9
|
+
this.productId = subscriptionPrice.product_id;
|
|
10
|
+
this.billingCycle = subscriptionPrice.billing_cycle ? new index_1.TimePeriod(subscriptionPrice.billing_cycle) : null;
|
|
11
|
+
this.trialPeriod = subscriptionPrice.trial_period ? new index_1.TimePeriod(subscriptionPrice.trial_period) : null;
|
|
12
|
+
this.taxMode = subscriptionPrice.tax_mode;
|
|
13
|
+
this.unitPrice = new index_1.Money(subscriptionPrice.unit_price);
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
16
|
exports.SubscriptionPrice = SubscriptionPrice;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ISubscriptionScheduledChangeResponse } from '../../types';
|
|
2
2
|
import { type AdjustmentAction } from '../../enums';
|
|
3
3
|
export declare class SubscriptionScheduledChange {
|
|
4
4
|
readonly action: AdjustmentAction;
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
constructor(subscriptionScheduledChange:
|
|
8
|
-
toJson(): ISubscriptionScheduledChange;
|
|
5
|
+
readonly effectiveAt: string;
|
|
6
|
+
readonly resumeAt: string | null;
|
|
7
|
+
constructor(subscriptionScheduledChange: ISubscriptionScheduledChangeResponse);
|
|
9
8
|
}
|
|
@@ -4,15 +4,8 @@ exports.SubscriptionScheduledChange = void 0;
|
|
|
4
4
|
class SubscriptionScheduledChange {
|
|
5
5
|
constructor(subscriptionScheduledChange) {
|
|
6
6
|
this.action = subscriptionScheduledChange.action;
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
action: this.action,
|
|
13
|
-
effective_at: this.effective_at,
|
|
14
|
-
resume_at: this.resume_at,
|
|
15
|
-
};
|
|
7
|
+
this.effectiveAt = subscriptionScheduledChange.effective_at;
|
|
8
|
+
this.resumeAt = subscriptionScheduledChange.resume_at ? subscriptionScheduledChange.resume_at : null;
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
11
|
exports.SubscriptionScheduledChange = SubscriptionScheduledChange;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ISubscriptionTimePeriodResponse } from '../../types';
|
|
2
2
|
export declare class SubscriptionTimePeriod {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
constructor(subscriptionTimePeriod:
|
|
6
|
-
toJson(): ISubscriptionTimePeriod;
|
|
3
|
+
readonly startsAt: string;
|
|
4
|
+
readonly endsAt: string;
|
|
5
|
+
constructor(subscriptionTimePeriod: ISubscriptionTimePeriodResponse);
|
|
7
6
|
}
|
|
@@ -3,14 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SubscriptionTimePeriod = void 0;
|
|
4
4
|
class SubscriptionTimePeriod {
|
|
5
5
|
constructor(subscriptionTimePeriod) {
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
8
|
-
}
|
|
9
|
-
toJson() {
|
|
10
|
-
return {
|
|
11
|
-
starts_at: this.starts_at,
|
|
12
|
-
ends_at: this.ends_at,
|
|
13
|
-
};
|
|
6
|
+
this.startsAt = subscriptionTimePeriod.starts_at;
|
|
7
|
+
this.endsAt = subscriptionTimePeriod.ends_at;
|
|
14
8
|
}
|
|
15
9
|
}
|
|
16
10
|
exports.SubscriptionTimePeriod = SubscriptionTimePeriod;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { BillingDetails, type CustomData, SubscriptionDiscount, SubscriptionItem, SubscriptionManagement, SubscriptionScheduledChange, SubscriptionTimePeriod, TimePeriod } from '../index';
|
|
2
2
|
import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ISubscriptionResponse } from '../../types';
|
|
4
4
|
export declare class Subscription {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly status: SubscriptionStatus;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly discount
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
7
|
+
readonly customerId: string;
|
|
8
|
+
readonly addressId: string;
|
|
9
|
+
readonly businessId: string | null;
|
|
10
|
+
readonly currencyCode: CurrencyCode;
|
|
11
|
+
readonly createdAt: string;
|
|
12
|
+
readonly updatedAt: string;
|
|
13
|
+
readonly startedAt: string | null;
|
|
14
|
+
readonly firstBilledAt: string | null;
|
|
15
|
+
readonly nextBilledAt: string | null;
|
|
16
|
+
readonly pausedAt: string | null;
|
|
17
|
+
readonly canceledAt: string | null;
|
|
18
|
+
readonly discount: SubscriptionDiscount | null;
|
|
19
|
+
readonly collectionMode: CollectionMode;
|
|
20
|
+
readonly billingDetails: BillingDetails | null;
|
|
21
|
+
readonly currentBillingPeriod: SubscriptionTimePeriod | null;
|
|
22
|
+
readonly billingCycle: TimePeriod;
|
|
23
|
+
readonly scheduledChange: SubscriptionScheduledChange | null;
|
|
24
|
+
readonly managementUrls: SubscriptionManagement | null;
|
|
25
25
|
readonly items: SubscriptionItem[];
|
|
26
|
-
readonly
|
|
27
|
-
constructor(subscription:
|
|
28
|
-
toJson(): ISubscription;
|
|
26
|
+
readonly customData: CustomData | null;
|
|
27
|
+
constructor(subscription: ISubscriptionResponse);
|
|
29
28
|
}
|
|
@@ -6,58 +6,32 @@ class Subscription {
|
|
|
6
6
|
constructor(subscription) {
|
|
7
7
|
this.id = subscription.id;
|
|
8
8
|
this.status = subscription.status;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.discount = subscription.discount ? new index_1.SubscriptionDiscount(subscription.discount) :
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
9
|
+
this.customerId = subscription.customer_id;
|
|
10
|
+
this.addressId = subscription.address_id;
|
|
11
|
+
this.businessId = subscription.business_id ? subscription.business_id : null;
|
|
12
|
+
this.currencyCode = subscription.currency_code;
|
|
13
|
+
this.createdAt = subscription.created_at;
|
|
14
|
+
this.updatedAt = subscription.updated_at;
|
|
15
|
+
this.startedAt = subscription.started_at ? subscription.started_at : null;
|
|
16
|
+
this.firstBilledAt = subscription.first_billed_at ? subscription.first_billed_at : null;
|
|
17
|
+
this.nextBilledAt = subscription.next_billed_at ? subscription.next_billed_at : null;
|
|
18
|
+
this.pausedAt = subscription.paused_at ? subscription.paused_at : null;
|
|
19
|
+
this.canceledAt = subscription.canceled_at ? subscription.canceled_at : null;
|
|
20
|
+
this.discount = subscription.discount ? new index_1.SubscriptionDiscount(subscription.discount) : null;
|
|
21
|
+
this.collectionMode = subscription.collection_mode;
|
|
22
|
+
this.billingDetails = subscription.billing_details ? new index_1.BillingDetails(subscription.billing_details) : null;
|
|
23
|
+
this.currentBillingPeriod = subscription.current_billing_period
|
|
24
24
|
? new index_1.SubscriptionTimePeriod(subscription.current_billing_period)
|
|
25
|
-
:
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
25
|
+
: null;
|
|
26
|
+
this.billingCycle = new index_1.TimePeriod(subscription.billing_cycle);
|
|
27
|
+
this.scheduledChange = subscription.scheduled_change
|
|
28
28
|
? new index_1.SubscriptionScheduledChange(subscription.scheduled_change)
|
|
29
|
-
:
|
|
30
|
-
this.
|
|
29
|
+
: null;
|
|
30
|
+
this.managementUrls = subscription.management_urls
|
|
31
31
|
? new index_1.SubscriptionManagement(subscription.management_urls)
|
|
32
|
-
:
|
|
32
|
+
: null;
|
|
33
33
|
this.items = subscription.items.map((item) => new index_1.SubscriptionItem(item));
|
|
34
|
-
this.
|
|
35
|
-
}
|
|
36
|
-
toJson() {
|
|
37
|
-
return {
|
|
38
|
-
id: this.id,
|
|
39
|
-
status: this.status,
|
|
40
|
-
customer_id: this.customer_id,
|
|
41
|
-
address_id: this.address_id,
|
|
42
|
-
business_id: this.business_id,
|
|
43
|
-
currency_code: this.currency_code,
|
|
44
|
-
created_at: this.created_at,
|
|
45
|
-
updated_at: this.updated_at,
|
|
46
|
-
started_at: this.started_at,
|
|
47
|
-
first_billed_at: this.first_billed_at,
|
|
48
|
-
next_billed_at: this.next_billed_at,
|
|
49
|
-
paused_at: this.paused_at,
|
|
50
|
-
canceled_at: this.canceled_at,
|
|
51
|
-
discount: this.discount,
|
|
52
|
-
collection_mode: this.collection_mode,
|
|
53
|
-
billing_details: this.billing_details,
|
|
54
|
-
current_billing_period: this.current_billing_period,
|
|
55
|
-
billing_cycle: this.billing_cycle,
|
|
56
|
-
scheduled_change: this.scheduled_change,
|
|
57
|
-
management_urls: this.management_urls,
|
|
58
|
-
items: this.items,
|
|
59
|
-
custom_data: this.custom_data,
|
|
60
|
-
};
|
|
34
|
+
this.customData = subscription.custom_data ? subscription.custom_data : null;
|
|
61
35
|
}
|
|
62
36
|
}
|
|
63
37
|
exports.Subscription = Subscription;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionDetailsPreviewResponse } from '../../types';
|
|
2
2
|
import { TaxRatesUsed, TransactionTotals, TransactionLineItemPreview } from '../index';
|
|
3
3
|
export declare class TransactionDetailsPreview {
|
|
4
|
-
readonly
|
|
4
|
+
readonly taxRatesUsed: TaxRatesUsed[];
|
|
5
5
|
readonly totals: TransactionTotals;
|
|
6
|
-
readonly
|
|
7
|
-
constructor(transactionDetailsPreview:
|
|
8
|
-
toJson(): ITransactionDetailsPreview;
|
|
6
|
+
readonly lineItems: TransactionLineItemPreview[];
|
|
7
|
+
constructor(transactionDetailsPreview: ITransactionDetailsPreviewResponse);
|
|
9
8
|
}
|
|
@@ -4,16 +4,9 @@ exports.TransactionDetailsPreview = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionDetailsPreview {
|
|
6
6
|
constructor(transactionDetailsPreview) {
|
|
7
|
-
this.
|
|
7
|
+
this.taxRatesUsed = transactionDetailsPreview.tax_rates_used.map((tax_rates_used) => new index_1.TaxRatesUsed(tax_rates_used));
|
|
8
8
|
this.totals = new index_1.TransactionTotals(transactionDetailsPreview.totals);
|
|
9
|
-
this.
|
|
10
|
-
}
|
|
11
|
-
toJson() {
|
|
12
|
-
return {
|
|
13
|
-
tax_rates_used: this.tax_rates_used,
|
|
14
|
-
totals: this.totals,
|
|
15
|
-
line_items: this.line_items,
|
|
16
|
-
};
|
|
9
|
+
this.lineItems = transactionDetailsPreview.line_items.map((line_item) => new index_1.TransactionLineItemPreview(line_item));
|
|
17
10
|
}
|
|
18
11
|
}
|
|
19
12
|
exports.TransactionDetailsPreview = TransactionDetailsPreview;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionLineItemPreviewResponse } from '../../types';
|
|
2
2
|
import { UnitTotals, Totals, Product } from '../index';
|
|
3
3
|
export declare class TransactionLineItemPreview {
|
|
4
|
-
readonly
|
|
4
|
+
readonly priceId: string;
|
|
5
5
|
readonly quantity: number;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly taxRate: string;
|
|
7
|
+
readonly unitTotals: UnitTotals;
|
|
8
8
|
readonly totals: Totals;
|
|
9
9
|
readonly product: Product;
|
|
10
|
-
constructor(transactionLineItemPreview:
|
|
11
|
-
toJson(): ITransactionLineItemPreview;
|
|
10
|
+
constructor(transactionLineItemPreview: ITransactionLineItemPreviewResponse);
|
|
12
11
|
}
|
|
@@ -4,22 +4,12 @@ exports.TransactionLineItemPreview = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionLineItemPreview {
|
|
6
6
|
constructor(transactionLineItemPreview) {
|
|
7
|
-
this.
|
|
7
|
+
this.priceId = transactionLineItemPreview.price_id;
|
|
8
8
|
this.quantity = transactionLineItemPreview.quantity;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
9
|
+
this.taxRate = transactionLineItemPreview.tax_rate;
|
|
10
|
+
this.unitTotals = new index_1.UnitTotals(transactionLineItemPreview.unit_totals);
|
|
11
11
|
this.totals = new index_1.Totals(transactionLineItemPreview.totals);
|
|
12
12
|
this.product = new index_1.Product(transactionLineItemPreview.product);
|
|
13
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
14
|
}
|
|
25
15
|
exports.TransactionLineItemPreview = TransactionLineItemPreview;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type CountryCode } from '../../enums';
|
|
2
|
-
import { type
|
|
2
|
+
import { type IAddressPreviewResponse } from '../../resources';
|
|
3
3
|
export declare class AddressPreview {
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
constructor(address:
|
|
7
|
-
toJson(): IAddressPreview;
|
|
4
|
+
readonly postalCode: string | null;
|
|
5
|
+
readonly countryCode: CountryCode;
|
|
6
|
+
constructor(address: IAddressPreviewResponse);
|
|
8
7
|
}
|
|
@@ -3,14 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AddressPreview = void 0;
|
|
4
4
|
class AddressPreview {
|
|
5
5
|
constructor(address) {
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
8
|
-
}
|
|
9
|
-
toJson() {
|
|
10
|
-
return {
|
|
11
|
-
postal_code: this.postal_code,
|
|
12
|
-
country_code: this.country_code,
|
|
13
|
-
};
|
|
6
|
+
this.postalCode = address.postal_code ? address.postal_code : null;
|
|
7
|
+
this.countryCode = address.country_code;
|
|
14
8
|
}
|
|
15
9
|
}
|
|
16
10
|
exports.AddressPreview = AddressPreview;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IAdjustmentTotalsResponse } from '../../types';
|
|
2
2
|
import { AdjustmentTotalsBreakdown } from '../index';
|
|
3
3
|
import { type CurrencyCode } from '../../enums';
|
|
4
4
|
export declare class AdjustmentTotals {
|
|
@@ -7,8 +7,7 @@ export declare class AdjustmentTotals {
|
|
|
7
7
|
readonly total: string;
|
|
8
8
|
readonly fee: string;
|
|
9
9
|
readonly earnings: string;
|
|
10
|
-
readonly breakdown
|
|
11
|
-
readonly
|
|
12
|
-
constructor(adjustmentTotals:
|
|
13
|
-
toJson(): IAdjustmentTotals;
|
|
10
|
+
readonly breakdown: AdjustmentTotalsBreakdown | null;
|
|
11
|
+
readonly currencyCode: CurrencyCode;
|
|
12
|
+
constructor(adjustmentTotals: IAdjustmentTotalsResponse);
|
|
14
13
|
}
|
|
@@ -9,19 +9,8 @@ class AdjustmentTotals {
|
|
|
9
9
|
this.total = adjustmentTotals.total;
|
|
10
10
|
this.fee = adjustmentTotals.fee;
|
|
11
11
|
this.earnings = adjustmentTotals.earnings;
|
|
12
|
-
this.breakdown = adjustmentTotals.breakdown ? new index_1.AdjustmentTotalsBreakdown(adjustmentTotals.breakdown) :
|
|
13
|
-
this.
|
|
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
|
-
};
|
|
12
|
+
this.breakdown = adjustmentTotals.breakdown ? new index_1.AdjustmentTotalsBreakdown(adjustmentTotals.breakdown) : null;
|
|
13
|
+
this.currencyCode = adjustmentTotals.currency_code;
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
16
|
exports.AdjustmentTotals = AdjustmentTotals;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { TransactionsTimePeriod } from '../index';
|
|
2
|
-
import { type
|
|
2
|
+
import { type IProrationResponse } from '../../types';
|
|
3
3
|
export declare class Proration {
|
|
4
4
|
readonly rate: string;
|
|
5
|
-
readonly
|
|
6
|
-
constructor(prorationResponse:
|
|
7
|
-
toJson(): IProration;
|
|
5
|
+
readonly billingPeriod: TransactionsTimePeriod;
|
|
6
|
+
constructor(prorationResponse: IProrationResponse);
|
|
8
7
|
}
|
|
@@ -5,13 +5,7 @@ const index_1 = require("../index");
|
|
|
5
5
|
class Proration {
|
|
6
6
|
constructor(prorationResponse) {
|
|
7
7
|
this.rate = prorationResponse.rate;
|
|
8
|
-
this.
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
rate: this.rate,
|
|
13
|
-
billing_period: this.billing_period,
|
|
14
|
-
};
|
|
8
|
+
this.billingPeriod = new index_1.TransactionsTimePeriod(prorationResponse.billing_period);
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.Proration = Proration;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionAdjustmentItemResponse } from '../../types';
|
|
2
2
|
import { TransactionProration, AdjustmentItemTotals } from '../index';
|
|
3
3
|
import { type PaymentType } from '../../enums';
|
|
4
4
|
export declare class TransactionAdjustmentItem {
|
|
5
|
-
readonly id
|
|
6
|
-
readonly
|
|
5
|
+
readonly id: string | null;
|
|
6
|
+
readonly itemId: string;
|
|
7
7
|
readonly type: PaymentType;
|
|
8
|
-
readonly amount
|
|
9
|
-
readonly proration
|
|
10
|
-
readonly totals
|
|
11
|
-
constructor(transactionAdjustmentItem:
|
|
12
|
-
toJson(): ITransactionAdjustmentItem;
|
|
8
|
+
readonly amount: string | null;
|
|
9
|
+
readonly proration: TransactionProration | null;
|
|
10
|
+
readonly totals: AdjustmentItemTotals | null;
|
|
11
|
+
constructor(transactionAdjustmentItem: ITransactionAdjustmentItemResponse);
|
|
13
12
|
}
|
|
@@ -4,26 +4,14 @@ exports.TransactionAdjustmentItem = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionAdjustmentItem {
|
|
6
6
|
constructor(transactionAdjustmentItem) {
|
|
7
|
-
this.id = transactionAdjustmentItem.id;
|
|
8
|
-
this.
|
|
7
|
+
this.id = transactionAdjustmentItem.id ? transactionAdjustmentItem.id : null;
|
|
8
|
+
this.itemId = transactionAdjustmentItem.item_id;
|
|
9
9
|
this.type = transactionAdjustmentItem.type;
|
|
10
|
-
this.amount = transactionAdjustmentItem.amount;
|
|
10
|
+
this.amount = transactionAdjustmentItem.amount ? transactionAdjustmentItem.amount : null;
|
|
11
11
|
this.proration = transactionAdjustmentItem.proration
|
|
12
12
|
? new index_1.TransactionProration(transactionAdjustmentItem.proration)
|
|
13
|
-
:
|
|
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
|
-
};
|
|
13
|
+
: null;
|
|
14
|
+
this.totals = transactionAdjustmentItem.totals ? new index_1.AdjustmentItemTotals(transactionAdjustmentItem.totals) : null;
|
|
27
15
|
}
|
|
28
16
|
}
|
|
29
17
|
exports.TransactionAdjustmentItem = TransactionAdjustmentItem;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionAdjustmentResponse } from '../../types';
|
|
2
2
|
import { TransactionAdjustmentItem, TotalAdjustments, PayoutTotalsAdjustment } from '../index';
|
|
3
3
|
import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../enums';
|
|
4
4
|
export declare class TransactionAdjustment {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly action: AdjustmentAction;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
7
|
+
readonly transactionId: string;
|
|
8
|
+
readonly subscriptionId: string | null;
|
|
9
|
+
readonly customerId: string;
|
|
10
10
|
readonly reason: string;
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
11
|
+
readonly creditAppliedToBalance: boolean;
|
|
12
|
+
readonly currencyCode: CurrencyCode;
|
|
13
13
|
readonly status: AdjustmentStatus;
|
|
14
14
|
readonly items: TransactionAdjustmentItem[];
|
|
15
|
-
readonly totals
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
constructor(adjustment:
|
|
20
|
-
toJson(): ITransactionAdjustment;
|
|
15
|
+
readonly totals: TotalAdjustments | null;
|
|
16
|
+
readonly payoutTotals: PayoutTotalsAdjustment | null;
|
|
17
|
+
readonly createdAt: string;
|
|
18
|
+
readonly updatedAt: string;
|
|
19
|
+
constructor(adjustment: ITransactionAdjustmentResponse);
|
|
21
20
|
}
|