UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

57 lines (56 loc) 2.01 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.instanceOfLineItemUpdateRequest = instanceOfLineItemUpdateRequest; exports.LineItemUpdateRequestFromJSON = LineItemUpdateRequestFromJSON; exports.LineItemUpdateRequestFromJSONTyped = LineItemUpdateRequestFromJSONTyped; exports.LineItemUpdateRequestToJSON = LineItemUpdateRequestToJSON; exports.LineItemUpdateRequestToJSONTyped = LineItemUpdateRequestToJSONTyped; /** * Check if a given object implements the LineItemUpdateRequest interface. */ function instanceOfLineItemUpdateRequest(value) { if (!('currentPriceId' in value) || value['currentPriceId'] === undefined) return false; return true; } function LineItemUpdateRequestFromJSON(json) { return LineItemUpdateRequestFromJSONTyped(json, false); } function LineItemUpdateRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'currentPriceId': json['current_price_id'], 'newPriceId': json['new_price_id'] == null ? undefined : json['new_price_id'], 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'selected': json['selected'] == null ? undefined : json['selected'], }; } function LineItemUpdateRequestToJSON(json) { return LineItemUpdateRequestToJSONTyped(json, false); } function LineItemUpdateRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'current_price_id': value['currentPriceId'], 'new_price_id': value['newPriceId'], 'quantity': value['quantity'], 'selected': value['selected'], }; }