voucherify 2.0.0 → 2.1.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
- SHA256:
3
- metadata.gz: f8ac6d52818e46207444a2952c1964fcc5a45a53ec0096861ef12eda70ef2885
4
- data.tar.gz: a6c2938be5738f7fcfc8c230d4327f08f1a9c83c75f896efd8b82a28d0955e34
2
+ SHA1:
3
+ metadata.gz: 0083c12450888cd7a234a99dc09487c1de548d04
4
+ data.tar.gz: a64663a5cdc89645b1b036f3a5278c6905602924
5
5
  SHA512:
6
- metadata.gz: b426e5e0bf1fe56777d035f6ee30333f9cda97da05199352375e1e90f02f9ac066d49a8168fbfe8d3def6575765d570d5d69c8723b24dbd47a0f011baa2b36c3
7
- data.tar.gz: 7fff7556ee805f0cae6268fc115a6a58e9def21132658b3c4d425b56419e0f959f3aa1f32b29f1eb8dfc393745d4fb45c8839b3bd48259ee96aeccbbe315c71c
6
+ metadata.gz: d2e900f394494574721a24c2b25355526c04b98a8af3a85f5b84b433603de35c2848ac5cd0dc4846a6b0b4a3c17c5d24d19a6342769908bf734fdf761c930be7
7
+ data.tar.gz: f2455f45a3f053dc210ac0261a6dd968f3788402d615d2830a8e05c2800e476498a6dab9510979c7d14a3c077d44f83e35a91e8d014046621d4353fe30be0e8f
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <img src="./voucherify-ruby-sdk.png"/>
3
3
  </p>
4
4
 
5
- <h3 align="center">Official <a href="http://voucherify.io?utm_source=github&utm_medium=sdk&utm_campaign=acq">Voucherify</a> SDK for Ruby</h3>
5
+ <h3 align="center">Official <a href="https://voucherify.io?utm_source=github&utm_medium=sdk&utm_campaign=acq">Voucherify</a> SDK for Ruby</h3>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://codeclimate.com/github/voucherifyio/voucherify-ruby-sdk"><img src="https://codeclimate.com/github/voucherifyio/voucherify-ruby-sdk/badges/gpa.svg" /></a>
@@ -71,7 +71,7 @@ Or install it yourself as:
71
71
 
72
72
  $ gem install voucherify
73
73
 
