UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

65 lines (64 loc) 2.73 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.instanceOfInlineSubscriptionItemUpdate = instanceOfInlineSubscriptionItemUpdate; exports.InlineSubscriptionItemUpdateFromJSON = InlineSubscriptionItemUpdateFromJSON; exports.InlineSubscriptionItemUpdateFromJSONTyped = InlineSubscriptionItemUpdateFromJSONTyped; exports.InlineSubscriptionItemUpdateToJSON = InlineSubscriptionItemUpdateToJSON; exports.InlineSubscriptionItemUpdateToJSONTyped = InlineSubscriptionItemUpdateToJSONTyped; /** * Check if a given object implements the InlineSubscriptionItemUpdate interface. */ function instanceOfInlineSubscriptionItemUpdate(value) { return true; } function InlineSubscriptionItemUpdateFromJSON(json) { return InlineSubscriptionItemUpdateFromJSONTyped(json, false); } function InlineSubscriptionItemUpdateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'addAtPeriodEnd': json['add_at_period_end'] == null ? undefined : json['add_at_period_end'], 'customFields': json['custom_fields'] == null ? undefined : json['custom_fields'], '_delete': json['delete'] == null ? undefined : json['delete'], 'description': json['description'] == null ? undefined : json['description'], 'dropAtEnd': json['drop_at_end'] == null ? undefined : json['drop_at_end'], 'id': json['id'] == null ? undefined : json['id'], 'priceId': json['price_id'] == null ? undefined : json['price_id'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'startsAt': json['starts_at'] == null ? undefined : (new Date(json['starts_at'])), }; } function InlineSubscriptionItemUpdateToJSON(json) { return InlineSubscriptionItemUpdateToJSONTyped(json, false); } function InlineSubscriptionItemUpdateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'add_at_period_end': value['addAtPeriodEnd'], 'custom_fields': value['customFields'], 'delete': value['_delete'], 'description': value['description'], 'drop_at_end': value['dropAtEnd'], 'id': value['id'], 'price_id': value['priceId'], 'quantity': value['quantity'], 'starts_at': value['startsAt'] == null ? undefined : (value['startsAt'].toISOString()), }; }