UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

62 lines (61 loc) 2.71 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.instanceOfCreateBillingMeterRequest = instanceOfCreateBillingMeterRequest; exports.CreateBillingMeterRequestFromJSON = CreateBillingMeterRequestFromJSON; exports.CreateBillingMeterRequestFromJSONTyped = CreateBillingMeterRequestFromJSONTyped; exports.CreateBillingMeterRequestToJSON = CreateBillingMeterRequestToJSON; exports.CreateBillingMeterRequestToJSONTyped = CreateBillingMeterRequestToJSONTyped; const BillingMeterAggregationFormula_1 = require("./BillingMeterAggregationFormula"); /** * Check if a given object implements the CreateBillingMeterRequest interface. */ function instanceOfCreateBillingMeterRequest(value) { if (!('displayName' in value) || value['displayName'] === undefined) return false; if (!('eventName' in value) || value['eventName'] === undefined) return false; return true; } function CreateBillingMeterRequestFromJSON(json) { return CreateBillingMeterRequestFromJSONTyped(json, false); } function CreateBillingMeterRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'aggregationFormula': json['aggregation_formula'] == null ? undefined : (0, BillingMeterAggregationFormula_1.BillingMeterAggregationFormulaFromJSON)(json['aggregation_formula']), 'displayName': json['display_name'], 'eventName': json['event_name'], 'eventPayloadCustomerMappingKey': json['event_payload_customer_mapping_key'] == null ? undefined : json['event_payload_customer_mapping_key'], 'eventPayloadValueKey': json['event_payload_value_key'] == null ? undefined : json['event_payload_value_key'], }; } function CreateBillingMeterRequestToJSON(json) { return CreateBillingMeterRequestToJSONTyped(json, false); } function CreateBillingMeterRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'aggregation_formula': (0, BillingMeterAggregationFormula_1.BillingMeterAggregationFormulaToJSON)(value['aggregationFormula']), 'display_name': value['displayName'], 'event_name': value['eventName'], 'event_payload_customer_mapping_key': value['eventPayloadCustomerMappingKey'], 'event_payload_value_key': value['eventPayloadValueKey'], }; }