UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

65 lines (64 loc) 2.38 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.instanceOfCreateProductRequest = instanceOfCreateProductRequest; exports.CreateProductRequestFromJSON = CreateProductRequestFromJSON; exports.CreateProductRequestFromJSONTyped = CreateProductRequestFromJSONTyped; exports.CreateProductRequestToJSON = CreateProductRequestToJSON; exports.CreateProductRequestToJSONTyped = CreateProductRequestToJSONTyped; /** * Check if a given object implements the CreateProductRequest interface. */ function instanceOfCreateProductRequest(value) { if (!('description' in value) || value['description'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; return true; } function CreateProductRequestFromJSON(json) { return CreateProductRequestFromJSONTyped(json, false); } function CreateProductRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'accountSku': json['account_sku'] == null ? undefined : json['account_sku'], 'customFields': json['custom_fields'] == null ? undefined : json['custom_fields'], 'description': json['description'], 'features': json['features'] == null ? undefined : json['features'], 'isActive': json['is_active'] == null ? undefined : json['is_active'], 'name': json['name'], 'unitLabel': json['unit_label'] == null ? undefined : json['unit_label'], }; } function CreateProductRequestToJSON(json) { return CreateProductRequestToJSONTyped(json, false); } function CreateProductRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'account_sku': value['accountSku'], 'custom_fields': value['customFields'], 'description': value['description'], 'features': value['features'], 'is_active': value['isActive'], 'name': value['name'], 'unit_label': value['unitLabel'], }; }