mercadolibre 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mercadolibre/core/order_management.rb +28 -1
- data/lib/mercadolibre/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cdd0a8806a54f7bf13f3af7438d96c87ebcf22f
|
4
|
+
data.tar.gz: b3625580caf2b132d1b36f95dac2d9c85fc9ef52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213b9d5bf71d5a841cfcc72962a38be15caadab1cb95554249d746e09320354e372728a774d2d28bbfdcce6e97d57c9a98bcd55e0f15fc4c2cfb4f76d796382e
|
7
|
+
data.tar.gz: 1f79ed50a6babb2158ee0f6198aa7ccc9b6619adc9ed18d71a50c45f6b48f18a71d972de253a15d09176f99a104d2f9b5ba168237088beb8ba8d91af33f9feea
|
data/CHANGELOG.md
CHANGED
@@ -69,7 +69,34 @@ module Mercadolibre
|
|
69
69
|
def get_order_notes(order_id)
|
70
70
|
filters = { access_token: @access_token }
|
71
71
|
results = get_request("/orders/#{order_id}/notes", filters)
|
72
|
-
|
72
|
+
|
73
|
+
results[:body].first['results'].map { |r| Mercadolibre::Entity::OrderNote.new(r) }
|
74
|
+
end
|
75
|
+
|
76
|
+
def create_order_note(order_id, text)
|
77
|
+
payload = { note: text }.to_json
|
78
|
+
|
79
|
+
headers = { content_type: :json, accept: :json }
|
80
|
+
|
81
|
+
result = post_request("/orders/#{order_id}/notes?access_token=#{@access_token}", payload, headers)
|
82
|
+
|
83
|
+
Mercadolibre::Entity::OrderNote.new(result[:body]['note'])
|
84
|
+
end
|
85
|
+
|
86
|
+
def update_order_note(order_id, note_id, text)
|
87
|
+
payload = { note: text }.to_json
|
88
|
+
|
89
|
+
headers = { content_type: :json, accept: :json }
|
90
|
+
|
91
|
+
result = put_request("/orders/#{order_id}/notes/#{note_id}?access_token=#{@access_token}", payload, headers)
|
92
|
+
|
93
|
+
Mercadolibre::Entity::OrderNote.new(result[:body]['note'])
|
94
|
+
end
|
95
|
+
|
96
|
+
def delete_order_note(order_id, note_id)
|
97
|
+
result = delete_request("/orders/#{order_id}/notes/#{note_id}?access_token=#{@access_token}")
|
98
|
+
|
99
|
+
result[:status_code] == 200
|
73
100
|
end
|
74
101
|
|
75
102
|
def get_order_feedbacks(order_id)
|
data/lib/mercadolibre/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mercadolibre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|