Class: GetStream::Generated::Models::APNSPayload

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

Initialize with attributes



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

def initialize(attributes = {})
  super(attributes)
  @body = attributes.fetch(:body) { attributes.fetch('body', nil) }
  @content_available = attributes.fetch(:content_available) { attributes.fetch('content-available', nil) }
  @mutable_content = attributes.fetch(:mutable_content) { attributes.fetch('mutable-content', nil) }
  @sound = attributes.fetch(:sound) { attributes.fetch('sound', nil) }
  @title = attributes.fetch(:title) { attributes.fetch('title', nil) }
  @data = attributes.fetch(:data) { attributes.fetch('data', nil) }
end

Instance Attribute Details

#body ⇒ String

Returns:

  • (String)


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

def body
  @body
end

#content_available ⇒ Integer

Returns:

  • (Integer)


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

def content_available
  @content_available
end

#data ⇒ Object

Returns:

  • (Object)


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

def data
  @data
end

#mutable_content ⇒ Integer

Returns:

  • (Integer)


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

def mutable_content
  @mutable_content
end

#sound ⇒ String

Returns:

  • (String)


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

def sound
  @sound
end

#title ⇒ String

Returns:

  • (String)


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

def title
  @title
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    body: 'body',
    content_available: 'content-available',
    mutable_content: 'mutable-content',
    sound: 'sound',
    title: 'title',
    data: 'data'
  }
end