voucherify 0.1.2 → 0.1.3

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: 6c2c2263b9c741412cf1b97577e4e6ed9db4489b
4
- data.tar.gz: e6b9a2d13a2316ffd9d894fc0bfa210e5e8cf653
3
+ metadata.gz: 49cefa65987b138ce3db394ed4c367927573a47e
4
+ data.tar.gz: 8eebd7cbe3e8ea1558ec7c0ee45ace44a5d35166
5
5
  SHA512:
6
- metadata.gz: 5913dba236cbda1d5925c5bb982b895f2e93999f95de790fb76eaf580fb3da1c0940a75c8e1dfc78aae710f4b2b25ee11e4c3e59a04db8c040745eadc2d4b292
7
- data.tar.gz: 4512409ecc8b137c79618cacab896b81f69f10d2dead2c65a4f99bd80c42ce5b65622c28c85f4109faefd427b4ae18451c5c2edb2877be8d77bd8c79b2d227e0
6
+ metadata.gz: 3aa0f648f576c8589d10425633aea28cae6534b320c60fb9bc32aed2879d70114dfe73349b8d2268aa29122cca8221f7e332666afc229087c5a49685cb323b23
7
+ data.tar.gz: 8cd9fa4bb7ecead7a00bbabf1c6c7c94be9655d6b9e0ceafa80e8a39a0510b0f8f44995b4744574e86e6fde9cd392bbbefa5ed76836797954a4fbb38bfe61fd0
data/README.md CHANGED
@@ -302,18 +302,18 @@ You can record a detailed customer profile consisting of an `id` (obligatory), `
302
302
 
303
303
  ```ruby
304
304
  voucherify.redeem({
305
- voucher: "v1GiJYuuS",
306
- customer: {
307
- id: "alice.morgan",
308
- name: "Alice Morgan",
309
- email: "alice@morgan.com",
310
- description: "",
311
- metadata: {
312
- locale: "en-GB",
313
- shoeSize: 5,
314
- favourite_brands: ["Armani", "L’Autre Chose", "Voucherify"]
305
+ "voucher" => "v1GiJYuuS",
306
+ "customer" => {
307
+ "id" => "alice.morgan",
308
+ "name" => "Alice Morgan",
309
+ "email" => "alice@morgan.com",
310
+ "description" => "look ma no hands",
311
+ "metadata" => {
312
+ "locale" => "en-GB",
313
+ "shoeSize" => 36.6
315
314
  }
316
- })
315
+ }
316
+ })
317
317
  ```
318
318
 
319
319
  #### Listing redemptions
@@ -409,12 +409,14 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
409
409
  Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
410
410
 
411
411
  ## Changelog
412
+ - **2016-04-13** - `0.1.3` - bugfix in redeem()
413
+ - **2016-04-13** - `0.1.2` - removed dependency to `pry`
414
+ - **2016-04-12** - `0.1.1` - minor gemspec changes
412
415
  - **2016-04-12** - `0.1.0` - First version:
413
416
  - Authentication
414
417
  - Voucher information: *retrieve voucher*, *list vouchers*, *retrieve redemptions*, *list redemptions*
415
418
  - Voucher operations: *redeem voucher*, *publish voucher*, *create voucher*, *enable/disable voucher*
416
- - **2016-04-12** - `0.1.1` - minor gemspec changes
417
- - **2016-04-13** - `0.1.2` - removed dependency to `pry`
419
+
418
420
 
419
421
  ## License
420
422
 
@@ -54,8 +54,9 @@ class Voucherify
54
54
 
55
55
  if code.is_a? Hash
56
56
  payload = code
57
- code = payload["voucher"]
57
+ code = payload["voucher"] || payload[:voucher]
58
58
  payload.delete "voucher"
59
+ payload.delete :voucher
59
60
  end
60
61
 
61
62
  url = @backend_url + "/vouchers/" + URI.encode(code) + "/redemption"
@@ -1,3 +1,3 @@
1
1
  class Voucherify
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voucherify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawelrychlik