@bitblit/ratchet-misc
Version:
Ratchet miscellaneous tooling that requires smallish dependant libraries
53 lines • 2.21 kB
JavaScript
import { exists } from '../runtime.js';
export var GetAccountAllOfPlanTypeEnum;
(function (GetAccountAllOfPlanTypeEnum) {
GetAccountAllOfPlanTypeEnum["PayAsYouGo"] = "payAsYouGo";
GetAccountAllOfPlanTypeEnum["Free"] = "free";
GetAccountAllOfPlanTypeEnum["Subscription"] = "subscription";
GetAccountAllOfPlanTypeEnum["Sms"] = "sms";
GetAccountAllOfPlanTypeEnum["Reseller"] = "reseller";
})(GetAccountAllOfPlanTypeEnum || (GetAccountAllOfPlanTypeEnum = {}));
export var GetAccountAllOfPlanCreditsTypeEnum;
(function (GetAccountAllOfPlanCreditsTypeEnum) {
GetAccountAllOfPlanCreditsTypeEnum["SendLimit"] = "sendLimit";
})(GetAccountAllOfPlanCreditsTypeEnum || (GetAccountAllOfPlanCreditsTypeEnum = {}));
export function instanceOfGetAccountAllOfPlan(value) {
let isInstance = true;
isInstance = isInstance && 'type' in value;
isInstance = isInstance && 'creditsType' in value;
isInstance = isInstance && 'credits' in value;
return isInstance;
}
export function GetAccountAllOfPlanFromJSON(json) {
return GetAccountAllOfPlanFromJSONTyped(json, false);
}
export function GetAccountAllOfPlanFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
type: json['type'],
creditsType: json['creditsType'],
credits: json['credits'],
startDate: !exists(json, 'startDate') ? undefined : new Date(json['startDate']),
endDate: !exists(json, 'endDate') ? undefined : new Date(json['endDate']),
userLimit: !exists(json, 'userLimit') ? undefined : json['userLimit'],
};
}
export function GetAccountAllOfPlanToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
type: value.type,
creditsType: value.creditsType,
credits: value.credits,
startDate: value.startDate === undefined ? undefined : value.startDate.toISOString().substring(0, 10),
endDate: value.endDate === undefined ? undefined : value.endDate.toISOString().substring(0, 10),
userLimit: value.userLimit,
};
}
//# sourceMappingURL=GetAccountAllOfPlan.js.map