/* 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 { Card } from './Card'; import { CardFromJSON, CardFromJSONTyped, CardToJSON, } from './Card'; import type { LemonWayCommission } from './LemonWayCommission'; import { LemonWayCommissionFromJSON, LemonWayCommissionFromJSONTyped, LemonWayCommissionToJSON, } from './LemonWayCommission'; import type { PSP } from './PSP'; import { PSPFromJSON, PSPFromJSONTyped, PSPToJSON, } from './PSP'; import type { ThreeDS } from './ThreeDS'; import { ThreeDSFromJSON, ThreeDSFromJSONTyped, ThreeDSToJSON, } from './ThreeDS'; /** * * @export * @interface TransactionIn */ export interface TransactionIn { /** * Credited account * @type {string} * @memberof TransactionIn */ receiverAccountId?: string; /** * Credited amount * Amounts represented as an integer in cents (euro) * @type {number} * @memberof TransactionIn */ creditAmount?: number; /** * * @type {string} * @memberof TransactionIn */ scheduledDate?: string; /** * * @type {string} * @memberof TransactionIn */ scheduledNumber?: string; /** * * @type {string} * @memberof TransactionIn */ maskedLabel?: string; /** * * @type {PSP} * @memberof TransactionIn */ pSP?: PSP; /** * * @type {Card} * @memberof TransactionIn */ card?: Card; /** * * @type {string} * @memberof TransactionIn */ bankStatus?: string; /** * * @type {number} * @memberof TransactionIn */ refundAmount?: number; /** * Bank reference * @type {string} * @memberof TransactionIn */ bankReference?: string; /** * A specified sending address for the cheque * @type {string} * @memberof TransactionIn */ chequeSendingAddressCorporateName?: string; /** * Cheque sending address street name * @type {string} * @memberof TransactionIn */ chequeSendingAddressStreet?: string; /** * Cheque sending address city name * @type {string} * @memberof TransactionIn */ chequeSendingAddressCity?: string; /** * Cheque sending address post code * @type {string} * @memberof TransactionIn */ chequeSendingAddressPostCode?: string; /** * * @type {ThreeDS} * @memberof TransactionIn */ ThreeDS?: ThreeDS; /** * Transaction ID * @type {number} * @memberof TransactionIn */ id?: number; /** * Payment Method * 0 Card * 1 Bank transfert (Money-In) * 3 Bank transfert (Money-Out) * 4 P2P * 13 IDEAL * 14 DirectDebit * 15 CHEQUE * 16 Neosurf * 17 SoFort * 18 PFS Physical Card * 19 Multibanco * 20 Payshop * 21 MB WAY * 22 Polish Instant Transfer * 23 PAGARE * 24 MobilePay * 25 PayTrail * 26 WeChat (via PayTend) * 27 P24 * 28 MoneyIn by TPE * 29 Trustly * @type {number} * @memberof TransactionIn */ method?: number; /** * Payment Method Details * 0 Standard * 1 Pay By Bank
0 = STANDARD.
1 = PAY_BY_BANK.
* @type {number} * @memberof TransactionIn */ methodDetails?: TransactionInMethodDetailsEnum; /** * Transaction initialization date, UTC Unix timestamp * @type {number} * @memberof TransactionIn */ date?: number; /** * Your fee * Amounts are given as integer numbers in cents * @type {number} * @memberof TransactionIn */ commissionAmount?: number; /** * Comment * @type {string} * @memberof TransactionIn */ comment?: string; /** * Money-In and Money-Out * * P2P * * @type {number} * @memberof TransactionIn */ status?: number; /** * Transaction execution date * @type {number} * @memberof TransactionIn */ executionDate?: number; /** * * @type {LemonWayCommission} * @memberof TransactionIn */ lemonWayCommission?: LemonWayCommission; /** * Unique ID generated by your server * @type {string} * @memberof TransactionIn */ reference?: string; } /** * @export */ export const TransactionInMethodDetailsEnum = { NUMBER_0: 0, NUMBER_1: 1 } as const; export type TransactionInMethodDetailsEnum = typeof TransactionInMethodDetailsEnum[keyof typeof TransactionInMethodDetailsEnum]; /** * Check if a given object implements the TransactionIn interface. */ export function instanceOfTransactionIn(value: object): boolean { let isInstance = true; return isInstance; } export function TransactionInFromJSON(json: any): TransactionIn { return TransactionInFromJSONTyped(json, false); } export function TransactionInFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionIn { if ((json === undefined) || (json === null)) { return json; } return { 'receiverAccountId': !exists(json, 'receiverAccountId') ? undefined : json['receiverAccountId'], 'creditAmount': !exists(json, 'creditAmount') ? undefined : json['creditAmount'], 'scheduledDate': !exists(json, 'scheduledDate') ? undefined : json['scheduledDate'], 'scheduledNumber': !exists(json, 'scheduledNumber') ? undefined : json['scheduledNumber'], 'maskedLabel': !exists(json, 'maskedLabel') ? undefined : json['maskedLabel'], 'pSP': !exists(json, 'PSP') ? undefined : PSPFromJSON(json['PSP']), 'card': !exists(json, 'card') ? undefined : CardFromJSON(json['card']), 'bankStatus': !exists(json, 'bankStatus') ? undefined : json['bankStatus'], 'refundAmount': !exists(json, 'refundAmount') ? undefined : json['refundAmount'], 'bankReference': !exists(json, 'bankReference') ? undefined : json['bankReference'], 'chequeSendingAddressCorporateName': !exists(json, 'ChequeSendingAddress_CorporateName') ? undefined : json['ChequeSendingAddress_CorporateName'], 'chequeSendingAddressStreet': !exists(json, 'ChequeSendingAddress_Street') ? undefined : json['ChequeSendingAddress_Street'], 'chequeSendingAddressCity': !exists(json, 'ChequeSendingAddress_City') ? undefined : json['ChequeSendingAddress_City'], 'chequeSendingAddressPostCode': !exists(json, 'ChequeSendingAddress_PostCode') ? undefined : json['ChequeSendingAddress_PostCode'], 'ThreeDS': !exists(json, 'ThreeDS') ? undefined : ThreeDSFromJSON(json['ThreeDS']), 'id': !exists(json, 'id') ? undefined : json['id'], 'method': !exists(json, 'method') ? undefined : json['method'], 'methodDetails': !exists(json, 'methodDetails') ? undefined : json['methodDetails'], 'date': !exists(json, 'date') ? undefined : json['date'], 'commissionAmount': !exists(json, 'commissionAmount') ? undefined : json['commissionAmount'], 'comment': !exists(json, 'comment') ? undefined : json['comment'], 'status': !exists(json, 'status') ? undefined : json['status'], 'executionDate': !exists(json, 'executionDate') ? undefined : json['executionDate'], 'lemonWayCommission': !exists(json, 'lemonWayCommission') ? undefined : LemonWayCommissionFromJSON(json['lemonWayCommission']), 'reference': !exists(json, 'reference') ? undefined : json['reference'], }; } export function TransactionInToJSON(value?: TransactionIn | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'receiverAccountId': value.receiverAccountId, 'creditAmount': value.creditAmount, 'scheduledDate': value.scheduledDate, 'scheduledNumber': value.scheduledNumber, 'maskedLabel': value.maskedLabel, 'PSP': PSPToJSON(value.pSP), 'card': CardToJSON(value.card), 'bankStatus': value.bankStatus, 'refundAmount': value.refundAmount, 'bankReference': value.bankReference, 'ChequeSendingAddress_CorporateName': value.chequeSendingAddressCorporateName, 'ChequeSendingAddress_Street': value.chequeSendingAddressStreet, 'ChequeSendingAddress_City': value.chequeSendingAddressCity, 'ChequeSendingAddress_PostCode': value.chequeSendingAddressPostCode, 'ThreeDS': ThreeDSToJSON(value.ThreeDS), 'id': value.id, 'method': value.method, 'methodDetails': value.methodDetails, 'date': value.date, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'status': value.status, 'executionDate': value.executionDate, 'lemonWayCommission': LemonWayCommissionToJSON(value.lemonWayCommission), 'reference': value.reference, }; }