-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from plivo/SMS-6815
Adding support for location whatsapp messages
- Loading branch information
Showing
6 changed files
with
422 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Plivo | ||
class Location | ||
attr_accessor :latitude, :longitude, :name, :address | ||
|
||
def initialize(latitude: nil, longitude: nil, name: nil, address: nil) | ||
@latitude = latitude | ||
@longitude = longitude | ||
@name = name | ||
@address = address | ||
end | ||
|
||
def to_hash | ||
{ | ||
latitude: @latitude, | ||
longitude: @longitude, | ||
name: @name, | ||
address: @address | ||
}.reject { |_, v| v.nil? } | ||
end | ||
end | ||
end | ||
|
Oops, something went wrong.