Module: BookingSync::API::Client::Conversations
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/conversations.rb
Instance Method Summary collapse
-
#connect_booking_to_conversation(conversation, options) ⇒ BookingSync::API::Resource
Connect conversation with booking.
-
#conversation(conversation) ⇒ BookingSync::API::Resource
Get a single conversation.
-
#conversations(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List conversations.
-
#create_conversation(options = {}) ⇒ BookingSync::API::Resource
Create a new conversation.
-
#disconnect_booking_from_conversation(conversation, options) ⇒ BookingSync::API::Resource
Disconnect conversation from booking.
-
#edit_conversation(conversation, options = {}) ⇒ BookingSync::API::Resource
Edit a conversation.
Instance Method Details
#connect_booking_to_conversation(conversation, options) ⇒ BookingSync::API::Resource
Connect conversation with booking
58 59 60 |
# File 'lib/bookingsync/api/client/conversations.rb', line 58 def connect_booking_to_conversation(conversation, ) put("inbox/conversations/#{conversation}/connect_booking", bookings: []).pop end |
#conversation(conversation) ⇒ BookingSync::API::Resource
Get a single conversation
24 25 26 |
# File 'lib/bookingsync/api/client/conversations.rb', line 24 def conversation(conversation) get("inbox/conversations/#{conversation}").pop end |
#conversations(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List conversations
Returns all conversations supported in BookingSync.
15 16 17 |
# File 'lib/bookingsync/api/client/conversations.rb', line 15 def conversations( = {}, &block) paginate "inbox/conversations", , &block end |
#create_conversation(options = {}) ⇒ BookingSync::API::Resource
Create a new conversation
32 33 34 |
# File 'lib/bookingsync/api/client/conversations.rb', line 32 def create_conversation( = {}) post("inbox/conversations", conversations: []).pop end |
#disconnect_booking_from_conversation(conversation, options) ⇒ BookingSync::API::Resource
Disconnect conversation from booking
70 71 72 |
# File 'lib/bookingsync/api/client/conversations.rb', line 70 def disconnect_booking_from_conversation(conversation, ) put("inbox/conversations/#{conversation}/disconnect_booking", bookings: []).pop end |
#edit_conversation(conversation, options = {}) ⇒ BookingSync::API::Resource
Edit a conversation
46 47 48 |
# File 'lib/bookingsync/api/client/conversations.rb', line 46 def edit_conversation(conversation, = {}) put("inbox/conversations/#{conversation}", conversations: []).pop end |