Class: GetStream::Generated::Models::UpsertPushTemplateRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/upsert_push_template_request.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 = {}) ⇒ UpsertPushTemplateRequest

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/upsert_push_template_request.rb', line 29

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

Instance Attribute Details

#enable_pushBoolean

Returns Whether to send push notification for this event.

Returns:

  • (Boolean)

    Whether to send push notification for this event



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

def enable_push
  @enable_push
end

#event_typeString

Returns Event type (message.new, message.updated, reaction.new).

Returns:

  • (String)

    Event type (message.new, message.updated, reaction.new)



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

def event_type
  @event_type
end

#push_provider_nameString

Returns Push provider name.

Returns:

  • (String)

    Push provider name



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

def push_provider_name
  @push_provider_name
end

#push_provider_typeString

Returns Push provider type (firebase, apn, huawei, xiaomi).

Returns:

  • (String)

    Push provider type (firebase, apn, huawei, xiaomi)



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

def push_provider_type
  @push_provider_type
end

#templateString

Returns Push template.

Returns:

  • (String)

    Push template



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

def template
  @template
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/upsert_push_template_request.rb', line 39

def self.json_field_mappings
  {
    event_type: 'event_type',
    push_provider_type: 'push_provider_type',
    enable_push: 'enable_push',
    push_provider_name: 'push_provider_name',
    template: 'template'
  }
end