@trycourier/courier-react-native
Version:
Inbox, Push Notifications, and Preferences for React Native
24 lines (23 loc) • 603 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.InboxAction = void 0;
class InboxAction {
constructor(content = null, href = null, data = null) {
this.content = content;
this.href = href;
this.data = data;
}
static fromJson(jsonString) {
try {
const parsed = JSON.parse(jsonString);
return new InboxAction(parsed.content, parsed.href, parsed.data);
} catch (error) {
console.log(`Error parsing action: ${error}`);
throw error;
}
}
}
exports.InboxAction = InboxAction;
//# sourceMappingURL=InboxAction.js.map