UNPKG

@mozaic-io/mozaic-sdk-node

Version:

The Mozaic Node SDK enables you to pay your creators easily via the Mozaic API.

27 lines (26 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PaymentCycleEntry = void 0; const BaseResource_1 = require("../BaseResource"); class PaymentCycleEntry extends BaseResource_1.BaseResource { /** * @internal * Internal use only. Please use the Mozaic object to utilize this object. * @param paymentCycleEntry */ constructor(paymentCycleEntry) { var _a; super(); this.rawObject = paymentCycleEntry; if (paymentCycleEntry.to === undefined) throw new Error("paymentCycleEntry.to is undefined"); this.id = this.throwIfNullOrUndefined("paymentCycleEntry.id", paymentCycleEntry.id); this.name = this.throwIfNullOrUndefined("paymentCycleEntry.to.name", paymentCycleEntry.to.name); this.email = this.throwIfNullOrUndefined("paymentCycleEntry.to.email", paymentCycleEntry.to.email); this.amount = this.throwIfNullOrUndefined("paymentCycleEntry.original_amount", paymentCycleEntry.original_amount); this.status = this.throwIfNullOrUndefined("paymentCycleEntry.status", paymentCycleEntry.status); this.externalId = paymentCycleEntry.external_id; this.memo = (_a = paymentCycleEntry.memo) === null || _a === void 0 ? void 0 : _a.substring(0, 140); } } exports.PaymentCycleEntry = PaymentCycleEntry;