Module: Mercadolibre::Core::Feedbacks

Included in:
Api
Defined in:
lib/mercadolibre/core/feedbacks.rb

Instance Method Summary collapse

Instance Method Details

#change_order_buyer_feedback(order_id, kind, feedback_data) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/mercadolibre/core/feedbacks.rb', line 38

def change_order_buyer_feedback(order_id, kind, feedback_data)
  payload = feedback_data.to_json

  headers = { content_type: :json }

  put_request("/orders/#{order_id}/feedback/purchase?access_token=#{@access_token}", payload, headers).body
end

#change_order_feedback(feedback_id, feedback_data) ⇒ Object



46
47
48
49
50
51
52
# File 'lib/mercadolibre/core/feedbacks.rb', line 46

def change_order_feedback(feedback_id, feedback_data)
  payload = feedback_data.to_json

  headers = { content_type: :json }

  put_request("/feedback/#{feedback_id}?access_token=#{@access_token}", payload, headers).body
end

#change_order_seller_feedback(order_id, kind, feedback_data) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/mercadolibre/core/feedbacks.rb', line 30

def change_order_seller_feedback(order_id, kind, feedback_data)
  payload = feedback_data.to_json

  headers = { content_type: :json }

  put_request("/orders/#{order_id}/feedback/sale?access_token=#{@access_token}", payload, headers).body
end

#create_order_feedback(order_id, feedback_data) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/mercadolibre/core/feedbacks.rb', line 22

def create_order_feedback(order_id, feedback_data)
  payload = feedback_data.to_json

  headers = { content_type: :json }

  post_request("/orders/#{order_id}/feedback?access_token=#{@access_token}", payload, headers).body
end

#get_order_buyer_feedback(order_id) ⇒ Object



10
11
12
13
14
# File 'lib/mercadolibre/core/feedbacks.rb', line 10

def get_order_buyer_feedback(order_id)
  filters = { access_token: @access_token }

  get_request("/orders/#{order_id}/feedback/purchase", filters).body
end

#get_order_feedbacks(order_id) ⇒ Object



4
5
6
7
8
# File 'lib/mercadolibre/core/feedbacks.rb', line 4

def get_order_feedbacks(order_id)
  filters = { access_token: @access_token }

  get_request("/orders/#{order_id}/feedback", filters).body
end

#get_order_seller_feedback(order_id) ⇒ Object



16
17
18
19
20
# File 'lib/mercadolibre/core/feedbacks.rb', line 16

def get_order_seller_feedback(order_id)
  filters = { access_token: @access_token }

  get_request("/orders/#{order_id}/feedback/sale", filters).body
end

#reply_order_feedback(feedback_id, text) ⇒ Object



54
55
56
57
58
59
60
# File 'lib/mercadolibre/core/feedbacks.rb', line 54

def reply_order_feedback(feedback_id, text)
  payload = { reply: text }.to_json

  headers = { content_type: :json }

  post_request("/feedback/{feedback_id}/reply?access_token=#{@access_token}", payload, headers).body
end