74
- [Log-in](http://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/login) to Voucherify web interface and obtain your Application Keys from [Configuration](https://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/app/configuration):
74
+ [Log-in](https://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/login) to Voucherify web interface and obtain your Application Keys from [Configuration](https://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/app/configuration):
75
75
 
76
76
  ```ruby
77
77
  require 'voucherify'
@@ -240,8 +240,8 @@ Methods are provided within `voucherify.redemptions.*` namespace.
240
240
  - [Redeem Voucher](#redeem-voucher)
241
241
  - [List Redemptions](#list-redemptions)
242
242
  - [Get Voucher's Redemptions](#get-vouchers-redemptions)
243
- - [Rollback Redemption](#rollback-redemption)
244
243
  - [Get Redemption](#get-redemption)
244
+ - [Rollback Redemption](#rollback-redemption)
245
245
 
246
246
  #### [Redeem Voucher]
247
247
  ```ruby
@@ -289,7 +289,7 @@ Methods are provided within `voucherify.promotions.*` namespace.
289
289
  - [Update Promotion's Tier](#update-promotions-tier)
290
290
  - [Delete Promotion's Tier](#delete-promotions-tier)
291
291
 
292
- Check [promotion campaign object](http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign).
292
+ Check [promotion campaign object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign).
293
293
  #### [Create Promotion Campaign]
294
294
  ```ruby
295
295
  voucherify.promotions.create(promotion_campaign)
@@ -302,7 +302,7 @@ voucherify.promotions.validate(validation_context)
302
302
  ```ruby
303
303
  voucherify.promotions.tiers.list(promotion_campaign_id)
304
304
  ```
305
- Check [promotion's tier object](http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-promotion-object)
305
+ Check [promotion's tier object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-promotion-object)
306
306
  #### [Create Promotion's Tier]
307
307
  ```ruby
308
308
  voucherify.promotions.tiers.create(promotion_id, promotions_tier)
@@ -484,7 +484,7 @@ Methods are provided within `voucherify.events.*` namespace.
484
484
 
485
485
  #### [Create event]
486
486
  ```ruby
487
- voucherify.events.track(event, metadata, customer);
487
+ voucherify.events.track(event, metadata, customer, referral);
488
488
  ```
489
489
 
490
490
  ---
@@ -577,6 +577,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
577
577
  Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
578
578
 
579
579
  ## Changelog
580
+ - **2019-02-19** - `2.1.0` - Handle `referral` in custom events tracking.
580
581
  - **2018-12-27** - `2.0.0` - Business validation rules.
581
582
  - **2018-09-05** - `1.6.1` - Request timeout settings
582
583
  - **2017-11-16** - `1.6.0` - Expose promotion API, Redemptions and Validations namespace update
@@ -606,7 +607,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/rspect
606
607
 
607
608
  ## License
608
609
 
609
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
610
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
610
611
 
611
612
  [Create Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-voucher
612
613
  [Get Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#vouchers-get
@@ -623,10 +624,10 @@ The gem is available as open source under the terms of the [MIT License](http://
623
624
  [Add Voucher to Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-voucher-to-campaign
624
625
  [Import Vouchers to Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#import-vouchers
625
626
 
626
- [Publish Vouchers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#publish-voucher
627
+ [Publish Vouchers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-publication
627
628
  [Create Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-export
628
629
  [Get Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-export
629
- [Delete Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#elete-export
630
+ [Delete Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-export
630
631
 
631
632
  [Validate Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#validate-voucher
632
633
 
@@ -636,13 +637,13 @@ The gem is available as open source under the terms of the [MIT License](http://
636
637
  [Get Redemption]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-redemption
637
638
  [Rollback Redemption]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#rollback-redemption
638
639
 
639
- [Create Promotion Campaign]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign
640
- [Validate Promotion Campaign]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#validate-promotions-1
641
- [List Promotion's Tiers]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-promotions
642
- [Create Promotion's Tier]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-promotion-tier-to-campaign
643
- [Redeem Promotion's Tier]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#redeem-promotion
644
- [Update Promotion's Tier]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-promotion
645
- [Delete Promotion's Tier]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-promotion
640
+ [Create Promotion Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign
641
+ [Validate Promotion Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#validate-promotions-1
642
+ [List Promotion's Tiers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-promotions
643
+ [Create Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-promotion-tier-to-campaign
644
+ [Redeem Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#redeem-promotion
645
+ [Update Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-promotion
646
+ [Delete Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-promotion
646
647
 
647
648
  [Create Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-customer
648
649
  [Get Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#read-customer
@@ -667,10 +668,11 @@ The gem is available as open source under the terms of the [MIT License](http://
667
668
  [Delete Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-validation-rules
668
669
  [Create Validation Rule Assignment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-validation-rules-assignment
669
670
  [Delete Validation Rule Assignment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-validation-rules-assignment
670
- [List Validation Rule Assignments]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-validation-rules
671
+ [List Validation Rule Assignments]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-validation-rule-assignments
671
672
 
672
673
  [Create Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-segment
673
674
  [Get Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-segment
674
675
  [Delete Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-segment
675
676
 
676
- [Events]: http://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-custom-event-object
677
+ [Events]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-custom-event-object
678
+ [Create event]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-custom-event
@@ -7,11 +7,12 @@ module Voucherify
7
7
  @client = client
8
8
  end
9
9
 
10
- def track(event, metadata, customer)
10
+ def track(event, metadata, customer, referral)
11
11
  @client.post('/events', {
12
12
  :event => event,
13
13
  :metadata => metadata,
14
- :customer => customer
14
+ :customer => customer,
15
+ :referral => referral
15
16
  }.to_json)
16
17
  end
17
18
  end
@@ -1,3 +1,3 @@
1
1
  module Voucherify
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  end
data/voucherify.gemspec CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency 'bundler', '~> 1.11'
22
21
  spec.add_development_dependency 'rake', '~> 10.0'
23
22
  spec.add_development_dependency 'rspec', '~> 3.0'
24
23
  spec.add_development_dependency 'webmock', '~> 2.3.1'
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voucherify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawelrychlik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-28 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.11'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.11'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
122
  version: '0'
137
123
  requirements: []
138
124
  rubyforge_project:
139
- rubygems_version: 2.7.6
125
+ rubygems_version: 2.5.1
140
126
  signing_key:
141
127
  specification_version: 4
142
128
  summary: Ruby SDK for Voucherify. More info on http://www.voucherify.io