@paddle/paddle-node-sdk 0.1.8 → 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 +28 -2
- 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 +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/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/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/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 +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-item.js +0 -2
- package/dist/types/subscription/subscription-management.d.ts +0 -4
- package/dist/types/subscription/subscription-management.js +0 -2
- 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-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 → types/address/address-response.js} +0 -0
- /package/dist/{resources/addresses/operations/get-address-path-parameters.js → types/adjustment/adjustment-item-response.js} +0 -0
- /package/dist/{resources/addresses/operations/list-address-path-parameters.js → types/adjustment/adjustment-response.js} +0 -0
- /package/dist/{resources/addresses/operations/update-address-path-parameters.js → types/adjustment/adjustments-proration-response.js} +0 -0
- /package/dist/{resources/businesses/operations/create-business-path-parameters.js → types/adjustment/adjustments-time-period-response.js} +0 -0
- /package/dist/{resources/businesses/operations/get-business-path-parameters.js → types/business/business-response.js} +0 -0
- /package/dist/{resources/businesses/operations/list-business-path-parameters.js → types/customer/credit-balance-response.js} +0 -0
- /package/dist/{resources/businesses/operations/update-business-path-parameters.js → types/customer/customer-response.js} +0 -0
- /package/dist/{resources/customers/operations/get-credit-balance-path-parameters.js → types/discount/discount-response.js} +0 -0
- /package/dist/{resources/customers/operations/get-customer-path-parameters.js → types/price/price-response.js} +0 -0
- /package/dist/{resources/customers/operations/update-customer-path-parameters.js → types/product/product-response.js} +0 -0
- /package/dist/{resources/discounts/operations/get-discount-path-parameters.js → types/shared/adjustment-original-amount-response.js} +0 -0
- /package/dist/{resources/discounts/operations/update-discount-path-parameters.js → types/shared/billing-details-create.js} +0 -0
- /package/dist/{resources/prices/operations/get-price-path-parameters.js → types/shared/billing-details-response.js} +0 -0
- /package/dist/{resources/prices/operations/update-price-path-parameters.js → types/shared/import-meta-response.js} +0 -0
- /package/dist/{resources/products/operations/get-product-path-parameters.js → types/shared/money-response.js} +0 -0
- /package/dist/{resources/products/operations/update-product-path-parameters.js → types/shared/payment-card-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/get-subscription-path-parameters.js → types/shared/payout-totals-adjustment-response.js} +0 -0
- /package/dist/{resources/subscriptions/operations/update-subscription-path-parameters.js → types/shared/shared-price-response.js} +0 -0
- /package/dist/{resources/transactions/operations/get-transaction-path-parameters.js → types/shared/shared-product-response.js} +0 -0
- /package/dist/{resources/transactions/operations/update-transaction-path-parameters.js → types/shared/tax-rates-used-response.js} +0 -0
- /package/dist/types/{address/address.js → shared/total-adjustments-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment-item.js → shared/transaction-details-preview-response.js} +0 -0
- /package/dist/types/{adjustment/adjustment.js → shared/transaction-line-item-preview-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-proration.js → shared/transaction-payment-attempt-response.js} +0 -0
- /package/dist/types/{adjustment/adjustments-time-period.js → shared/transaction-payout-totals-adjusted-response.js} +0 -0
- /package/dist/types/{business/business.js → shared/transaction-payout-totals-response.js} +0 -0
- /package/dist/types/{customer/credit-balance.js → shared/transaction-totals-adjusted-response.js} +0 -0
- /package/dist/types/{customer/customer.js → shared/transaction-totals-response.js} +0 -0
- /package/dist/types/{discount/discount.js → shared/unit-price-override-response.js} +0 -0
- /package/dist/types/{price/price.js → subscription/next-transaction-response.js} +0 -0
- /package/dist/types/{product/product.js → subscription/subscription-discount-response.js} +0 -0
- /package/dist/types/{shared/adjustment-original-amount.js → subscription/subscription-item-response.js} +0 -0
- /package/dist/types/{shared/billing-details.js → subscription/subscription-management-response.js} +0 -0
- /package/dist/types/{shared/payment-card.js → subscription/subscription-preview-response.js} +0 -0
- /package/dist/types/{shared/payout-totals-adjustment.js → subscription/subscription-price-response.js} +0 -0
- /package/dist/types/{shared/shared-price.js → subscription/subscription-result-response.js} +0 -0
- /package/dist/types/{shared/shared-product.js → subscription/subscription-scheduled-change-response.js} +0 -0
- /package/dist/types/{shared/tax-rates-used.js → subscription/subscription-time-period-response.js} +0 -0
- /package/dist/types/{shared/total-adjustments.js → transaction/adjustment-totals-response.js} +0 -0
- /package/dist/types/{shared/transaction-details-preview.js → transaction/transaction-adjustment-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-line-item-preview.js → transaction/transaction-adjustment-response.js} +0 -0
- /package/dist/types/{shared/transaction-payment-attempt.js → transaction/transaction-details-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals-adjusted.js → transaction/transaction-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-payout-totals.js → transaction/transaction-line-item-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals-adjusted.js → transaction/transaction-preview-response.js} +0 -0
- /package/dist/types/{shared/transaction-totals.js → transaction/transaction-proration-response.js} +0 -0
- /package/dist/types/{subscription/next-transaction.js → transaction/transaction-response.js} +0 -0
- /package/dist/types/{subscription/subscription-discount.js → transaction/transactions-time-period-response.js} +0 -0
|
@@ -8,22 +8,11 @@ class PayoutTotalsAdjustment {
|
|
|
8
8
|
this.tax = payoutTotalsAdjustment.tax;
|
|
9
9
|
this.total = payoutTotalsAdjustment.total;
|
|
10
10
|
this.fee = payoutTotalsAdjustment.fee;
|
|
11
|
-
this.
|
|
11
|
+
this.chargebackFee = payoutTotalsAdjustment.chargeback_fee
|
|
12
12
|
? new index_1.ChargebackFee(payoutTotalsAdjustment.chargeback_fee)
|
|
13
|
-
:
|
|
13
|
+
: null;
|
|
14
14
|
this.earnings = payoutTotalsAdjustment.earnings;
|
|
15
|
-
this.
|
|
16
|
-
}
|
|
17
|
-
toJson() {
|
|
18
|
-
return {
|
|
19
|
-
subtotal: this.subtotal,
|
|
20
|
-
tax: this.tax,
|
|
21
|
-
total: this.total,
|
|
22
|
-
fee: this.fee,
|
|
23
|
-
chargeback_fee: this.chargeback_fee,
|
|
24
|
-
earnings: this.earnings,
|
|
25
|
-
currency_code: this.currency_code,
|
|
26
|
-
};
|
|
15
|
+
this.currencyCode = payoutTotalsAdjustment.currency_code;
|
|
27
16
|
}
|
|
28
17
|
}
|
|
29
18
|
exports.PayoutTotalsAdjustment = PayoutTotalsAdjustment;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITaxRatesUsedResponse } from '../../types';
|
|
2
2
|
import { Totals } from '../index';
|
|
3
3
|
export declare class TaxRatesUsed {
|
|
4
|
-
readonly
|
|
5
|
-
readonly totals
|
|
6
|
-
constructor(taxRatesUsed:
|
|
7
|
-
toJson(): ITaxRatesUsed;
|
|
4
|
+
readonly taxRate: string;
|
|
5
|
+
readonly totals: Totals | null;
|
|
6
|
+
constructor(taxRatesUsed: ITaxRatesUsedResponse);
|
|
8
7
|
}
|
|
@@ -4,14 +4,8 @@ exports.TaxRatesUsed = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TaxRatesUsed {
|
|
6
6
|
constructor(taxRatesUsed) {
|
|
7
|
-
this.
|
|
8
|
-
this.totals = taxRatesUsed.totals ? new index_1.Totals(taxRatesUsed.totals) :
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
tax_rate: this.tax_rate,
|
|
13
|
-
totals: this.totals,
|
|
14
|
-
};
|
|
7
|
+
this.taxRate = taxRatesUsed.tax_rate;
|
|
8
|
+
this.totals = taxRatesUsed.totals ? new index_1.Totals(taxRatesUsed.totals) : null;
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.TaxRatesUsed = TaxRatesUsed;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITotalAdjustmentsResponse } from '../../types';
|
|
2
2
|
import { type CurrencyCode } from '../../enums';
|
|
3
3
|
export declare class TotalAdjustments {
|
|
4
4
|
readonly subtotal: string;
|
|
@@ -6,7 +6,6 @@ export declare class TotalAdjustments {
|
|
|
6
6
|
readonly total: string;
|
|
7
7
|
readonly fee: string;
|
|
8
8
|
readonly earnings: string;
|
|
9
|
-
readonly
|
|
10
|
-
constructor(totalAdjustments:
|
|
11
|
-
toJson(): ITotalAdjustments;
|
|
9
|
+
readonly currencyCode: CurrencyCode;
|
|
10
|
+
constructor(totalAdjustments: ITotalAdjustmentsResponse);
|
|
12
11
|
}
|
|
@@ -8,17 +8,7 @@ class TotalAdjustments {
|
|
|
8
8
|
this.total = totalAdjustments.total;
|
|
9
9
|
this.fee = totalAdjustments.fee;
|
|
10
10
|
this.earnings = totalAdjustments.earnings;
|
|
11
|
-
this.
|
|
12
|
-
}
|
|
13
|
-
toJson() {
|
|
14
|
-
return {
|
|
15
|
-
subtotal: this.subtotal,
|
|
16
|
-
tax: this.tax,
|
|
17
|
-
total: this.total,
|
|
18
|
-
fee: this.fee,
|
|
19
|
-
earnings: this.earnings,
|
|
20
|
-
currency_code: this.currency_code,
|
|
21
|
-
};
|
|
11
|
+
this.currencyCode = totalAdjustments.currency_code;
|
|
22
12
|
}
|
|
23
13
|
}
|
|
24
14
|
exports.TotalAdjustments = TotalAdjustments;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ITransactionCheckout } from '../../types';
|
|
2
2
|
export declare class TransactionCheckout {
|
|
3
|
-
readonly url
|
|
3
|
+
readonly url: string | null;
|
|
4
4
|
constructor(transactionCheckout: ITransactionCheckout);
|
|
5
|
-
toJson(): ITransactionCheckout;
|
|
6
5
|
}
|
|
@@ -3,12 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TransactionCheckout = void 0;
|
|
4
4
|
class TransactionCheckout {
|
|
5
5
|
constructor(transactionCheckout) {
|
|
6
|
-
this.url = transactionCheckout.url;
|
|
7
|
-
}
|
|
8
|
-
toJson() {
|
|
9
|
-
return {
|
|
10
|
-
url: this.url,
|
|
11
|
-
};
|
|
6
|
+
this.url = transactionCheckout.url ? transactionCheckout.url : null;
|
|
12
7
|
}
|
|
13
8
|
}
|
|
14
9
|
exports.TransactionCheckout = TransactionCheckout;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionPaymentAttemptResponse } from '../../types';
|
|
2
2
|
import { PaymentMethodDetails } from '../index';
|
|
3
3
|
import { type PaymentAttemptStatus, type ErrorCode } from '../../enums';
|
|
4
4
|
export declare class TransactionPaymentAttempt {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly paymentAttemptId: string;
|
|
6
|
+
readonly storedPaymentMethodId: string;
|
|
7
7
|
readonly amount: string;
|
|
8
8
|
readonly status: PaymentAttemptStatus;
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
constructor(transactionPaymentAttempt:
|
|
14
|
-
toJson(): ITransactionPaymentAttempt;
|
|
9
|
+
readonly errorCode: ErrorCode | null;
|
|
10
|
+
readonly methodDetails: PaymentMethodDetails | null;
|
|
11
|
+
readonly createdAt: string;
|
|
12
|
+
readonly capturedAt: string | null;
|
|
13
|
+
constructor(transactionPaymentAttempt: ITransactionPaymentAttemptResponse);
|
|
15
14
|
}
|
|
@@ -4,28 +4,16 @@ exports.TransactionPaymentAttempt = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class TransactionPaymentAttempt {
|
|
6
6
|
constructor(transactionPaymentAttempt) {
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
7
|
+
this.paymentAttemptId = transactionPaymentAttempt.payment_attempt_id;
|
|
8
|
+
this.storedPaymentMethodId = transactionPaymentAttempt.stored_payment_method_id;
|
|
9
9
|
this.amount = transactionPaymentAttempt.amount;
|
|
10
10
|
this.status = transactionPaymentAttempt.status;
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
11
|
+
this.errorCode = transactionPaymentAttempt.error_code ? transactionPaymentAttempt.error_code : null;
|
|
12
|
+
this.methodDetails = transactionPaymentAttempt.method_details
|
|
13
13
|
? new index_1.PaymentMethodDetails(transactionPaymentAttempt.method_details)
|
|
14
|
-
:
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
}
|
|
18
|
-
toJson() {
|
|
19
|
-
return {
|
|
20
|
-
payment_attempt_id: this.payment_attempt_id,
|
|
21
|
-
stored_payment_method_id: this.stored_payment_method_id,
|
|
22
|
-
amount: this.amount,
|
|
23
|
-
status: this.status,
|
|
24
|
-
error_code: this.error_code,
|
|
25
|
-
method_details: this.method_details,
|
|
26
|
-
created_at: this.created_at,
|
|
27
|
-
captured_at: this.captured_at,
|
|
28
|
-
};
|
|
14
|
+
: null;
|
|
15
|
+
this.createdAt = transactionPaymentAttempt.created_at;
|
|
16
|
+
this.capturedAt = transactionPaymentAttempt.captured_at ? transactionPaymentAttempt.captured_at : null;
|
|
29
17
|
}
|
|
30
18
|
}
|
|
31
19
|
exports.TransactionPaymentAttempt = TransactionPaymentAttempt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionPayoutTotalsAdjustedResponse } from '../../types';
|
|
2
2
|
import { ChargebackFee } from '../index';
|
|
3
3
|
import { type PayoutCurrencyCode } from '../../enums';
|
|
4
4
|
export declare class TransactionPayoutTotalsAdjusted {
|
|
@@ -6,9 +6,8 @@ export declare class TransactionPayoutTotalsAdjusted {
|
|
|
6
6
|
readonly tax: string;
|
|
7
7
|
readonly total: string;
|
|
8
8
|
readonly fee: string;
|
|
9
|
-
readonly
|
|
9
|
+
readonly chargebackFee: ChargebackFee | null;
|
|
10
10
|
readonly earnings: string;
|
|
11
|
-
readonly
|
|
12
|
-
constructor(transactionPayoutTotalsAdjusted:
|
|
13
|
-
toJson(): ITransactionPayoutTotalsAdjusted;
|
|
11
|
+
readonly currencyCode: PayoutCurrencyCode;
|
|
12
|
+
constructor(transactionPayoutTotalsAdjusted: ITransactionPayoutTotalsAdjustedResponse);
|
|
14
13
|
}
|
|
@@ -8,22 +8,11 @@ class TransactionPayoutTotalsAdjusted {
|
|
|
8
8
|
this.tax = transactionPayoutTotalsAdjusted.tax;
|
|
9
9
|
this.total = transactionPayoutTotalsAdjusted.total;
|
|
10
10
|
this.fee = transactionPayoutTotalsAdjusted.fee;
|
|
11
|
-
this.
|
|
11
|
+
this.chargebackFee = transactionPayoutTotalsAdjusted.chargeback_fee
|
|
12
12
|
? new index_1.ChargebackFee(transactionPayoutTotalsAdjusted.chargeback_fee)
|
|
13
|
-
:
|
|
13
|
+
: null;
|
|
14
14
|
this.earnings = transactionPayoutTotalsAdjusted.earnings;
|
|
15
|
-
this.
|
|
16
|
-
}
|
|
17
|
-
toJson() {
|
|
18
|
-
return {
|
|
19
|
-
subtotal: this.subtotal,
|
|
20
|
-
tax: this.tax,
|
|
21
|
-
total: this.total,
|
|
22
|
-
fee: this.fee,
|
|
23
|
-
chargeback_fee: this.chargeback_fee,
|
|
24
|
-
earnings: this.earnings,
|
|
25
|
-
currency_code: this.currency_code,
|
|
26
|
-
};
|
|
15
|
+
this.currencyCode = transactionPayoutTotalsAdjusted.currency_code;
|
|
27
16
|
}
|
|
28
17
|
}
|
|
29
18
|
exports.TransactionPayoutTotalsAdjusted = TransactionPayoutTotalsAdjusted;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionPayoutTotalsResponse } from '../../types';
|
|
2
2
|
import { type PayoutCurrencyCode } from '../../enums';
|
|
3
3
|
export declare class TransactionPayoutTotals {
|
|
4
4
|
readonly subtotal: string;
|
|
@@ -7,10 +7,9 @@ export declare class TransactionPayoutTotals {
|
|
|
7
7
|
readonly total: string;
|
|
8
8
|
readonly credit: string;
|
|
9
9
|
readonly balance: string;
|
|
10
|
-
readonly
|
|
10
|
+
readonly grandTotal: string;
|
|
11
11
|
readonly fee: string;
|
|
12
12
|
readonly earnings: string;
|
|
13
|
-
readonly
|
|
14
|
-
constructor(transactionPayoutTotals:
|
|
15
|
-
toJson(): ITransactionPayoutTotals;
|
|
13
|
+
readonly currencyCode: PayoutCurrencyCode;
|
|
14
|
+
constructor(transactionPayoutTotals: ITransactionPayoutTotalsResponse);
|
|
16
15
|
}
|
|
@@ -9,24 +9,10 @@ class TransactionPayoutTotals {
|
|
|
9
9
|
this.total = transactionPayoutTotals.total;
|
|
10
10
|
this.credit = transactionPayoutTotals.credit;
|
|
11
11
|
this.balance = transactionPayoutTotals.balance;
|
|
12
|
-
this.
|
|
12
|
+
this.grandTotal = transactionPayoutTotals.grand_total;
|
|
13
13
|
this.fee = transactionPayoutTotals.fee;
|
|
14
14
|
this.earnings = transactionPayoutTotals.earnings;
|
|
15
|
-
this.
|
|
16
|
-
}
|
|
17
|
-
toJson() {
|
|
18
|
-
return {
|
|
19
|
-
subtotal: this.subtotal,
|
|
20
|
-
discount: this.discount,
|
|
21
|
-
tax: this.tax,
|
|
22
|
-
total: this.total,
|
|
23
|
-
credit: this.credit,
|
|
24
|
-
balance: this.balance,
|
|
25
|
-
grand_total: this.grand_total,
|
|
26
|
-
fee: this.fee,
|
|
27
|
-
earnings: this.earnings,
|
|
28
|
-
currency_code: this.currency_code,
|
|
29
|
-
};
|
|
15
|
+
this.currencyCode = transactionPayoutTotals.currency_code;
|
|
30
16
|
}
|
|
31
17
|
}
|
|
32
18
|
exports.TransactionPayoutTotals = TransactionPayoutTotals;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionTotalsAdjustedResponse } from '../../types';
|
|
2
2
|
import { type CurrencyCode } from '../../enums';
|
|
3
3
|
export declare class TransactionTotalsAdjusted {
|
|
4
4
|
readonly subtotal: string;
|
|
5
5
|
readonly tax: string;
|
|
6
6
|
readonly total: string;
|
|
7
|
-
readonly
|
|
8
|
-
readonly fee
|
|
9
|
-
readonly earnings
|
|
10
|
-
readonly
|
|
11
|
-
constructor(transactionTotalsAdjusted:
|
|
12
|
-
toJson(): ITransactionTotalsAdjusted;
|
|
7
|
+
readonly grandTotal: string;
|
|
8
|
+
readonly fee: string | null;
|
|
9
|
+
readonly earnings: string | null;
|
|
10
|
+
readonly currencyCode: CurrencyCode;
|
|
11
|
+
constructor(transactionTotalsAdjusted: ITransactionTotalsAdjustedResponse);
|
|
13
12
|
}
|
|
@@ -6,21 +6,10 @@ class TransactionTotalsAdjusted {
|
|
|
6
6
|
this.subtotal = transactionTotalsAdjusted.subtotal;
|
|
7
7
|
this.tax = transactionTotalsAdjusted.tax;
|
|
8
8
|
this.total = transactionTotalsAdjusted.total;
|
|
9
|
-
this.
|
|
10
|
-
this.fee = transactionTotalsAdjusted.fee;
|
|
11
|
-
this.earnings = transactionTotalsAdjusted.earnings;
|
|
12
|
-
this.
|
|
13
|
-
}
|
|
14
|
-
toJson() {
|
|
15
|
-
return {
|
|
16
|
-
subtotal: this.subtotal,
|
|
17
|
-
tax: this.tax,
|
|
18
|
-
total: this.total,
|
|
19
|
-
grand_total: this.grand_total,
|
|
20
|
-
fee: this.fee,
|
|
21
|
-
earnings: this.earnings,
|
|
22
|
-
currency_code: this.currency_code,
|
|
23
|
-
};
|
|
9
|
+
this.grandTotal = transactionTotalsAdjusted.grand_total;
|
|
10
|
+
this.fee = transactionTotalsAdjusted.fee ? transactionTotalsAdjusted.fee : null;
|
|
11
|
+
this.earnings = transactionTotalsAdjusted.earnings ? transactionTotalsAdjusted.earnings : null;
|
|
12
|
+
this.currencyCode = transactionTotalsAdjusted.currency_code;
|
|
24
13
|
}
|
|
25
14
|
}
|
|
26
15
|
exports.TransactionTotalsAdjusted = TransactionTotalsAdjusted;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ITransactionTotalsResponse } from '../../types';
|
|
2
2
|
import { type CurrencyCode } from '../../enums';
|
|
3
3
|
export declare class TransactionTotals {
|
|
4
4
|
readonly subtotal: string;
|
|
@@ -7,10 +7,9 @@ export declare class TransactionTotals {
|
|
|
7
7
|
readonly total: string;
|
|
8
8
|
readonly credit: string;
|
|
9
9
|
readonly balance: string;
|
|
10
|
-
readonly
|
|
11
|
-
readonly fee
|
|
12
|
-
readonly earnings
|
|
13
|
-
readonly
|
|
14
|
-
constructor(transactionTotals:
|
|
15
|
-
toJson(): ITransactionTotals;
|
|
10
|
+
readonly grandTotal: string;
|
|
11
|
+
readonly fee: string | null;
|
|
12
|
+
readonly earnings: string | null;
|
|
13
|
+
readonly currencyCode: CurrencyCode;
|
|
14
|
+
constructor(transactionTotals: ITransactionTotalsResponse);
|
|
16
15
|
}
|
|
@@ -9,24 +9,10 @@ class TransactionTotals {
|
|
|
9
9
|
this.total = transactionTotals.total;
|
|
10
10
|
this.credit = transactionTotals.credit;
|
|
11
11
|
this.balance = transactionTotals.balance;
|
|
12
|
-
this.
|
|
13
|
-
this.fee = transactionTotals.fee;
|
|
14
|
-
this.earnings = transactionTotals.earnings;
|
|
15
|
-
this.
|
|
16
|
-
}
|
|
17
|
-
toJson() {
|
|
18
|
-
return {
|
|
19
|
-
subtotal: this.subtotal,
|
|
20
|
-
discount: this.discount,
|
|
21
|
-
tax: this.tax,
|
|
22
|
-
total: this.total,
|
|
23
|
-
credit: this.credit,
|
|
24
|
-
balance: this.balance,
|
|
25
|
-
grand_total: this.grand_total,
|
|
26
|
-
fee: this.fee,
|
|
27
|
-
earnings: this.earnings,
|
|
28
|
-
currency_code: this.currency_code,
|
|
29
|
-
};
|
|
12
|
+
this.grandTotal = transactionTotals.grand_total;
|
|
13
|
+
this.fee = transactionTotals.fee ? transactionTotals.fee : null;
|
|
14
|
+
this.earnings = transactionTotals.earnings ? transactionTotals.earnings : null;
|
|
15
|
+
this.currencyCode = transactionTotals.currency_code;
|
|
30
16
|
}
|
|
31
17
|
}
|
|
32
18
|
exports.TransactionTotals = TransactionTotals;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IUnitPriceOverrideResponse } from '../../types';
|
|
2
2
|
import { Money } from '../index';
|
|
3
3
|
import { type CountryCode } from '../../enums';
|
|
4
4
|
export declare class UnitPriceOverride {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
constructor(unitPriceOverride:
|
|
8
|
-
toJson(): IUnitPriceOverride;
|
|
5
|
+
readonly countryCodes: CountryCode[];
|
|
6
|
+
readonly unitPrice: Money;
|
|
7
|
+
constructor(unitPriceOverride: IUnitPriceOverrideResponse);
|
|
9
8
|
}
|
|
@@ -4,14 +4,8 @@ exports.UnitPriceOverride = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class UnitPriceOverride {
|
|
6
6
|
constructor(unitPriceOverride) {
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
country_codes: this.country_codes,
|
|
13
|
-
unit_price: this.unit_price,
|
|
14
|
-
};
|
|
7
|
+
this.countryCodes = unitPriceOverride.country_codes;
|
|
8
|
+
this.unitPrice = new index_1.Money(unitPriceOverride.unit_price);
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.UnitPriceOverride = UnitPriceOverride;
|
|
@@ -8,13 +8,5 @@ class UnitTotals {
|
|
|
8
8
|
this.tax = unitTotals.tax;
|
|
9
9
|
this.total = unitTotals.total;
|
|
10
10
|
}
|
|
11
|
-
toJson() {
|
|
12
|
-
return {
|
|
13
|
-
subtotal: this.subtotal,
|
|
14
|
-
discount: this.discount,
|
|
15
|
-
tax: this.tax,
|
|
16
|
-
total: this.total,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
11
|
}
|
|
20
12
|
exports.UnitTotals = UnitTotals;
|
|
@@ -13,3 +13,5 @@ export * from './transaction-line-item-preview';
|
|
|
13
13
|
export * from './subscription-preview';
|
|
14
14
|
export * from './subscription-preview-update-summary';
|
|
15
15
|
export * from './subscription-preview-summary-result';
|
|
16
|
+
export * from './next-transaction-adjustment-preview';
|
|
17
|
+
export * from './next-transaction-adjustment-item';
|
|
@@ -29,3 +29,5 @@ __exportStar(require("./transaction-line-item-preview"), exports);
|
|
|
29
29
|
__exportStar(require("./subscription-preview"), exports);
|
|
30
30
|
__exportStar(require("./subscription-preview-update-summary"), exports);
|
|
31
31
|
__exportStar(require("./subscription-preview-summary-result"), exports);
|
|
32
|
+
__exportStar(require("./next-transaction-adjustment-preview"), exports);
|
|
33
|
+
__exportStar(require("./next-transaction-adjustment-item"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AdjustmentItemTotals, AdjustmentProration } from '../adjustment';
|
|
2
|
+
import { type AdjustmentType } from '../../enums';
|
|
3
|
+
import { type IAdjustmentItemResponse } from '../../types';
|
|
4
|
+
export declare class NextTransactionAdjustmentItem {
|
|
5
|
+
readonly itemId: string;
|
|
6
|
+
readonly type: AdjustmentType;
|
|
7
|
+
readonly amount: string | null;
|
|
8
|
+
readonly proration: AdjustmentProration | null;
|
|
9
|
+
readonly totals: AdjustmentItemTotals | null;
|
|
10
|
+
constructor(adjustmentItem: IAdjustmentItemResponse);
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NextTransactionAdjustmentItem = void 0;
|
|
4
|
+
const adjustment_1 = require("../adjustment");
|
|
5
|
+
class NextTransactionAdjustmentItem {
|
|
6
|
+
constructor(adjustmentItem) {
|
|
7
|
+
this.itemId = adjustmentItem.item_id;
|
|
8
|
+
this.type = adjustmentItem.type;
|
|
9
|
+
this.amount = adjustmentItem.amount ? adjustmentItem.amount : null;
|
|
10
|
+
this.proration = adjustmentItem.proration ? new adjustment_1.AdjustmentProration(adjustmentItem.proration) : null;
|
|
11
|
+
this.totals = adjustmentItem.totals ? new adjustment_1.AdjustmentItemTotals(adjustmentItem.totals) : null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.NextTransactionAdjustmentItem = NextTransactionAdjustmentItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NextTransactionAdjustmentItem } from './next-transaction-adjustment-item';
|
|
2
|
+
import { TotalAdjustments } from '../shared';
|
|
3
|
+
import { type AdjustmentPreviewResponse } from '../../types';
|
|
4
|
+
export declare class NextTransactionAdjustmentPreview {
|
|
5
|
+
readonly transactionId: string;
|
|
6
|
+
readonly items: NextTransactionAdjustmentItem[];
|
|
7
|
+
readonly totals: TotalAdjustments | null;
|
|
8
|
+
constructor(adjustmentPreview: AdjustmentPreviewResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NextTransactionAdjustmentPreview = void 0;
|
|
4
|
+
const next_transaction_adjustment_item_1 = require("./next-transaction-adjustment-item");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
class NextTransactionAdjustmentPreview {
|
|
7
|
+
constructor(adjustmentPreview) {
|
|
8
|
+
this.transactionId = adjustmentPreview.transaction_id;
|
|
9
|
+
this.items = adjustmentPreview.items.map((item) => new next_transaction_adjustment_item_1.NextTransactionAdjustmentItem(item));
|
|
10
|
+
this.totals = adjustmentPreview.totals ? new shared_1.TotalAdjustments(adjustmentPreview.totals) : null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.NextTransactionAdjustmentPreview = NextTransactionAdjustmentPreview;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { SubscriptionTimePeriod, TransactionDetailsPreview } from '../index';
|
|
1
|
+
import { type INextTransactionResponse } from '../../types';
|
|
2
|
+
import { SubscriptionTimePeriod, TransactionDetailsPreview, NextTransactionAdjustmentPreview } from '../index';
|
|
3
3
|
export declare class NextTransaction {
|
|
4
|
-
readonly
|
|
4
|
+
readonly billingPeriod: SubscriptionTimePeriod;
|
|
5
5
|
readonly details: TransactionDetailsPreview;
|
|
6
|
-
readonly adjustments:
|
|
7
|
-
constructor(nextTransaction:
|
|
8
|
-
toJson(): INextTransaction;
|
|
6
|
+
readonly adjustments: NextTransactionAdjustmentPreview[];
|
|
7
|
+
constructor(nextTransaction: INextTransactionResponse);
|
|
9
8
|
}
|
|
@@ -4,16 +4,9 @@ exports.NextTransaction = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class NextTransaction {
|
|
6
6
|
constructor(nextTransaction) {
|
|
7
|
-
this.
|
|
7
|
+
this.billingPeriod = new index_1.SubscriptionTimePeriod(nextTransaction.billing_period);
|
|
8
8
|
this.details = new index_1.TransactionDetailsPreview(nextTransaction.details);
|
|
9
|
-
this.adjustments = nextTransaction.adjustments;
|
|
10
|
-
}
|
|
11
|
-
toJson() {
|
|
12
|
-
return {
|
|
13
|
-
billing_period: this.billing_period,
|
|
14
|
-
details: this.details,
|
|
15
|
-
adjustments: this.adjustments,
|
|
16
|
-
};
|
|
9
|
+
this.adjustments = nextTransaction.adjustments.map((adjustment) => new index_1.NextTransactionAdjustmentPreview(adjustment));
|
|
17
10
|
}
|
|
18
11
|
}
|
|
19
12
|
exports.NextTransaction = NextTransaction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Subscription } from './subscription';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ISubscriptionResponse } from '../../types';
|
|
3
3
|
import { Collection } from '../../internal/base';
|
|
4
|
-
export declare class SubscriptionCollection extends Collection<
|
|
5
|
-
fromJson(data:
|
|
4
|
+
export declare class SubscriptionCollection extends Collection<ISubscriptionResponse, Subscription> {
|
|
5
|
+
fromJson(data: ISubscriptionResponse): Subscription;
|
|
6
6
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ISubscriptionDiscountResponse } from '../../types';
|
|
2
2
|
export declare class SubscriptionDiscount {
|
|
3
3
|
readonly id: string;
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
constructor(subscriptionDiscount:
|
|
7
|
-
toJson(): ISubscriptionDiscount;
|
|
4
|
+
readonly startsAt: string;
|
|
5
|
+
readonly endsAt: string;
|
|
6
|
+
constructor(subscriptionDiscount: ISubscriptionDiscountResponse);
|
|
8
7
|
}
|
|
@@ -4,15 +4,8 @@ exports.SubscriptionDiscount = void 0;
|
|
|
4
4
|
class SubscriptionDiscount {
|
|
5
5
|
constructor(subscriptionDiscount) {
|
|
6
6
|
this.id = subscriptionDiscount.id;
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
id: this.id,
|
|
13
|
-
starts_at: this.starts_at,
|
|
14
|
-
ends_at: this.ends_at,
|
|
15
|
-
};
|
|
7
|
+
this.startsAt = subscriptionDiscount.starts_at;
|
|
8
|
+
this.endsAt = subscriptionDiscount.ends_at;
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
11
|
exports.SubscriptionDiscount = SubscriptionDiscount;
|