/* tslint:disable */ /* eslint-disable */ /** * Sonatype Guide API * REST API into [Sonatype Guide](https://guide.sonatype.com). * * The version of the OpenAPI document: 202607 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface Invoice */ export interface Invoice { /** * * @type {number} * @memberof Invoice */ amount?: number; /** * * @type {Date} * @memberof Invoice */ date?: Date; /** * * @type {string} * @memberof Invoice */ description?: string; /** * * @type {string} * @memberof Invoice */ id?: string; /** * * @type {string} * @memberof Invoice */ pdfUrl?: string; /** * * @type {string} * @memberof Invoice */ status?: string; /** * * @type {string} * @memberof Invoice */ subscriptionId?: string; /** * * @type {number} * @memberof Invoice */ totalCredits?: number; /** * * @type {number} * @memberof Invoice */ usedCredits?: number; } /** * Check if a given object implements the Invoice interface. */ export function instanceOfInvoice(value: object): value is Invoice { return true; } export function InvoiceFromJSON(json: any): Invoice { return InvoiceFromJSONTyped(json, false); } export function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Invoice { if (json == null) { return json; } return { 'amount': json['amount'] == null ? undefined : json['amount'], 'date': json['date'] == null ? undefined : (new Date(json['date'])), 'description': json['description'] == null ? undefined : json['description'], 'id': json['id'] == null ? undefined : json['id'], 'pdfUrl': json['pdfUrl'] == null ? undefined : json['pdfUrl'], 'status': json['status'] == null ? undefined : json['status'], 'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'], 'totalCredits': json['totalCredits'] == null ? undefined : json['totalCredits'], 'usedCredits': json['usedCredits'] == null ? undefined : json['usedCredits'], }; } export function InvoiceToJSON(json: any): Invoice { return InvoiceToJSONTyped(json, false); } export function InvoiceToJSONTyped(value?: Invoice | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'amount': value['amount'], 'date': value['date'] == null ? value['date'] : value['date'].toISOString().substring(0,10), 'description': value['description'], 'id': value['id'], 'pdfUrl': value['pdfUrl'], 'status': value['status'], 'subscriptionId': value['subscriptionId'], 'totalCredits': value['totalCredits'], 'usedCredits': value['usedCredits'], }; }