Class: GetStream::Generated::Models::PushTemplateResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/push_template_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ PushTemplateResponse

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @created_at = attributes[:created_at] || attributes['created_at']
  @enable_push = attributes[:enable_push] || attributes['enable_push']
  @event_type = attributes[:event_type] || attributes['event_type']
  @push_provider_internal_id = attributes[:push_provider_internal_id] || attributes['push_provider_internal_id']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @template = attributes[:template] || attributes['template'] || nil
end

Instance Attribute Details

#created_atDateTime

Returns Time when the template was created.

Returns:

  • (DateTime)

    Time when the template was created



14
15
16
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 14

def created_at
  @created_at
end

#enable_pushBoolean

Returns Whether push notification is enabled for this event.

Returns:

  • (Boolean)

    Whether push notification is enabled for this event



17
18
19
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 17

def enable_push
  @enable_push
end

#event_typeString

Returns Type of event this template applies to.

Returns:

  • (String)

    Type of event this template applies to



20
21
22
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 20

def event_type
  @event_type
end

#push_provider_internal_idString

Returns Internal ID of the push provider.

Returns:

  • (String)

    Internal ID of the push provider



23
24
25
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 23

def push_provider_internal_id
  @push_provider_internal_id
end

#templateString

Returns The push notification template.

Returns:

  • (String)

    The push notification template



29
30
31
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 29

def template
  @template
end

#updated_atDateTime

Returns Time when the template was last updated.

Returns:

  • (DateTime)

    Time when the template was last updated



26
27
28
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 26

def updated_at
  @updated_at
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/push_template_response.rb', line 43

def self.json_field_mappings
  {
    created_at: 'created_at',
    enable_push: 'enable_push',
    event_type: 'event_type',
    push_provider_internal_id: 'push_provider_internal_id',
    updated_at: 'updated_at',
    template: 'template'
  }
end