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 +4 -4
- data/lib/libring/event.rb +1 -0
- data/lib/libring/product.rb +10 -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: 967c4957087f7dcbb99712ae7c1498e449c48917
|
4
|
+
data.tar.gz: 1f290192dd16799f304b5cce1dffae564d5f3bed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/libring/product.rb
CHANGED
@@ -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.
|
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-
|
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
|