@apideck/node
Version:
Apideck Node.js SDK
100 lines (94 loc) • 2.31 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.13.0
* Contact: support@apideck.com
*
* 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 } from '../runtime'
import {
ProfitAndLossType,
ProfitAndLossTypeFromJSON,
ProfitAndLossTypeToJSON
} from './ProfitAndLossType'
/**
*
* @export
* @interface ProfitAndLossRecord
*/
export interface ProfitAndLossRecord {
/**
* The total amount of the transaction or record
* @type {number}
* @memberof ProfitAndLossRecord
*/
total: number | null
/**
* A unique identifier for an object.
* @type {string}
* @memberof ProfitAndLossRecord
*/
readonly id?: string
/**
* The account code of the account
* @type {string}
* @memberof ProfitAndLossRecord
*/
readonly code?: string
/**
* The name of the account.
* @type {string}
* @memberof ProfitAndLossRecord
*/
readonly title?: string
/**
*
* @type {ProfitAndLossType}
* @memberof ProfitAndLossRecord
*/
type?: ProfitAndLossType | null
/**
*
* @type {number}
* @memberof ProfitAndLossRecord
*/
value?: number
}
export function ProfitAndLossRecordFromJSON(json: any): ProfitAndLossRecord {
return ProfitAndLossRecordFromJSONTyped(json, false)
}
export function ProfitAndLossRecordFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ProfitAndLossRecord {
if (json === undefined || json === null) {
return json
}
return {
total: json['total'],
id: !exists(json, 'id') ? undefined : json['id'],
code: !exists(json, 'code') ? undefined : json['code'],
title: !exists(json, 'title') ? undefined : json['title'],
type: !exists(json, 'type') ? undefined : ProfitAndLossTypeFromJSON(json['type']),
value: !exists(json, 'value') ? undefined : json['value']
}
}
export function ProfitAndLossRecordToJSON(value?: ProfitAndLossRecord | null): any {
if (value === undefined) {
return undefined
}
if (value === null) {
return null
}
return {
total: value.total,
type: ProfitAndLossTypeToJSON(value.type),
value: value.value
}
}