voucherify 1.1.0 → 1.2.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: 6735d1504bcd3793ae0a670d0a687e17e38f2519
4
- data.tar.gz: 8880cf6c0bb216754bc960924ae064895160ffdb
3
+ metadata.gz: 8903d1d22de61bf4ebda5db9a52ad5ebce28c067
4
+ data.tar.gz: 1889dc404c0b5c51f72929f9d9ec6d773bc53ca1
5
5
  SHA512:
6
- metadata.gz: ace85201f017f9b164bbf91d2888177a62ccb52b0197db600879dccd06d64c62d5416cea56566d69b3d7eea181d2cba2db3dba38278740dc27d26e8b6a0e1d6c
7
- data.tar.gz: d67ad31d24816f1276e28b2d14d63a0bab5f12310c4ab1a86fc643cd82366310fb90d12996b7838a8ee76d62fd01f1ca39263b534d4cbc442334be5458bb9caf
6
+ metadata.gz: 73682fd328a86822a6cf3306575616f3efef2c883c68b3c9c946d55c5f8c7acf6d283c5b809a0337ac3000509c4e06bb60a7f525d70081965fcf8e3180f25ee3
7
+ data.tar.gz: b7e10d6d01eef68d6aeefbe95a03531f4211227bc1ba02b9ccad89b34980390a62eb50099d7db304470fb0212ee020a3e912babdb523e5873c853e44ccb2d7fa
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
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>
6
6
 
7
7
  <p align="center">
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>
8
9
  <a href="https://travis-ci.org/voucherifyio/voucherify-ruby-sdk"><img src="https://travis-ci.org/voucherifyio/voucherify-ruby-sdk.svg?branch=master" alt="Build Status"/></a>
9
10
  <a href="https://rubygems.org/gems/voucherify"><img src="https://img.shields.io/gem/v/voucherify.svg" alt="Gem Version"/></a>
10
11
  <a href="https://rubygems.org/gems/voucherify"><img src="https://img.shields.io/gem/dt/voucherify.svg" alt="Gem Downloads"/></a>
@@ -88,6 +89,7 @@ Methods are provided within `voucherify.vouchers.*` namespace.
88
89
  - [List Vouchers](#list-vouchers)
89
90
  - [Enable Voucher](#enable-voucher)
90
91
  - [Disable Voucher](#disable-voucher)
92
+ - [Import Vouchers](#import-vouchers)
91
93
 
92
94
  #### [Create Voucher]
93
95
  ```ruby
@@ -118,6 +120,10 @@ voucherify.vouchers.enable(code)
118
120
  ```ruby
119
121
  voucherify.vouchers.disable(code)
120
122
  ```
123
+ #### [Import Vouchers]
124
+ ```ruby
125
+ voucherify.vouchers.import(vouchers)
126
+ ```
121
127
  ---
122
128
 
123
129
  ### Campaigns API
@@ -182,8 +188,8 @@ Methods are provided within `voucherify.redemptions.*` namespace.
182
188
  ```ruby
183
189
  voucherify.redemptions.redeem(code, [params])
184
190
 
185
- // Removed!
186
- voucherify.redemptions.redeem(code, tracking_id) // use: voucherify.redemptions.redeem(code, {:customer => {:source_id => 'source_id'}})
191
+ # Removed!
192
+ voucherify.redemptions.redeem(code, tracking_id) # use: voucherify.redemptions.redeem(code, {:customer => {:source_id => 'source_id'}})
187
193
  ```
188
194
  #### [List Redemptions]
189
195
  ```ruby
@@ -198,8 +204,8 @@ voucherify.redemptions.get_for_voucher(code)
198
204
  ```ruby
199
205
  voucherify.redemptions.rollback(redemption_id, [params])
200
206
 
201
- // Removed!
202
- voucherify.redemptions.rollback(code, tracking_id, reason) // use: voucherify.redemptions.rollback(code, {:customer => {:source_id => 'source_id'}, :reason => 'reason'})
207
+ # Removed!
208
+ voucherify.redemptions.rollback(code, tracking_id, reason) # use: voucherify.redemptions.rollback(code, {:customer => {:source_id => 'source_id'}, :reason => 'reason'})
203
209
  ```
204
210
  Check [redemption rollback object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-redemption-rollback-object).
205
211
 
@@ -368,6 +374,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
368
374
  Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
369
375
 
370
376
  ## Changelog
377
+ - **2016-01-04** - `1.2.0` - added [import vouchers](#import-vouchers) method.
371
378
  - **2016-12-29** - `1.1.0` - introduced [campaigns api](#campaigns-api) and [products api](#products-api).
372
379
  - **2016-12-15** - `1.0.0` - introduced namespaces, unified method names, updated README. Migration from versions 0.x required [migration from version 0.x](#migration-from-0x)
373
380
  - **2016-12-02** - `0.8.2` - support gift vouchers in utils, fix price and discount calculations for amount discounts
@@ -41,6 +41,10 @@ module Voucherify
41
41
  @client.delete("/vouchers/#{URI.encode(code)}", {:force => (!!(params['force'] || params[:force])).to_s})
42
42
  nil
43
43
  end
44
+
45
+ def import(vouchers)
46
+ @client.post('/vouchers/import', vouchers.to_json);
47
+ end
44
48
  end
45
49
  end
46
50
  end
@@ -1,3 +1,3 @@
1
1
  module Voucherify
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voucherify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawelrychlik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-02 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler