Class: SendgridNotification::SendgridStatus::Suppression
- Inherits:
-
Struct
- Object
- Struct
- SendgridNotification::SendgridStatus::Suppression
- Defined in:
- app/models/sendgrid_notification/sendgrid_status.rb
Overview
mapped to sendgrid api result e.g. sendgrid.com/docs/API_Reference/Web_API_v3/blocks.html ( なお invalid_emails には status がない。そもそも送っていないから。 )
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#email ⇒ Object
Returns the value of attribute email.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created
10 11 12 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 10 def created @created end |
#email ⇒ Object
Returns the value of attribute email
10 11 12 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 10 def email @email end |
#reason ⇒ Object
Returns the value of attribute reason
10 11 12 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 10 def reason @reason end |
#status ⇒ Object
Returns the value of attribute status
10 11 12 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 10 def status @status end |
#type ⇒ Object
Returns the value of attribute type
10 11 12 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 10 def type @type end |
Class Method Details
.build(type, hash) ⇒ Object
11 12 13 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 11 def self.build(type, hash) new(type, *hash.values_at('created', 'email', 'reason', 'status')) end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'app/models/sendgrid_notification/sendgrid_status.rb', line 15 def to_s to_h.to_json end |