UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

54 lines (53 loc) 2.34 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.instanceOfUpdateCheckoutSessionRequest = instanceOfUpdateCheckoutSessionRequest; exports.UpdateCheckoutSessionRequestFromJSON = UpdateCheckoutSessionRequestFromJSON; exports.UpdateCheckoutSessionRequestFromJSONTyped = UpdateCheckoutSessionRequestFromJSONTyped; exports.UpdateCheckoutSessionRequestToJSON = UpdateCheckoutSessionRequestToJSON; exports.UpdateCheckoutSessionRequestToJSONTyped = UpdateCheckoutSessionRequestToJSONTyped; const LineItemUpdateRequest_1 = require("./LineItemUpdateRequest"); /** * Check if a given object implements the UpdateCheckoutSessionRequest interface. */ function instanceOfUpdateCheckoutSessionRequest(value) { return true; } function UpdateCheckoutSessionRequestFromJSON(json) { return UpdateCheckoutSessionRequestFromJSONTyped(json, false); } function UpdateCheckoutSessionRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'lineItemUpdates': json['line_item_updates'] == null ? undefined : (json['line_item_updates'].map(LineItemUpdateRequest_1.LineItemUpdateRequestFromJSON)), 'selectedLineItemIds': json['selected_line_item_ids'] == null ? undefined : json['selected_line_item_ids'], 'selectedProductBundleId': json['selected_product_bundle_id'] == null ? undefined : json['selected_product_bundle_id'], }; } function UpdateCheckoutSessionRequestToJSON(json) { return UpdateCheckoutSessionRequestToJSONTyped(json, false); } function UpdateCheckoutSessionRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'line_item_updates': value['lineItemUpdates'] == null ? undefined : (value['lineItemUpdates'].map(LineItemUpdateRequest_1.LineItemUpdateRequestToJSON)), 'selected_line_item_ids': value['selectedLineItemIds'], 'selected_product_bundle_id': value['selectedProductBundleId'], }; }