@getopenpay/client
Version:
OpenPay API TypeScript SDK
77 lines (76 loc) • 3.05 kB
JavaScript
;
/* 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.instanceOfTaxIntegrationExternal = instanceOfTaxIntegrationExternal;
exports.TaxIntegrationExternalFromJSON = TaxIntegrationExternalFromJSON;
exports.TaxIntegrationExternalFromJSONTyped = TaxIntegrationExternalFromJSONTyped;
exports.TaxIntegrationExternalToJSON = TaxIntegrationExternalToJSON;
exports.TaxIntegrationExternalToJSONTyped = TaxIntegrationExternalToJSONTyped;
const ObjectName_1 = require("./ObjectName");
const TaxIntegrationApiName_1 = require("./TaxIntegrationApiName");
/**
* Check if a given object implements the TaxIntegrationExternal interface.
*/
function instanceOfTaxIntegrationExternal(value) {
if (!('accountingTz' in value) || value['accountingTz'] === undefined)
return false;
if (!('apiKeys' in value) || value['apiKeys'] === undefined)
return false;
if (!('apiName' in value) || value['apiName'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
return false;
return true;
}
function TaxIntegrationExternalFromJSON(json) {
return TaxIntegrationExternalFromJSONTyped(json, false);
}
function TaxIntegrationExternalFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'accountingTz': json['accounting_tz'],
'apiKeys': json['api_keys'],
'apiName': (0, TaxIntegrationApiName_1.TaxIntegrationApiNameFromJSON)(json['api_name']),
'createdAt': (new Date(json['created_at'])),
'id': json['id'],
'isDeleted': json['is_deleted'] == null ? undefined : json['is_deleted'],
'object': json['object'] == null ? undefined : (0, ObjectName_1.ObjectNameFromJSON)(json['object']),
'updatedAt': (new Date(json['updated_at'])),
};
}
function TaxIntegrationExternalToJSON(json) {
return TaxIntegrationExternalToJSONTyped(json, false);
}
function TaxIntegrationExternalToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'accounting_tz': value['accountingTz'],
'api_keys': value['apiKeys'],
'api_name': (0, TaxIntegrationApiName_1.TaxIntegrationApiNameToJSON)(value['apiName']),
'created_at': ((value['createdAt']).toISOString()),
'id': value['id'],
'is_deleted': value['isDeleted'],
'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']),
'updated_at': ((value['updatedAt']).toISOString()),
};
}