@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
|
@@ -6,39 +6,20 @@ class Discount {
|
|
|
6
6
|
this.id = discount.id;
|
|
7
7
|
this.status = discount.status;
|
|
8
8
|
this.description = discount.description;
|
|
9
|
-
this.
|
|
10
|
-
this.code = discount.code;
|
|
9
|
+
this.enabledForCheckout = discount.enabled_for_checkout;
|
|
10
|
+
this.code = discount.code ? discount.code : null;
|
|
11
11
|
this.type = discount.type;
|
|
12
12
|
this.amount = discount.amount;
|
|
13
|
-
this.
|
|
13
|
+
this.currencyCode = discount.currency_code ? discount.currency_code : null;
|
|
14
14
|
this.recur = discount.recur;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
toJson() {
|
|
24
|
-
return {
|
|
25
|
-
id: this.id,
|
|
26
|
-
status: this.status,
|
|
27
|
-
description: this.description,
|
|
28
|
-
enabled_for_checkout: this.enabled_for_checkout,
|
|
29
|
-
code: this.code,
|
|
30
|
-
type: this.type,
|
|
31
|
-
amount: this.amount,
|
|
32
|
-
currency_code: this.currency_code,
|
|
33
|
-
recur: this.recur,
|
|
34
|
-
maximum_recurring_intervals: this.maximum_recurring_intervals,
|
|
35
|
-
usage_limit: this.usage_limit,
|
|
36
|
-
restrict_to: this.restrict_to,
|
|
37
|
-
expires_at: this.expires_at,
|
|
38
|
-
times_used: this.times_used,
|
|
39
|
-
created_at: this.created_at,
|
|
40
|
-
updated_at: this.updated_at,
|
|
41
|
-
};
|
|
15
|
+
this.maximumRecurringIntervals = discount.maximum_recurring_intervals ? discount.maximum_recurring_intervals : null;
|
|
16
|
+
this.usageLimit = discount.usage_limit ? discount.usage_limit : null;
|
|
17
|
+
this.restrictTo = discount.restrict_to ? discount.restrict_to : null;
|
|
18
|
+
this.expiresAt = discount.expires_at ? discount.expires_at : null;
|
|
19
|
+
this.customData = discount.custom_data ? discount.custom_data : null;
|
|
20
|
+
this.timesUsed = discount.times_used;
|
|
21
|
+
this.createdAt = discount.created_at;
|
|
22
|
+
this.updatedAt = discount.updated_at;
|
|
42
23
|
}
|
|
43
24
|
}
|
|
44
25
|
exports.Discount = Discount;
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PriceWithIncludes } from './price-with-includes';
|
|
2
|
-
import { type
|
|
2
|
+
import { type IPriceResponse } from '../../types';
|
|
3
3
|
import { Collection } from '../../internal/base';
|
|
4
|
-
export declare class PriceCollection extends Collection<
|
|
5
|
-
fromJson(data:
|
|
4
|
+
export declare class PriceCollection extends Collection<IPriceResponse, PriceWithIncludes> {
|
|
5
|
+
fromJson(data: IPriceResponse): PriceWithIncludes;
|
|
6
6
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type CustomData, Money, PriceQuantity, Product, TimePeriod, UnitPriceOverride } from '../index';
|
|
1
|
+
import { type IPriceResponse } from '../../types';
|
|
2
|
+
import { type CustomData, ImportMeta, Money, PriceQuantity, Product, TimePeriod, UnitPriceOverride } from '../index';
|
|
3
3
|
import { type Status, type TaxMode } from '../../enums';
|
|
4
4
|
export declare class PriceWithIncludes {
|
|
5
5
|
readonly id: string;
|
|
6
|
-
readonly
|
|
6
|
+
readonly productId: string;
|
|
7
7
|
readonly description: string;
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
8
|
+
readonly name: string | null;
|
|
9
|
+
readonly billingCycle: TimePeriod | null;
|
|
10
|
+
readonly trialPeriod: TimePeriod | null;
|
|
11
|
+
readonly taxMode: TaxMode;
|
|
12
|
+
readonly unitPrice: Money;
|
|
13
|
+
readonly unitPriceOverrides: UnitPriceOverride[];
|
|
13
14
|
readonly quantity: PriceQuantity;
|
|
14
15
|
readonly status: Status;
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
readonly customData: CustomData | null;
|
|
17
|
+
readonly importMeta: ImportMeta | null;
|
|
18
|
+
readonly product: Product | null;
|
|
19
|
+
constructor(price: IPriceResponse);
|
|
19
20
|
}
|
|
@@ -5,33 +5,19 @@ const index_1 = require("../index");
|
|
|
5
5
|
class PriceWithIncludes {
|
|
6
6
|
constructor(price) {
|
|
7
7
|
this.id = price.id;
|
|
8
|
-
this.
|
|
8
|
+
this.productId = price.product_id;
|
|
9
9
|
this.description = price.description;
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
10
|
+
this.name = price.name ? price.name : null;
|
|
11
|
+
this.billingCycle = price.billing_cycle ? new index_1.TimePeriod(price.billing_cycle) : null;
|
|
12
|
+
this.trialPeriod = price.trial_period ? new index_1.TimePeriod(price.trial_period) : null;
|
|
13
|
+
this.taxMode = price.tax_mode;
|
|
14
|
+
this.unitPrice = new index_1.Money(price.unit_price);
|
|
15
|
+
this.unitPriceOverrides = price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverride(unit_price_override));
|
|
15
16
|
this.quantity = new index_1.PriceQuantity(price.quantity);
|
|
16
17
|
this.status = price.status;
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
toJson() {
|
|
21
|
-
return {
|
|
22
|
-
id: this.id,
|
|
23
|
-
product_id: this.product_id,
|
|
24
|
-
description: this.description,
|
|
25
|
-
billing_cycle: this.billing_cycle,
|
|
26
|
-
trial_period: this.trial_period,
|
|
27
|
-
tax_mode: this.tax_mode,
|
|
28
|
-
unit_price: this.unit_price,
|
|
29
|
-
unit_price_overrides: this.unit_price_overrides,
|
|
30
|
-
quantity: this.quantity,
|
|
31
|
-
status: this.status,
|
|
32
|
-
custom_data: this.custom_data,
|
|
33
|
-
product: this.product,
|
|
34
|
-
};
|
|
18
|
+
this.customData = price.custom_data ? price.custom_data : null;
|
|
19
|
+
this.importMeta = price.import_meta ? new index_1.ImportMeta(price.import_meta) : null;
|
|
20
|
+
this.product = price.product ? new index_1.Product(price.product) : null;
|
|
35
21
|
}
|
|
36
22
|
}
|
|
37
23
|
exports.PriceWithIncludes = PriceWithIncludes;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { TimePeriod, Money, UnitPriceOverride, PriceQuantity,
|
|
1
|
+
import { type ICustomData, type ISharedPriceResponse } from '../../types';
|
|
2
|
+
import { TimePeriod, Money, UnitPriceOverride, PriceQuantity, ImportMeta } from '../index';
|
|
3
3
|
import { type TaxMode, type Status } from '../../enums';
|
|
4
4
|
export declare class Price {
|
|
5
5
|
readonly id: string;
|
|
6
|
-
readonly
|
|
6
|
+
readonly productId: string;
|
|
7
7
|
readonly description: string;
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
8
|
+
readonly name: string | null;
|
|
9
|
+
readonly billingCycle: TimePeriod | null;
|
|
10
|
+
readonly trialPeriod: TimePeriod | null;
|
|
11
|
+
readonly taxMode: TaxMode;
|
|
12
|
+
readonly unitPrice: Money | null;
|
|
13
|
+
readonly unitPriceOverrides: UnitPriceOverride[];
|
|
14
|
+
readonly quantity: PriceQuantity | null;
|
|
14
15
|
readonly status: Status;
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
readonly customData: ICustomData | null;
|
|
17
|
+
readonly importMeta: ImportMeta | null;
|
|
18
|
+
constructor(price: ISharedPriceResponse);
|
|
18
19
|
}
|
|
@@ -5,31 +5,18 @@ const index_1 = require("../index");
|
|
|
5
5
|
class Price {
|
|
6
6
|
constructor(price) {
|
|
7
7
|
this.id = price.id;
|
|
8
|
-
this.
|
|
8
|
+
this.productId = price.product_id;
|
|
9
9
|
this.description = price.description;
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
10
|
+
this.name = price.name ? price.name : null;
|
|
11
|
+
this.billingCycle = price.billing_cycle ? new index_1.TimePeriod(price.billing_cycle) : null;
|
|
12
|
+
this.trialPeriod = price.trial_period ? new index_1.TimePeriod(price.trial_period) : null;
|
|
13
|
+
this.taxMode = price.tax_mode;
|
|
14
|
+
this.unitPrice = price.unit_price ? new index_1.Money(price.unit_price) : null;
|
|
15
|
+
this.unitPriceOverrides = price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverride(unit_price_override));
|
|
16
|
+
this.quantity = price.quantity ? new index_1.PriceQuantity(price.quantity) : null;
|
|
16
17
|
this.status = price.status;
|
|
17
|
-
this.
|
|
18
|
-
|
|
19
|
-
toJson() {
|
|
20
|
-
return {
|
|
21
|
-
id: this.id,
|
|
22
|
-
product_id: this.product_id,
|
|
23
|
-
description: this.description,
|
|
24
|
-
billing_cycle: this.billing_cycle,
|
|
25
|
-
trial_period: this.trial_period,
|
|
26
|
-
tax_mode: this.tax_mode,
|
|
27
|
-
unit_price: this.unit_price,
|
|
28
|
-
unit_price_overrides: this.unit_price_overrides,
|
|
29
|
-
quantity: this.quantity,
|
|
30
|
-
status: this.status,
|
|
31
|
-
custom_data: this.custom_data,
|
|
32
|
-
};
|
|
18
|
+
this.customData = price.custom_data ? price.custom_data : null;
|
|
19
|
+
this.importMeta = price.import_meta ? new index_1.ImportMeta(price.import_meta) : null;
|
|
33
20
|
}
|
|
34
21
|
}
|
|
35
22
|
exports.Price = Price;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProductWithIncludes } from './product-with-includes';
|
|
2
|
-
import { type
|
|
2
|
+
import { type IProductResponse } from '../../types';
|
|
3
3
|
import { Collection } from '../../internal/base';
|
|
4
|
-
export declare class ProductCollection extends Collection<
|
|
5
|
-
fromJson(data:
|
|
4
|
+
export declare class ProductCollection extends Collection<IProductResponse, ProductWithIncludes> {
|
|
5
|
+
fromJson(data: IProductResponse): ProductWithIncludes;
|
|
6
6
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type CustomData, Price } from '../index';
|
|
1
|
+
import { type IProductResponse } from '../../types';
|
|
2
|
+
import { type CustomData, ImportMeta, Price } from '../index';
|
|
3
3
|
import { type Status, type TaxCategory } from '../../enums';
|
|
4
4
|
export declare class ProductWithIncludes {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly name: string;
|
|
7
|
-
readonly description
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
7
|
+
readonly description: string | null;
|
|
8
|
+
readonly taxCategory: TaxCategory;
|
|
9
|
+
readonly imageUrl: string | null;
|
|
10
|
+
readonly customData: CustomData | null;
|
|
11
11
|
readonly status: Status;
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
readonly createdAt: string;
|
|
13
|
+
readonly importMeta: ImportMeta | null;
|
|
14
|
+
readonly prices: Price[] | null;
|
|
15
|
+
constructor(product: IProductResponse);
|
|
16
16
|
}
|
|
@@ -4,29 +4,16 @@ exports.ProductWithIncludes = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class ProductWithIncludes {
|
|
6
6
|
constructor(product) {
|
|
7
|
-
var _a;
|
|
8
7
|
this.id = product.id;
|
|
9
8
|
this.name = product.name;
|
|
10
|
-
this.description = product.description;
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
9
|
+
this.description = product.description ? product.description : null;
|
|
10
|
+
this.taxCategory = product.tax_category;
|
|
11
|
+
this.imageUrl = product.image_url ? product.image_url : null;
|
|
12
|
+
this.customData = product.custom_data ? product.custom_data : null;
|
|
14
13
|
this.status = product.status;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
toJson() {
|
|
19
|
-
return {
|
|
20
|
-
id: this.id,
|
|
21
|
-
name: this.name,
|
|
22
|
-
description: this.description,
|
|
23
|
-
tax_category: this.tax_category,
|
|
24
|
-
image_url: this.image_url,
|
|
25
|
-
custom_data: this.custom_data,
|
|
26
|
-
status: this.status,
|
|
27
|
-
created_at: this.created_at,
|
|
28
|
-
prices: this.prices,
|
|
29
|
-
};
|
|
14
|
+
this.createdAt = product.created_at;
|
|
15
|
+
this.importMeta = product.import_meta ? new index_1.ImportMeta(product.import_meta) : null;
|
|
16
|
+
this.prices = product.prices ? product.prices.map((price) => new index_1.Price(price)) : null;
|
|
30
17
|
}
|
|
31
18
|
}
|
|
32
19
|
exports.ProductWithIncludes = ProductWithIncludes;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type CustomData } from '../index';
|
|
1
|
+
import { type ISharedProductResponse } from '../../types';
|
|
2
|
+
import { type CustomData, ImportMeta } from '../index';
|
|
3
3
|
import { type TaxCategory, type Status } from '../../enums';
|
|
4
4
|
export declare class Product {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly name: string;
|
|
7
|
-
readonly description
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
7
|
+
readonly description: string | null;
|
|
8
|
+
readonly taxCategory: TaxCategory;
|
|
9
|
+
readonly imageUrl: string | null;
|
|
10
|
+
readonly customData: CustomData | null;
|
|
11
11
|
readonly status: Status;
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
readonly createdAt: string;
|
|
13
|
+
readonly importMeta: ImportMeta | null;
|
|
14
|
+
constructor(product: ISharedProductResponse);
|
|
15
15
|
}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Product = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
4
5
|
class Product {
|
|
5
6
|
constructor(product) {
|
|
6
7
|
this.id = product.id;
|
|
7
8
|
this.name = product.name;
|
|
8
|
-
this.description = product.description;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
9
|
+
this.description = product.description ? product.description : null;
|
|
10
|
+
this.taxCategory = product.tax_category;
|
|
11
|
+
this.imageUrl = product.image_url ? product.image_url : null;
|
|
12
|
+
this.customData = product.custom_data ? product.custom_data : null;
|
|
12
13
|
this.status = product.status;
|
|
13
|
-
this.
|
|
14
|
-
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
id: this.id,
|
|
18
|
-
name: this.name,
|
|
19
|
-
description: this.description,
|
|
20
|
-
tax_category: this.tax_category,
|
|
21
|
-
image_url: this.image_url,
|
|
22
|
-
custom_data: this.custom_data,
|
|
23
|
-
status: this.status,
|
|
24
|
-
created_at: this.created_at,
|
|
25
|
-
};
|
|
14
|
+
this.createdAt = product.created_at;
|
|
15
|
+
this.importMeta = product.import_meta ? new index_1.ImportMeta(product.import_meta) : null;
|
|
26
16
|
}
|
|
27
17
|
}
|
|
28
18
|
exports.Product = Product;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IAdjustmentOriginalAmountResponse } from '../../types';
|
|
2
2
|
import { type AdjustmentCurrencyCode } from '../../enums';
|
|
3
3
|
export declare class AdjustmentOriginalAmount {
|
|
4
4
|
readonly amount: string;
|
|
5
|
-
readonly
|
|
6
|
-
constructor(originalAmount:
|
|
7
|
-
toJson(): IAdjustmentOriginalAmount;
|
|
5
|
+
readonly currencyCode: AdjustmentCurrencyCode;
|
|
6
|
+
constructor(originalAmount: IAdjustmentOriginalAmountResponse);
|
|
8
7
|
}
|
|
@@ -4,13 +4,7 @@ exports.AdjustmentOriginalAmount = void 0;
|
|
|
4
4
|
class AdjustmentOriginalAmount {
|
|
5
5
|
constructor(originalAmount) {
|
|
6
6
|
this.amount = originalAmount.amount;
|
|
7
|
-
this.
|
|
8
|
-
}
|
|
9
|
-
toJson() {
|
|
10
|
-
return {
|
|
11
|
-
amount: this.amount,
|
|
12
|
-
currency_code: this.currency_code,
|
|
13
|
-
};
|
|
7
|
+
this.currencyCode = originalAmount.currency_code;
|
|
14
8
|
}
|
|
15
9
|
}
|
|
16
10
|
exports.AdjustmentOriginalAmount = AdjustmentOriginalAmount;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IBillingDetailsResponse } from '../../types';
|
|
2
2
|
import { TimePeriod } from '../index';
|
|
3
3
|
export declare class BillingDetails {
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
constructor(billingDetails:
|
|
9
|
-
toJson(): IBillingDetails;
|
|
4
|
+
readonly enableCheckout: boolean | null;
|
|
5
|
+
readonly purchaseOrderNumber: string | null;
|
|
6
|
+
readonly additionalInformation: string | null;
|
|
7
|
+
readonly paymentTerms: TimePeriod;
|
|
8
|
+
constructor(billingDetails: IBillingDetailsResponse);
|
|
10
9
|
}
|
|
@@ -4,18 +4,11 @@ exports.BillingDetails = void 0;
|
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
class BillingDetails {
|
|
6
6
|
constructor(billingDetails) {
|
|
7
|
-
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
toJson() {
|
|
13
|
-
return {
|
|
14
|
-
enable_checkout: this.enable_checkout,
|
|
15
|
-
purchase_order_number: this.purchase_order_number,
|
|
16
|
-
additional_information: this.additional_information,
|
|
17
|
-
payment_terms: this.payment_terms,
|
|
18
|
-
};
|
|
7
|
+
var _a;
|
|
8
|
+
this.enableCheckout = (_a = billingDetails.enable_checkout) !== null && _a !== void 0 ? _a : null;
|
|
9
|
+
this.purchaseOrderNumber = billingDetails.purchase_order_number ? billingDetails.purchase_order_number : null;
|
|
10
|
+
this.additionalInformation = billingDetails.additional_information ? billingDetails.additional_information : null;
|
|
11
|
+
this.paymentTerms = new index_1.TimePeriod(billingDetails.payment_terms);
|
|
19
12
|
}
|
|
20
13
|
}
|
|
21
14
|
exports.BillingDetails = BillingDetails;
|
|
@@ -2,7 +2,6 @@ import { type IChargebackFee } from '../../types';
|
|
|
2
2
|
import { AdjustmentOriginalAmount } from '../index';
|
|
3
3
|
export declare class ChargebackFee {
|
|
4
4
|
readonly amount: string;
|
|
5
|
-
readonly original
|
|
5
|
+
readonly original: AdjustmentOriginalAmount | null;
|
|
6
6
|
constructor(chargebackFee: IChargebackFee);
|
|
7
|
-
toJson(): IChargebackFee;
|
|
8
7
|
}
|
|
@@ -5,13 +5,7 @@ const index_1 = require("../index");
|
|
|
5
5
|
class ChargebackFee {
|
|
6
6
|
constructor(chargebackFee) {
|
|
7
7
|
this.amount = chargebackFee.amount;
|
|
8
|
-
this.original = chargebackFee.original ? new index_1.AdjustmentOriginalAmount(chargebackFee.original) :
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
amount: this.amount,
|
|
13
|
-
original: this.original,
|
|
14
|
-
};
|
|
8
|
+
this.original = chargebackFee.original ? new index_1.AdjustmentOriginalAmount(chargebackFee.original) : null;
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.ChargebackFee = ChargebackFee;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImportMeta = void 0;
|
|
4
|
+
class ImportMeta {
|
|
5
|
+
constructor(importMeta) {
|
|
6
|
+
this.externalId = importMeta.external_id ? importMeta.external_id : null;
|
|
7
|
+
this.importedFrom = importMeta.imported_from;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ImportMeta = ImportMeta;
|
|
@@ -33,3 +33,4 @@ __exportStar(require("./transaction-payment-attempt"), exports);
|
|
|
33
33
|
__exportStar(require("./transaction-checkout"), exports);
|
|
34
34
|
__exportStar(require("./total-adjustments"), exports);
|
|
35
35
|
__exportStar(require("./payout-totals-adjustment"), exports);
|
|
36
|
+
__exportStar(require("./import-meta"), exports);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IMoneyResponse } from '../../types';
|
|
2
2
|
import { type CurrencyCode } from '../../enums';
|
|
3
3
|
export declare class Money {
|
|
4
4
|
readonly amount: string;
|
|
5
|
-
readonly
|
|
6
|
-
constructor(money:
|
|
7
|
-
toJson(): IMoney;
|
|
5
|
+
readonly currencyCode: CurrencyCode;
|
|
6
|
+
constructor(money: IMoneyResponse);
|
|
8
7
|
}
|
|
@@ -4,13 +4,7 @@ exports.Money = void 0;
|
|
|
4
4
|
class Money {
|
|
5
5
|
constructor(money) {
|
|
6
6
|
this.amount = money.amount;
|
|
7
|
-
this.
|
|
8
|
-
}
|
|
9
|
-
toJson() {
|
|
10
|
-
return {
|
|
11
|
-
amount: this.amount,
|
|
12
|
-
currency_code: this.currency_code,
|
|
13
|
-
};
|
|
7
|
+
this.currencyCode = money.currency_code;
|
|
14
8
|
}
|
|
15
9
|
}
|
|
16
10
|
exports.Money = Money;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IPaymentCardResponse } from '../../types';
|
|
2
2
|
import { type PaymentCardType } from '../../enums';
|
|
3
3
|
export declare class PaymentCard {
|
|
4
4
|
readonly type: PaymentCardType;
|
|
5
5
|
readonly last4: string;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
constructor(paymentCard:
|
|
10
|
-
toJson(): IPaymentCard;
|
|
6
|
+
readonly expiryMonth: number;
|
|
7
|
+
readonly expiryYear: number;
|
|
8
|
+
readonly cardholderName: string;
|
|
9
|
+
constructor(paymentCard: IPaymentCardResponse);
|
|
11
10
|
}
|
|
@@ -5,18 +5,9 @@ class PaymentCard {
|
|
|
5
5
|
constructor(paymentCard) {
|
|
6
6
|
this.type = paymentCard.type;
|
|
7
7
|
this.last4 = paymentCard.last4;
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
}
|
|
12
|
-
toJson() {
|
|
13
|
-
return {
|
|
14
|
-
type: this.type,
|
|
15
|
-
last4: this.last4,
|
|
16
|
-
expiry_month: this.expiry_month,
|
|
17
|
-
expiry_year: this.expiry_year,
|
|
18
|
-
cardholder_name: this.cardholder_name,
|
|
19
|
-
};
|
|
8
|
+
this.expiryMonth = paymentCard.expiry_month;
|
|
9
|
+
this.expiryYear = paymentCard.expiry_year;
|
|
10
|
+
this.cardholderName = paymentCard.cardholder_name;
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
13
|
exports.PaymentCard = PaymentCard;
|
|
@@ -3,7 +3,6 @@ import { PaymentCard } from '../index';
|
|
|
3
3
|
import { type PaymentType } from '../../enums';
|
|
4
4
|
export declare class PaymentMethodDetails {
|
|
5
5
|
readonly type: PaymentType;
|
|
6
|
-
readonly card
|
|
6
|
+
readonly card: PaymentCard | null;
|
|
7
7
|
constructor(paymentMethodDetails: IPaymentMethodDetails);
|
|
8
|
-
toJson(): IPaymentMethodDetails;
|
|
9
8
|
}
|
|
@@ -5,13 +5,7 @@ const index_1 = require("../index");
|
|
|
5
5
|
class PaymentMethodDetails {
|
|
6
6
|
constructor(paymentMethodDetails) {
|
|
7
7
|
this.type = paymentMethodDetails.type;
|
|
8
|
-
this.card = paymentMethodDetails.card ? new index_1.PaymentCard(paymentMethodDetails.card) :
|
|
9
|
-
}
|
|
10
|
-
toJson() {
|
|
11
|
-
return {
|
|
12
|
-
type: this.type,
|
|
13
|
-
card: this.card,
|
|
14
|
-
};
|
|
8
|
+
this.card = paymentMethodDetails.card ? new index_1.PaymentCard(paymentMethodDetails.card) : null;
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.PaymentMethodDetails = PaymentMethodDetails;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IPayoutTotalsAdjustmentResponse } from '../../types';
|
|
2
2
|
import { ChargebackFee } from '../index';
|
|
3
3
|
import { type PayoutCurrencyCode } from '../../enums';
|
|
4
4
|
export declare class PayoutTotalsAdjustment {
|
|
@@ -6,9 +6,8 @@ export declare class PayoutTotalsAdjustment {
|
|
|
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(payoutTotalsAdjustment:
|
|
13
|
-
toJson(): IPayoutTotalsAdjustment;
|
|
11
|
+
readonly currencyCode: PayoutCurrencyCode;
|
|
12
|
+
constructor(payoutTotalsAdjustment: IPayoutTotalsAdjustmentResponse);
|
|
14
13
|
}
|