@paddle/paddle-node-sdk 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -2
- package/README.md +90 -106
- 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/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 +6 -7
- package/dist/entities/subscription/transaction-line-item-preview.js +3 -13
- package/dist/entities/transaction/address-preview.d.ts +7 -0
- package/dist/entities/transaction/address-preview.js +10 -0
- package/dist/entities/transaction/adjustment-totals.d.ts +4 -5
- package/dist/entities/transaction/adjustment-totals.js +2 -13
- package/dist/entities/transaction/index.d.ts +4 -0
- package/dist/entities/transaction/index.js +4 -0
- package/dist/entities/transaction/proration.d.ts +7 -0
- package/dist/entities/transaction/proration.js +11 -0
- 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 +9 -0
- package/dist/entities/transaction/transaction-item-preview.js +14 -0
- 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 +16 -0
- package/dist/entities/transaction/transaction-preview.js +19 -0
- 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/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/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/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 +2 -2
- package/dist/resources/customers/index.js +1 -1
- 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 +1 -1
- 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/prices/index.d.ts +1 -1
- 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/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 +1 -1
- 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 +3 -2
- package/dist/resources/transactions/index.js +8 -0
- package/dist/resources/transactions/operations/create-transaction-request-body.d.ts +13 -18
- package/dist/resources/transactions/operations/index.d.ts +1 -2
- package/dist/resources/transactions/operations/index.js +1 -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 +21 -0
- 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/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/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 +11 -7
- package/dist/types/transaction/index.js +11 -7
- 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 +5 -0
- 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-preview.js +0 -2
- package/dist/types/subscription/subscription-price.d.ts +0 -11
- package/dist/types/subscription/subscription-price.js +0 -2
- package/dist/types/subscription/subscription-result.d.ts +0 -4
- package/dist/types/subscription/subscription-result.js +0 -2
- package/dist/types/subscription/subscription-scheduled-change.js +0 -2
- 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-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 → transactions/operations/transaction-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/product/product-response.js} +0 -0
- /package/dist/{resources/discounts/operations/update-discount-path-parameters.js → types/shared/adjustment-original-amount-response.js} +0 -0
- /package/dist/{resources/prices/operations/get-price-path-parameters.js → types/shared/billing-details-create.js} +0 -0
- /package/dist/{resources/prices/operations/update-price-path-parameters.js → types/shared/billing-details-response.js} +0 -0
- /package/dist/{resources/products/operations/get-product-path-parameters.js → types/shared/import-meta-response.js} +0 -0
- /package/dist/{resources/products/operations/update-product-path-parameters.js → types/shared/money-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/get-subscription-path-parameters.js → types/shared/payment-card-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/update-subscription-path-parameters.js → types/shared/payout-totals-adjustment-response.js} +0 -0
- /package/dist/{resources/transactions/operations/get-transaction-path-parameters.js → types/shared/shared-price-response.js} +0 -0
- /package/dist/{resources/transactions/operations/update-transaction-path-parameters.js → types/shared/shared-product-response.js} +0 -0
- /package/dist/types/{address/address.js → shared/tax-rates-used-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment-item.js → shared/total-adjustments-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment.js → shared/transaction-details-preview-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-proration.js → shared/transaction-line-item-preview-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-time-period.js → shared/transaction-payment-attempt-response.js} +0 -0
- /package/dist/types/{business/business.js → shared/transaction-payout-totals-adjusted-response.js} +0 -0
- /package/dist/types/{customer/credit-balance.js → shared/transaction-payout-totals-response.js} +0 -0
- /package/dist/types/{customer/customer.js → shared/transaction-totals-adjusted-response.js} +0 -0
- /package/dist/types/{discount/discount.js → shared/transaction-totals-response.js} +0 -0
- /package/dist/types/{price/price.js → shared/unit-price-override-response.js} +0 -0
- /package/dist/types/{product/product.js → subscription/next-transaction-response.js} +0 -0
- /package/dist/types/{shared/adjustment-original-amount.js → subscription/subscription-discount-response.js} +0 -0
- /package/dist/types/{shared/billing-details.js → subscription/subscription-item-response.js} +0 -0
- /package/dist/types/{shared/payment-card.js → subscription/subscription-management-response.js} +0 -0
- /package/dist/types/{shared/payout-totals-adjustment.js → subscription/subscription-preview-response.js} +0 -0
- /package/dist/types/{shared/shared-price.js → subscription/subscription-price-response.js} +0 -0
- /package/dist/types/{shared/shared-product.js → subscription/subscription-result-response.js} +0 -0
- /package/dist/types/{shared/tax-rates-used.js → subscription/subscription-scheduled-change-response.js} +0 -0
- /package/dist/types/{shared/total-adjustments.js → subscription/subscription-time-period-response.js} +0 -0
- /package/dist/types/{shared/transaction-details-preview.js → transaction/adjustment-totals-response.js} +0 -0
- /package/dist/types/{shared/transaction-line-item-preview.js → transaction/transaction-adjustment-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-payment-attempt.js → transaction/transaction-adjustment-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals-adjusted.js → transaction/transaction-details-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals.js → transaction/transaction-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals-adjusted.js → transaction/transaction-line-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals.js → transaction/transaction-preview-item.js} +0 -0
- /package/dist/types/{subscription/next-transaction.js → transaction/transaction-preview-response.js} +0 -0
- /package/dist/types/{subscription/subscription-discount.js → transaction/transaction-proration-response.js} +0 -0
- /package/dist/types/{subscription/subscription-item.js → transaction/transaction-response.js} +0 -0
- /package/dist/types/{subscription/subscription-management.js → transaction/transactions-time-period-response.js} +0 -0
|
@@ -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
|
}
|
|
@@ -6,36 +6,18 @@ class TransactionAdjustment {
|
|
|
6
6
|
constructor(adjustment) {
|
|
7
7
|
this.id = adjustment.id;
|
|
8
8
|
this.action = adjustment.action;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
9
|
+
this.transactionId = adjustment.transaction_id;
|
|
10
|
+
this.subscriptionId = adjustment.subscription_id ? adjustment.subscription_id : null;
|
|
11
|
+
this.customerId = adjustment.customer_id;
|
|
12
12
|
this.reason = adjustment.reason;
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
13
|
+
this.creditAppliedToBalance = adjustment.credit_applied_to_balance;
|
|
14
|
+
this.currencyCode = adjustment.currency_code;
|
|
15
15
|
this.status = adjustment.status;
|
|
16
16
|
this.items = adjustment.items.map((item) => new index_1.TransactionAdjustmentItem(item));
|
|
17
|
-
this.totals = adjustment.totals ? new index_1.TotalAdjustments(adjustment.totals) :
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
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
|
-
};
|
|
17
|
+
this.totals = adjustment.totals ? new index_1.TotalAdjustments(adjustment.totals) : null;
|
|
18
|
+
this.payoutTotals = adjustment.payout_totals ? new index_1.PayoutTotalsAdjustment(adjustment.payout_totals) : null;
|
|
19
|
+
this.createdAt = adjustment.created_at;
|
|
20
|
+
this.updatedAt = adjustment.updated_at;
|
|
39
21
|
}
|
|
40
22
|
}
|
|
41
23
|
exports.TransactionAdjustment = TransactionAdjustment;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionIncludes } from './transaction-includes';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ITransactionResponse } from '../../types';
|
|
3
3
|
import { Collection } from '../../internal/base';
|
|
4
|
-
export declare class TransactionCollection extends Collection<
|
|
5
|
-
fromJson(data:
|
|
4
|
+
export declare class TransactionCollection extends Collection<ITransactionResponse, TransactionIncludes> {
|
|
5
|
+
fromJson(data: ITransactionResponse): TransactionIncludes;
|
|
6
6
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionDetailsResponse } from '../../types';
|
|
2
2
|
import { TaxRatesUsed, TransactionTotals, TransactionTotalsAdjusted, TransactionPayoutTotals, TransactionPayoutTotalsAdjusted, TransactionLineItem } from '../index';
|
|
3
3
|
export declare class TransactionDetails {
|
|
4
|
-
readonly
|
|
5
|
-
readonly totals
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
constructor(transactionDetails:
|
|
11
|
-
toJson(): ITransactionDetails;
|
|
4
|
+
readonly taxRatesUsed: TaxRatesUsed[];
|
|
5
|
+
readonly totals: TransactionTotals | null;
|
|
6
|
+
readonly adjustedTotals: TransactionTotalsAdjusted | null;
|
|
7
|
+
readonly payoutTotals: TransactionPayoutTotals | null;
|
|
8
|
+
readonly adjustedPayoutTotals: TransactionPayoutTotalsAdjusted | null;
|
|
9
|
+
readonly lineItems: TransactionLineItem[];
|
|
10
|
+
constructor(transactionDetails: ITransactionDetailsResponse);
|
|
12
11
|
}
|
|
@@ -4,28 +4,18 @@ exports.TransactionDetails = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionDetails {
|
|
6
6
|
constructor(transactionDetails) {
|
|
7
|
-
this.
|
|
8
|
-
this.totals = transactionDetails.totals ? new index_1.TransactionTotals(transactionDetails.totals) :
|
|
9
|
-
this.
|
|
7
|
+
this.taxRatesUsed = 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) : null;
|
|
9
|
+
this.adjustedTotals = transactionDetails.adjusted_totals
|
|
10
10
|
? new index_1.TransactionTotalsAdjusted(transactionDetails.adjusted_totals)
|
|
11
|
-
:
|
|
12
|
-
this.
|
|
11
|
+
: null;
|
|
12
|
+
this.payoutTotals = transactionDetails.payout_totals
|
|
13
13
|
? new index_1.TransactionPayoutTotals(transactionDetails.payout_totals)
|
|
14
|
-
:
|
|
15
|
-
this.
|
|
14
|
+
: null;
|
|
15
|
+
this.adjustedPayoutTotals = transactionDetails.adjusted_payout_totals
|
|
16
16
|
? new index_1.TransactionPayoutTotalsAdjusted(transactionDetails.adjusted_payout_totals)
|
|
17
|
-
:
|
|
18
|
-
this.
|
|
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
|
-
};
|
|
17
|
+
: null;
|
|
18
|
+
this.lineItems = transactionDetails.line_items.map((line_item) => new index_1.TransactionLineItem(line_item));
|
|
29
19
|
}
|
|
30
20
|
}
|
|
31
21
|
exports.TransactionDetails = TransactionDetails;
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionResponse } from '../../types';
|
|
2
2
|
import { Address, TransactionAdjustment, AdjustmentTotals, BillingDetails, Business, TransactionCheckout, type CustomData, Customer, TransactionDetails, Discount, TransactionItem, TransactionPaymentAttempt, TransactionsTimePeriod } from '../index';
|
|
3
3
|
import { type CollectionMode, type CurrencyCode, type TransactionStatus, type TransactionOrigin } from '../../enums';
|
|
4
4
|
export declare class TransactionIncludes {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly status: TransactionStatus;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
7
|
+
readonly customerId: string | null;
|
|
8
|
+
readonly addressId: string | null;
|
|
9
|
+
readonly businessId: string | null;
|
|
10
|
+
readonly customData: CustomData | null;
|
|
11
|
+
readonly currencyCode: CurrencyCode;
|
|
12
12
|
readonly origin: TransactionOrigin;
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
13
|
+
readonly subscriptionId: string | null;
|
|
14
|
+
readonly invoiceId: string | null;
|
|
15
|
+
readonly invoiceNumber: string | null;
|
|
16
|
+
readonly collectionMode: CollectionMode;
|
|
17
|
+
readonly discountId: string | null;
|
|
18
|
+
readonly billingDetails: BillingDetails | null;
|
|
19
|
+
readonly billingPeriod: TransactionsTimePeriod | null;
|
|
20
20
|
readonly items: TransactionItem[];
|
|
21
|
-
readonly details
|
|
21
|
+
readonly details: TransactionDetails | null;
|
|
22
22
|
readonly payments: TransactionPaymentAttempt[];
|
|
23
|
-
readonly checkout
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly address
|
|
28
|
-
readonly adjustments
|
|
29
|
-
readonly
|
|
30
|
-
readonly business
|
|
31
|
-
readonly customer
|
|
32
|
-
readonly discount
|
|
33
|
-
constructor(transaction:
|
|
34
|
-
toJson(): ITransaction;
|
|
23
|
+
readonly checkout: TransactionCheckout | null;
|
|
24
|
+
readonly createdAt: string;
|
|
25
|
+
readonly updatedAt: string;
|
|
26
|
+
readonly billedAt: string | null;
|
|
27
|
+
readonly address: Address | null;
|
|
28
|
+
readonly adjustments: TransactionAdjustment[] | null;
|
|
29
|
+
readonly adjustmentsTotals: AdjustmentTotals | null;
|
|
30
|
+
readonly business: Business | null;
|
|
31
|
+
readonly customer: Customer | null;
|
|
32
|
+
readonly discount: Discount | null;
|
|
33
|
+
constructor(transaction: ITransactionResponse);
|
|
35
34
|
}
|
|
@@ -7,68 +7,36 @@ class TransactionIncludes {
|
|
|
7
7
|
var _a;
|
|
8
8
|
this.id = transaction.id;
|
|
9
9
|
this.status = transaction.status;
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
10
|
+
this.customerId = transaction.customer_id ? transaction.customer_id : null;
|
|
11
|
+
this.addressId = transaction.address_id ? transaction.address_id : null;
|
|
12
|
+
this.businessId = transaction.business_id ? transaction.business_id : null;
|
|
13
|
+
this.customData = transaction.custom_data ? transaction.custom_data : null;
|
|
14
|
+
this.currencyCode = transaction.currency_code;
|
|
15
15
|
this.origin = transaction.origin;
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
? new index_1.TransactionsTimePeriod(transaction.billing_period)
|
|
24
|
-
: undefined;
|
|
16
|
+
this.subscriptionId = transaction.subscription_id ? transaction.subscription_id : null;
|
|
17
|
+
this.invoiceId = transaction.invoice_id ? transaction.invoice_id : null;
|
|
18
|
+
this.invoiceNumber = transaction.invoice_number ? transaction.invoice_number : null;
|
|
19
|
+
this.collectionMode = transaction.collection_mode;
|
|
20
|
+
this.discountId = transaction.discount_id ? transaction.discount_id : null;
|
|
21
|
+
this.billingDetails = transaction.billing_details ? new index_1.BillingDetails(transaction.billing_details) : null;
|
|
22
|
+
this.billingPeriod = transaction.billing_period ? new index_1.TransactionsTimePeriod(transaction.billing_period) : null;
|
|
25
23
|
this.items = transaction.items.map((item) => new index_1.TransactionItem(item));
|
|
26
|
-
this.details = transaction.details ? new index_1.TransactionDetails(transaction.details) :
|
|
24
|
+
this.details = transaction.details ? new index_1.TransactionDetails(transaction.details) : null;
|
|
27
25
|
this.payments = transaction.payments.map((payment) => new index_1.TransactionPaymentAttempt(payment));
|
|
28
|
-
this.checkout = transaction.checkout ? new index_1.TransactionCheckout(transaction.checkout) :
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.address = transaction.address ? new index_1.Address(transaction.address) :
|
|
33
|
-
this.adjustments =
|
|
34
|
-
|
|
26
|
+
this.checkout = transaction.checkout ? new index_1.TransactionCheckout(transaction.checkout) : null;
|
|
27
|
+
this.createdAt = transaction.created_at;
|
|
28
|
+
this.updatedAt = transaction.updated_at;
|
|
29
|
+
this.billedAt = transaction.billed_at ? transaction.billed_at : null;
|
|
30
|
+
this.address = transaction.address ? new index_1.Address(transaction.address) : null;
|
|
31
|
+
this.adjustments = transaction.adjustments
|
|
32
|
+
? (_a = transaction.adjustments) === null || _a === void 0 ? void 0 : _a.map((adjustment) => new index_1.TransactionAdjustment(adjustment))
|
|
33
|
+
: null;
|
|
34
|
+
this.adjustmentsTotals = transaction.adjustments_totals
|
|
35
35
|
? new index_1.AdjustmentTotals(transaction.adjustments_totals)
|
|
36
|
-
:
|
|
37
|
-
this.business = transaction.business ? new index_1.Business(transaction.business) :
|
|
38
|
-
this.customer = transaction.customer ? new index_1.Customer(transaction.customer) :
|
|
39
|
-
this.discount = transaction.discount ? new index_1.Discount(transaction.discount) :
|
|
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
|
-
};
|
|
36
|
+
: null;
|
|
37
|
+
this.business = transaction.business ? new index_1.Business(transaction.business) : null;
|
|
38
|
+
this.customer = transaction.customer ? new index_1.Customer(transaction.customer) : null;
|
|
39
|
+
this.discount = transaction.discount ? new index_1.Discount(transaction.discount) : null;
|
|
72
40
|
}
|
|
73
41
|
}
|
|
74
42
|
exports.TransactionIncludes = TransactionIncludes;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PriceWithIncludes, Proration } from '../index';
|
|
2
|
+
import { type ITransactionItemPreviewResponse } from '../../types';
|
|
3
|
+
export declare class TransactionItemPreview {
|
|
4
|
+
readonly price: PriceWithIncludes | null;
|
|
5
|
+
readonly quantity: number;
|
|
6
|
+
readonly includeInTotals: boolean | null;
|
|
7
|
+
readonly proration: Proration | null;
|
|
8
|
+
constructor(transactionItem: ITransactionItemPreviewResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionItemPreview = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionItemPreview {
|
|
6
|
+
constructor(transactionItem) {
|
|
7
|
+
var _a;
|
|
8
|
+
this.price = transactionItem.price ? new index_1.PriceWithIncludes(transactionItem.price) : null;
|
|
9
|
+
this.quantity = transactionItem.quantity;
|
|
10
|
+
this.includeInTotals = (_a = transactionItem.include_in_totals) !== null && _a !== void 0 ? _a : null;
|
|
11
|
+
this.proration = transactionItem.proration ? new index_1.Proration(transactionItem.proration) : null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.TransactionItemPreview = TransactionItemPreview;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionItemResponse } from '../../types';
|
|
2
2
|
import { Price, TransactionProration } from '../index';
|
|
3
3
|
export declare class TransactionItem {
|
|
4
|
-
readonly
|
|
5
|
-
readonly price?: Price | undefined | null;
|
|
4
|
+
readonly price: Price | null;
|
|
6
5
|
readonly quantity: number;
|
|
7
|
-
readonly proration
|
|
8
|
-
constructor(transactionItem:
|
|
9
|
-
toJson(): ITransactionItem;
|
|
6
|
+
readonly proration: TransactionProration | null;
|
|
7
|
+
constructor(transactionItem: ITransactionItemResponse);
|
|
10
8
|
}
|
|
@@ -4,18 +4,9 @@ exports.TransactionItem = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionItem {
|
|
6
6
|
constructor(transactionItem) {
|
|
7
|
-
this.
|
|
8
|
-
this.price = transactionItem.price ? new index_1.Price(transactionItem.price) : undefined;
|
|
7
|
+
this.price = transactionItem.price ? new index_1.Price(transactionItem.price) : null;
|
|
9
8
|
this.quantity = transactionItem.quantity;
|
|
10
|
-
this.proration = transactionItem.proration ? new index_1.TransactionProration(transactionItem.proration) :
|
|
11
|
-
}
|
|
12
|
-
toJson() {
|
|
13
|
-
return {
|
|
14
|
-
price_id: this.price_id,
|
|
15
|
-
price: this.price,
|
|
16
|
-
quantity: this.quantity,
|
|
17
|
-
proration: this.proration,
|
|
18
|
-
};
|
|
9
|
+
this.proration = transactionItem.proration ? new index_1.TransactionProration(transactionItem.proration) : null;
|
|
19
10
|
}
|
|
20
11
|
}
|
|
21
12
|
exports.TransactionItem = TransactionItem;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionLineItemResponse } from '../../types';
|
|
2
2
|
import { TransactionProration, UnitTotals, Totals, Product } from '../index';
|
|
3
3
|
export declare class TransactionLineItem {
|
|
4
4
|
readonly id: string;
|
|
5
|
-
readonly
|
|
5
|
+
readonly priceId: string;
|
|
6
6
|
readonly quantity: number;
|
|
7
|
-
readonly proration
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly totals
|
|
11
|
-
readonly product
|
|
12
|
-
constructor(transactionLineItem:
|
|
13
|
-
toJson(): ITransactionLineItem;
|
|
7
|
+
readonly proration: TransactionProration | null;
|
|
8
|
+
readonly taxRate: string;
|
|
9
|
+
readonly unitTotals: UnitTotals | null;
|
|
10
|
+
readonly totals: Totals | null;
|
|
11
|
+
readonly product: Product | null;
|
|
12
|
+
constructor(transactionLineItem: ITransactionLineItemResponse);
|
|
14
13
|
}
|
|
@@ -5,27 +5,13 @@ const index_1 = require("../index");
|
|
|
5
5
|
class TransactionLineItem {
|
|
6
6
|
constructor(transactionLineItem) {
|
|
7
7
|
this.id = transactionLineItem.id;
|
|
8
|
-
this.
|
|
8
|
+
this.priceId = transactionLineItem.price_id;
|
|
9
9
|
this.quantity = transactionLineItem.quantity;
|
|
10
|
-
this.proration = transactionLineItem.proration
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.totals = transactionLineItem.totals ? new index_1.Totals(transactionLineItem.totals) : undefined;
|
|
16
|
-
this.product = transactionLineItem.product ? new index_1.Product(transactionLineItem.product) : undefined;
|
|
17
|
-
}
|
|
18
|
-
toJson() {
|
|
19
|
-
return {
|
|
20
|
-
id: this.id,
|
|
21
|
-
price_id: this.price_id,
|
|
22
|
-
quantity: this.quantity,
|
|
23
|
-
proration: this.proration,
|
|
24
|
-
tax_rate: this.tax_rate,
|
|
25
|
-
unit_totals: this.unit_totals,
|
|
26
|
-
totals: this.totals,
|
|
27
|
-
product: this.product,
|
|
28
|
-
};
|
|
10
|
+
this.proration = transactionLineItem.proration ? new index_1.TransactionProration(transactionLineItem.proration) : null;
|
|
11
|
+
this.taxRate = transactionLineItem.tax_rate;
|
|
12
|
+
this.unitTotals = transactionLineItem.unit_totals ? new index_1.UnitTotals(transactionLineItem.unit_totals) : null;
|
|
13
|
+
this.totals = transactionLineItem.totals ? new index_1.Totals(transactionLineItem.totals) : null;
|
|
14
|
+
this.product = transactionLineItem.product ? new index_1.Product(transactionLineItem.product) : null;
|
|
29
15
|
}
|
|
30
16
|
}
|
|
31
17
|
exports.TransactionLineItem = TransactionLineItem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ITransactionPreviewResponse } from '../../types';
|
|
2
|
+
import { AddressPreview, TransactionDetailsPreview, TransactionItemPreview } from '../index';
|
|
3
|
+
import { type CurrencyCode } from '../../enums';
|
|
4
|
+
export declare class TransactionPreview {
|
|
5
|
+
readonly customerId: string | null;
|
|
6
|
+
readonly addressId: string | null;
|
|
7
|
+
readonly businessId: string | null;
|
|
8
|
+
readonly currencyCode: CurrencyCode;
|
|
9
|
+
readonly discountId: string | null;
|
|
10
|
+
readonly customerIpAddress: string | null;
|
|
11
|
+
readonly address: AddressPreview | null;
|
|
12
|
+
readonly ignoreTrials: boolean | null;
|
|
13
|
+
readonly items: TransactionItemPreview[];
|
|
14
|
+
readonly details: TransactionDetailsPreview;
|
|
15
|
+
constructor(transactionPreview: ITransactionPreviewResponse);
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionPreview = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class TransactionPreview {
|
|
6
|
+
constructor(transactionPreview) {
|
|
7
|
+
this.customerId = transactionPreview.customer_id ? transactionPreview.customer_id : null;
|
|
8
|
+
this.addressId = transactionPreview.address_id ? transactionPreview.address_id : null;
|
|
9
|
+
this.businessId = transactionPreview.business_id ? transactionPreview.business_id : null;
|
|
10
|
+
this.currencyCode = transactionPreview.currency_code;
|
|
11
|
+
this.discountId = transactionPreview.discount_id ? transactionPreview.discount_id : null;
|
|
12
|
+
this.customerIpAddress = transactionPreview.customer_ip_address ? transactionPreview.customer_ip_address : null;
|
|
13
|
+
this.address = transactionPreview.address ? new index_1.AddressPreview(transactionPreview.address) : null;
|
|
14
|
+
this.ignoreTrials = transactionPreview.ignore_trials ? transactionPreview.ignore_trials : null;
|
|
15
|
+
this.items = transactionPreview.items.map((item) => new index_1.TransactionItemPreview(item));
|
|
16
|
+
this.details = new index_1.TransactionDetailsPreview(transactionPreview.details);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.TransactionPreview = TransactionPreview;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionProrationResponse } from '../../types';
|
|
2
2
|
import { TransactionsTimePeriod } from '../index';
|
|
3
3
|
export declare class TransactionProration {
|
|
4
4
|
readonly rate: string;
|
|
5
|
-
readonly
|
|
6
|
-
constructor(transactionProration:
|
|
7
|
-
toJson(): ITransactionProration;
|
|
5
|
+
readonly billingPeriod: TransactionsTimePeriod | null;
|
|
6
|
+
constructor(transactionProration: ITransactionProrationResponse);
|
|
8
7
|
}
|
|
@@ -5,15 +5,9 @@ const index_1 = require("../index");
|
|
|
5
5
|
class TransactionProration {
|
|
6
6
|
constructor(transactionProration) {
|
|
7
7
|
this.rate = transactionProration.rate;
|
|
8
|
-
this.
|
|
8
|
+
this.billingPeriod = transactionProration.billing_period
|
|
9
9
|
? new index_1.TransactionsTimePeriod(transactionProration.billing_period)
|
|
10
|
-
:
|
|
11
|
-
}
|
|
12
|
-
toJson() {
|
|
13
|
-
return {
|
|
14
|
-
rate: this.rate,
|
|
15
|
-
billing_period: this.billing_period,
|
|
16
|
-
};
|
|
10
|
+
: null;
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
13
|
exports.TransactionProration = TransactionProration;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { type CustomData, BillingDetails, TransactionsTimePeriod, TransactionItem, TransactionDetails, TransactionPaymentAttempt, TransactionCheckout } from '../index';
|
|
2
2
|
import { type TransactionStatus, type CurrencyCode, type TransactionOrigin, type CollectionMode } from '../../enums';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ITransactionResponse } from '../../types';
|
|
4
4
|
export declare class Transaction {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly status: TransactionStatus;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
7
|
+
readonly customerId: string | null;
|
|
8
|
+
readonly addressId: string | null;
|
|
9
|
+
readonly businessId: string | null;
|
|
10
|
+
readonly customData: CustomData | null;
|
|
11
|
+
readonly currencyCode: CurrencyCode;
|
|
12
12
|
readonly origin: TransactionOrigin;
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
13
|
+
readonly subscriptionId: string | null;
|
|
14
|
+
readonly invoiceId: string | null;
|
|
15
|
+
readonly invoiceNumber: string | null;
|
|
16
|
+
readonly collectionMode: CollectionMode;
|
|
17
|
+
readonly discountId: string | null;
|
|
18
|
+
readonly billingDetails: BillingDetails | null;
|
|
19
|
+
readonly billingPeriod: TransactionsTimePeriod | null;
|
|
20
20
|
readonly items: TransactionItem[];
|
|
21
|
-
readonly details
|
|
21
|
+
readonly details: TransactionDetails | null;
|
|
22
22
|
readonly payments: TransactionPaymentAttempt[];
|
|
23
|
-
readonly checkout
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
constructor(transaction:
|
|
28
|
-
toJson(): ITransaction;
|
|
23
|
+
readonly checkout: TransactionCheckout | null;
|
|
24
|
+
readonly createdAt: string;
|
|
25
|
+
readonly updatedAt: string;
|
|
26
|
+
readonly billedAt: string | null;
|
|
27
|
+
constructor(transaction: ITransactionResponse);
|
|
29
28
|
}
|