/* tslint:disable */ /* eslint-disable */ /** * Hathora Cloud API * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. * * The version of the OpenAPI document: 0.0.1 * * * 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 { InvoiceStatus } from './InvoiceStatus'; import { InvoiceStatusFromJSON, InvoiceStatusFromJSONTyped, InvoiceStatusToJSON, } from './InvoiceStatus'; /** * * @export * @interface Invoice */ export interface Invoice { /** * * @type {InvoiceStatus} * @memberof Invoice */ status: InvoiceStatus; /** * * @type {number} * @memberof Invoice */ amountDue: number; /** * * @type {string} * @memberof Invoice */ pdfUrl: string; /** * * @type {Date} * @memberof Invoice */ dueDate: Date; /** * * @type {number} * @memberof Invoice */ year: number; /** * * @type {number} * @memberof Invoice */ month: number; /** * * @type {string} * @memberof Invoice */ id: string; } /** * Check if a given object implements the Invoice interface. */ export function instanceOfInvoice(value: object): boolean { let isInstance = true; isInstance = isInstance && "status" in value; isInstance = isInstance && "amountDue" in value; isInstance = isInstance && "pdfUrl" in value; isInstance = isInstance && "dueDate" in value; isInstance = isInstance && "year" in value; isInstance = isInstance && "month" in value; isInstance = isInstance && "id" in value; return isInstance; } export function InvoiceFromJSON(json: any): Invoice { return InvoiceFromJSONTyped(json, false); } export function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Invoice { if ((json === undefined) || (json === null)) { return json; } return { 'status': InvoiceStatusFromJSON(json['status']), 'amountDue': json['amountDue'], 'pdfUrl': json['pdfUrl'], 'dueDate': (new Date(json['dueDate'])), 'year': json['year'], 'month': json['month'], 'id': json['id'], }; } export function InvoiceToJSON(value?: Invoice | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'status': InvoiceStatusToJSON(value.status), 'amountDue': value.amountDue, 'pdfUrl': value.pdfUrl, 'dueDate': (value.dueDate.toISOString()), 'year': value.year, 'month': value.month, 'id': value.id, }; }