UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

59 lines (58 loc) 1.85 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * OpenPay API * super charge your subscription management. * * The version of the OpenAPI document: 1.2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfInvoiceComment = instanceOfInvoiceComment; exports.InvoiceCommentFromJSON = InvoiceCommentFromJSON; exports.InvoiceCommentFromJSONTyped = InvoiceCommentFromJSONTyped; exports.InvoiceCommentToJSON = InvoiceCommentToJSON; exports.InvoiceCommentToJSONTyped = InvoiceCommentToJSONTyped; /** * Check if a given object implements the InvoiceComment interface. */ function instanceOfInvoiceComment(value) { if (!('comment' in value) || value['comment'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('userEmail' in value) || value['userEmail'] === undefined) return false; return true; } function InvoiceCommentFromJSON(json) { return InvoiceCommentFromJSONTyped(json, false); } function InvoiceCommentFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'comment': json['comment'], 'createdAt': (new Date(json['created_at'])), 'userEmail': json['user_email'], }; } function InvoiceCommentToJSON(json) { return InvoiceCommentToJSONTyped(json, false); } function InvoiceCommentToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'comment': value['comment'], 'created_at': ((value['createdAt']).toISOString()), 'user_email': value['userEmail'], }; }