UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

84 lines (83 loc) 3.14 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.instanceOfPortalSessionExternal = instanceOfPortalSessionExternal; exports.PortalSessionExternalFromJSON = PortalSessionExternalFromJSON; exports.PortalSessionExternalFromJSONTyped = PortalSessionExternalFromJSONTyped; exports.PortalSessionExternalToJSON = PortalSessionExternalToJSON; exports.PortalSessionExternalToJSONTyped = PortalSessionExternalToJSONTyped; const ObjectName_1 = require("./ObjectName"); /** * Check if a given object implements the PortalSessionExternal interface. */ function instanceOfPortalSessionExternal(value) { if (!('accountId' in value) || value['accountId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('customerId' in value) || value['customerId'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('returnUrl' in value) || value['returnUrl'] === undefined) return false; if (!('token' in value) || value['token'] === undefined) return false; if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false; if (!('url' in value) || value['url'] === undefined) return false; return true; } function PortalSessionExternalFromJSON(json) { return PortalSessionExternalFromJSONTyped(json, false); } function PortalSessionExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'accountId': json['account_id'], 'createdAt': (new Date(json['created_at'])), 'customerId': json['customer_id'], 'id': json['id'], 'isDeleted': json['is_deleted'] == null ? undefined : json['is_deleted'], 'object': json['object'] == null ? undefined : (0, ObjectName_1.ObjectNameFromJSON)(json['object']), 'returnUrl': json['return_url'], 'token': json['token'], 'updatedAt': (new Date(json['updated_at'])), 'url': json['url'], }; } function PortalSessionExternalToJSON(json) { return PortalSessionExternalToJSONTyped(json, false); } function PortalSessionExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'account_id': value['accountId'], 'created_at': ((value['createdAt']).toISOString()), 'customer_id': value['customerId'], 'id': value['id'], 'is_deleted': value['isDeleted'], 'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']), 'return_url': value['returnUrl'], 'token': value['token'], 'updated_at': ((value['updatedAt']).toISOString()), 'url': value['url'], }; }