transferzero-sdk 1.19.1 → 1.19.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '00468d46970a925efd5635a7582a0d3a1c1960f9506eb0a50d9b2abcaddc5a20'
4
- data.tar.gz: c6ee6c667f53b785dc92c3635ba29f1350d28b66dadddbbe7f7041e9ffa173fc
3
+ metadata.gz: '0812c5257c325705bfa9e2432f72cf21ca96f5d24069586b24671e5194a1c250'
4
+ data.tar.gz: d18bed4cc5d05afe7307b2bb200d36399cd16ec835e00c7ece7d0c8845449ab3
5
5
  SHA512:
6
- metadata.gz: 4cca859d0aa1c027a2a4d99fd3f84c3274143ebae977de2aa69a3f3397e9869cbf1b79a32d3b6c18be2613a58dcbc11f76e4898a2c443876a5b7c42a25fa00c2
7
- data.tar.gz: 574688f95c6f1cd9c2675d3730ad647a635507df70d83c15dc60a547e737f8515a6b3a587744c378a6ee2ceed8b78f6d1053317f3ca6ad25c8cfd325b7542483
6
+ metadata.gz: e64cc5a2e82023fd5dc29010c7b89df1beeac80cd0375f426389619c775b654b4d0db9e23595dbf7a6fe790c30da94dea11a6f48f098abbbbb120753214e0d97
7
+ data.tar.gz: a171d6704db8e11b503df0ec67409eafcddff3140bf2b455aa2f0718b61732d6405da0e16503c9c62e3b2229f99e70a8ba02f4839264228a3bc150fc3be035aa
data/Gemfile.lock ADDED
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ transferzero-sdk (1.11.0)
5
+ activesupport (>= 4)
6
+ json (>= 1.4)
7
+ typhoeus (~> 1.0, >= 1.0.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ZenTest (4.12.0)
13
+ activesupport (6.1.3)
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ zeitwerk (~> 2.3)
19
+ addressable (2.7.0)
20
+ public_suffix (>= 2.0.2, < 5.0)
21
+ autotest (4.4.6)
22
+ ZenTest (>= 4.4.1)
23
+ autotest-fsevent (0.2.17)
24
+ sys-uname
25
+ autotest-growl (0.2.16)
26
+ autotest-rails-pure (4.1.2)
27
+ byebug (11.1.3)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.1.8)
30
+ crack (0.4.4)
31
+ diff-lcs (1.4.4)
32
+ ethon (0.12.0)
33
+ ffi (>= 1.3.0)
34
+ ffi (1.13.1)
35
+ hashdiff (1.0.1)
36
+ i18n (1.8.9)
37
+ concurrent-ruby (~> 1.0)
38
+ json (2.5.1)
39
+ method_source (1.0.0)
40
+ minitest (5.14.3)
41
+ pry (0.13.1)
42
+ coderay (~> 1.1)
43
+ method_source (~> 1.0)
44
+ pry-byebug (3.9.0)
45
+ byebug (~> 11.0)
46
+ pry (~> 0.13.0)
47
+ public_suffix (4.0.6)
48
+ rake (12.0.0)
49
+ rspec (3.10.0)
50
+ rspec-core (~> 3.10.0)
51
+ rspec-expectations (~> 3.10.0)
52
+ rspec-mocks (~> 3.10.0)
53
+ rspec-core (3.10.0)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-expectations (3.10.0)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-mocks (3.10.0)
59
+ diff-lcs (>= 1.2.0, < 2.0)
60
+ rspec-support (~> 3.10.0)
61
+ rspec-support (3.10.0)
62
+ sys-uname (1.2.2)
63
+ ffi (~> 1.1)
64
+ typhoeus (1.4.0)
65
+ ethon (>= 0.9.0)
66
+ tzinfo (2.0.4)
67
+ concurrent-ruby (~> 1.0)
68
+ vcr (3.0.3)
69
+ webmock (1.24.6)
70
+ addressable (>= 2.3.6)
71
+ crack (>= 0.3.2)
72
+ hashdiff
73
+ zeitwerk (2.4.2)
74
+
75
+ PLATFORMS
76
+ ruby
77
+
78
+ DEPENDENCIES
79
+ ZenTest (~> 4.11, >= 4.11.2)
80
+ autotest (~> 4.4, >= 4.4.6)
81
+ autotest-fsevent (~> 0.2, >= 0.2.12)
82
+ autotest-growl (~> 0.2, >= 0.2.16)
83
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
84
+ pry-byebug
85
+ rake (~> 12.0.0)
86
+ rspec (~> 3.6, >= 3.6.0)
87
+ transferzero-sdk!
88
+ vcr (~> 3.0, >= 3.0.1)
89
+ webmock (~> 1.24, >= 1.24.3)
90
+
91
+ BUNDLED WITH
92
+ 1.17.3
data/README.md CHANGED
@@ -7,7 +7,7 @@ Reference documentation for the TransferZero API V1
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 1.0
10
- - Package version: 1.19.1
10
+ - Package version: 1.19.2
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
 
