Class: WaCloudApi::Message::Location

Inherits:
Base
  • Object
show all
Defined in:
lib/wa_cloud_api/message/location.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#messaging_product, #recipient_type, #to, #type

Instance Method Summary collapse

Methods inherited from Base

#deliver

Constructor Details

#initialize(to:, longitude:, latitude:, name: nil, address: nil) ⇒ Location

Returns a new instance of Location.



8
9
10
11
12
13
14
# File 'lib/wa_cloud_api/message/location.rb', line 8

def initialize(to:, longitude:, latitude:, name: nil, address: nil)
  @longitude = longitude
  @latitude = latitude
  @name = name
  @address = address
  super(to: to, type: 'location')
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



6
7
8
# File 'lib/wa_cloud_api/message/location.rb', line 6

def address
  @address
end

#latitudeObject

Returns the value of attribute latitude.



6
7
8
# File 'lib/wa_cloud_api/message/location.rb', line 6

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



6
7
8
# File 'lib/wa_cloud_api/message/location.rb', line 6

def longitude
  @longitude
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/wa_cloud_api/message/location.rb', line 6

def name
  @name
end