UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

101 lines (100 loc) 3.92 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.instanceOfValidationStats = instanceOfValidationStats; exports.ValidationStatsFromJSON = ValidationStatsFromJSON; exports.ValidationStatsFromJSONTyped = ValidationStatsFromJSONTyped; exports.ValidationStatsToJSON = ValidationStatsToJSON; exports.ValidationStatsToJSONTyped = ValidationStatsToJSONTyped; /** * Check if a given object implements the ValidationStats interface. */ function instanceOfValidationStats(value) { if (!('coupons' in value) || value['coupons'] === undefined) return false; if (!('customers' in value) || value['customers'] === undefined) return false; if (!('discounts' in value) || value['discounts'] === undefined) return false; if (!('failedRows' in value) || value['failedRows'] === undefined) return false; if (!('invoiceItems' in value) || value['invoiceItems'] === undefined) return false; if (!('invoices' in value) || value['invoices'] === undefined) return false; if (!('prices' in value) || value['prices'] === undefined) return false; if (!('processedRows' in value) || value['processedRows'] === undefined) return false; if (!('products' in value) || value['products'] === undefined) return false; if (!('promotionCodes' in value) || value['promotionCodes'] === undefined) return false; if (!('subscriptionItems' in value) || value['subscriptionItems'] === undefined) return false; if (!('subscriptions' in value) || value['subscriptions'] === undefined) return false; if (!('validationErrors' in value) || value['validationErrors'] === undefined) return false; return true; } function ValidationStatsFromJSON(json) { return ValidationStatsFromJSONTyped(json, false); } function ValidationStatsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'coupons': json['coupons'], 'customers': json['customers'], 'discounts': json['discounts'], 'failedRows': json['failed_rows'], 'invoiceItems': json['invoice_items'], 'invoices': json['invoices'], 'prices': json['prices'], 'processedRows': json['processed_rows'], 'products': json['products'], 'promotionCodes': json['promotion_codes'], 'subscriptionItems': json['subscription_items'], 'subscriptions': json['subscriptions'], 'validationErrorDetails': json['validation_error_details'] == null ? undefined : json['validation_error_details'], 'validationErrors': json['validation_errors'], }; } function ValidationStatsToJSON(json) { return ValidationStatsToJSONTyped(json, false); } function ValidationStatsToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'coupons': value['coupons'], 'customers': value['customers'], 'discounts': value['discounts'], 'failed_rows': value['failedRows'], 'invoice_items': value['invoiceItems'], 'invoices': value['invoices'], 'prices': value['prices'], 'processed_rows': value['processedRows'], 'products': value['products'], 'promotion_codes': value['promotionCodes'], 'subscription_items': value['subscriptionItems'], 'subscriptions': value['subscriptions'], 'validation_error_details': value['validationErrorDetails'], 'validation_errors': value['validationErrors'], }; }