/* 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 MoneyInWithCardIdInput */ export interface MoneyInWithCardIdInput { /** * Indicates if the request is delayed and will require validation. * 1. If empty, the default behavior is no delay and no validation necessary (unless stated otherwise in your contract). * 2. If true, the payment is pre-authorized. You will have to call MoneyInValidate within delayDays time lapse (From J to J+delayDays). * 3. If false, debit is immediately effective * Only available for Transactpro, Mercanet V2 and Payzen * @type {boolean} * @memberof MoneyInWithCardIdInput */ isPreAuth?: boolean; /** * Indicate the number of days of the deferred payment. Between 0 and 6 days to have a guaranteed payment. * Only usable with isPreAuth = 1 * Only available for Transactpro, Mercanet v2, Payzen, Monetico. * @type {number} * @memberof MoneyInWithCardIdInput */ delayedDays?: number; /** * Leave empty * @type {string} * @memberof MoneyInWithCardIdInput */ 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 MoneyInWithCardIdInput */ reference?: string; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyInWithCardIdInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInWithCardIdInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInWithCardIdInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyInWithCardIdInput */ 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 MoneyInWithCardIdInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyInWithCardIdInput interface. */ export function instanceOfMoneyInWithCardIdInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyInWithCardIdInputFromJSON(json: any): MoneyInWithCardIdInput { return MoneyInWithCardIdInputFromJSONTyped(json, false); } export function MoneyInWithCardIdInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInWithCardIdInput { if ((json === undefined) || (json === null)) { return json; } return { '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 MoneyInWithCardIdInputToJSON(value?: MoneyInWithCardIdInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { '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, }; }