amberflo-metering-typescript
Version:
Amberflo metering client for TypeScript
23 lines • 1.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerProductPlan = exports.CustomerProductPlanApiPayload = void 0;
const validation_1 = require("./validation");
const constants_1 = require("./constants");
class CustomerProductPlanApiPayload {
constructor(customerId, productPlanId) {
this.customerId = customerId;
this.productPlanId = productPlanId;
}
validate() {
validation_1.validators.nonEmptyStr('customerId', this.customerId, false);
validation_1.validators.nonEmptyStr('productPlanId', this.productPlanId, false);
this.productId || (this.productId = constants_1.defaultProductId);
validation_1.validators.positiveInteger('startTimeInSeconds', this.startTimeInSeconds);
validation_1.validators.positiveInteger('endTimeInSeconds', this.endTimeInSeconds);
}
}
exports.CustomerProductPlanApiPayload = CustomerProductPlanApiPayload;
class CustomerProductPlan {
}
exports.CustomerProductPlan = CustomerProductPlan;
//# sourceMappingURL=customerProductPlanApiPayload.js.map