@getopenpay/client
Version:
OpenPay API TypeScript SDK
72 lines (71 loc) • 3.21 kB
JavaScript
;
/* 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.instanceOfPriceQueryParams = instanceOfPriceQueryParams;
exports.PriceQueryParamsFromJSON = PriceQueryParamsFromJSON;
exports.PriceQueryParamsFromJSONTyped = PriceQueryParamsFromJSONTyped;
exports.PriceQueryParamsToJSON = PriceQueryParamsToJSON;
exports.PriceQueryParamsToJSONTyped = PriceQueryParamsToJSONTyped;
const PriceTypeEnum_1 = require("./PriceTypeEnum");
const DateTimeFilter_1 = require("./DateTimeFilter");
const CurrencyEnum_1 = require("./CurrencyEnum");
/**
* Check if a given object implements the PriceQueryParams interface.
*/
function instanceOfPriceQueryParams(value) {
return true;
}
function PriceQueryParamsFromJSON(json) {
return PriceQueryParamsFromJSONTyped(json, false);
}
function PriceQueryParamsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'createdAt': json['created_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['created_at']),
'currency': json['currency'] == null ? undefined : (0, CurrencyEnum_1.CurrencyEnumFromJSON)(json['currency']),
'expand': json['expand'] == null ? undefined : json['expand'],
'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'],
'priceType': json['price_type'] == null ? undefined : (0, PriceTypeEnum_1.PriceTypeEnumFromJSON)(json['price_type']),
'productId': json['product_id'] == null ? undefined : json['product_id'],
'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 PriceQueryParamsToJSON(json) {
return PriceQueryParamsToJSONTyped(json, false);
}
function PriceQueryParamsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'created_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['createdAt']),
'currency': (0, CurrencyEnum_1.CurrencyEnumToJSON)(value['currency']),
'expand': value['expand'],
'is_active': value['isActive'],
'page_number': value['pageNumber'],
'page_size': value['pageSize'],
'price_type': (0, PriceTypeEnum_1.PriceTypeEnumToJSON)(value['priceType']),
'product_id': value['productId'],
'sort_descending': value['sortDescending'],
'sort_key': value['sortKey'],
'updated_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['updatedAt']),
};
}