/* 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 { CardInfo } from './CardInfo'; import { CardInfoFromJSON, CardInfoFromJSONTyped, CardInfoToJSON, } from './CardInfo'; import type { RiskAnalysis } from './RiskAnalysis'; import { RiskAnalysisFromJSON, RiskAnalysisFromJSONTyped, RiskAnalysisToJSON, } from './RiskAnalysis'; import type { ThreeDS } from './ThreeDS'; import { ThreeDSFromJSON, ThreeDSFromJSONTyped, ThreeDSToJSON, } from './ThreeDS'; /** * * @export * @interface MoneyIn3DInitInput */ export interface MoneyIn3DInitInput { /** * * @type {CardInfo} * @memberof MoneyIn3DInitInput */ card?: CardInfo; /** * Return URL of the 3-D Secure website. Your client will be redirected on this URL, which should be your website URL. * @type {string} * @memberof MoneyIn3DInitInput */ returnUrl?: string; /** * * @type {number} * @memberof MoneyIn3DInitInput */ cardId?: number; /** * * @type {boolean} * @memberof MoneyIn3DInitInput */ registerCard?: boolean; /** * * @type {ThreeDS} * @memberof MoneyIn3DInitInput */ threeDS?: ThreeDS; /** * * @type {RiskAnalysis} * @memberof MoneyIn3DInitInput */ riskAnalysis?: RiskAnalysis; /** * Average amount of future recurring payments to cover recurring payments with variable amounts. **Note:** Only if the amount is higher than the amount of the first transaction. cover recurring payments with variable amounts. **Note:** Only if the amount is higher than the amount of the first transaction. * @type {number} * @memberof MoneyIn3DInitInput */ recurringAvgAmount?: number; /** * **Recurring**: If a payment follows a recurring amount or **One_shot**: when there is no future recurring payments. * @type {string} * @memberof MoneyIn3DInitInput */ paymentPattern?: 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 MoneyIn3DInitInput */ reference?: string; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyIn3DInitInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyIn3DInitInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyIn3DInitInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyIn3DInitInput */ 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 MoneyIn3DInitInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyIn3DInitInput interface. */ export function instanceOfMoneyIn3DInitInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyIn3DInitInputFromJSON(json: any): MoneyIn3DInitInput { return MoneyIn3DInitInputFromJSONTyped(json, false); } export function MoneyIn3DInitInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyIn3DInitInput { if ((json === undefined) || (json === null)) { return json; } return { 'card': !exists(json, 'card') ? undefined : CardInfoFromJSON(json['card']), 'returnUrl': !exists(json, 'returnUrl') ? undefined : json['returnUrl'], 'cardId': !exists(json, 'cardId') ? undefined : json['cardId'], 'registerCard': !exists(json, 'registerCard') ? undefined : json['registerCard'], 'threeDS': !exists(json, 'threeDS') ? undefined : ThreeDSFromJSON(json['threeDS']), 'riskAnalysis': !exists(json, 'riskAnalysis') ? undefined : RiskAnalysisFromJSON(json['riskAnalysis']), 'recurringAvgAmount': !exists(json, 'recurringAvgAmount') ? undefined : json['recurringAvgAmount'], 'paymentPattern': !exists(json, 'paymentPattern') ? undefined : json['paymentPattern'], '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 MoneyIn3DInitInputToJSON(value?: MoneyIn3DInitInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'card': CardInfoToJSON(value.card), 'returnUrl': value.returnUrl, 'cardId': value.cardId, 'registerCard': value.registerCard, 'threeDS': ThreeDSToJSON(value.threeDS), 'riskAnalysis': RiskAnalysisToJSON(value.riskAnalysis), 'recurringAvgAmount': value.recurringAvgAmount, 'paymentPattern': value.paymentPattern, 'reference': value.reference, 'accountId': value.accountId, 'totalAmount': value.totalAmount, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'autoCommission': value.autoCommission, }; }