@mozaic-io/mozaic-sdk-node
Version:
The Mozaic Node SDK enables you to pay your creators easily via the Mozaic API.
20 lines (19 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WalletItem = void 0;
class WalletItem {
constructor(source) {
var _a, _b, _c, _d, _e, _f, _g, _h;
this.paymentMethodId = (_a = source.external_id) !== null && _a !== void 0 ? _a : "";
this.lastFour = (_b = source.last_four) !== null && _b !== void 0 ? _b : "";
this.default = (_c = source.default_for_currency) !== null && _c !== void 0 ? _c : false;
this.brand = (_d = source.brand) !== null && _d !== void 0 ? _d : "";
this.expiration = (_e = source.exp) !== null && _e !== void 0 ? _e : {};
this.name = (_f = source.account_bank_name) !== null && _f !== void 0 ? _f : "";
if ("payment_method_type" in source)
this.type = (_g = source.payment_method_type) !== null && _g !== void 0 ? _g : "";
else
this.type = (_h = source.payout_method_type) !== null && _h !== void 0 ? _h : "";
}
}
exports.WalletItem = WalletItem;