fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
127 lines • 6.58 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* fastcomments
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.0
*
*
* 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.instanceOfAPITenant = instanceOfAPITenant;
exports.APITenantFromJSON = APITenantFromJSON;
exports.APITenantFromJSONTyped = APITenantFromJSONTyped;
exports.APITenantToJSON = APITenantToJSON;
exports.APITenantToJSONTyped = APITenantToJSONTyped;
const APIDomainConfiguration_1 = require("./APIDomainConfiguration");
const BillingInfo_1 = require("./BillingInfo");
/**
* Check if a given object implements the APITenant interface.
*/
function instanceOfAPITenant(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('signUpDate' in value) || value['signUpDate'] === undefined)
return false;
if (!('packageId' in value) || value['packageId'] === undefined)
return false;
if (!('paymentFrequency' in value) || value['paymentFrequency'] === undefined)
return false;
if (!('billingInfoValid' in value) || value['billingInfoValid'] === undefined)
return false;
if (!('createdBy' in value) || value['createdBy'] === undefined)
return false;
if (!('isSetup' in value) || value['isSetup'] === undefined)
return false;
if (!('domainConfiguration' in value) || value['domainConfiguration'] === undefined)
return false;
if (!('enableProfanityFilter' in value) || value['enableProfanityFilter'] === undefined)
return false;
if (!('enableSpamFilter' in value) || value['enableSpamFilter'] === undefined)
return false;
return true;
}
function APITenantFromJSON(json) {
return APITenantFromJSONTyped(json, false);
}
function APITenantFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'email': json['email'] == null ? undefined : json['email'],
'signUpDate': json['signUpDate'],
'packageId': json['packageId'],
'paymentFrequency': json['paymentFrequency'],
'billingInfoValid': json['billingInfoValid'],
'billingHandledExternally': json['billingHandledExternally'] == null ? undefined : json['billingHandledExternally'],
'createdBy': json['createdBy'],
'isSetup': json['isSetup'],
'domainConfiguration': (json['domainConfiguration'].map(APIDomainConfiguration_1.APIDomainConfigurationFromJSON)),
'billingInfo': json['billingInfo'] == null ? undefined : (0, BillingInfo_1.BillingInfoFromJSON)(json['billingInfo']),
'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
'stripeSubscriptionId': json['stripeSubscriptionId'] == null ? undefined : json['stripeSubscriptionId'],
'stripePlanId': json['stripePlanId'] == null ? undefined : json['stripePlanId'],
'enableProfanityFilter': json['enableProfanityFilter'],
'enableSpamFilter': json['enableSpamFilter'],
'lastBillingIssueReminderDate': json['lastBillingIssueReminderDate'] == null ? undefined : (new Date(json['lastBillingIssueReminderDate'])),
'removeUnverifiedComments': json['removeUnverifiedComments'] == null ? undefined : json['removeUnverifiedComments'],
'unverifiedCommentsTTLms': json['unverifiedCommentsTTLms'] == null ? undefined : json['unverifiedCommentsTTLms'],
'commentsRequireApproval': json['commentsRequireApproval'] == null ? undefined : json['commentsRequireApproval'],
'autoApproveCommentOnVerification': json['autoApproveCommentOnVerification'] == null ? undefined : json['autoApproveCommentOnVerification'],
'sendProfaneToSpam': json['sendProfaneToSpam'] == null ? undefined : json['sendProfaneToSpam'],
'hasFlexPricing': json['hasFlexPricing'] == null ? undefined : json['hasFlexPricing'],
'hasAuditing': json['hasAuditing'] == null ? undefined : json['hasAuditing'],
'flexLastBilledAmount': json['flexLastBilledAmount'] == null ? undefined : json['flexLastBilledAmount'],
'deAnonIpAddr': json['deAnonIpAddr'] == null ? undefined : json['deAnonIpAddr'],
'meta': json['meta'] == null ? undefined : json['meta'],
};
}
function APITenantToJSON(json) {
return APITenantToJSONTyped(json, false);
}
function APITenantToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'email': value['email'],
'signUpDate': value['signUpDate'],
'packageId': value['packageId'],
'paymentFrequency': value['paymentFrequency'],
'billingInfoValid': value['billingInfoValid'],
'billingHandledExternally': value['billingHandledExternally'],
'createdBy': value['createdBy'],
'isSetup': value['isSetup'],
'domainConfiguration': (value['domainConfiguration'].map(APIDomainConfiguration_1.APIDomainConfigurationToJSON)),
'billingInfo': (0, BillingInfo_1.BillingInfoToJSON)(value['billingInfo']),
'stripeCustomerId': value['stripeCustomerId'],
'stripeSubscriptionId': value['stripeSubscriptionId'],
'stripePlanId': value['stripePlanId'],
'enableProfanityFilter': value['enableProfanityFilter'],
'enableSpamFilter': value['enableSpamFilter'],
'lastBillingIssueReminderDate': value['lastBillingIssueReminderDate'] == null ? undefined : ((value['lastBillingIssueReminderDate']).toISOString()),
'removeUnverifiedComments': value['removeUnverifiedComments'],
'unverifiedCommentsTTLms': value['unverifiedCommentsTTLms'],
'commentsRequireApproval': value['commentsRequireApproval'],
'autoApproveCommentOnVerification': value['autoApproveCommentOnVerification'],
'sendProfaneToSpam': value['sendProfaneToSpam'],
'hasFlexPricing': value['hasFlexPricing'],
'hasAuditing': value['hasAuditing'],
'flexLastBilledAmount': value['flexLastBilledAmount'],
'deAnonIpAddr': value['deAnonIpAddr'],
'meta': value['meta'],
};
}
//# sourceMappingURL=APITenant.js.map