talon_one 0.1.0 → 0.1.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: c9f994e537c582f172f740e93602c4e537632845
4
- data.tar.gz: cf603ff40f4892e100aa0e5bf84b719339578312
3
+ metadata.gz: ec021679d2ba4a56723eb77aaf81c78c80f22902
4
+ data.tar.gz: 571de8f8d7a4fd85340939901160f2bdc2126e37
5
5
  SHA512:
6
- metadata.gz: 3d513e65fb61c2931b5f3f368d6e605858112c83d37a9182f8879b3694d4655b46ad6cdac9c63cb13d2544f5cb0756624efdfcb976bb6d30ab2ac52ef4311474
7
- data.tar.gz: 0fb1ffb44c1936f7518180ec9d6f104a64f62739b03d3abb921acf1f962572d3d4cf72360538c350d121b1c3ccd5b5653b938d7d22e7933dbf31639194a3dc86
6
+ metadata.gz: 360124e2dc690146fc46ca4d416da36a7a87d28430957a8760dae05ce206154ff01e7b79c2b16b526d337f494e0bb31a994a43408648f962864bfda58c03e020
7
+ data.tar.gz: 43bea9701af3416dc131be0bec6b54e507cb5a5924739e2c245676981de57f65cf4b9f4f21d556ac02b75f605c7957cbec88f1695ff079e909e9f6cc17127820
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.1 / 2018-02-26
2
+
3
+ * [FEATURE] campaign_id is now an exposed attribute of the effect class
4
+
1
5
  # 0.1.0 / 2017-07-25
2
6
 
3
7
  * [BUG] talon_one.rb is now compatible wit Oj version 3 and above (bumped the minimum version to 3.0)
data/README.md CHANGED
@@ -43,8 +43,10 @@ sessions, and events to Talon.One:
43
43
  ```ruby
44
44
  # When the customer registers or updates their account
45
45
  client.update_customer_profile "my_unique_profile_id",
46
- "name" => "Val Kust",
47
- "billingAddress1" => "21 Jump St."
46
+ "attributes" => {
47
+ "Name" => "Val Kust",
48
+ "BillingAddress1" => "21 Jump St."
49
+ }
48
50
 
49
51
  # When the customer adds an item to their cart
50
52
  client.update_customer_session "my_unique_session_id",
@@ -8,6 +8,10 @@ module TalonOne
8
8
  @raw = raw_array[3]
9
9
  end
10
10
 
11
+ def campaign_id
12
+ @campaign_id
13
+ end
14
+
11
15
  def function
12
16
  @raw[0]
13
17
  end
data/talon_one.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'talon_one'
3
- s.version = '0.1.0'
4
- s.date = '2017-07-25'
3
+ s.version = '0.1.1'
4
+ s.date = '2018-02-26'
5
5
  s.summary = 'Client for the Talon.One API'
6
6
  s.description = 'A simple client for using the Talon.One API'
7
7
  s.authors = ['Talon.One GmbH']
@@ -6,7 +6,7 @@ class TestIntegrationApiLive < LiveApiTest
6
6
  currency: "USD",
7
7
  timezone: "UTC"
8
8
  )
9
- @campaign = management_client.create_campaign @app["id"], { name: "Test Campaign", state: 'disabled', tags: [], limits: [] }
9
+ @campaign = management_client.create_campaign @app["id"], { name: "Test Campaign", state: 'disabled', tags: [], limits: [], features: [] }
10
10
  @ruleset = management_client.update_ruleset_for_campaign @app["id"], @campaign["id"], rules: [{
11
11
  title: "Free money for all!",
12
12
  condition: ["and", true],
@@ -38,6 +38,7 @@ class TestIntegrationApiLive < LiveApiTest
38
38
  assert !res.event.rejected_coupon?, "No coupon -> no rejectCoupon effect"
39
39
  assert !res.event.accepted_coupon?, "No coupon -> no acceptCoupon effect"
40
40
  assert_equal 1, res.event.effects.length
41
+ assert_equal @campaign["id"], res.event.effects[0].campaign_id
41
42
  assert_equal "setDiscount", res.event.effects[0].function
42
43
  assert_equal @event_type, res.event.type
43
44
  assert_equal "a-session", res.event.session_id, "a-session"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talon_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Talon.One GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-25 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.5.2
103
+ rubygems_version: 2.6.14
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Client for the Talon.One API