/* 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'; /** * * @export * @interface MoneyInInput */ export interface MoneyInInput { /** * * @type {CardInfo} * @memberof MoneyInInput */ card: CardInfo; /** * **Mercanet Only** * Indicates if the request is delayed and will require validation. * 1. If true, payment will only be pre-authorized, you will have to call MoneyInValidate within 6 days or [delayedDays] in order to request the card debit. * 2. If empty, the default behavior is no delay and no validation necessary (unless stated otherwise in your contract). * 3. If false, the card will be debited without delay and without validation necessary. * @type {boolean} * @memberof MoneyInInput */ isPreAuth?: boolean; /** * **Mercanet Only** * If isPreAuth is not true, this will be ignored. * Please use with caution, if delayedDays > 6, it is possible that the payment will be denied when you try to validate it, because a new authorization will be made. * @type {number} * @memberof MoneyInInput */ delayedDays?: number; /** * Leave Empty * @type {string} * @memberof MoneyInInput */ specialConfig?: 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 MoneyInInput */ reference?: string; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyInInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyInInput */ 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 MoneyInInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyInInput interface. */ export function instanceOfMoneyInInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "card" in value; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyInInputFromJSON(json: any): MoneyInInput { return MoneyInInputFromJSONTyped(json, false); } export function MoneyInInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInInput { if ((json === undefined) || (json === null)) { return json; } return { 'card': CardInfoFromJSON(json['card']), 'isPreAuth': !exists(json, 'isPreAuth') ? undefined : json['isPreAuth'], 'delayedDays': !exists(json, 'delayedDays') ? undefined : json['delayedDays'], 'specialConfig': !exists(json, 'specialConfig') ? undefined : json['specialConfig'], '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 MoneyInInputToJSON(value?: MoneyInInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'card': CardInfoToJSON(value.card), 'isPreAuth': value.isPreAuth, 'delayedDays': value.delayedDays, 'specialConfig': value.specialConfig, 'reference': value.reference, 'accountId': value.accountId, 'totalAmount': value.totalAmount, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'autoCommission': value.autoCommission, }; }