Class: Mailkube::ScheduledEmailBatchUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/mailkube/types/scheduled_acks.rb,
sig/mailkube/types/scheduled_acks.rbs

Overview

What rescheduling a whole batch reports back.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object: "scheduled_email.batch", batch_id: "", rescheduled_count: 0, scheduled_at: nil) ⇒ ScheduledEmailBatchUpdate

Returns a new instance of ScheduledEmailBatchUpdate.

Parameters:

  • object (String) (defaults to: "scheduled_email.batch")

    the resource discriminator, always scheduled_email.batch.

  • batch_id (String) (defaults to: "")

    the batch that was targeted.

  • rescheduled_count (Integer) (defaults to: 0)

    how many pending emails moved. An unknown batch is a no-op reporting 0, not an error.

  • scheduled_at (String, nil) (defaults to: nil)

    the new due time applied to every moved email.



46
47
48
# File 'lib/mailkube/types/scheduled_acks.rb', line 46

def initialize(object: "scheduled_email.batch", batch_id: "", rescheduled_count: 0, scheduled_at: nil)
  super
end

Instance Attribute Details

#batch_idString (readonly)

Returns the value of attribute batch_id.

Returns:

  • (String)


22
23
24
# File 'sig/mailkube/types/scheduled_acks.rbs', line 22

def batch_id
  @batch_id
end

#objectString (readonly)

Returns the value of attribute object.

Returns:

  • (String)


21
22
23
# File 'sig/mailkube/types/scheduled_acks.rbs', line 21

def object
  @object
end

#rescheduled_countInteger (readonly)

Returns the value of attribute rescheduled_count.

Returns:

  • (Integer)


23
24
25
# File 'sig/mailkube/types/scheduled_acks.rbs', line 23

def rescheduled_count
  @rescheduled_count
end

#scheduled_atString? (readonly)

Returns the value of attribute scheduled_at.

Returns:

  • (String, nil)


24
25
26
# File 'sig/mailkube/types/scheduled_acks.rbs', line 24

def scheduled_at
  @scheduled_at
end

Class Method Details

.from(payload) ⇒ ScheduledEmailBatchUpdate

Returns the model.

Parameters:

  • payload (Hash{String => Object})

    the decoded acknowledgement.

  • (Hash[String, untyped])

Returns:



52
53
54
55
# File 'lib/mailkube/types/scheduled_acks.rb', line 52

def self.from(payload)
  new(object: payload["object"] || "scheduled_email.batch", batch_id: payload["batch_id"] || "",
      rescheduled_count: payload["rescheduled_count"] || 0, scheduled_at: payload["scheduled_at"])
end