UNPKG

ebay-api

Version:

eBay API for Node and Browser

43 lines (42 loc) 1.38 kB
import Restful from '../../index.js'; class Message extends Restful { get basePath() { return '/commerce/message/v1'; } getConversations({ limit, offset, conversationStatus, conversationType, referenceId, referenceType, startTime, endTime, otherPartyUsername } = {}) { return this.get('/conversation', { params: { limit, offset, conversation_status: conversationStatus, conversation_type: conversationType, reference_id: referenceId, reference_type: referenceType, start_time: startTime, end_time: endTime, other_party_username: otherPartyUsername } }); } getConversation(conversationId, { conversationType, limit, offset }) { return this.get(`/conversation/${conversationId}`, { params: { conversation_type: conversationType, limit, offset } }); } updateConversation(body) { return this.post('/update_conversation', body); } bulkUpdateConversation(body) { return this.post('/bulk_update_conversation', body); } sendMessage(body) { return this.post('/send_message', body); } ; } Message.id = 'Message'; export default Message;