UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

55 lines (54 loc) 1.96 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.instanceOfUpdateCouponRequest = instanceOfUpdateCouponRequest; exports.UpdateCouponRequestFromJSON = UpdateCouponRequestFromJSON; exports.UpdateCouponRequestFromJSONTyped = UpdateCouponRequestFromJSONTyped; exports.UpdateCouponRequestToJSON = UpdateCouponRequestToJSON; exports.UpdateCouponRequestToJSONTyped = UpdateCouponRequestToJSONTyped; /** * Check if a given object implements the UpdateCouponRequest interface. */ function instanceOfUpdateCouponRequest(value) { return true; } function UpdateCouponRequestFromJSON(json) { return UpdateCouponRequestFromJSONTyped(json, false); } function UpdateCouponRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'isActive': json['is_active'] == null ? undefined : json['is_active'], 'maxRedemptions': json['max_redemptions'] == null ? undefined : json['max_redemptions'], 'name': json['name'] == null ? undefined : json['name'], 'redeemBy': json['redeem_by'] == null ? undefined : (new Date(json['redeem_by'])), }; } function UpdateCouponRequestToJSON(json) { return UpdateCouponRequestToJSONTyped(json, false); } function UpdateCouponRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'is_active': value['isActive'], 'max_redemptions': value['maxRedemptions'], 'name': value['name'], 'redeem_by': value['redeemBy'] == null ? undefined : (value['redeemBy'].toISOString()), }; }