13
13
  For more information, please visit:
@@ -31,15 +31,15 @@ gem build transferzero-sdk.gemspec
31
31
  Then either install the gem locally:
32
32
 
33
33
  ```shell
34
- gem install ./transferzero-sdk-1.19.1.gem
34
+ gem install ./transferzero-sdk-1.19.2.gem
35
35
  ```
36
- (for development, run `gem install --dev ./transferzero-sdk-1.19.1.gem` to install the development dependencies)
36
+ (for development, run `gem install --dev ./transferzero-sdk-1.19.2.gem` to install the development dependencies)
37
37
 
38
38
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
39
39
 
40
40
  Finally add this to the Gemfile:
41
41
 
42
- gem 'transferzero-sdk', '~> 1.19.1'
42
+ gem 'transferzero-sdk', '~> 1.19.2'
43
43
 
44
44
  ### Install from Git
45
45
 
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **redirect_url** | **String** | This is where the sender should be redirected back when the payment has been finished | [optional]
9
9
  **phone_number** | **String** | The phone number where the funds should be collected from | [optional]
10
10
  **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | | [optional]
11
+ **otp** | **String** | The OTP that the sender received in otp verified ussd popup ux flow. | [optional]
11
12
  **refund_address** | **String** | Please make sure the refund_address is a valid BTC address belonging to the sender, as that is going to be used in case the transaction has to be refunded. | [optional]
12
13
 
13
14
  ## Code Sample
@@ -19,6 +20,7 @@ instance = TransferZero::PayinMethodDetails.new(payment_method: null,
19
20
  redirect_url: null,
20
21
  phone_number: +2569999999,
21
22
  mobile_provider: null,
23
+ otp: null,
22
24
  refund_address: null)
23
25
  ```
24
26
 
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **phone_number** | **String** | The phone number where the funds should be collected from | [optional]
8
8
  **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | | [optional]
9
+ **otp** | **String** | The OTP that the sender received in otp verified ussd popup ux flow. | [optional]
9
10
 
10
11
  ## Code Sample
11
12
 
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
13
14
  require 'TransferZero'
14
15
 
15
16
  instance = TransferZero::PayinMethodDetailsMobile.new(phone_number: +2569999999,
16
- mobile_provider: null)
17
+ mobile_provider: null,
18
+ otp: null)
17
19
  ```
18
20
 
19
21
 
@@ -195,7 +195,7 @@ end
195
195
 
196
196
 
197
197
  # **retry_payin_method**
198
- > retry_payin_method(payin_method_id)
198
+ > PayinMethodResponse retry_payin_method(payin_method_id)
199
199
 
200
200
  Retries PayinMethod
201
201
 
@@ -211,11 +211,12 @@ api_instance = TransferZero::PayinMethodsApi.new
211
211
 
212
212
  begin
213
213
  #Retries PayinMethod
214
- api_instance.retry_payin_method(payin_method_id)
214
+ result = api_instance.retry_payin_method(payin_method_id)
215
+ p result
215
216
  rescue TransferZero::ApiError => e
216
217
  if e.validation_error
217
218
  puts "WARN: Validation error occured when calling the endpoint"
218
- result = e.response_object("")
219
+ result = e.response_object("PayinMethodResponse")
219
220
  p result
220
221
  else
221
222
  puts "Exception when calling PayinMethodsApi->retry_payin_method: #{e}"
@@ -231,7 +232,7 @@ Name | Type | Description | Notes
231
232
 
232
233
  ### Return type
233
234
 
234
- nil (empty response body)
235
+ [**PayinMethodResponse**](PayinMethodResponse.md)
235
236
 
236
237
  ### Authorization
237
238
 
@@ -250,7 +251,7 @@ end
250
251
  ### HTTP request headers
251
252
 
252
253
  - **Content-Type**: Not defined
253
- - **Accept**: Not defined
254
+ - **Accept**: application/json
254
255
 
255
256
 
256
257
 
@@ -195,17 +195,17 @@ module TransferZero
195
195
  # Retries the collection process for the payin method. Please note only payin methods in `error` state can be retried.
196
196
  # @param payin_method_id ID of the payin method whose collection process should be retried Example: &#x60;/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry&#x60;
197
197
  # @param [Hash] opts the optional parameters
198
- # @return [nil]
198
+ # @return [PayinMethodResponse]
199
199
  def retry_payin_method(payin_method_id, opts = {})
200
- retry_payin_method_with_http_info(payin_method_id, opts)
201
- nil
200
+ data, _status_code, _headers = retry_payin_method_with_http_info(payin_method_id, opts)
201
+ data
202
202
  end
203
203
 
204
204
  # Retries PayinMethod
205
205
  # Retries the collection process for the payin method. Please note only payin methods in &#x60;error&#x60; state can be retried.
206
206
  # @param payin_method_id ID of the payin method whose collection process should be retried Example: &#x60;/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry&#x60;
207
207
  # @param [Hash] opts the optional parameters
208
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
208
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
209
209
  def retry_payin_method_with_http_info(payin_method_id, opts = {})
210
210
  if @api_client.config.debugging
211
211
  @api_client.config.logger.debug 'Calling API: PayinMethodsApi.retry_payin_method ...'
@@ -222,6 +222,8 @@ module TransferZero
222
222
 
223
223
  # header parameters
224
224
  header_params = {}
225
+ # HTTP header 'Accept' (if needed)
226
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
227
 
226
228
  # form parameters
227
229
  form_params = {}
@@ -234,7 +236,8 @@ module TransferZero
234
236
  :query_params => query_params,
235
237
  :form_params => form_params,
236
238
  :body => post_body,
237
- :auth_names => auth_names)
239
+ :auth_names => auth_names,
240
+ :return_type => 'PayinMethodResponse')
238
241
  if @api_client.config.debugging
239
242
  @api_client.config.logger.debug "API called: PayinMethodsApi#retry_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
243
  end
@@ -35,7 +35,7 @@ module TransferZero
35
35
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
36
36
  def initialize(config = Configuration.default)
37
37
  @config = config
38
- @user_agent = "TransferZero-SDK/Ruby/1.19.1"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.19.2"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -26,6 +26,9 @@ class PayinMethodDetails
26
26
 
27
27
  attr_accessor :mobile_provider
28
28
 
29
+ # The OTP that the sender received in otp verified ussd popup ux flow.
30
+ attr_accessor :otp
31
+
29
32
  # Please make sure the refund_address is a valid BTC address belonging to the sender, as that is going to be used in case the transaction has to be refunded.
30
33
  attr_accessor :refund_address
31
34
 
@@ -36,6 +39,7 @@ class PayinMethodDetails
36
39
  :'redirect_url' => :'redirect_url',
37
40
  :'phone_number' => :'phone_number',
38
41
  :'mobile_provider' => :'mobile_provider',
42
+ :'otp' => :'otp',
39
43
  :'refund_address' => :'refund_address'
40
44
  }
41
45
  end
@@ -47,6 +51,7 @@ class PayinMethodDetails
47
51
  :'redirect_url' => :'String',
48
52
  :'phone_number' => :'String',
49
53
  :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
54
+ :'otp' => :'String',
50
55
  :'refund_address' => :'String'
51
56
  }
52
57
  end
@@ -91,6 +96,10 @@ class PayinMethodDetails
91
96
  self.mobile_provider = attributes[:'mobile_provider']
92
97
  end
93
98
 
99
+ if attributes.key?(:'otp')
100
+ self.otp = attributes[:'otp']
101
+ end
102
+
94
103
  if attributes.key?(:'refund_address')
95
104
  self.refund_address = attributes[:'refund_address']
96
105
  end
@@ -134,6 +143,7 @@ class PayinMethodDetails
134
143
  redirect_url == o.redirect_url &&
135
144
  phone_number == o.phone_number &&
136
145
  mobile_provider == o.mobile_provider &&
146
+ otp == o.otp &&
137
147
  refund_address == o.refund_address
138
148
  end
139
149
 
@@ -146,7 +156,7 @@ class PayinMethodDetails
146
156
  # Calculates hash code according to all attributes.
147
157
  # @return [Integer] Hash code
148
158
  def hash
149
- [payment_method, redirect_url, phone_number, mobile_provider, refund_address].hash
159
+ [payment_method, redirect_url, phone_number, mobile_provider, otp, refund_address].hash
150
160
  end
151
161
 
