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 +4 -4
- data/README.md +15 -13
- data/lib/voucherify.rb +2 -1
- data/lib/voucherify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49cefa65987b138ce3db394ed4c367927573a47e
|
4
|
+
data.tar.gz: 8eebd7cbe3e8ea1558ec7c0ee45ace44a5d35166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
306
|
-
customer
|
307
|
-
id
|
308
|
-
name
|
309
|
-
email
|
310
|
-
description
|
311
|
-
metadata
|
312
|
-
locale
|
313
|
-
shoeSize
|
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
|
-
|
417
|
-
- **2016-04-13** - `0.1.2` - removed dependency to `pry`
|
419
|
+
|
418
420
|
|
419
421
|
## License
|
420
422
|
|
data/lib/voucherify.rb
CHANGED
@@ -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"
|
data/lib/voucherify/version.rb
CHANGED