UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

73 lines (72 loc) 3.31 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.instanceOfPromoCodeQueryParams = instanceOfPromoCodeQueryParams; exports.PromoCodeQueryParamsFromJSON = PromoCodeQueryParamsFromJSON; exports.PromoCodeQueryParamsFromJSONTyped = PromoCodeQueryParamsFromJSONTyped; exports.PromoCodeQueryParamsToJSON = PromoCodeQueryParamsToJSON; exports.PromoCodeQueryParamsToJSONTyped = PromoCodeQueryParamsToJSONTyped; const DateTimeFilter_1 = require("./DateTimeFilter"); const SearchFilter_1 = require("./SearchFilter"); /** * Check if a given object implements the PromoCodeQueryParams interface. */ function instanceOfPromoCodeQueryParams(value) { return true; } function PromoCodeQueryParamsFromJSON(json) { return PromoCodeQueryParamsFromJSONTyped(json, false); } function PromoCodeQueryParamsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'code': json['code'] == null ? undefined : json['code'], 'couponId': json['coupon_id'] == null ? undefined : json['coupon_id'], 'createdAt': json['created_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['created_at']), 'expand': json['expand'] == null ? undefined : json['expand'], 'expiresAt': json['expires_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['expires_at']), 'isActive': json['is_active'] == null ? undefined : json['is_active'], 'pageNumber': json['page_number'] == null ? undefined : json['page_number'], 'pageSize': json['page_size'] == null ? undefined : json['page_size'], 'search': json['search'] == null ? undefined : (0, SearchFilter_1.SearchFilterFromJSON)(json['search']), 'sortDescending': json['sort_descending'] == null ? undefined : json['sort_descending'], 'sortKey': json['sort_key'] == null ? undefined : json['sort_key'], 'updatedAt': json['updated_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['updated_at']), }; } function PromoCodeQueryParamsToJSON(json) { return PromoCodeQueryParamsToJSONTyped(json, false); } function PromoCodeQueryParamsToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'code': value['code'], 'coupon_id': value['couponId'], 'created_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['createdAt']), 'expand': value['expand'], 'expires_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['expiresAt']), 'is_active': value['isActive'], 'page_number': value['pageNumber'], 'page_size': value['pageSize'], 'search': (0, SearchFilter_1.SearchFilterToJSON)(value['search']), 'sort_descending': value['sortDescending'], 'sort_key': value['sortKey'], 'updated_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['updatedAt']), }; }