/* 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 SubaccountCreate
 */
export interface SubaccountCreate {
    /**
     * Name of business for subaccount
     * @type {string}
     * @memberof SubaccountCreate
     */
    businessName: string;
    /**
     * Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint.
     * @type {string}
     * @memberof SubaccountCreate
     */
    settlementBank: string;
    /**
     * Bank account number
     * @type {string}
     * @memberof SubaccountCreate
     */
    accountNumber: string;
    /**
     * Customer's phone number
     * @type {number}
     * @memberof SubaccountCreate
     */
    percentageCharge: number;
    /**
     * A description for this subaccount
     * @type {string}
     * @memberof SubaccountCreate
     */
    description?: string;
    /**
     * A contact email for the subaccount
     * @type {string}
     * @memberof SubaccountCreate
     */
    primaryContactEmail?: string;
    /**
     * The name of the contact person for this subaccount
     * @type {string}
     * @memberof SubaccountCreate
     */
    primaryContactName?: string;
    /**
     * A phone number to call for this subaccount
     * @type {string}
     * @memberof SubaccountCreate
     */
    primaryContactPhone?: string;
    /**
     * Stringified JSON object of custom data
     * @type {string}
     * @memberof SubaccountCreate
     */
    metadata?: string;
}

export function SubaccountCreateFromJSON(json: any): SubaccountCreate {
    return SubaccountCreateFromJSONTyped(json, false);
}

export function SubaccountCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubaccountCreate {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'businessName': json['business_name'],
        'settlementBank': json['settlement_bank'],
        'accountNumber': json['account_number'],
        'percentageCharge': json['percentage_charge'],
        'description': !exists(json, 'description') ? undefined : json['description'],
        'primaryContactEmail': !exists(json, 'primary_contact_email') ? undefined : json['primary_contact_email'],
        'primaryContactName': !exists(json, 'primary_contact_name') ? undefined : json['primary_contact_name'],
        'primaryContactPhone': !exists(json, 'primary_contact_phone') ? undefined : json['primary_contact_phone'],
        'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
    };
}

export function SubaccountCreateToJSON(value?: SubaccountCreate | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'business_name': value.businessName,
        'settlement_bank': value.settlementBank,
        'account_number': value.accountNumber,
        'percentage_charge': value.percentageCharge,
        'description': value.description,
        'primary_contact_email': value.primaryContactEmail,
        'primary_contact_name': value.primaryContactName,
        'primary_contact_phone': value.primaryContactPhone,
        'metadata': value.metadata,
    };
}


