Class: ApolloDeploySignalSdkRails::EmailTimelineItem
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::EmailTimelineItem
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: EmailTimelineItem
Instance Attribute Summary collapse
- #created_at ⇒ String
- #id ⇒ String
- #occurred_at ⇒ String
- #payload ⇒ Hash{String => String, nil}
- #provider_event_id ⇒ String?
- #type ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ EmailTimelineItem
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, type:, provider_event_id:, payload:, occurred_at:, created_at:) ⇒ EmailTimelineItem
constructor
A new instance of EmailTimelineItem.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, type:, provider_event_id:, payload:, occurred_at:, created_at:) ⇒ EmailTimelineItem
Returns a new instance of EmailTimelineItem.
4234 4235 4236 4237 4238 4239 4240 4241 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4234 def initialize(id: , type: , provider_event_id: , payload: , occurred_at: , created_at: ) @id = id @type = type @provider_event_id = provider_event_id @payload = payload @occurred_at = occurred_at @created_at = created_at end |
Instance Attribute Details
#created_at ⇒ String
4231 4232 4233 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4231 def created_at @created_at end |
#id ⇒ String
4221 4222 4223 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4221 def id @id end |
#occurred_at ⇒ String
4229 4230 4231 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4229 def occurred_at @occurred_at end |
#payload ⇒ Hash{String => String, nil}
4227 4228 4229 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4227 def payload @payload end |
#provider_event_id ⇒ String?
4225 4226 4227 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4225 def provider_event_id @provider_event_id end |
#type ⇒ String
4223 4224 4225 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4223 def type @type end |
Class Method Details
.from_json(attributes) ⇒ EmailTimelineItem
Create an instance from a parsed JSON hash.
4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4258 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], type: attributes.key?("type") ? attributes["type"] : attributes[:type], provider_event_id: attributes.key?("providerEventId") ? attributes["providerEventId"] : attributes[:provider_event_id], payload: attributes.key?("payload") ? attributes["payload"] : attributes[:payload], occurred_at: attributes.key?("occurredAt") ? attributes["occurredAt"] : attributes[:occurred_at], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4244 def to_h { id: @id, type: @type, provider_event_id: @provider_event_id, payload: @payload, occurred_at: @occurred_at, created_at: @created_at, }.compact end |