class Pinnacle::ActionLatLong
Latitude and longitude coordinates. Required for ‘sendLocation’.
def self.from_json(json_object:)
-
(Pinnacle::ActionLatLong)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) lat = parsed_json["lat"] lng = parsed_json["lng"] new( lat: lat, lng: lng, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) obj.lat&.is_a?(Float) != false || raise("Passed value for field obj.lat is not the expected type, validation failed.") obj.lng&.is_a?(Float) != false || raise("Passed value for field obj.lng is not the expected type, validation failed.") end
def initialize(lat: OMIT, lng: OMIT, additional_properties: nil)
-
(Pinnacle::ActionLatLong)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
lng
(Float
) -- Longitude value. -
lat
(Float
) -- Latitude value.
def initialize(lat: OMIT, lng: OMIT, additional_properties: nil) @lat = lat if lat != OMIT @lng = lng if lng != OMIT @additional_properties = additional_properties @_field_set = { "lat": lat, "lng": lng }.reject do |_k, v| v == OMIT end end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end