Class: Mailkube::CanceledScheduledEmail
- Inherits:
-
Object
- Object
- Mailkube::CanceledScheduledEmail
- Defined in:
- lib/mailkube/types/scheduled_acks.rb,
sig/mailkube/types/scheduled_acks.rbs
Overview
What a cancellation reports back.
A separate model from ScheduledEmail rather than a widened one: the server answers a cancellation with a three-field acknowledgement, not with the record, and a model mirrors the wire and nothing else.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
Returns the value of attribute id.
-
#object ⇒ String
readonly
Returns the value of attribute object.
-
#status ⇒ String
readonly
Returns the value of attribute status.
Class Method Summary collapse
-
.from(payload) ⇒ CanceledScheduledEmail
The model.
Instance Method Summary collapse
-
#initialize(id:, object: "scheduled_email", status: "canceled") ⇒ CanceledScheduledEmail
constructor
A new instance of CanceledScheduledEmail.
Constructor Details
#initialize(id:, object: "scheduled_email", status: "canceled") ⇒ CanceledScheduledEmail
Returns a new instance of CanceledScheduledEmail.
13 |
# File 'lib/mailkube/types/scheduled_acks.rb', line 13 def initialize(id:, object: "scheduled_email", status: "canceled") = super |
Instance Attribute Details
#id ⇒ String (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'sig/mailkube/types/scheduled_acks.rbs', line 3 def id @id end |
#object ⇒ String (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'sig/mailkube/types/scheduled_acks.rbs', line 4 def object @object end |
#status ⇒ String (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'sig/mailkube/types/scheduled_acks.rbs', line 5 def status @status end |
Class Method Details
.from(payload) ⇒ CanceledScheduledEmail
Returns the model.
17 18 19 20 |
# File 'lib/mailkube/types/scheduled_acks.rb', line 17 def self.from(payload) new(id: payload["id"], object: payload["object"] || "scheduled_email", status: payload["status"] || "canceled") end |