Class: GuestyAPI::GuestInbox
Instance Method Summary
collapse
#initialize
Instance Method Details
#list(params: {}) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/guesty_api/guest_inbox.rb', line 5
def list(params: {})
response = @client.get url: '/inbox/conversations', data: params
check_response! response
collection_entity response
end
|
#post(id:, params:) ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/guesty_api/guest_inbox.rb', line 21
def post(id:, params:)
response = @client.post url: '/inbox/conversations', data: {
conversationId: id,
}.merge(params)
check_response! response
single_entity response
end
|
#retrieve(id:, fields: nil) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/guesty_api/guest_inbox.rb', line 13
def retrieve(id:, fields: nil)
response = @client.get url: "/inbox/conversations/#{id}", data: { fields: fields }
check_response! response
single_entity response
end
|