tangocard 3.3.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tangocard.rb +0 -1
- data/lib/tangocard/brand.rb +0 -12
- data/lib/tangocard/reward.rb +5 -1
- data/lib/tangocard/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: cd29a51b8650b514dc09bc278ce37740e9957153
|
4
|
+
data.tar.gz: 618da4ddf55e67a5554addd734478ef14a22054d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae579cabb4edef980a2d8ad4bd5d55a1eac81d4a927f01b6b652e8dc408abb0c143e1dcacdad82a152e2add327e56c5612610fa18589bce0775c9884be36b67
|
7
|
+
data.tar.gz: a605a79b85e12710d16c352a08516e43e371340b5d5ebb61ebc27f4749cd652b6baa0c9919ffdeffd0849b2c2948a5e41a98de0f84d494b343340217d2be8ef6
|
data/lib/tangocard.rb
CHANGED
data/lib/tangocard/brand.rb
CHANGED
@@ -25,18 +25,6 @@ class Tangocard::Brand
|
|
25
25
|
Tangocard::Raas.rewards_index.parsed_response['brands'].map{|p| Tangocard::Brand.new(p)}
|
26
26
|
end
|
27
27
|
|
28
|
-
# Return an array of default brands. Must set default_brands in your Tangocard initializer (see README).
|
29
|
-
#
|
30
|
-
# Example:
|
31
|
-
# >> Tangocard::Brand.default_brands
|
32
|
-
# => [#<Tangocard::Brand:0x007f9a6f9d3030 ...>, #<Tangocard::Brand:0x007f9a6f9d3030 ...>, ...]
|
33
|
-
#
|
34
|
-
# Arguments:
|
35
|
-
# none
|
36
|
-
def self.default_brands
|
37
|
-
self.all.select{|b| Tangocard.configuration.default_brands.include?(b.description)}
|
38
|
-
end
|
39
|
-
|
40
28
|
# Find a brand by its :description field.
|
41
29
|
#
|
42
30
|
# Example:
|
data/lib/tangocard/reward.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
class Tangocard::Reward
|
2
|
-
attr_reader :description, :sku, :currency_type, :unit_price, :available, :min_price, :max_price
|
2
|
+
attr_reader :description, :sku, :currency_type, :unit_price, :available, :min_price, :max_price,
|
3
|
+
:currency_code, :denomination, :locale
|
3
4
|
|
4
5
|
def initialize(params)
|
5
6
|
@description = params['description']
|
@@ -9,6 +10,9 @@ class Tangocard::Reward
|
|
9
10
|
@available = params['available']
|
10
11
|
@min_price = params['min_price'].to_i
|
11
12
|
@max_price = params['max_price'].to_i
|
13
|
+
@currency_code = params['currency_code']
|
14
|
+
@denomination = params['denomination'].to_i
|
15
|
+
@locale = params['locale']
|
12
16
|
end
|
13
17
|
|
14
18
|
# Is this a variable-priced reward?
|
data/lib/tangocard/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tangocard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raphael Crawford-Marks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|