/* tslint:disable */
/* eslint-disable */
/**
* Lemonway DirectKit API 2.0
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v2
*
*
* 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';
import type { Address } from './Address';
import {
AddressFromJSON,
AddressFromJSONTyped,
AddressToJSON,
} from './Address';
import type { Birth } from './Birth';
import {
BirthFromJSON,
BirthFromJSONTyped,
BirthToJSON,
} from './Birth';
/**
*
* @export
* @interface RegisterIndividualAccountInput
*/
export interface RegisterIndividualAccountInput {
/**
* Payment account ID that you use to identify the customer.Choose your unique number.
Note: If you plan to credit payments accounts by fund transfer, please use short alphanumeric payment account identifiers (max 20 char.).
* Your customers will have to write their payment account identifier in the transfer label/comment, a label of more that 20 characters could be cut when passing the the banking system.
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
accountId: string;
/**
* Unique Email
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
email: string;
/**
* Client title
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
title?: string;
/**
* Client first name
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
firstName: string;
/**
* Client last name
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
lastName: string;
/**
*
* @type {Address}
* @memberof RegisterIndividualAccountInput
*/
adresse?: Address;
/**
*
* @type {Birth}
* @memberof RegisterIndividualAccountInput
*/
birth?: Birth;
/**
* Client nationality, using ISO 3166-1 alpha-3 format
* Please separate multiple nationalities with a comma
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
nationality: string;
/**
* Phone number with MSISDN format: international number with country code without "00" neither "+".
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
phoneNumber?: string;
/**
* Mobile phone number with MSISDN format: international number with country code without "00" neither "+".
* This will be used by default when eletronically signing documents.
* @type {string}
* @memberof RegisterIndividualAccountInput
*/
mobileNumber?: string;
/**
* For crowdfunding/loan platforms, indicates if the wallet is created for a debtor.
* @type {boolean}
* @memberof RegisterIndividualAccountInput
*/
isDebtor?: boolean;
/**
* Indicates if the payment account is created for a payer or a beneficiary:
* 1. Empty: unknown status (default)
* 2. 1: Payer
* 3. 2: Beneficiary
* @type {number}
* @memberof RegisterIndividualAccountInput
*/
payerOrBeneficiary: number;
/**
* Indicates if the payment account is for a one-time customer.
* If yes, the payment account will be created with status 14, allowing only one payment.
* The maximum amount will be defined with Lemonway.
* @type {boolean}
* @memberof RegisterIndividualAccountInput
*/
isOneTimeCustomerAccount?: boolean;
/**
* Note: This option is available depending on your contract
* True, in case this option is enabled in your contract.
* Otherwise it will be considered a client wallet.
* @type {boolean}
* @memberof RegisterIndividualAccountInput
*/
isTechnicalAccount?: boolean;
/**
*
* @type {boolean}
* @memberof RegisterIndividualAccountInput
*/
isUltimateBeneficialOwner?: boolean;
}
/**
* Check if a given object implements the RegisterIndividualAccountInput interface.
*/
export function instanceOfRegisterIndividualAccountInput(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "accountId" in value;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "firstName" in value;
isInstance = isInstance && "lastName" in value;
isInstance = isInstance && "nationality" in value;
isInstance = isInstance && "payerOrBeneficiary" in value;
return isInstance;
}
export function RegisterIndividualAccountInputFromJSON(json: any): RegisterIndividualAccountInput {
return RegisterIndividualAccountInputFromJSONTyped(json, false);
}
export function RegisterIndividualAccountInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterIndividualAccountInput {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'accountId': json['accountId'],
'email': json['email'],
'title': !exists(json, 'title') ? undefined : json['title'],
'firstName': json['firstName'],
'lastName': json['lastName'],
'adresse': !exists(json, 'adresse') ? undefined : AddressFromJSON(json['adresse']),
'birth': !exists(json, 'birth') ? undefined : BirthFromJSON(json['birth']),
'nationality': json['nationality'],
'phoneNumber': !exists(json, 'phoneNumber') ? undefined : json['phoneNumber'],
'mobileNumber': !exists(json, 'mobileNumber') ? undefined : json['mobileNumber'],
'isDebtor': !exists(json, 'isDebtor') ? undefined : json['isDebtor'],
'payerOrBeneficiary': json['payerOrBeneficiary'],
'isOneTimeCustomerAccount': !exists(json, 'isOneTimeCustomerAccount') ? undefined : json['isOneTimeCustomerAccount'],
'isTechnicalAccount': !exists(json, 'isTechnicalAccount') ? undefined : json['isTechnicalAccount'],
'isUltimateBeneficialOwner': !exists(json, 'isUltimateBeneficialOwner') ? undefined : json['isUltimateBeneficialOwner'],
};
}
export function RegisterIndividualAccountInputToJSON(value?: RegisterIndividualAccountInput | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'accountId': value.accountId,
'email': value.email,
'title': value.title,
'firstName': value.firstName,
'lastName': value.lastName,
'adresse': AddressToJSON(value.adresse),
'birth': BirthToJSON(value.birth),
'nationality': value.nationality,
'phoneNumber': value.phoneNumber,
'mobileNumber': value.mobileNumber,
'isDebtor': value.isDebtor,
'payerOrBeneficiary': value.payerOrBeneficiary,
'isOneTimeCustomerAccount': value.isOneTimeCustomerAccount,
'isTechnicalAccount': value.isTechnicalAccount,
'isUltimateBeneficialOwner': value.isUltimateBeneficialOwner,
};
}