@getopenpay/client
Version:
OpenPay API TypeScript SDK
59 lines (58 loc) • 1.99 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.instanceOfPriceTierParams = instanceOfPriceTierParams;
exports.PriceTierParamsFromJSON = PriceTierParamsFromJSON;
exports.PriceTierParamsFromJSONTyped = PriceTierParamsFromJSONTyped;
exports.PriceTierParamsToJSON = PriceTierParamsToJSON;
exports.PriceTierParamsToJSONTyped = PriceTierParamsToJSONTyped;
/**
* Check if a given object implements the PriceTierParams interface.
*/
function instanceOfPriceTierParams(value) {
if (!('unitAmountAtom' in value) || value['unitAmountAtom'] === undefined)
return false;
if (!('unitsFrom' in value) || value['unitsFrom'] === undefined)
return false;
return true;
}
function PriceTierParamsFromJSON(json) {
return PriceTierParamsFromJSONTyped(json, false);
}
function PriceTierParamsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'flatAmountAtom': json['flat_amount_atom'] == null ? undefined : json['flat_amount_atom'],
'unitAmountAtom': json['unit_amount_atom'],
'unitsFrom': json['units_from'],
'unitsUpto': json['units_upto'] == null ? undefined : json['units_upto'],
};
}
function PriceTierParamsToJSON(json) {
return PriceTierParamsToJSONTyped(json, false);
}
function PriceTierParamsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'flat_amount_atom': value['flatAmountAtom'],
'unit_amount_atom': value['unitAmountAtom'],
'units_from': value['unitsFrom'],
'units_upto': value['unitsUpto'],
};
}