Module: BookingSync::API::Client::Messages
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/messages.rb
Instance Method Summary collapse
-
#add_attachment_to_message(message, options) ⇒ BookingSync::API::Resource
Add attachment to message.
-
#create_message(options = {}) ⇒ BookingSync::API::Resource
Create a new message.
-
#edit_message(message, options = {}) ⇒ BookingSync::API::Resource
Edit a message.
-
#message(message) ⇒ BookingSync::API::Resource
Get a single message.
-
#messages(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List messages.
Instance Method Details
#add_attachment_to_message(message, options) ⇒ BookingSync::API::Resource
Add attachment to message
58 59 60 |
# File 'lib/bookingsync/api/client/messages.rb', line 58 def (, ) put("inbox/messages/#{}/add_attachment", attachments: []).pop end |
#create_message(options = {}) ⇒ BookingSync::API::Resource
Create a new message
32 33 34 |
# File 'lib/bookingsync/api/client/messages.rb', line 32 def ( = {}) post("inbox/messages", messages: []).pop end |
#edit_message(message, options = {}) ⇒ BookingSync::API::Resource
Edit a message
46 47 48 |
# File 'lib/bookingsync/api/client/messages.rb', line 46 def (, = {}) put("inbox/messages/#{}", messages: []).pop end |
#message(message) ⇒ BookingSync::API::Resource
Get a single message
24 25 26 |
# File 'lib/bookingsync/api/client/messages.rb', line 24 def () get("inbox/messages/#{}").pop end |
#messages(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List messages
Returns all messages supported in BookingSync.
15 16 17 |
# File 'lib/bookingsync/api/client/messages.rb', line 15 def ( = {}, &block) paginate "inbox/messages", , &block end |