voucherify 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/lib/voucherify/client.rb +1 -1
- data/lib/voucherify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4aa0cad4cae561010aa3cf6f4b21d0367b55c58
|
4
|
+
data.tar.gz: eebcdbc2babe763f666676728c328f27b25fa487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f06ee069dcd509386b414bf1243d9e0e3e9522276c7d1d1772cb774feb1d1450b868423c22393085e9dfbfa391bb2f9b5d7b8f8e92d710de1ae53ffd19011c5e
|
7
|
+
data.tar.gz: 204aa07951b003cb218df95bf8fc69d7b4878524bcf0d96bcb384c124ddb0625b51331f70a898b193952e31d4d735fcd47bf74759e79f9348557f9f7fdbf93ee
|
data/README.md
CHANGED
@@ -107,6 +107,18 @@ voucherify = Voucherify::Client.new({
|
|
107
107
|
})
|
108
108
|
```
|
109
109
|
|
110
|
+
### API Endpoint
|
111
|
+
|
112
|
+
Optionally, you can add `apiUrl` to the client options if you want to use Voucherify running in a specific region.
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
voucherify = Voucherify::Client.new({
|
116
|
+
:applicationId => 'YOUR-APPLICATION-ID',
|
117
|
+
:clientSecretKey => 'YOUR-CLIENT-SECRET-KEY',
|
118
|
+
:apiUrl => 'https://<region>.api.voucherify.io'
|
119
|
+
})
|
120
|
+
```
|
121
|
+
|
110
122
|
## API
|
111
123
|
|
112
124
|
This SDK is fully consistent with restful API Voucherify provides.
|
@@ -736,6 +748,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
736
748
|
Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
|
737
749
|
|
738
750
|
## Changelog
|
751
|
+
- **2019-06-19** - `2.4.0` - Added support for custom API endpoint, that allows to connect to projects created in specific Voucherify region.
|
739
752
|
- **2019-05-09** - `2.3.0` - Added `create_publication` method in Distributions module..
|
740
753
|
- **2019-04-23** - `2.2.0` - Loyalties API, Rewards API, Orders API.
|
741
754
|
- **2019-02-19** - `2.1.1` - Treat `referral` as optional in custom events. Added new method for custom event tracking.
|
data/lib/voucherify/client.rb
CHANGED
@@ -9,7 +9,7 @@ module Voucherify
|
|
9
9
|
|
10
10
|
def initialize (options)
|
11
11
|
@options = options
|
12
|
-
@backend_url = 'https://api.voucherify.io/v1'
|
12
|
+
@backend_url = (@options[:apiUrl] || @options['apiUrl'] || 'https://api.voucherify.io') + '/v1'
|
13
13
|
@headers = {
|
14
14
|
'X-App-Id' => @options[:applicationId] || @options['applicationId'],
|
15
15
|
'X-App-Token' => @options[:clientSecretKey] || @options['clientSecretKey'],
|
data/lib/voucherify/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawelrychlik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|