berbix 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/berbix.rb +7 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9987708521ec087ad34bb2bccc7a2b00a6cf161d4b2e49b7f95cd6a4d449215
4
- data.tar.gz: 6ac9676690b4269b550e6e401cab0b32cff20a9e87e52e7f1e32d1695b119cc5
3
+ metadata.gz: 07a9370bef12c540f5221ada05219c051922698b0d738017b97bf27e60c52deb
4
+ data.tar.gz: e075b7d20b1951b818312d6081e33da021b46247f33ece5006a9d5f8915972c6
5
5
  SHA512:
6
- metadata.gz: 7bc15dc6022cd4ea92aa7bc845bc94b68e30141c1324fb0af1b934e7142df70d2445a71f3fba2c73864c32541357238e309a6c2ad972613afa16d6313d8ec323
7
- data.tar.gz: a964e57ccd439700c726ed5c9fd9de01435f8f422b25e00e01f022552c45e3a4b2708420804b0dc089a046eaa852d9c0a441b89a38076cbc20234e6690040400
6
+ metadata.gz: 4381b67fe62cf954b963ef20ba5a859469c22bd13236dd8185f5ef48b1b0ae8c61733af48e2d5788edadd8951544b5eeb5e257f47117f8c4e53b0b830f6823fd
7
+ data.tar.gz: fafff8852c9cb95cc7f0e78f254875677dede2ca46f93c43dee21c83660efffc2ce9a03142733949f2aa04dafeb60ba81269d5570be08e93fbbcbe93f66760e5
@@ -2,7 +2,7 @@ require 'net/https'
2
2
  require 'json'
3
3
 
4
4
  module Berbix
5
- SDK_VERSION = '0.0.9'
5
+ SDK_VERSION = '0.0.10'
6
6
  CLOCK_DRIFT = 300
7
7
 
8
8
  class HTTPClient
@@ -57,15 +57,16 @@ module Berbix
57
57
  end
58
58
 
59
59
  class Tokens
60
- attr_reader :access_token, :client_token, :refresh_token, :expiry, :transaction_id, :user_id
60
+ attr_reader :access_token, :client_token, :refresh_token, :expiry, :transaction_id, :user_id, :response
61
61
 
62
- def initialize(refresh_token, access_token=nil, client_token=nil, expiry=nil, transaction_id=nil)
62
+ def initialize(refresh_token, access_token=nil, client_token=nil, expiry=nil, transaction_id=nil, response=nil)
63
63
  @refresh_token = refresh_token
64
64
  @access_token = access_token
65
65
  @client_token = client_token
66
66
  @expiry = expiry
67
67
  @transaction_id = transaction_id
68
68
  @user_id = transaction_id
69
+ @response = response
69
70
  end
70
71
 
71
72
  def refresh!(access_token, client_token, expiry, transaction_id)
@@ -102,6 +103,7 @@ module Berbix
102
103
  payload[:phone] = opts[:phone] unless opts[:phone].nil?
103
104
  payload[:customer_uid] = opts[:customer_uid].to_s unless opts[:customer_uid].nil?
104
105
  payload[:template_key] = opts[:template_key] unless opts[:template_key].nil?
106
+ payload[:hosted_options] = opts[:hosted_options] unless opts[:hosted_options].nil?
105
107
  fetch_tokens('/v0/transactions', payload)
106
108
  end
107
109
 
@@ -209,7 +211,8 @@ module Berbix
209
211
  result['access_token'],
210
212
  result['client_token'],
211
213
  Time.now + result['expires_in'],
212
- result['transaction_id'])
214
+ result['transaction_id'],
215
+ result)
213
216
  end
214
217
 
215
218
  def auth
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berbix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Levine