UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

112 lines (111 loc) 4.75 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.instanceOfDataImportBatchExternal = instanceOfDataImportBatchExternal; exports.DataImportBatchExternalFromJSON = DataImportBatchExternalFromJSON; exports.DataImportBatchExternalFromJSONTyped = DataImportBatchExternalFromJSONTyped; exports.DataImportBatchExternalToJSON = DataImportBatchExternalToJSON; exports.DataImportBatchExternalToJSONTyped = DataImportBatchExternalToJSONTyped; const ObjectName_1 = require("./ObjectName"); /** * Check if a given object implements the DataImportBatchExternal interface. */ function instanceOfDataImportBatchExternal(value) { if (!('accountId' in value) || value['accountId'] === undefined) return false; if (!('completedAt' in value) || value['completedAt'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('createdByUserId' in value) || value['createdByUserId'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('errorSummary' in value) || value['errorSummary'] === undefined) return false; if (!('failedRows' in value) || value['failedRows'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('processedRows' in value) || value['processedRows'] === undefined) return false; if (!('startedAt' in value) || value['startedAt'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('successfulRows' in value) || value['successfulRows'] === undefined) return false; if (!('totalRows' in value) || value['totalRows'] === undefined) return false; if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false; return true; } function DataImportBatchExternalFromJSON(json) { return DataImportBatchExternalFromJSONTyped(json, false); } function DataImportBatchExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'accountId': json['account_id'], 'completedAt': (json['completed_at'] == null ? null : new Date(json['completed_at'])), 'createdAt': (new Date(json['created_at'])), 'createdByUserId': json['created_by_user_id'], 'description': json['description'], 'errorSummary': json['error_summary'], 'failedRows': json['failed_rows'], 'id': json['id'], 'isDeleted': json['is_deleted'] == null ? undefined : json['is_deleted'], 'name': json['name'], 'object': json['object'] == null ? undefined : (0, ObjectName_1.ObjectNameFromJSON)(json['object']), 'processedRows': json['processed_rows'], 'startedAt': (json['started_at'] == null ? null : new Date(json['started_at'])), 'status': json['status'], 'successfulRows': json['successful_rows'], 'totalRows': json['total_rows'], 'updatedAt': (new Date(json['updated_at'])), }; } function DataImportBatchExternalToJSON(json) { return DataImportBatchExternalToJSONTyped(json, false); } function DataImportBatchExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'account_id': value['accountId'], 'completed_at': (value['completedAt'] == null ? null : value['completedAt'].toISOString()), 'created_at': ((value['createdAt']).toISOString()), 'created_by_user_id': value['createdByUserId'], 'description': value['description'], 'error_summary': value['errorSummary'], 'failed_rows': value['failedRows'], 'id': value['id'], 'is_deleted': value['isDeleted'], 'name': value['name'], 'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']), 'processed_rows': value['processedRows'], 'started_at': (value['startedAt'] == null ? null : value['startedAt'].toISOString()), 'status': value['status'], 'successful_rows': value['successfulRows'], 'total_rows': value['totalRows'], 'updated_at': ((value['updatedAt']).toISOString()), }; }