/* 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 { BankBranchAddress } from './BankBranchAddress';
import {
BankBranchAddressFromJSON,
BankBranchAddressFromJSONTyped,
BankBranchAddressToJSON,
} from './BankBranchAddress';
/**
*
* @export
* @interface RegisterIBANExtendedInput
*/
export interface RegisterIBANExtendedInput {
/**
* Payment Account ID
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
wallet: string;
/**
* Account Type, by default Other
0 = Other.
1 = IBAN.
2 = BBAN/RIB.
* @type {number}
* @memberof RegisterIBANExtendedInput
*/
accountType?: RegisterIBANExtendedInputAccountTypeEnum;
/**
* The registered bank account owner: First and Last name, or Company Name
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
holderName: string;
/**
* Account Number. The format depends on the account type.
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
accountNumber: string;
/**
* Country of the beneficiary. Two-letter country code (ISO alpha-2) for example, France=FR
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
holderCountry?: string;
/**
* BIC/SWIFT codes are arranged like this: AAAABBCCDDD
* AAAA: 4 character for bank code
* BB: 2 char for country code
* CC: 2 char for location code
* DDD: 3 char for branch code
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
bicCode?: string;
/**
* Bank Name. This field is mandatory in the following circumstances:
*
- If the currency is USD
- If the selected bank country code requires this field
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
bankName?: string;
/**
* Country of the Bank. Two-letter country code (ISO alpha-2) for example, France=FR
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
bankCountry: string;
/**
* Bank Branch Code (Sort Code in the United Kingdom). It is mandatory for the examples below:
* - If the selected bank country code requires this field.
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
bankBranchCode?: string;
/**
*
* @type {BankBranchAddress}
* @memberof RegisterIBANExtendedInput
*/
bankBranchAddress?: BankBranchAddress;
/**
* BIC/SWIFT Code of the Intermediary Bank.
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
intermediaryBicCode?: string;
/**
* Intermediary Bank Name
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
intermediaryBankName?: string;
/**
* Bank Country Code of the Intermediary Bank. Two-letter country code (ISO alpha-2) for example, France=FR
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
intermediaryBankCountry?: string;
/**
* Reason for New Bank Account Details if another one is already linked to the Payment Account.
* @type {string}
* @memberof RegisterIBANExtendedInput
*/
comment?: string;
}
/**
* @export
*/
export const RegisterIBANExtendedInputAccountTypeEnum = {
NUMBER_0: 0,
NUMBER_1: 1,
NUMBER_2: 2
} as const;
export type RegisterIBANExtendedInputAccountTypeEnum = typeof RegisterIBANExtendedInputAccountTypeEnum[keyof typeof RegisterIBANExtendedInputAccountTypeEnum];
/**
* Check if a given object implements the RegisterIBANExtendedInput interface.
*/
export function instanceOfRegisterIBANExtendedInput(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "wallet" in value;
isInstance = isInstance && "holderName" in value;
isInstance = isInstance && "accountNumber" in value;
isInstance = isInstance && "bankCountry" in value;
return isInstance;
}
export function RegisterIBANExtendedInputFromJSON(json: any): RegisterIBANExtendedInput {
return RegisterIBANExtendedInputFromJSONTyped(json, false);
}
export function RegisterIBANExtendedInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterIBANExtendedInput {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'wallet': json['wallet'],
'accountType': !exists(json, 'accountType') ? undefined : json['accountType'],
'holderName': json['holderName'],
'accountNumber': json['accountNumber'],
'holderCountry': !exists(json, 'holderCountry') ? undefined : json['holderCountry'],
'bicCode': !exists(json, 'bicCode') ? undefined : json['bicCode'],
'bankName': !exists(json, 'bankName') ? undefined : json['bankName'],
'bankCountry': json['bankCountry'],
'bankBranchCode': !exists(json, 'bankBranchCode') ? undefined : json['bankBranchCode'],
'bankBranchAddress': !exists(json, 'bankBranchAddress') ? undefined : BankBranchAddressFromJSON(json['bankBranchAddress']),
'intermediaryBicCode': !exists(json, 'intermediaryBicCode') ? undefined : json['intermediaryBicCode'],
'intermediaryBankName': !exists(json, 'intermediaryBankName') ? undefined : json['intermediaryBankName'],
'intermediaryBankCountry': !exists(json, 'intermediaryBankCountry') ? undefined : json['intermediaryBankCountry'],
'comment': !exists(json, 'comment') ? undefined : json['comment'],
};
}
export function RegisterIBANExtendedInputToJSON(value?: RegisterIBANExtendedInput | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'wallet': value.wallet,
'accountType': value.accountType,
'holderName': value.holderName,
'accountNumber': value.accountNumber,
'holderCountry': value.holderCountry,
'bicCode': value.bicCode,
'bankName': value.bankName,
'bankCountry': value.bankCountry,
'bankBranchCode': value.bankBranchCode,
'bankBranchAddress': BankBranchAddressToJSON(value.bankBranchAddress),
'intermediaryBicCode': value.intermediaryBicCode,
'intermediaryBankName': value.intermediaryBankName,
'intermediaryBankCountry': value.intermediaryBankCountry,
'comment': value.comment,
};
}