/* 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'; /** * * @export * @interface MoneyInTransferInitInput */ export interface MoneyInTransferInitInput { /** * returnUrl in case of success * @type {string} * @memberof MoneyInTransferInitInput */ returnUrl: string; /** * cancelUrl in case of cancellation * @type {string} * @memberof MoneyInTransferInitInput */ cancelUrl: string; /** * errorUrl in case of error * @type {string} * @memberof MoneyInTransferInitInput */ errorUrl: string; /** * The country code associated with the payment bank. ISO Alpha-2 codes accepted: (FR) France, (ES) - Spain,(IT) Italy, (DE)- Germany, (GB) - United Kingdom, (PT) Portugal and (SE) Sweden * @type {string} * @memberof MoneyInTransferInitInput */ countryCode?: string; /** * If you use the bankId in the call, the end-user will be redirected to their bank. They will not have to select a bank from a list provided. To get a comprehensive list of bankIds call the GET v2/moneyins/paybybank/transfer/banks method specifying the ISO Alpha-2 Country Code for example FR for France. * @type {string} * @memberof MoneyInTransferInitInput */ bankId?: string; /** * Unique ID of the call, generated by your server. This ID can be used as a search field when looking for operation details * @type {string} * @memberof MoneyInTransferInitInput */ reference?: string; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyInTransferInitInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInTransferInitInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInTransferInitInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyInTransferInitInput */ comment?: string; /** * If true: * 1. [amountCom] will be ignored and will be replaced with Lemonway's fee * 2. You will not receive any fee * @type {boolean} * @memberof MoneyInTransferInitInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyInTransferInitInput interface. */ export function instanceOfMoneyInTransferInitInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "returnUrl" in value; isInstance = isInstance && "cancelUrl" in value; isInstance = isInstance && "errorUrl" in value; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyInTransferInitInputFromJSON(json: any): MoneyInTransferInitInput { return MoneyInTransferInitInputFromJSONTyped(json, false); } export function MoneyInTransferInitInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInTransferInitInput { if ((json === undefined) || (json === null)) { return json; } return { 'returnUrl': json['returnUrl'], 'cancelUrl': json['cancelUrl'], 'errorUrl': json['errorUrl'], 'countryCode': !exists(json, 'countryCode') ? undefined : json['countryCode'], 'bankId': !exists(json, 'bankId') ? undefined : json['bankId'], 'reference': !exists(json, 'reference') ? undefined : json['reference'], 'accountId': json['accountId'], 'totalAmount': !exists(json, 'totalAmount') ? undefined : json['totalAmount'], 'commissionAmount': !exists(json, 'commissionAmount') ? undefined : json['commissionAmount'], 'comment': !exists(json, 'comment') ? undefined : json['comment'], 'autoCommission': !exists(json, 'autoCommission') ? undefined : json['autoCommission'], }; } export function MoneyInTransferInitInputToJSON(value?: MoneyInTransferInitInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'returnUrl': value.returnUrl, 'cancelUrl': value.cancelUrl, 'errorUrl': value.errorUrl, 'countryCode': value.countryCode, 'bankId': value.bankId, 'reference': value.reference, 'accountId': value.accountId, 'totalAmount': value.totalAmount, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'autoCommission': value.autoCommission, }; }