lib/voucherify/client.rb in voucherify-2.3.0 vs lib/voucherify/client.rb in voucherify-2.4.0
- old
+ new
@@ -7,10 +7,10 @@
class Client
attr_reader :backend_url
def initialize (options)
@options = options
- @backend_url = 'https://api.voucherify.io/v1'
+ @backend_url = (@options[:apiUrl] || @options['apiUrl'] || 'https://api.voucherify.io') + '/v1'
@headers = {
'X-App-Id' => @options[:applicationId] || @options['applicationId'],
'X-App-Token' => @options[:clientSecretKey] || @options['clientSecretKey'],
'X-Voucherify-Channel' => 'Ruby-SDK',
'X-Voucherify-API-Version' => @options[:apiVersion] || @options['apiVersion'] || 'v2018-08-01',