Class: MessengerClient::URLFile

Inherits:
Object
  • Object
show all
Defined in:
lib/messenger_client/url_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ URLFile

Returns a new instance of URLFile.



3
4
5
# File 'lib/messenger_client/url_file.rb', line 3

def initialize(url)
  @url = url
end

Instance Method Details

#to_jsonObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/messenger_client/url_file.rb', line 7

def to_json
  {
    attachment: {
      type: "file",
      payload: {
        url: @url
      }
    }
  }
end