Class: MaxApiClient::LocationAttachment

Inherits:
Attachment
  • Object
show all
Defined in:
lib/max_api_client/attachments.rb,
sig/max_api_client.rbs

Overview

Attachment wrapper for geo coordinates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lon:, lat:) ⇒ LocationAttachment

Returns a new instance of LocationAttachment.



86
87
88
89
90
# File 'lib/max_api_client/attachments.rb', line 86

def initialize(lon:, lat:)
  super()
  @longitude = lon
  @latitude = lat
end

Instance Attribute Details

#latitudeObject (readonly)

Returns the value of attribute latitude.



84
85
86
# File 'lib/max_api_client/attachments.rb', line 84

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



84
85
86
# File 'lib/max_api_client/attachments.rb', line 84

def longitude
  @longitude
end

Instance Method Details

#to_hObject



92
93
94
# File 'lib/max_api_client/attachments.rb', line 92

def to_h
  { type: "location", latitude:, longitude: }
end