mercadolibre 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca5981ecdfaffc11a6dd83fbb8dcc46dcca69cbc
4
- data.tar.gz: 541ea2124e4d1d45e77049e16b4facc87231d822
3
+ metadata.gz: c5acc11835e2d0d774843063e4b453988fa6a0e1
4
+ data.tar.gz: adee422ec7ba5e0d366fe71ec556f4db6c7d9201
5
5
  SHA512:
6
- metadata.gz: 8f0e3817ff0d254f9c180092c37def9860dcc187a6e05cc40de023bf472d99bc43abcaab8c7dcb6342c460ae3a1473e5ac35351fd5c9ef9feb8097200beea53c
7
- data.tar.gz: 36d3ee88b4deeca17c1917079f781f3eefd2b8e80003f0ec8e301c692d278dc6f96b5b57fd0ac664c98825b569dfd08a511ea39ddd7215b83efccda4c85c905d
6
+ metadata.gz: 543a27fbe6cca691313d4e7ff6b49055fffe7df5a89105e7f2a5b4c52df104514ba9ac9f7c25c1e059abd72289cfb083c20e9830e57c21d7486fbc87a49a7899
7
+ data.tar.gz: fb4256f9de382ee5b65114847f651b6f3c2ab78fa5c666420292a70e37bb0e43e20ddc00530f99c6e00e96b25948b10f1bedd022b993c9ffc47a6ca1d202ca4c
@@ -93,3 +93,7 @@
93
93
  ## v0.4.0
94
94
 
95
95
  * New feedbacks interface
96
+
97
+ ## v0.4.1
98
+
99
+ * Bugfixes on feedback and location
@@ -17,6 +17,7 @@ require "mercadolibre/entity/currency"
17
17
  require "mercadolibre/entity/currency_conversion_ratio"
18
18
  require "mercadolibre/entity/featured_item"
19
19
  require "mercadolibre/entity/feedback"
20
+ require "mercadolibre/entity/feedback_reply"
20
21
  require "mercadolibre/entity/item"
21
22
  require "mercadolibre/entity/item_description"
22
23
  require "mercadolibre/entity/item_picture"
@@ -19,6 +19,8 @@ module Mercadolibre
19
19
  self.from = User.new(v)
20
20
  elsif k.to_s == 'item'
21
21
  self.item = Item.new(v)
22
+ elsif k.to_s == 'reply'
23
+ self.reply = FeedbackReply.new(v)
22
24
  else
23
25
  self.send("#{k}=", v) if self.respond_to?(k)
24
26
  end
@@ -0,0 +1,33 @@
1
+ module Mercadolibre
2
+ module Entity
3
+ class FeedbackReply
4
+ def self.attr_list
5
+ [:message, :reply_date, :reply_status]
6
+ end
7
+
8
+ attr_reader *attr_list
9
+
10
+ def initialize(attributes={})
11
+ attributes.each do |k, v|
12
+ if ['date_created', 'visibility_date'].include?(k.to_s)
13
+ self.date_created = Time.parse(v) unless v.nil?
14
+ elsif k.to_s == 'to'
15
+ self.to = User.new(v)
16
+ elsif k.to_s == 'from'
17
+ self.from = User.new(v)
18
+ elsif k.to_s == 'item'
19
+ self.item = Item.new(v)
20
+ elsif k.to_s == 'reply'
21
+ self.reply = FeedbackReply.new(v)
22
+ else
23
+ self.send("#{k}=", v) if self.respond_to?(k)
24
+ end
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ attr_writer *attr_list
31
+ end
32
+ end
33
+ end
@@ -1,6 +1,6 @@
1
1
  module Mercadolibre
2
2
  module Entity
3
- class Country
3
+ class Site
4
4
  def self.attr_list
5
5
  [:id, :name, :country_id, :sale_fees_mode, :mercadopago_version, :default_currency_id,
6
6
  :currencies, :immediate_payment, :payment_method_ids, :categories]
@@ -1,3 +1,3 @@
1
1
  module Mercadolibre
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
4
+ version: 0.4.1
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-25 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,6 +87,7 @@ files:
87
87
  - lib/mercadolibre/entity/currency_conversion_ratio.rb
88
88
  - lib/mercadolibre/entity/featured_item.rb
89
89
  - lib/mercadolibre/entity/feedback.rb
90
+ - lib/mercadolibre/entity/feedback_reply.rb
90
91
  - lib/mercadolibre/entity/item.rb
91
92
  - lib/mercadolibre/entity/item_description.rb
92
93
  - lib/mercadolibre/entity/item_picture.rb