"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.BillingSettingsToJSON = exports.BillingSettingsFromJSONTyped = exports.BillingSettingsFromJSON = void 0;
const runtime_1 = require("../runtime");
function BillingSettingsFromJSON(json) {
    return BillingSettingsFromJSONTyped(json, false);
}
exports.BillingSettingsFromJSON = BillingSettingsFromJSON;
function BillingSettingsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'invoiceGracePeriodLength': !(0, runtime_1.exists)(json, 'invoice_grace_period_length') ? undefined : json['invoice_grace_period_length'],
        'invoiceGracePeriodUnit': !(0, runtime_1.exists)(json, 'invoice_grace_period_unit') ? undefined : json['invoice_grace_period_unit'],
        'paymentGracePeriodLength': !(0, runtime_1.exists)(json, 'payment_grace_period_length') ? undefined : json['payment_grace_period_length'],
        'paymentGracePeriodUnit': !(0, runtime_1.exists)(json, 'payment_grace_period_unit') ? undefined : json['payment_grace_period_unit'],
        'shouldSendInvoiceToCustomers': !(0, runtime_1.exists)(json, 'should_send_invoice_to_customers') ? undefined : json['should_send_invoice_to_customers'],
        'invoiceViaOctane': !(0, runtime_1.exists)(json, 'invoice_via_octane') ? undefined : json['invoice_via_octane'],
        'autoApproveInvoices': !(0, runtime_1.exists)(json, 'auto_approve_invoices') ? undefined : json['auto_approve_invoices'],
        'customerInvoiceDetailLevel': !(0, runtime_1.exists)(json, 'customer_invoice_detail_level') ? undefined : json['customer_invoice_detail_level'],
        'chargesEnabled': !(0, runtime_1.exists)(json, 'charges_enabled') ? undefined : json['charges_enabled'],
        'invoiceFixedComponentsAtStart': !(0, runtime_1.exists)(json, 'invoice_fixed_components_at_start') ? undefined : json['invoice_fixed_components_at_start'],
        'retryAttempts': !(0, runtime_1.exists)(json, 'retry_attempts') ? undefined : json['retry_attempts'],
        'retryFrequencyLength': !(0, runtime_1.exists)(json, 'retry_frequency_length') ? undefined : json['retry_frequency_length'],
        'retryFrequencyUnit': !(0, runtime_1.exists)(json, 'retry_frequency_unit') ? undefined : json['retry_frequency_unit'],
        'taxRate': !(0, runtime_1.exists)(json, 'tax_rate') ? undefined : json['tax_rate'],
        'taxViaPaymentProvider': !(0, runtime_1.exists)(json, 'tax_via_payment_provider') ? undefined : json['tax_via_payment_provider'],
        'invoiceMeteredComponentsAtStart': !(0, runtime_1.exists)(json, 'invoice_metered_components_at_start') ? undefined : json['invoice_metered_components_at_start'],
        'invoiceOverages': !(0, runtime_1.exists)(json, 'invoice_overages') ? undefined : json['invoice_overages'],
        'invoiceMemo': !(0, runtime_1.exists)(json, 'invoice_memo') ? undefined : json['invoice_memo'],
        'daysUntilDue': !(0, runtime_1.exists)(json, 'days_until_due') ? undefined : json['days_until_due'],
        'stripeAutoAdvance': !(0, runtime_1.exists)(json, 'stripe_auto_advance') ? undefined : json['stripe_auto_advance'],
        'alignBillingCyclesToCalendar': !(0, runtime_1.exists)(json, 'align_billing_cycles_to_calendar') ? undefined : json['align_billing_cycles_to_calendar'],
        'invoiceLogoUrl': !(0, runtime_1.exists)(json, 'invoice_logo_url') ? undefined : json['invoice_logo_url'],
        'includeAchInstructions': !(0, runtime_1.exists)(json, 'include_ach_instructions') ? undefined : json['include_ach_instructions'],
        'achAccountName': !(0, runtime_1.exists)(json, 'ach_account_name') ? undefined : json['ach_account_name'],
        'achRoutingNumber': !(0, runtime_1.exists)(json, 'ach_routing_number') ? undefined : json['ach_routing_number'],
        'achAccountNumber': !(0, runtime_1.exists)(json, 'ach_account_number') ? undefined : json['ach_account_number'],
        'achSwiftCode': !(0, runtime_1.exists)(json, 'ach_swift_code') ? undefined : json['ach_swift_code'],
        'achBankName': !(0, runtime_1.exists)(json, 'ach_bank_name') ? undefined : json['ach_bank_name'],
        'achBankAddress1': !(0, runtime_1.exists)(json, 'ach_bank_address_1') ? undefined : json['ach_bank_address_1'],
        'achBankAddress2': !(0, runtime_1.exists)(json, 'ach_bank_address_2') ? undefined : json['ach_bank_address_2'],
        'syncCustomerDataToPaymentGateway': !(0, runtime_1.exists)(json, 'sync_customer_data_to_payment_gateway') ? undefined : json['sync_customer_data_to_payment_gateway'],
        'stripeImmediateFinalization': !(0, runtime_1.exists)(json, 'stripe_immediate_finalization') ? undefined : json['stripe_immediate_finalization'],
        'alternateSendgridTemplateId': !(0, runtime_1.exists)(json, 'alternate_sendgrid_template_id') ? undefined : json['alternate_sendgrid_template_id'],
        'shouldMinimumChargeOverrideLineItems': !(0, runtime_1.exists)(json, 'should_minimum_charge_override_line_items') ? undefined : json['should_minimum_charge_override_line_items'],
        'sendReceipts': !(0, runtime_1.exists)(json, 'send_receipts') ? undefined : json['send_receipts'],
        'communicatePaymentFailures': !(0, runtime_1.exists)(json, 'communicate_payment_failures') ? undefined : json['communicate_payment_failures'],
        'upcomingReminderDaysArray': !(0, runtime_1.exists)(json, 'upcoming_reminder_days_array') ? undefined : json['upcoming_reminder_days_array'],
        'pastDueReminderDaysArray': !(0, runtime_1.exists)(json, 'past_due_reminder_days_array') ? undefined : json['past_due_reminder_days_array'],
        'autoUpdateStripeDefaultPaymentMethod': !(0, runtime_1.exists)(json, 'auto_update_stripe_default_payment_method') ? undefined : json['auto_update_stripe_default_payment_method'],
    };
}
exports.BillingSettingsFromJSONTyped = BillingSettingsFromJSONTyped;
function BillingSettingsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'invoice_grace_period_length': value.invoiceGracePeriodLength,
        'invoice_grace_period_unit': value.invoiceGracePeriodUnit,
        'payment_grace_period_length': value.paymentGracePeriodLength,
        'payment_grace_period_unit': value.paymentGracePeriodUnit,
        'should_send_invoice_to_customers': value.shouldSendInvoiceToCustomers,
        'invoice_via_octane': value.invoiceViaOctane,
        'auto_approve_invoices': value.autoApproveInvoices,
        'charges_enabled': value.chargesEnabled,
        'invoice_fixed_components_at_start': value.invoiceFixedComponentsAtStart,
        'retry_attempts': value.retryAttempts,
        'retry_frequency_length': value.retryFrequencyLength,
        'retry_frequency_unit': value.retryFrequencyUnit,
        'tax_rate': value.taxRate,
        'tax_via_payment_provider': value.taxViaPaymentProvider,
        'invoice_metered_components_at_start': value.invoiceMeteredComponentsAtStart,
        'invoice_overages': value.invoiceOverages,
        'invoice_memo': value.invoiceMemo,
        'days_until_due': value.daysUntilDue,
        'stripe_auto_advance': value.stripeAutoAdvance,
        'align_billing_cycles_to_calendar': value.alignBillingCyclesToCalendar,
        'invoice_logo_url': value.invoiceLogoUrl,
        'include_ach_instructions': value.includeAchInstructions,
        'ach_account_name': value.achAccountName,
        'ach_routing_number': value.achRoutingNumber,
        'ach_account_number': value.achAccountNumber,
        'ach_swift_code': value.achSwiftCode,
        'ach_bank_name': value.achBankName,
        'ach_bank_address_1': value.achBankAddress1,
        'ach_bank_address_2': value.achBankAddress2,
        'sync_customer_data_to_payment_gateway': value.syncCustomerDataToPaymentGateway,
        'stripe_immediate_finalization': value.stripeImmediateFinalization,
        'alternate_sendgrid_template_id': value.alternateSendgridTemplateId,
        'should_minimum_charge_override_line_items': value.shouldMinimumChargeOverrideLineItems,
        'send_receipts': value.sendReceipts,
        'communicate_payment_failures': value.communicatePaymentFailures,
        'upcoming_reminder_days_array': value.upcomingReminderDaysArray,
        'past_due_reminder_days_array': value.pastDueReminderDaysArray,
        'auto_update_stripe_default_payment_method': value.autoUpdateStripeDefaultPaymentMethod,
    };
}
exports.BillingSettingsToJSON = BillingSettingsToJSON;
//# sourceMappingURL=data:application/json;base64, 