@getopenpay/client
Version:
OpenPay API TypeScript SDK
54 lines (53 loc) • 2.04 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.instanceOfPromoRestrictions = instanceOfPromoRestrictions;
exports.PromoRestrictionsFromJSON = PromoRestrictionsFromJSON;
exports.PromoRestrictionsFromJSONTyped = PromoRestrictionsFromJSONTyped;
exports.PromoRestrictionsToJSON = PromoRestrictionsToJSON;
exports.PromoRestrictionsToJSONTyped = PromoRestrictionsToJSONTyped;
const CurrencyEnum_1 = require("./CurrencyEnum");
/**
* Check if a given object implements the PromoRestrictions interface.
*/
function instanceOfPromoRestrictions(value) {
return true;
}
function PromoRestrictionsFromJSON(json) {
return PromoRestrictionsFromJSONTyped(json, false);
}
function PromoRestrictionsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'firstTimeTransaction': json['first_time_transaction'] == null ? undefined : json['first_time_transaction'],
'minimumAmountAtom': json['minimum_amount_atom'] == null ? undefined : json['minimum_amount_atom'],
'minimumAmountCurrency': json['minimum_amount_currency'] == null ? undefined : (0, CurrencyEnum_1.CurrencyEnumFromJSON)(json['minimum_amount_currency']),
};
}
function PromoRestrictionsToJSON(json) {
return PromoRestrictionsToJSONTyped(json, false);
}
function PromoRestrictionsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'first_time_transaction': value['firstTimeTransaction'],
'minimum_amount_atom': value['minimumAmountAtom'],
'minimum_amount_currency': (0, CurrencyEnum_1.CurrencyEnumToJSON)(value['minimumAmountCurrency']),
};
}