/* 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 { CardInfoExtended } from './CardInfoExtended'; import { CardInfoExtendedFromJSON, CardInfoExtendedFromJSONTyped, CardInfoExtendedToJSON, } from './CardInfoExtended'; import type { TransactionInfo } from './TransactionInfo'; import { TransactionInfoFromJSON, TransactionInfoFromJSONTyped, TransactionInfoToJSON, } from './TransactionInfo'; /** * * @export * @interface MoneyInCreateInput */ export interface MoneyInCreateInput { /** * * @type {CardInfoExtended} * @memberof MoneyInCreateInput */ card: CardInfoExtended; /** * * @type {TransactionInfo} * @memberof MoneyInCreateInput */ transaction: TransactionInfo; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyInCreateInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInCreateInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInCreateInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyInCreateInput */ 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 MoneyInCreateInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyInCreateInput interface. */ export function instanceOfMoneyInCreateInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "card" in value; isInstance = isInstance && "transaction" in value; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyInCreateInputFromJSON(json: any): MoneyInCreateInput { return MoneyInCreateInputFromJSONTyped(json, false); } export function MoneyInCreateInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInCreateInput { if ((json === undefined) || (json === null)) { return json; } return { 'card': CardInfoExtendedFromJSON(json['card']), 'transaction': TransactionInfoFromJSON(json['transaction']), '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 MoneyInCreateInputToJSON(value?: MoneyInCreateInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'card': CardInfoExtendedToJSON(value.card), 'transaction': TransactionInfoToJSON(value.transaction), 'accountId': value.accountId, 'totalAmount': value.totalAmount, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'autoCommission': value.autoCommission, }; }