@trycourier/courier-react-native
Version:
Inbox, Push Notifications, and Preferences for React Native
17 lines • 465 B
JavaScript
export 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;
}
}
}
//# sourceMappingURL=InboxAction.js.map