@flexprice/sdk 2.1.34 → 2.1.36
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/README.md +39 -3
- package/docs/sdk/models/add-addon-ref.md +1 -0
- package/docs/sdk/models/add-addon-request.md +1 -0
- package/docs/sdk/models/add-addon-to-subscription-request.md +1 -0
- package/docs/sdk/models/coupon-ref.md +19 -0
- package/docs/sdk/models/create-credit-grant-request.md +1 -0
- package/docs/sdk/models/create-customer-request.md +7 -0
- package/docs/sdk/models/create-scheduled-task-request.md +1 -1
- package/docs/sdk/models/create-subscription-request.md +1 -0
- package/docs/sdk/models/customer-contact-person.md +25 -0
- package/docs/sdk/models/customer-response.md +2 -0
- package/docs/sdk/models/customer.md +2 -0
- package/docs/sdk/models/external-tax-details.md +25 -0
- package/docs/sdk/models/fx-conversion-source.md +18 -0
- package/docs/sdk/models/fx-conversion.md +21 -0
- package/docs/sdk/models/inline-fx-rate.md +17 -0
- package/docs/sdk/models/invoice-line-item-response.md +1 -0
- package/docs/sdk/models/invoice-response.md +1 -0
- package/docs/sdk/models/line-item-change.md +1 -0
- package/docs/sdk/models/modify-subscription-line-item.md +1 -0
- package/docs/sdk/models/scheduled-task-entity-type.md +1 -1
- package/docs/sdk/models/tax-applied-response.md +5 -1
- package/docs/sdk/models/tax-exemption-reason-code.md +2 -2
- package/docs/sdk/models/tax-jurisdiction.md +18 -0
- package/docs/sdk/models/tax-provider.md +17 -0
- package/docs/sdk/models/tax-rate-entity-type.md +1 -1
- package/docs/sdk/models/tax-reversal-mode.md +17 -0
- package/docs/sdk/models/tax-reversal.md +16 -0
- package/docs/sdk/models/tax-transaction-type.md +17 -0
- package/docs/sdk/models/top-up-coupon.md +17 -0
- package/docs/sdk/models/top-up-wallet-request.md +1 -0
- package/docs/sdk/models/update-customer-request-request.md +7 -1
- package/docs/sdk/models/update-customer-request.md +5 -1
- package/docs/sdk/models/update-subscription-line-item-request.md +20 -18
- package/docs/sdk/models/update-tenant-address.md +20 -0
- package/docs/sdk/models/update-tenant-billing-details.md +18 -0
- package/docs/sdk/models/update-tenant-request.md +5 -5
- package/docs/sdk/models/wallet-transaction-response.md +3 -0
- package/docs/sdk/models/wallet-tx-consumption.md +16 -0
- package/docs/sdk/models/wallet-tx-source-type.md +15 -0
- package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
- package/docs/sdk/models/webhook-dto-invoice.md +1 -0
- package/docs/sdk/models/webhook-dto-tax-applied.md +3 -0
- package/docs/sdk/models/webhook-dto-wallet-transaction.md +3 -0
- package/docs/sdks/customers/README.md +8 -2
- package/esm/hooks/auth-headers.d.ts +4 -0
- package/esm/hooks/auth-headers.d.ts.map +1 -0
- package/esm/hooks/auth-headers.js +35 -0
- package/esm/hooks/auth-headers.js.map +1 -0
- package/esm/hooks/registration.d.ts +2 -3
- package/esm/hooks/registration.d.ts.map +1 -1
- package/esm/hooks/registration.js +4 -4
- package/esm/hooks/registration.js.map +1 -1
- package/esm/lib/config.d.ts +7 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/models/add-addon-ref.d.ts +3 -0
- package/esm/sdk/models/add-addon-ref.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-ref.js +2 -0
- package/esm/sdk/models/add-addon-ref.js.map +1 -1
- package/esm/sdk/models/add-addon-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-request.js +2 -0
- package/esm/sdk/models/add-addon-request.js.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.js +2 -0
- package/esm/sdk/models/add-addon-to-subscription-request.js.map +1 -1
- package/esm/sdk/models/address.d.ts +0 -12
- package/esm/sdk/models/address.d.ts.map +1 -1
- package/esm/sdk/models/address.js +0 -21
- package/esm/sdk/models/address.js.map +1 -1
- package/esm/sdk/models/coupon-ref.d.ts +20 -0
- package/esm/sdk/models/coupon-ref.d.ts.map +1 -0
- package/esm/sdk/models/coupon-ref.js +25 -0
- package/esm/sdk/models/coupon-ref.js.map +1 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts +3 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts.map +1 -1
- package/esm/sdk/models/create-credit-grant-request.js +3 -0
- package/esm/sdk/models/create-credit-grant-request.js.map +1 -1
- package/esm/sdk/models/create-customer-request.d.ts +11 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +5 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +9 -0
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +3 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/customer-contact-person.d.ts +33 -0
- package/esm/sdk/models/customer-contact-person.d.ts.map +1 -0
- package/esm/sdk/models/customer-contact-person.js +50 -0
- package/esm/sdk/models/customer-contact-person.js.map +1 -0
- package/esm/sdk/models/customer-response.d.ts +6 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +5 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +6 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +5 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/external-tax-details.d.ts +66 -0
- package/esm/sdk/models/external-tax-details.d.ts.map +1 -0
- package/esm/sdk/models/external-tax-details.js +36 -0
- package/esm/sdk/models/external-tax-details.js.map +1 -0
- package/esm/sdk/models/fx-conversion-source.d.ts +13 -0
- package/esm/sdk/models/fx-conversion-source.d.ts.map +1 -0
- package/esm/sdk/models/fx-conversion-source.js +23 -0
- package/esm/sdk/models/fx-conversion-source.js.map +1 -0
- package/esm/sdk/models/fx-conversion.d.ts +33 -0
- package/esm/sdk/models/fx-conversion.d.ts.map +1 -0
- package/esm/sdk/models/fx-conversion.js +30 -0
- package/esm/sdk/models/fx-conversion.js.map +1 -0
- package/esm/sdk/models/index.d.ts +16 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +16 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/inline-fx-rate.d.ts +16 -0
- package/esm/sdk/models/inline-fx-rate.d.ts.map +1 -0
- package/esm/sdk/models/inline-fx-rate.js +20 -0
- package/esm/sdk/models/inline-fx-rate.js.map +1 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts +2 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +3 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +2 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +3 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/line-item-change.d.ts +6 -0
- package/esm/sdk/models/line-item-change.d.ts.map +1 -1
- package/esm/sdk/models/line-item-change.js +2 -0
- package/esm/sdk/models/line-item-change.js.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.d.ts +3 -0
- package/esm/sdk/models/modify-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.js +2 -0
- package/esm/sdk/models/modify-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.d.ts +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.js +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.js.map +1 -1
- package/esm/sdk/models/tax-applied-response.d.ts +13 -0
- package/esm/sdk/models/tax-applied-response.d.ts.map +1 -1
- package/esm/sdk/models/tax-applied-response.js +10 -0
- package/esm/sdk/models/tax-applied-response.js.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.d.ts +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.d.ts.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.js +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.js.map +1 -1
- package/esm/sdk/models/tax-jurisdiction.d.ts +13 -0
- package/esm/sdk/models/tax-jurisdiction.d.ts.map +1 -0
- package/esm/sdk/models/tax-jurisdiction.js +22 -0
- package/esm/sdk/models/tax-jurisdiction.js.map +1 -0
- package/esm/sdk/models/tax-provider.d.ts +10 -0
- package/esm/sdk/models/tax-provider.d.ts.map +1 -0
- package/esm/sdk/models/tax-provider.js +11 -0
- package/esm/sdk/models/tax-provider.js.map +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/tax-rate-entity-type.js +1 -0
- package/esm/sdk/models/tax-rate-entity-type.js.map +1 -1
- package/esm/sdk/models/tax-reversal-mode.d.ts +10 -0
- package/esm/sdk/models/tax-reversal-mode.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal-mode.js +11 -0
- package/esm/sdk/models/tax-reversal-mode.js.map +1 -0
- package/esm/sdk/models/tax-reversal.d.ts +12 -0
- package/esm/sdk/models/tax-reversal.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal.js +22 -0
- package/esm/sdk/models/tax-reversal.js.map +1 -0
- package/esm/sdk/models/tax-transaction-type.d.ts +10 -0
- package/esm/sdk/models/tax-transaction-type.d.ts.map +1 -0
- package/esm/sdk/models/tax-transaction-type.js +11 -0
- package/esm/sdk/models/tax-transaction-type.js.map +1 -0
- package/esm/sdk/models/tenant-billing-details.d.ts +1 -11
- package/esm/sdk/models/tenant-billing-details.d.ts.map +1 -1
- package/esm/sdk/models/tenant-billing-details.js +1 -15
- package/esm/sdk/models/tenant-billing-details.js.map +1 -1
- package/esm/sdk/models/top-up-coupon.d.ts +12 -0
- package/esm/sdk/models/top-up-coupon.d.ts.map +1 -0
- package/esm/sdk/models/top-up-coupon.js +17 -0
- package/esm/sdk/models/top-up-coupon.js.map +1 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts +3 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts.map +1 -1
- package/esm/sdk/models/top-up-wallet-request.js +2 -0
- package/esm/sdk/models/top-up-wallet-request.js.map +1 -1
- package/esm/sdk/models/update-customer-request.d.ts +11 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +5 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.d.ts +10 -0
- package/esm/sdk/models/update-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.js +4 -0
- package/esm/sdk/models/update-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/update-tenant-address.d.ts +22 -0
- package/esm/sdk/models/update-tenant-address.d.ts.map +1 -0
- package/esm/sdk/models/update-tenant-address.js +27 -0
- package/esm/sdk/models/update-tenant-address.js.map +1 -0
- package/esm/sdk/models/update-tenant-billing-details.d.ts +19 -0
- package/esm/sdk/models/update-tenant-billing-details.d.ts.map +1 -0
- package/esm/sdk/models/update-tenant-billing-details.js +21 -0
- package/esm/sdk/models/update-tenant-billing-details.js.map +1 -0
- package/esm/sdk/models/update-tenant-request.d.ts +3 -3
- package/esm/sdk/models/update-tenant-request.d.ts.map +1 -1
- package/esm/sdk/models/update-tenant-request.js +2 -2
- package/esm/sdk/models/update-tenant-request.js.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.d.ts +8 -0
- package/esm/sdk/models/wallet-transaction-response.d.ts.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.js +8 -0
- package/esm/sdk/models/wallet-transaction-response.js.map +1 -1
- package/esm/sdk/models/wallet-tx-consumption.d.ts +11 -0
- package/esm/sdk/models/wallet-tx-consumption.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-consumption.js +20 -0
- package/esm/sdk/models/wallet-tx-consumption.js.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts +9 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.js +10 -0
- package/esm/sdk/models/wallet-tx-source-type.js.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-line-item.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice.js.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts +6 -0
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.js +8 -0
- package/esm/sdk/models/webhook-dto-tax-applied.js.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts +5 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.js +8 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.js.map +1 -1
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +13 -8
- package/esm/types/smart-union.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/hooks/auth-headers.ts +47 -0
- package/src/hooks/registration.ts +4 -4
- package/src/lib/config.ts +7 -3
- package/src/sdk/models/add-addon-ref.ts +8 -0
- package/src/sdk/models/add-addon-request.ts +11 -0
- package/src/sdk/models/add-addon-to-subscription-request.ts +11 -0
- package/src/sdk/models/address.ts +0 -35
- package/src/sdk/models/coupon-ref.ts +50 -0
- package/src/sdk/models/create-credit-grant-request.ts +8 -0
- package/src/sdk/models/create-customer-request.ts +19 -0
- package/src/sdk/models/create-subscription-request.ts +15 -0
- package/src/sdk/models/customer-contact-person.ts +101 -0
- package/src/sdk/models/customer-response.ts +15 -0
- package/src/sdk/models/customer.ts +15 -0
- package/src/sdk/models/external-tax-details.ts +113 -0
- package/src/sdk/models/fx-conversion-source.ts +46 -0
- package/src/sdk/models/fx-conversion.ts +72 -0
- package/src/sdk/models/index.ts +16 -0
- package/src/sdk/models/inline-fx-rate.ts +41 -0
- package/src/sdk/models/invoice-line-item-response.ts +4 -0
- package/src/sdk/models/invoice-response.ts +4 -0
- package/src/sdk/models/line-item-change.ts +11 -0
- package/src/sdk/models/modify-subscription-line-item.ts +8 -0
- package/src/sdk/models/scheduled-task-entity-type.ts +1 -0
- package/src/sdk/models/tax-applied-response.ts +26 -0
- package/src/sdk/models/tax-exemption-reason-code.ts +4 -0
- package/src/sdk/models/tax-jurisdiction.ts +45 -0
- package/src/sdk/models/tax-provider.ts +17 -0
- package/src/sdk/models/tax-rate-entity-type.ts +1 -0
- package/src/sdk/models/tax-reversal-mode.ts +19 -0
- package/src/sdk/models/tax-reversal.ts +43 -0
- package/src/sdk/models/tax-transaction-type.ts +19 -0
- package/src/sdk/models/tenant-billing-details.ts +1 -38
- package/src/sdk/models/top-up-coupon.ts +34 -0
- package/src/sdk/models/top-up-wallet-request.ts +8 -0
- package/src/sdk/models/update-customer-request.ts +19 -0
- package/src/sdk/models/update-subscription-line-item-request.ts +14 -0
- package/src/sdk/models/update-tenant-address.ts +58 -0
- package/src/sdk/models/update-tenant-billing-details.ts +52 -0
- package/src/sdk/models/update-tenant-request.ts +7 -7
- package/src/sdk/models/wallet-transaction-response.ts +22 -0
- package/src/sdk/models/wallet-tx-consumption.ts +41 -0
- package/src/sdk/models/wallet-tx-source-type.ts +16 -0
- package/src/sdk/models/webhook-dto-invoice-line-item.ts +4 -0
- package/src/sdk/models/webhook-dto-invoice.ts +4 -0
- package/src/sdk/models/webhook-dto-tax-applied.ts +17 -0
- package/src/sdk/models/webhook-dto-wallet-transaction.ts +19 -0
- package/src/types/smart-union.ts +17 -8
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
CreateEntityIntegrationMappingRequest$Outbound,
|
|
10
10
|
CreateEntityIntegrationMappingRequest$outboundSchema,
|
|
11
11
|
} from "./create-entity-integration-mapping-request.js";
|
|
12
|
+
import {
|
|
13
|
+
CustomerContactPerson,
|
|
14
|
+
CustomerContactPerson$Outbound,
|
|
15
|
+
CustomerContactPerson$outboundSchema,
|
|
16
|
+
} from "./customer-contact-person.js";
|
|
12
17
|
import {
|
|
13
18
|
TaxRateOverride,
|
|
14
19
|
TaxRateOverride$Outbound,
|
|
@@ -44,10 +49,18 @@ export type CreateCustomerRequest = {
|
|
|
44
49
|
* address_state is the state, province, or region name with maximum 100 characters
|
|
45
50
|
*/
|
|
46
51
|
addressState?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* billing_currency is the fiat currency invoices are issued in; empty means the charge currency is used as-is
|
|
54
|
+
*/
|
|
55
|
+
billingCurrency?: string | undefined;
|
|
47
56
|
/**
|
|
48
57
|
* contact is an optional contact number for the customer (e.g. phone)
|
|
49
58
|
*/
|
|
50
59
|
contact?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* contact_persons are people at the customer; at most one may be primary
|
|
62
|
+
*/
|
|
63
|
+
contactPersons: Array<CustomerContactPerson>;
|
|
51
64
|
/**
|
|
52
65
|
* email is the customer's email address and must be a valid email format if provided
|
|
53
66
|
*/
|
|
@@ -104,7 +117,9 @@ export type CreateCustomerRequest$Outbound = {
|
|
|
104
117
|
address_line2?: string | undefined;
|
|
105
118
|
address_postal_code?: string | undefined;
|
|
106
119
|
address_state?: string | undefined;
|
|
120
|
+
billing_currency?: string | undefined;
|
|
107
121
|
contact?: string | undefined;
|
|
122
|
+
contact_persons: Array<CustomerContactPerson$Outbound>;
|
|
108
123
|
email?: string | undefined;
|
|
109
124
|
external_id: string;
|
|
110
125
|
integration_entity_mapping?:
|
|
@@ -131,7 +146,9 @@ export const CreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
131
146
|
addressLine2: z.optional(z.string()),
|
|
132
147
|
addressPostalCode: z.optional(z.string()),
|
|
133
148
|
addressState: z.optional(z.string()),
|
|
149
|
+
billingCurrency: z.optional(z.string()),
|
|
134
150
|
contact: z.optional(z.string()),
|
|
151
|
+
contactPersons: z.array(CustomerContactPerson$outboundSchema),
|
|
135
152
|
email: z.optional(z.string()),
|
|
136
153
|
externalId: z.string(),
|
|
137
154
|
integrationEntityMapping: z.optional(
|
|
@@ -153,6 +170,8 @@ export const CreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
153
170
|
addressLine2: "address_line2",
|
|
154
171
|
addressPostalCode: "address_postal_code",
|
|
155
172
|
addressState: "address_state",
|
|
173
|
+
billingCurrency: "billing_currency",
|
|
174
|
+
contactPersons: "contact_persons",
|
|
156
175
|
externalId: "external_id",
|
|
157
176
|
integrationEntityMapping: "integration_entity_mapping",
|
|
158
177
|
onboardingWorkflowName: "onboarding_workflow_name",
|
|
@@ -33,6 +33,11 @@ import {
|
|
|
33
33
|
CreateSubscriptionLineItemRequest$Outbound,
|
|
34
34
|
CreateSubscriptionLineItemRequest$outboundSchema,
|
|
35
35
|
} from "./create-subscription-line-item-request.js";
|
|
36
|
+
import {
|
|
37
|
+
InlineFXRate,
|
|
38
|
+
InlineFXRate$Outbound,
|
|
39
|
+
InlineFXRate$outboundSchema,
|
|
40
|
+
} from "./inline-fx-rate.js";
|
|
36
41
|
import {
|
|
37
42
|
LineItemCommitmentConfig,
|
|
38
43
|
LineItemCommitmentConfig$Outbound,
|
|
@@ -122,6 +127,13 @@ export type CreateSubscriptionRequest = {
|
|
|
122
127
|
enableTrueUp?: boolean | undefined;
|
|
123
128
|
endDate?: Date | undefined;
|
|
124
129
|
externalCustomerId?: string | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* FxRates sets subscription-scope rates to the invoicing customer's billing currency, one per
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
* non-overlapping window. Rejected when nothing needs converting or the pair has no tenant rate.
|
|
135
|
+
*/
|
|
136
|
+
fxRates?: Array<InlineFXRate> | undefined;
|
|
125
137
|
gatewayPaymentMethodId?: string | undefined;
|
|
126
138
|
/**
|
|
127
139
|
* IncludePriceIDs selects which plan prices to attach. Nil/omitted attaches matching-cadence
|
|
@@ -200,6 +212,7 @@ export type CreateSubscriptionRequest$Outbound = {
|
|
|
200
212
|
enable_true_up?: boolean | undefined;
|
|
201
213
|
end_date?: string | undefined;
|
|
202
214
|
external_customer_id?: string | undefined;
|
|
215
|
+
fx_rates?: Array<InlineFXRate$Outbound> | undefined;
|
|
203
216
|
gateway_payment_method_id?: string | undefined;
|
|
204
217
|
include_price_ids?: Array<string> | undefined;
|
|
205
218
|
inheritance?: SubscriptionInheritanceConfig$Outbound | undefined;
|
|
@@ -254,6 +267,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
254
267
|
enableTrueUp: z.optional(z.boolean()),
|
|
255
268
|
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
256
269
|
externalCustomerId: z.optional(z.string()),
|
|
270
|
+
fxRates: z.optional(z.array(InlineFXRate$outboundSchema)),
|
|
257
271
|
gatewayPaymentMethodId: z.optional(z.string()),
|
|
258
272
|
includePriceIds: z.optional(z.array(z.string())),
|
|
259
273
|
inheritance: z.optional(SubscriptionInheritanceConfig$outboundSchema),
|
|
@@ -303,6 +317,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
303
317
|
enableTrueUp: "enable_true_up",
|
|
304
318
|
endDate: "end_date",
|
|
305
319
|
externalCustomerId: "external_customer_id",
|
|
320
|
+
fxRates: "fx_rates",
|
|
306
321
|
gatewayPaymentMethodId: "gateway_payment_method_id",
|
|
307
322
|
includePriceIds: "include_price_ids",
|
|
308
323
|
lineItemCommitments: "line_item_commitments",
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type CustomerContactPerson = {
|
|
13
|
+
department?: string | undefined;
|
|
14
|
+
designation?: string | undefined;
|
|
15
|
+
email?: string | undefined;
|
|
16
|
+
firstName: string;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
isPrimary?: boolean | undefined;
|
|
19
|
+
lastName?: string | undefined;
|
|
20
|
+
mobile?: string | undefined;
|
|
21
|
+
salutation?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const CustomerContactPerson$inboundSchema: z.ZodMiniType<
|
|
26
|
+
CustomerContactPerson,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.pipe(
|
|
29
|
+
z.object({
|
|
30
|
+
department: types.optional(types.string()),
|
|
31
|
+
designation: types.optional(types.string()),
|
|
32
|
+
email: types.optional(types.string()),
|
|
33
|
+
first_name: types.string(),
|
|
34
|
+
id: types.optional(types.string()),
|
|
35
|
+
is_primary: types.optional(types.boolean()),
|
|
36
|
+
last_name: types.optional(types.string()),
|
|
37
|
+
mobile: types.optional(types.string()),
|
|
38
|
+
salutation: types.optional(types.string()),
|
|
39
|
+
}),
|
|
40
|
+
z.transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"first_name": "firstName",
|
|
43
|
+
"is_primary": "isPrimary",
|
|
44
|
+
"last_name": "lastName",
|
|
45
|
+
});
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type CustomerContactPerson$Outbound = {
|
|
50
|
+
department?: string | undefined;
|
|
51
|
+
designation?: string | undefined;
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
first_name: string;
|
|
54
|
+
id?: string | undefined;
|
|
55
|
+
is_primary?: boolean | undefined;
|
|
56
|
+
last_name?: string | undefined;
|
|
57
|
+
mobile?: string | undefined;
|
|
58
|
+
salutation?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CustomerContactPerson$outboundSchema: z.ZodMiniType<
|
|
63
|
+
CustomerContactPerson$Outbound,
|
|
64
|
+
CustomerContactPerson
|
|
65
|
+
> = z.pipe(
|
|
66
|
+
z.object({
|
|
67
|
+
department: z.optional(z.string()),
|
|
68
|
+
designation: z.optional(z.string()),
|
|
69
|
+
email: z.optional(z.string()),
|
|
70
|
+
firstName: z.string(),
|
|
71
|
+
id: z.optional(z.string()),
|
|
72
|
+
isPrimary: z.optional(z.boolean()),
|
|
73
|
+
lastName: z.optional(z.string()),
|
|
74
|
+
mobile: z.optional(z.string()),
|
|
75
|
+
salutation: z.optional(z.string()),
|
|
76
|
+
}),
|
|
77
|
+
z.transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
firstName: "first_name",
|
|
80
|
+
isPrimary: "is_primary",
|
|
81
|
+
lastName: "last_name",
|
|
82
|
+
});
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
export function customerContactPersonToJSON(
|
|
87
|
+
customerContactPerson: CustomerContactPerson,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
CustomerContactPerson$outboundSchema.parse(customerContactPerson),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export function customerContactPersonFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<CustomerContactPerson, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => CustomerContactPerson$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'CustomerContactPerson' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -7,6 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
CustomerContactPerson,
|
|
12
|
+
CustomerContactPerson$inboundSchema,
|
|
13
|
+
} from "./customer-contact-person.js";
|
|
10
14
|
import {
|
|
11
15
|
EntityIntegrationMappingResponse,
|
|
12
16
|
EntityIntegrationMappingResponse$inboundSchema,
|
|
@@ -43,10 +47,15 @@ export type CustomerResponse = {
|
|
|
43
47
|
* AddressState is the state of the customer's address
|
|
44
48
|
*/
|
|
45
49
|
addressState?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.
|
|
52
|
+
*/
|
|
53
|
+
billingCurrency?: string | undefined;
|
|
46
54
|
/**
|
|
47
55
|
* Contact is an optional contact number for the customer (e.g. phone)
|
|
48
56
|
*/
|
|
49
57
|
contact?: string | undefined;
|
|
58
|
+
contactPersons?: Array<CustomerContactPerson> | undefined;
|
|
50
59
|
createdAt?: Date | undefined;
|
|
51
60
|
createdBy?: string | undefined;
|
|
52
61
|
/**
|
|
@@ -100,7 +109,11 @@ export const CustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
100
109
|
address_line2: types.optional(types.string()),
|
|
101
110
|
address_postal_code: types.optional(types.string()),
|
|
102
111
|
address_state: types.optional(types.string()),
|
|
112
|
+
billing_currency: types.optional(types.string()),
|
|
103
113
|
contact: types.optional(types.string()),
|
|
114
|
+
contact_persons: types.optional(
|
|
115
|
+
z.array(CustomerContactPerson$inboundSchema),
|
|
116
|
+
),
|
|
104
117
|
created_at: types.optional(types.date()),
|
|
105
118
|
created_by: types.optional(types.string()),
|
|
106
119
|
email: types.optional(types.string()),
|
|
@@ -127,6 +140,8 @@ export const CustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
127
140
|
"address_line2": "addressLine2",
|
|
128
141
|
"address_postal_code": "addressPostalCode",
|
|
129
142
|
"address_state": "addressState",
|
|
143
|
+
"billing_currency": "billingCurrency",
|
|
144
|
+
"contact_persons": "contactPersons",
|
|
130
145
|
"created_at": "createdAt",
|
|
131
146
|
"created_by": "createdBy",
|
|
132
147
|
"environment_id": "environmentId",
|
|
@@ -7,6 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
CustomerContactPerson,
|
|
12
|
+
CustomerContactPerson$inboundSchema,
|
|
13
|
+
} from "./customer-contact-person.js";
|
|
10
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
15
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
12
16
|
import { TaxTreatment, TaxTreatment$inboundSchema } from "./tax-treatment.js";
|
|
@@ -36,10 +40,15 @@ export type Customer = {
|
|
|
36
40
|
* AddressState is the state of the customer's address
|
|
37
41
|
*/
|
|
38
42
|
addressState?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* BillingCurrency is the fiat currency invoices are issued in; nil means charge currency is used as-is.
|
|
45
|
+
*/
|
|
46
|
+
billingCurrency?: string | undefined;
|
|
39
47
|
/**
|
|
40
48
|
* Contact is an optional contact number for the customer (e.g. phone)
|
|
41
49
|
*/
|
|
42
50
|
contact?: string | undefined;
|
|
51
|
+
contactPersons?: Array<CustomerContactPerson> | undefined;
|
|
43
52
|
createdAt?: Date | undefined;
|
|
44
53
|
createdBy?: string | undefined;
|
|
45
54
|
/**
|
|
@@ -89,7 +98,11 @@ export const Customer$inboundSchema: z.ZodMiniType<Customer, unknown> = z.pipe(
|
|
|
89
98
|
address_line2: types.optional(types.string()),
|
|
90
99
|
address_postal_code: types.optional(types.string()),
|
|
91
100
|
address_state: types.optional(types.string()),
|
|
101
|
+
billing_currency: types.optional(types.string()),
|
|
92
102
|
contact: types.optional(types.string()),
|
|
103
|
+
contact_persons: types.optional(
|
|
104
|
+
z.array(CustomerContactPerson$inboundSchema),
|
|
105
|
+
),
|
|
93
106
|
created_at: types.optional(types.date()),
|
|
94
107
|
created_by: types.optional(types.string()),
|
|
95
108
|
email: types.optional(types.string()),
|
|
@@ -113,6 +126,8 @@ export const Customer$inboundSchema: z.ZodMiniType<Customer, unknown> = z.pipe(
|
|
|
113
126
|
"address_line2": "addressLine2",
|
|
114
127
|
"address_postal_code": "addressPostalCode",
|
|
115
128
|
"address_state": "addressState",
|
|
129
|
+
"billing_currency": "billingCurrency",
|
|
130
|
+
"contact_persons": "contactPersons",
|
|
116
131
|
"created_at": "createdAt",
|
|
117
132
|
"created_by": "createdBy",
|
|
118
133
|
"environment_id": "environmentId",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
import {
|
|
12
|
+
TaxJurisdiction,
|
|
13
|
+
TaxJurisdiction$inboundSchema,
|
|
14
|
+
} from "./tax-jurisdiction.js";
|
|
15
|
+
import { TaxReversal, TaxReversal$inboundSchema } from "./tax-reversal.js";
|
|
16
|
+
|
|
17
|
+
export type ExternalTaxDetails = {
|
|
18
|
+
/**
|
|
19
|
+
* CalculationExpiresAt is when the calculation can no longer be filed, RFC3339.
|
|
20
|
+
*/
|
|
21
|
+
calculationExpiresAt?: Date | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* CalculationID is the provider calculation this row was written from. Commit files it.
|
|
24
|
+
*/
|
|
25
|
+
calculationId?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* DisplayName is the engine's own name for the tax, such as
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* "Integrated goods and services tax (IGST)".
|
|
31
|
+
*/
|
|
32
|
+
displayName?: string | undefined;
|
|
33
|
+
jurisdiction?: TaxJurisdiction | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Percentage is the resolved rate, such as "18.0". This is what was charged, not the
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* rate that would apply if the tax were imposed.
|
|
39
|
+
*/
|
|
40
|
+
percentage?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Reference is what this row's provider transaction was filed under. It is unique across
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* every transaction on the account, so it is also the only way back to a transaction whose
|
|
46
|
+
* id failed to land here.
|
|
47
|
+
*/
|
|
48
|
+
reference?: string | undefined;
|
|
49
|
+
reversal?: TaxReversal | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Sourcing is whether the jurisdiction followed the seller's address or the buyer's.
|
|
52
|
+
*/
|
|
53
|
+
sourcing?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* TaxCode is the product tax category the engine priced against, such as txcd_10000000.
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* It belongs to the line rather than the rate, so today every row on an invoice carries
|
|
59
|
+
* the account default. It only varies once tax is calculated per line item.
|
|
60
|
+
*/
|
|
61
|
+
taxCode?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* TaxType is the tax family, such as vat, igst or sales_tax.
|
|
64
|
+
*/
|
|
65
|
+
taxType?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* TaxabilityReason is why the engine charged what it did, such as standard_rated or
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* reverse_charge. Recorded, not yet rendered.
|
|
71
|
+
*/
|
|
72
|
+
taxabilityReason?: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const ExternalTaxDetails$inboundSchema: z.ZodMiniType<
|
|
77
|
+
ExternalTaxDetails,
|
|
78
|
+
unknown
|
|
79
|
+
> = z.pipe(
|
|
80
|
+
z.object({
|
|
81
|
+
calculation_expires_at: types.optional(types.date()),
|
|
82
|
+
calculation_id: types.optional(types.string()),
|
|
83
|
+
display_name: types.optional(types.string()),
|
|
84
|
+
jurisdiction: types.optional(TaxJurisdiction$inboundSchema),
|
|
85
|
+
percentage: types.optional(types.string()),
|
|
86
|
+
reference: types.optional(types.string()),
|
|
87
|
+
reversal: types.optional(TaxReversal$inboundSchema),
|
|
88
|
+
sourcing: types.optional(types.string()),
|
|
89
|
+
tax_code: types.optional(types.string()),
|
|
90
|
+
tax_type: types.optional(types.string()),
|
|
91
|
+
taxability_reason: types.optional(types.string()),
|
|
92
|
+
}),
|
|
93
|
+
z.transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
"calculation_expires_at": "calculationExpiresAt",
|
|
96
|
+
"calculation_id": "calculationId",
|
|
97
|
+
"display_name": "displayName",
|
|
98
|
+
"tax_code": "taxCode",
|
|
99
|
+
"tax_type": "taxType",
|
|
100
|
+
"taxability_reason": "taxabilityReason",
|
|
101
|
+
});
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
export function externalTaxDetailsFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<ExternalTaxDetails, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => ExternalTaxDetails$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'ExternalTaxDetails' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type FxConversionSource = {
|
|
13
|
+
net?: string | undefined;
|
|
14
|
+
subtotal?: string | undefined;
|
|
15
|
+
totalDiscount?: string | undefined;
|
|
16
|
+
totalPrepaidCreditsApplied?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const FxConversionSource$inboundSchema: z.ZodMiniType<
|
|
21
|
+
FxConversionSource,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.pipe(
|
|
24
|
+
z.object({
|
|
25
|
+
net: types.optional(types.string()),
|
|
26
|
+
subtotal: types.optional(types.string()),
|
|
27
|
+
total_discount: types.optional(types.string()),
|
|
28
|
+
total_prepaid_credits_applied: types.optional(types.string()),
|
|
29
|
+
}),
|
|
30
|
+
z.transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"total_discount": "totalDiscount",
|
|
33
|
+
"total_prepaid_credits_applied": "totalPrepaidCreditsApplied",
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export function fxConversionSourceFromJSON(
|
|
39
|
+
jsonString: string,
|
|
40
|
+
): SafeParseResult<FxConversionSource, SDKValidationError> {
|
|
41
|
+
return safeParse(
|
|
42
|
+
jsonString,
|
|
43
|
+
(x) => FxConversionSource$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
+
`Failed to parse 'FxConversionSource' from JSON`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
FxConversionSource,
|
|
12
|
+
FxConversionSource$inboundSchema,
|
|
13
|
+
} from "./fx-conversion-source.js";
|
|
14
|
+
import { FXRateScope, FXRateScope$inboundSchema } from "./fx-rate-scope.js";
|
|
15
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
16
|
+
|
|
17
|
+
export type FxConversion = {
|
|
18
|
+
/**
|
|
19
|
+
* BillingCurrency is the currency the invoice was issued in.
|
|
20
|
+
*/
|
|
21
|
+
billingCurrency?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ChargeCurrency is the invoice's original (draft) currency.
|
|
24
|
+
*/
|
|
25
|
+
chargeCurrency?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* ConvertedAt is when the conversion ran.
|
|
28
|
+
*/
|
|
29
|
+
convertedAt?: Date | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Rate is the frozen rate: billing per 1 charge unit.
|
|
32
|
+
*/
|
|
33
|
+
rate?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* RateID is the fx_rates row used, for reference only; never read again.
|
|
36
|
+
*/
|
|
37
|
+
rateId?: string | undefined;
|
|
38
|
+
scope?: FXRateScope | undefined;
|
|
39
|
+
source?: FxConversionSource | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const FxConversion$inboundSchema: z.ZodMiniType<FxConversion, unknown> =
|
|
44
|
+
z.pipe(
|
|
45
|
+
z.object({
|
|
46
|
+
billing_currency: types.optional(types.string()),
|
|
47
|
+
charge_currency: types.optional(types.string()),
|
|
48
|
+
converted_at: types.optional(types.date()),
|
|
49
|
+
rate: types.optional(types.string()),
|
|
50
|
+
rate_id: types.optional(types.string()),
|
|
51
|
+
scope: types.optional(FXRateScope$inboundSchema),
|
|
52
|
+
source: types.optional(FxConversionSource$inboundSchema),
|
|
53
|
+
}),
|
|
54
|
+
z.transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
"billing_currency": "billingCurrency",
|
|
57
|
+
"charge_currency": "chargeCurrency",
|
|
58
|
+
"converted_at": "convertedAt",
|
|
59
|
+
"rate_id": "rateId",
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export function fxConversionFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<FxConversion, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => FxConversion$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'FxConversion' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
package/src/sdk/models/index.ts
CHANGED
|
@@ -110,6 +110,7 @@ export * from "./coupon-application-response.js";
|
|
|
110
110
|
export * from "./coupon-association-response.js";
|
|
111
111
|
export * from "./coupon-cadence.js";
|
|
112
112
|
export * from "./coupon-filter.js";
|
|
113
|
+
export * from "./coupon-ref.js";
|
|
113
114
|
export * from "./coupon-response.js";
|
|
114
115
|
export * from "./coupon-type.js";
|
|
115
116
|
export * from "./create-addon-request.js";
|
|
@@ -172,6 +173,7 @@ export * from "./creditnote-credit-note-line-item.js";
|
|
|
172
173
|
export * from "./custom-analytic-item.js";
|
|
173
174
|
export * from "./custom-currency-line-item.js";
|
|
174
175
|
export * from "./custom-currency.js";
|
|
176
|
+
export * from "./customer-contact-person.js";
|
|
175
177
|
export * from "./customer-entitlements-response.js";
|
|
176
178
|
export * from "./customer-filter.js";
|
|
177
179
|
export * from "./customer-invoice-summary.js";
|
|
@@ -247,6 +249,7 @@ export * from "./execute-subscription-plan-change-v2-op.js";
|
|
|
247
249
|
export * from "./execution-details.js";
|
|
248
250
|
export * from "./export-metadata-entity-type.js";
|
|
249
251
|
export * from "./export-metadata-field.js";
|
|
252
|
+
export * from "./external-tax-details.js";
|
|
250
253
|
export * from "./fact-status.js";
|
|
251
254
|
export * from "./failure-point-type.js";
|
|
252
255
|
export * from "./failure-point.js";
|
|
@@ -262,6 +265,8 @@ export * from "./filter-operator-type.js";
|
|
|
262
265
|
export * from "./finalize-credit-note-request.js";
|
|
263
266
|
export * from "./finalize-invoice-op.js";
|
|
264
267
|
export * from "./flex-price-error.js";
|
|
268
|
+
export * from "./fx-conversion-source.js";
|
|
269
|
+
export * from "./fx-conversion.js";
|
|
265
270
|
export * from "./fx-rate-filter.js";
|
|
266
271
|
export * from "./fx-rate-response.js";
|
|
267
272
|
export * from "./fx-rate-scope.js";
|
|
@@ -350,6 +355,7 @@ export * from "./grouped-invoicing-child-request.js";
|
|
|
350
355
|
export * from "./http-client-errors.js";
|
|
351
356
|
export * from "./ingest-event-request.js";
|
|
352
357
|
export * from "./inheritance-action.js";
|
|
358
|
+
export * from "./inline-fx-rate.js";
|
|
353
359
|
export * from "./integration-config-entry.js";
|
|
354
360
|
export * from "./integration-config-response.js";
|
|
355
361
|
export * from "./integration-entity-type.js";
|
|
@@ -602,13 +608,18 @@ export * from "./tax-association-update-request.js";
|
|
|
602
608
|
export * from "./tax-behavior.js";
|
|
603
609
|
export * from "./tax-exemption-reason-code.js";
|
|
604
610
|
export * from "./tax-exemption-summary.js";
|
|
611
|
+
export * from "./tax-jurisdiction.js";
|
|
612
|
+
export * from "./tax-provider.js";
|
|
605
613
|
export * from "./tax-rate-entity-type.js";
|
|
606
614
|
export * from "./tax-rate-override.js";
|
|
607
615
|
export * from "./tax-rate-response.js";
|
|
608
616
|
export * from "./tax-rate-scope.js";
|
|
609
617
|
export * from "./tax-rate-status.js";
|
|
610
618
|
export * from "./tax-rate-type.js";
|
|
619
|
+
export * from "./tax-reversal-mode.js";
|
|
620
|
+
export * from "./tax-reversal.js";
|
|
611
621
|
export * from "./tax-summary.js";
|
|
622
|
+
export * from "./tax-transaction-type.js";
|
|
612
623
|
export * from "./tax-treatment.js";
|
|
613
624
|
export * from "./tenant-billing-details.js";
|
|
614
625
|
export * from "./tenant-billing-usage.js";
|
|
@@ -616,6 +627,7 @@ export * from "./tenant-response.js";
|
|
|
616
627
|
export * from "./terminate-wallet-op.js";
|
|
617
628
|
export * from "./time-of-day-bucket.js";
|
|
618
629
|
export * from "./time-range-filter.js";
|
|
630
|
+
export * from "./top-up-coupon.js";
|
|
619
631
|
export * from "./top-up-wallet-op.js";
|
|
620
632
|
export * from "./top-up-wallet-request.js";
|
|
621
633
|
export * from "./top-up-wallet-response.js";
|
|
@@ -673,6 +685,8 @@ export * from "./update-task-status-request.js";
|
|
|
673
685
|
export * from "./update-tax-association-op.js";
|
|
674
686
|
export * from "./update-tax-rate-op.js";
|
|
675
687
|
export * from "./update-tax-rate-request.js";
|
|
688
|
+
export * from "./update-tenant-address.js";
|
|
689
|
+
export * from "./update-tenant-billing-details.js";
|
|
676
690
|
export * from "./update-tenant-request.js";
|
|
677
691
|
export * from "./update-user-request.js";
|
|
678
692
|
export * from "./update-user-response.js";
|
|
@@ -706,7 +720,9 @@ export * from "./wallet-status.js";
|
|
|
706
720
|
export * from "./wallet-topup-params.js";
|
|
707
721
|
export * from "./wallet-transaction-filter.js";
|
|
708
722
|
export * from "./wallet-transaction-response.js";
|
|
723
|
+
export * from "./wallet-tx-consumption.js";
|
|
709
724
|
export * from "./wallet-tx-reference-type.js";
|
|
725
|
+
export * from "./wallet-tx-source-type.js";
|
|
710
726
|
export * from "./wallet-type.js";
|
|
711
727
|
export * from "./webhook-dto-alert-webhook-payload.js";
|
|
712
728
|
export * from "./webhook-dto-checkout-session-webhook-payload.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type InlineFXRate = {
|
|
9
|
+
endDate?: Date | undefined;
|
|
10
|
+
rate?: string | undefined;
|
|
11
|
+
startDate?: Date | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type InlineFXRate$Outbound = {
|
|
16
|
+
end_date?: string | undefined;
|
|
17
|
+
rate?: string | undefined;
|
|
18
|
+
start_date?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const InlineFXRate$outboundSchema: z.ZodMiniType<
|
|
23
|
+
InlineFXRate$Outbound,
|
|
24
|
+
InlineFXRate
|
|
25
|
+
> = z.pipe(
|
|
26
|
+
z.object({
|
|
27
|
+
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
28
|
+
rate: z.optional(z.string()),
|
|
29
|
+
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
30
|
+
}),
|
|
31
|
+
z.transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
endDate: "end_date",
|
|
34
|
+
startDate: "start_date",
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export function inlineFXRateToJSON(inlineFXRate: InlineFXRate): string {
|
|
40
|
+
return JSON.stringify(InlineFXRate$outboundSchema.parse(inlineFXRate));
|
|
41
|
+
}
|