Class: Clerk::Models::Components::Template

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/template.rb

Overview

Success

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(id: nil, object: nil, resource_type: nil, template_type: nil, name: nil, slug: nil, position: nil, can_revert: nil, can_delete: nil, can_edit_body: nil, can_toggle: nil, markup: nil, body: nil, available_variables: nil, required_variables: nil, from_email_name: nil, reply_to_email_name: nil, delivered_by_clerk: nil, enabled: nil, flagged_as_suspicious: nil, updated_at: nil, created_at: nil, instance_id: nil, subject: nil) ⇒ Template

Returns a new instance of Template.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/clerk/models/components/template.rb', line 68

def initialize(id: nil, object: nil, resource_type: nil, template_type: nil, name: nil, slug: nil, position: nil, can_revert: nil, can_delete: nil, can_edit_body: nil, can_toggle: nil, markup: nil, body: nil, available_variables: nil, required_variables: nil, from_email_name: nil, reply_to_email_name: nil, delivered_by_clerk: nil, enabled: nil, flagged_as_suspicious: nil, updated_at: nil, created_at: nil, instance_id: nil, subject: nil)
  @id = id
  @object = object
  @resource_type = resource_type
  @template_type = template_type
  @name = name
  @slug = slug
  @position = position
  @can_revert = can_revert
  @can_delete = can_delete
  @can_edit_body = can_edit_body
  @can_toggle = can_toggle
  @markup = markup
  @body = body
  @available_variables = available_variables
  @required_variables = required_variables
  @from_email_name = from_email_name
  @reply_to_email_name = reply_to_email_name
  @delivered_by_clerk = delivered_by_clerk
  @enabled = enabled
  @flagged_as_suspicious = flagged_as_suspicious
  @updated_at = updated_at
  @created_at = created_at
  @instance_id = instance_id
  @subject = subject
end

Instance Method Details

#==(other) ⇒ Object



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/clerk/models/components/template.rb', line 96

def ==(other)
  return false unless other.is_a? self.class
  return false unless @id == other.id
  return false unless @object == other.object
  return false unless @resource_type == other.resource_type
  return false unless @template_type == other.template_type
  return false unless @name == other.name
  return false unless @slug == other.slug
  return false unless @position == other.position
  return false unless @can_revert == other.can_revert
  return false unless @can_delete == other.can_delete
  return false unless @can_edit_body == other.can_edit_body
  return false unless @can_toggle == other.can_toggle
  return false unless @markup == other.markup
  return false unless @body == other.body
  return false unless @available_variables == other.available_variables
  return false unless @required_variables == other.required_variables
  return false unless @from_email_name == other.from_email_name
  return false unless @reply_to_email_name == other.reply_to_email_name
  return false unless @delivered_by_clerk == other.delivered_by_clerk
  return false unless @enabled == other.enabled
  return false unless @flagged_as_suspicious == other.flagged_as_suspicious
  return false unless @updated_at == other.updated_at
  return false unless @created_at == other.created_at
  return false unless @instance_id == other.instance_id
  return false unless @subject == other.subject
  true
end