152
162
  require 'active_support/core_ext/hash'
@@ -20,11 +20,15 @@ class PayinMethodDetailsMobile
20
20
 
21
21
  attr_accessor :mobile_provider
22
22
 
23
+ # The OTP that the sender received in otp verified ussd popup ux flow.
24
+ attr_accessor :otp
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'phone_number' => :'phone_number',
27
- :'mobile_provider' => :'mobile_provider'
30
+ :'mobile_provider' => :'mobile_provider',
31
+ :'otp' => :'otp'
28
32
  }
29
33
  end
30
34
 
@@ -32,7 +36,8 @@ class PayinMethodDetailsMobile
32
36
  def self.openapi_types
33
37
  {
34
38
  :'phone_number' => :'String',
35
- :'mobile_provider' => :'PayoutMethodMobileProviderEnum'
39
+ :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
40
+ :'otp' => :'String'
36
41
  }
37
42
  end
38
43
 
@@ -58,6 +63,10 @@ class PayinMethodDetailsMobile
58
63
  if attributes.key?(:'mobile_provider')
59
64
  self.mobile_provider = attributes[:'mobile_provider']
60
65
  end
66
+
67
+ if attributes.key?(:'otp')
68
+ self.otp = attributes[:'otp']
69
+ end
61
70
  end
62
71
 
63
72
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -79,7 +88,8 @@ class PayinMethodDetailsMobile
79
88
  return true if self.equal?(o)
80
89
  self.class == o.class &&
81
90
  phone_number == o.phone_number &&
82
- mobile_provider == o.mobile_provider
91
+ mobile_provider == o.mobile_provider &&
92
+ otp == o.otp
83
93
  end
84
94
 
85
95
  # @see the `==` method
@@ -91,7 +101,7 @@ class PayinMethodDetailsMobile
91
101
  # Calculates hash code according to all attributes.
92
102
  # @return [Integer] Hash code
93
103
  def hash
94
- [phone_number, mobile_provider].hash
104
+ [phone_number, mobile_provider, otp].hash
95
105
  end
96
106
 
97
107
  require 'active_support/core_ext/hash'
@@ -16,6 +16,8 @@ module TransferZero
16
16
  class PayinMethodUxFlow
17
17
 
18
18
  USSD_POPUP = "ussd_popup".freeze
19
+ USSD_MENU_APPROVAL = "ussd_menu_approval".freeze
20
+ OTP_VERIFIED_USSD_POPUP = "otp_verified_ussd_popup".freeze
19
21
  BANK_TRANSFER = "bank_transfer".freeze
20
22
  HTTP_REDIRECT = "http_redirect".freeze
21
23
  BLOCKCHAIN = "blockchain".freeze
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.19.1'
14
+ VERSION = '1.19.2'
15
15
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transferzero-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TransferZero
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-22 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -62,22 +62,22 @@ dependencies:
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '3.6'
68
65
  - - ">="
69
66
  - !ruby/object:Gem::Version
70
67
  version: 3.6.0
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '3.6'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: '3.6'
78
75
  - - ">="
79
76
  - !ruby/object:Gem::Version
80
77
  version: 3.6.0
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '3.6'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: vcr
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -206,6 +206,7 @@ extensions: []
206
206
  extra_rdoc_files: []
207
207
  files:
208
208
  - Gemfile
209
+ - Gemfile.lock
209
210
  - LICENSE
210
211
  - README.md
211
212
  - Rakefile
@@ -620,13 +621,13 @@ files:
620
621
  - spec/models/webhook_log_spec.rb
621
622
  - spec/models/webhook_spec.rb
622
623
  - spec/spec_helper.rb
623
- - transferzero-sdk-1.17.0.gem
624
+ - transferzero-sdk-1.19.0.gem
624
625
  - transferzero-sdk.gemspec
625
626
  homepage: https://github.com/transferzero/transferzero-sdk-ruby
626
627
  licenses:
627
628
  - MIT
628
629
  metadata: {}
629
- post_install_message:
630
+ post_install_message:
630
631
  rdoc_options: []
631
632
  require_paths:
632
633
  - lib
@@ -641,8 +642,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
641
642
  - !ruby/object:Gem::Version
642
643
  version: '0'
643
644
  requirements: []
644
- rubygems_version: 3.1.2
645
- signing_key:
645
+ rubygems_version: 3.0.3
646
+ signing_key:
646
647
  specification_version: 4
647
648
  summary: TransferZero API Ruby Gem
648
649
  test_files:
Binary file