libring 1.0.5 → 1.0.6

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: 48c698a7212ea22b88b9d915f09e1b825f3f9626
4
- data.tar.gz: 4646b7809b288df9b0235c3cdad2b5dd27316898
3
+ metadata.gz: 967c4957087f7dcbb99712ae7c1498e449c48917
4
+ data.tar.gz: 1f290192dd16799f304b5cce1dffae564d5f3bed
5
5
  SHA512:
6
- metadata.gz: 82f2b1401cf609b4fb9ea84dfd8e9d5145a6973875370d58b72a51b7152b47e66c64d21778f9f2f6abd3dcfe41f0b1ac9fdac9684f0dc18df8ba11ada2ed623f
7
- data.tar.gz: ad492f0cf71642efbdfc2b9012923f8a26de7ad65c5d9f4367b60208038465ce58839656d997e78877df77454ddf5a257ba302910b9c4f966c32e3fbf5fc27fb
6
+ metadata.gz: 3772cf395df2e0accc336264d2dd041db75d92faaf90446bb1b98d0fd5c4c8a0f1d8892bc5c320b6cdbab451d6357733d6af4fcdfc6a933a591c0a49e6fad1c0
7
+ data.tar.gz: 43eb86780b9d815c276213946613b6244b2d9e6cab248d879d8325ffaffb4906747bfb7bb1a24610ae744194ad9ce7547e9384630dafb6ee77f40c795d6ebded
data/lib/libring/event.rb CHANGED
@@ -109,6 +109,7 @@
109
109
  @products["#{product.sku}"][:name] = product.name
110
110
  @products["#{product.sku}"][:unit_amount] = product.unit_amount
111
111
  @products["#{product.sku}"][:quantity] = product.quantity
112
+ @products["#{product.sku}"][:category] = product.category
112
113
 
113
114
  true
114
115
 
@@ -1,6 +1,6 @@
1
1
  class Libring::Product
2
2
 
3
- attr_reader :sku, :name, :unit_amount, :quantity
3
+ attr_reader :sku, :name, :unit_amount, :quantity, :category
4
4
 
5
5
  def initialize(sku)
6
6
 
@@ -8,6 +8,7 @@
8
8
  @name = sku
9
9
  @quantity = 1
10
10
  @unit_amount = -1
11
+ @category = ""
11
12
 
12
13
  true
13
14
 
@@ -21,6 +22,14 @@
21
22
 
22
23
  end
23
24
 
25
+ def set_category(data)
26
+
27
+ @category = data
28
+
29
+ true
30
+
31
+ end
32
+
24
33
  def set_unit_amount(data)
25
34
 
26
35
  @unit_amount = data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitor Pereira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Libring API for Ruby
14
14
  email: vitor@libring.com