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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51dddce2fbe8e44af38da1b950021e2a752b08bb
4
- data.tar.gz: 7b05e162ef18d772b3cf91462b1d7c53802493c2
3
+ metadata.gz: f4aa0cad4cae561010aa3cf6f4b21d0367b55c58
4
+ data.tar.gz: eebcdbc2babe763f666676728c328f27b25fa487
5
5
  SHA512:
6
- metadata.gz: d6707f69ab862bf9435036206dd22fe2ee3b707d84e0ec33daff792cde9f5d75b44592fd67a41987cf9ae4e81389714039fe76da8b73689ef7f41ed8be72d292
7
- data.tar.gz: 27c8835ecccb55b94089495ec7f6e4e5823c3c0cf5d455beea935e39680407fb377e161fcf36172ed3f2d113c014958ce36f9bb696c694ee4d158ae6ffbb4d4f
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.
@@ -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'],
@@ -1,3 +1,3 @@
1
1
  module Voucherify
2
- VERSION = '2.3.0'
2
+ VERSION = '2.4.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: 2.3.0
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-05-09 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake