@maxio-com/advanced-billing-sdk
Version:
Ultimate billing and pricing flexibility for B2B SaaS. Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
113 lines • 5.09 kB
JavaScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { array, boolean, dict, expandoObject, lazy, nullable, number, optional, string, } from '../schema.js';
import { aCHAgreementSchema } from './aCHAgreement.js';
import { agreementAcceptanceSchema, } from './agreementAcceptance.js';
import { bankAccountAttributesSchema, } from './bankAccountAttributes.js';
import { calendarBillingSchema } from './calendarBilling.js';
import { collectionMethodSchema, } from './collectionMethod.js';
import { createSubscriptionOfferIdSchema, } from './containers/createSubscriptionOfferId.js';
import { createSubscriptionComponentSchema, } from './createSubscriptionComponent.js';
import { customerAttributesSchema, } from './customerAttributes.js';
import { groupSettingsSchema } from './groupSettings.js';
import { paymentProfileAttributesSchema, } from './paymentProfileAttributes.js';
import { subscriptionCustomPriceSchema, } from './subscriptionCustomPrice.js';
import { upsertPrepaidConfigurationSchema, } from './upsertPrepaidConfiguration.js';
export const createSubscriptionSchema = lazy(() => expandoObject({
productHandle: ['product_handle', optional(string())],
productId: ['product_id', optional(number())],
productPricePointHandle: ['product_price_point_handle', optional(string())],
productPricePointId: ['product_price_point_id', optional(number())],
customPrice: ['custom_price', optional(subscriptionCustomPriceSchema)],
couponCode: ['coupon_code', optional(string())],
couponCodes: ['coupon_codes', optional(array(string()))],
paymentCollectionMethod: [
'payment_collection_method',
optional(collectionMethodSchema),
],
receivesInvoiceEmails: ['receives_invoice_emails', optional(string())],
netTerms: ['net_terms', optional(string())],
customerId: ['customer_id', optional(number())],
nextBillingAt: ['next_billing_at', optional(string())],
initialBillingAt: ['initial_billing_at', optional(string())],
deferSignup: ['defer_signup', optional(boolean())],
storedCredentialTransactionId: [
'stored_credential_transaction_id',
optional(number()),
],
salesRepId: ['sales_rep_id', optional(number())],
paymentProfileId: ['payment_profile_id', optional(number())],
reference: ['reference', optional(string())],
customerAttributes: [
'customer_attributes',
optional(customerAttributesSchema),
],
paymentProfileAttributes: [
'payment_profile_attributes',
optional(paymentProfileAttributesSchema),
],
creditCardAttributes: [
'credit_card_attributes',
optional(paymentProfileAttributesSchema),
],
bankAccountAttributes: [
'bank_account_attributes',
optional(bankAccountAttributesSchema),
],
components: [
'components',
optional(array(createSubscriptionComponentSchema)),
],
calendarBilling: ['calendar_billing', optional(calendarBillingSchema)],
metafields: ['metafields', optional(dict(string()))],
customerReference: ['customer_reference', optional(string())],
group: ['group', optional(groupSettingsSchema)],
ref: ['ref', optional(string())],
cancellationMessage: ['cancellation_message', optional(string())],
cancellationMethod: ['cancellation_method', optional(string())],
currency: ['currency', optional(string())],
expiresAt: ['expires_at', optional(string())],
expirationTracksNextBillingChange: [
'expiration_tracks_next_billing_change',
optional(string()),
],
agreementTerms: ['agreement_terms', optional(string())],
authorizerFirstName: ['authorizer_first_name', optional(string())],
authorizerLastName: ['authorizer_last_name', optional(string())],
calendarBillingFirstCharge: [
'calendar_billing_first_charge',
optional(string()),
],
reasonCode: ['reason_code', optional(string())],
productChangeDelayed: ['product_change_delayed', optional(boolean())],
offerId: ['offer_id', optional(createSubscriptionOfferIdSchema)],
prepaidConfiguration: [
'prepaid_configuration',
optional(upsertPrepaidConfigurationSchema),
],
previousBillingAt: ['previous_billing_at', optional(string())],
importMrr: ['import_mrr', optional(boolean())],
canceledAt: ['canceled_at', optional(string())],
activatedAt: ['activated_at', optional(string())],
agreementAcceptance: [
'agreement_acceptance',
optional(agreementAcceptanceSchema),
],
achAgreement: ['ach_agreement', optional(aCHAgreementSchema)],
dunningCommunicationDelayEnabled: [
'dunning_communication_delay_enabled',
optional(boolean()),
],
dunningCommunicationDelayTimeZone: [
'dunning_communication_delay_time_zone',
optional(nullable(string())),
],
skipBillingManifestTaxes: [
'skip_billing_manifest_taxes',
optional(boolean()),
],
}));
//# sourceMappingURL=createSubscription.js.map