/* tslint:disable */
/* eslint-disable */
/**
 * Paystack
 * The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa.
 *
 * The version of the Paystack Node library: 1.0.0
 * Contact: techsupport@paystack.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface DedicatedVirtualAccountSplit
 */
export interface DedicatedVirtualAccountSplit {
    /**
     * Valid Dedicated virtual account
     * @type {string}
     * @memberof DedicatedVirtualAccountSplit
     */
    accountNumber: string;
    /**
     * Subaccount code of the account you want to split the transaction with
     * @type {string}
     * @memberof DedicatedVirtualAccountSplit
     */
    subaccount?: string;
    /**
     * Split code consisting of the lists of accounts you want to split the transaction with
     * @type {string}
     * @memberof DedicatedVirtualAccountSplit
     */
    splitCode?: string;
}

export function DedicatedVirtualAccountSplitFromJSON(json: any): DedicatedVirtualAccountSplit {
    return DedicatedVirtualAccountSplitFromJSONTyped(json, false);
}

export function DedicatedVirtualAccountSplitFromJSONTyped(json: any, ignoreDiscriminator: boolean): DedicatedVirtualAccountSplit {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'accountNumber': json['account_number'],
        'subaccount': !exists(json, 'subaccount') ? undefined : json['subaccount'],
        'splitCode': !exists(json, 'split_code') ? undefined : json['split_code'],
    };
}

export function DedicatedVirtualAccountSplitToJSON(value?: DedicatedVirtualAccountSplit | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'account_number': value.accountNumber,
        'subaccount': value.subaccount,
        'split_code': value.splitCode,
    };
}


