mercadolibre 0.6.1 → 0.7.0
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 +17 -2
- data/lib/mercadolibre/core/questions.rb +3 -3
- 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: 2a37112d42aab380e876e14d7abb653e25f39e1c
|
4
|
+
data.tar.gz: 5e5b962ae73e34a2e80efdbedf92701b23addc2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8841adfb471f1976699254dbf74dc7d69d7ac703de5856e7a8d711144e29430c38f55cf6241b8539f35cb54c833b1c3639287a28007350d87b2d10df06a1ec8c
|
7
|
+
data.tar.gz: a8a8a58c3feb9883ed1296cf8a1698df4545e56d0e89f5d305a3c3656a31cffadb1184a0e10ec5af115350132bb42c54ec722e9f56d0503fe93e5f9d8a41b5cc
|
data/CHANGELOG.md
CHANGED
@@ -179,10 +179,25 @@ module Mercadolibre
|
|
179
179
|
Mercadolibre::Entity::PaymentMethod.new(results[:body])
|
180
180
|
end
|
181
181
|
|
182
|
-
def
|
182
|
+
def get_orders_blacklist(user_id)
|
183
183
|
results = get_request("/users/#{user_id}/order_blacklist?access_token=#{@access_token}")
|
184
|
+
result[:body].map { |r| r['user']['id'] }
|
185
|
+
end
|
186
|
+
|
187
|
+
def add_user_to_orders_blacklist(seller_id, user_id)
|
188
|
+
payload = { user_id: user_id }.to_json
|
189
|
+
|
190
|
+
headers = { content_type: :json }
|
191
|
+
|
192
|
+
url = "/users/#{seller_id}/order_blacklist?access_token=#{@access_token}"
|
193
|
+
|
194
|
+
post_request(url, payload, headers)[:status_code] == 200
|
195
|
+
end
|
196
|
+
|
197
|
+
def remove_user_from_orders_blacklist(seller_id, user_id)
|
198
|
+
url = "/users/#{seller_id}/order_blacklist/#{user_id}?access_token=#{@access_token}"
|
184
199
|
|
185
|
-
|
200
|
+
delete_request(url)[:status_code] == 200
|
186
201
|
end
|
187
202
|
end
|
188
203
|
end
|
@@ -110,12 +110,12 @@ module Mercadolibre
|
|
110
110
|
Mercadolibre::Entity::Question.new(result[:body])
|
111
111
|
end
|
112
112
|
|
113
|
-
def
|
113
|
+
def get_questions_blacklist(seller_id)
|
114
114
|
result = get_request("/users/#{seller_id}/questions_blacklist?access_token=#{@access_token}")
|
115
115
|
result[:body].map { |r| r['user']['id'] }
|
116
116
|
end
|
117
117
|
|
118
|
-
def
|
118
|
+
def add_user_to_questions_blacklist(seller_id, user_id)
|
119
119
|
payload = { user_id: user_id }.to_json
|
120
120
|
|
121
121
|
headers = { content_type: :json }
|
@@ -125,7 +125,7 @@ module Mercadolibre
|
|
125
125
|
post_request(url, payload, headers)[:status_code] == 200
|
126
126
|
end
|
127
127
|
|
128
|
-
def
|
128
|
+
def remove_user_from_questions_blacklist(seller_id, user_id)
|
129
129
|
url = "/users/#{seller_id}/questions_blacklist/#{user_id}?access_token=#{@access_token}"
|
130
130
|
|
131
131
|
delete_request(url)[:status_code] == 200
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|