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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 533aedba21b3ae4f82f13ec71336e66f48f4dce9
4
- data.tar.gz: 6fb20c318df7d572d17bbabab427446e65272931
3
+ metadata.gz: cd29a51b8650b514dc09bc278ce37740e9957153
4
+ data.tar.gz: 618da4ddf55e67a5554addd734478ef14a22054d
5
5
  SHA512:
6
- metadata.gz: f2fe99b03cb14b041163ad5e7f492f7f5d0e406f39d30daba49d373b3a675ec190c919024180977aea1ebc051a7b745dbceb8462312dbd22e96fe7962c516f4f
7
- data.tar.gz: 3fd86852f0fa396624d36ec4f3a3f70c5de8ea56fdbef5a11edc33276bde73c545cc0e7ffb261e520641aada6790edd983f0d4fc27758d644fb3633832698bf2
6
+ metadata.gz: dae579cabb4edef980a2d8ad4bd5d55a1eac81d4a927f01b6b652e8dc408abb0c143e1dcacdad82a152e2add327e56c5612610fa18589bce0775c9884be36b67
7
+ data.tar.gz: a605a79b85e12710d16c352a08516e43e371340b5d5ebb61ebc27f4749cd652b6baa0c9919ffdeffd0849b2c2948a5e41a98de0f84d494b343340217d2be8ef6
data/lib/tangocard.rb CHANGED
@@ -10,7 +10,6 @@ module Tangocard
10
10
  self.name = nil
11
11
  self.key = nil
12
12
  self.base_uri = 'https://sandbox.tangocard.com'
13
- self.default_brands = ['Tango Card']
14
13
  self.local_images = {}
15
14
  self.sku_blacklist = []
16
15
  self.use_cache = true
@@ -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:
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module Tangocard
2
- VERSION = '3.3.2'
2
+ VERSION = '4.0.0'
3
3
  end
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: 3.3.2
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-05-12 00:00:00.000000000 Z
11
+ date: 2015-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty