Class: GetStream::Generated::Models::ScheduledMessageLocation

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

Overview

The location a scheduled message will share

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 = {}) ⇒ ScheduledMessageLocation

Initialize with attributes



26
27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/scheduled_message_location.rb', line 26

def initialize(attributes = {})
  super(attributes)
  @created_by_device_id = attributes.fetch(:created_by_device_id) { attributes.fetch('created_by_device_id', nil) }
  @end_at = attributes.fetch(:end_at) { attributes.fetch('end_at', nil) }
  @latitude = attributes.fetch(:latitude) { attributes.fetch('latitude', nil) }
  @longitude = attributes.fetch(:longitude) { attributes.fetch('longitude', nil) }
end

Instance Attribute Details

#created_by_device_id ⇒ String

Returns The ID of the device that created the location.

Returns:

  • (String) —

    The ID of the device that created the location.



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

def created_by_device_id
  @created_by_device_id
end

#end_at ⇒ DateTime

Returns The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live.

Returns:

  • (DateTime) —

    The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live.



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

def end_at
  @end_at
end

#latitude ⇒ Float

Returns The latitude of the location.

Returns:

  • (Float) —

    The latitude of the location.



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

def latitude
  @latitude
end

#longitude ⇒ Float

Returns The longitude of the location.

Returns:

  • (Float) —

    The longitude of the location.



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

def longitude
  @longitude
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



35
36
37
38
39
40
41
42
# File 'lib/getstream_ruby/generated/models/scheduled_message_location.rb', line 35

def self.json_field_mappings
  {
    created_by_device_id: 'created_by_device_id',
    end_at: 'end_at',
    latitude: 'latitude',
    longitude: 'longitude'
  }
end