/* 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';
import type { Company } from './Company';
import {
CompanyFromJSON,
CompanyFromJSONTyped,
CompanyToJSON,
} from './Company';
/**
*
* @export
* @interface RegisterLegalAccountInput
*/
export interface RegisterLegalAccountInput {
/**
*
* @type {Company}
* @memberof RegisterLegalAccountInput
*/
company: Company;
/**
* Indicates if the legal representative is also an Ultimate Beneficial owner (ie shareholder with >25% of capital or voting rights).
* @type {boolean}
* @memberof RegisterLegalAccountInput
*/
isUltimateBeneficialOwner?: boolean;
/**
* 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 RegisterLegalAccountInput
*/
accountId: string;
/**
* Unique Email
* @type {string}
* @memberof RegisterLegalAccountInput
*/
email: string;
/**
* Client title
* @type {string}
* @memberof RegisterLegalAccountInput
*/
title?: string;
/**
* Client first name
* @type {string}
* @memberof RegisterLegalAccountInput
*/
firstName: string;
/**
* Client last name
* @type {string}
* @memberof RegisterLegalAccountInput
*/
lastName: string;
/**
*
* @type {Address}
* @memberof RegisterLegalAccountInput
*/
adresse?: Address;
/**
*
* @type {Birth}
* @memberof RegisterLegalAccountInput
*/
birth?: Birth;
/**
* Client nationality, using ISO 3166-1 alpha-3 format
* Please separate multiple nationalities with a comma
* @type {string}
* @memberof RegisterLegalAccountInput
*/
nationality: string;
/**
* Phone number with MSISDN format: international number with country code without "00" neither "+".
* @type {string}
* @memberof RegisterLegalAccountInput
*/
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 RegisterLegalAccountInput
*/
mobileNumber?: string;
/**
* For crowdfunding/loan platforms, indicates if the wallet is created for a debtor.
* @type {boolean}
* @memberof RegisterLegalAccountInput
*/
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 RegisterLegalAccountInput
*/
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 RegisterLegalAccountInput
*/
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 RegisterLegalAccountInput
*/
isTechnicalAccount?: boolean;
}
/**
* Check if a given object implements the RegisterLegalAccountInput interface.
*/
export function instanceOfRegisterLegalAccountInput(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "company" in value;
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 RegisterLegalAccountInputFromJSON(json: any): RegisterLegalAccountInput {
return RegisterLegalAccountInputFromJSONTyped(json, false);
}
export function RegisterLegalAccountInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterLegalAccountInput {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'company': CompanyFromJSON(json['company']),
'isUltimateBeneficialOwner': !exists(json, 'isUltimateBeneficialOwner') ? undefined : json['isUltimateBeneficialOwner'],
'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'],
};
}
export function RegisterLegalAccountInputToJSON(value?: RegisterLegalAccountInput | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'company': CompanyToJSON(value.company),
'isUltimateBeneficialOwner': value.isUltimateBeneficialOwner,
'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,
};
}