-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add messagaeble rendering and include in show message
- Loading branch information
1 parent
ca1c9c0
commit d16934e
Showing
5 changed files
with
69 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
class Event | ||
attr_accessor :id | ||
attr_accessor :id, :type | ||
|
||
def self.find(id) | ||
new( | ||
id: id, | ||
name: 'Stubbed Event', | ||
description: 'This is a stubbed event for testing purposes.', | ||
type: 'Accountify::Contact::CreatedEvent', | ||
created_at: Time.now.utc, | ||
header: { | ||
'user' => { 'id' => 1, 'name' => 'Alice', 'email' => '[email protected]' }, | ||
|
@@ -19,10 +18,9 @@ def self.find(id) | |
) | ||
end | ||
|
||
def initialize(id:, name:, description:, created_at:, header:, body:) | ||
def initialize(id:, type:, created_at:, header:, body:) | ||
@id = id | ||
@name = name | ||
@description = description | ||
@type = type | ||
@created_at = created_at | ||
@header = header | ||
@body = body | ||
|
@@ -31,8 +29,7 @@ def initialize(id:, name:, description:, created_at:, header:, body:) | |
def attributes | ||
{ | ||
'id' => @id, | ||
'name' => @name, | ||
'description' => @description, | ||
'type' => @type, | ||
'created_at' => @created_at, | ||
'header' => @header, | ||
'body' => @body | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters