/* 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 MoneyInSubscriptionInitInput */ export interface MoneyInSubscriptionInitInput { /** * Subscription ID * @type {string} * @memberof MoneyInSubscriptionInitInput */ subscriptionId: string; /** * Number of operations to be performed on this subscription * @type {number} * @memberof MoneyInSubscriptionInitInput */ count: number; /** * Payment Account ID to Credit * @type {string} * @memberof MoneyInSubscriptionInitInput */ accountId: string; /** * Amount to Debit * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInSubscriptionInitInput */ totalAmount?: number; /** * Your Fee * Amounts are given as integer numbers in cents * @type {number} * @memberof MoneyInSubscriptionInitInput */ commissionAmount?: number; /** * Comment Regarding the Transaction * @type {string} * @memberof MoneyInSubscriptionInitInput */ 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 MoneyInSubscriptionInitInput */ autoCommission?: boolean; } /** * Check if a given object implements the MoneyInSubscriptionInitInput interface. */ export function instanceOfMoneyInSubscriptionInitInput(value: object): boolean { let isInstance = true; isInstance = isInstance && "subscriptionId" in value; isInstance = isInstance && "count" in value; isInstance = isInstance && "accountId" in value; return isInstance; } export function MoneyInSubscriptionInitInputFromJSON(json: any): MoneyInSubscriptionInitInput { return MoneyInSubscriptionInitInputFromJSONTyped(json, false); } export function MoneyInSubscriptionInitInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyInSubscriptionInitInput { if ((json === undefined) || (json === null)) { return json; } return { 'subscriptionId': json['subscriptionId'], 'count': json['Count'], '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 MoneyInSubscriptionInitInputToJSON(value?: MoneyInSubscriptionInitInput | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'subscriptionId': value.subscriptionId, 'Count': value.count, 'accountId': value.accountId, 'totalAmount': value.totalAmount, 'commissionAmount': value.commissionAmount, 'comment': value.comment, 'autoCommission': value.autoCommission, }; }