transferzero-sdk 1.16.0 → 1.16.1
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 +4 -4
- data/Gemfile.lock +89 -0
- data/README.md +4 -4
- data/docs/Recipient.md +2 -0
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/recipient.rb +45 -1
- data/lib/transferzero-sdk/version.rb +1 -1
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cb88f7dd25322010286cda4057d0fa7353f08a01372ddd384c25c14a6a42644
|
4
|
+
data.tar.gz: b4fe63d3416fe08dbbe8c8622a09fe1c4014ff6b6cab1bc6afb3e5f4e6b7a258
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74ccb124ad0d3146592a1380d91e7a77b2bf4090cc2670b4ecbbfe2157a30077b629e8770b14368d2d98e3d31d3bbd7e8845e0a6ba35d454cdefe3be36b57ce8
|
7
|
+
data.tar.gz: a2418c3385939f664e2fe2167627814dd351874241237fac09a8764a7a369e937ff01dd5dfd2c520db407b4707390fbed0b653ec423495c7eecba74854c6c499
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
transferzero-sdk (1.16.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.4.1)
|
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-growl (0.2.16)
|
24
|
+
autotest-rails-pure (4.1.2)
|
25
|
+
byebug (11.1.3)
|
26
|
+
coderay (1.1.3)
|
27
|
+
concurrent-ruby (1.1.9)
|
28
|
+
crack (0.4.5)
|
29
|
+
rexml
|
30
|
+
diff-lcs (1.4.4)
|
31
|
+
ethon (0.14.0)
|
32
|
+
ffi (>= 1.15.0)
|
33
|
+
ffi (1.15.4)
|
34
|
+
hashdiff (1.0.1)
|
35
|
+
i18n (1.8.10)
|
36
|
+
concurrent-ruby (~> 1.0)
|
37
|
+
json (2.5.1)
|
38
|
+
method_source (1.0.0)
|
39
|
+
minitest (5.14.4)
|
40
|
+
pry (0.13.1)
|
41
|
+
coderay (~> 1.1)
|
42
|
+
method_source (~> 1.0)
|
43
|
+
pry-byebug (3.9.0)
|
44
|
+
byebug (~> 11.0)
|
45
|
+
pry (~> 0.13.0)
|
46
|
+
public_suffix (4.0.6)
|
47
|
+
rake (12.0.0)
|
48
|
+
rexml (3.2.4)
|
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.1)
|
54
|
+
rspec-support (~> 3.10.0)
|
55
|
+
rspec-expectations (3.10.1)
|
56
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
57
|
+
rspec-support (~> 3.10.0)
|
58
|
+
rspec-mocks (3.10.1)
|
59
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-support (3.10.1)
|
62
|
+
typhoeus (1.4.0)
|
63
|
+
ethon (>= 0.9.0)
|
64
|
+
tzinfo (2.0.4)
|
65
|
+
concurrent-ruby (~> 1.0)
|
66
|
+
vcr (3.0.3)
|
67
|
+
webmock (1.24.6)
|
68
|
+
addressable (>= 2.3.6)
|
69
|
+
crack (>= 0.3.2)
|
70
|
+
hashdiff
|
71
|
+
zeitwerk (2.4.2)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
ZenTest (~> 4.11, >= 4.11.2)
|
78
|
+
autotest (~> 4.4, >= 4.4.6)
|
79
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
80
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
81
|
+
pry-byebug
|
82
|
+
rake (~> 12.0.0)
|
83
|
+
rspec (~> 3.6, >= 3.6.0)
|
84
|
+
transferzero-sdk!
|
85
|
+
vcr (~> 3.0, >= 3.0.1)
|
86
|
+
webmock (~> 1.24, >= 1.24.3)
|
87
|
+
|
88
|
+
BUNDLED WITH
|
89
|
+
2.1.4
|
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.16.
|
10
|
+
- Package version: 1.16.1
|
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.16.
|
34
|
+
gem install ./transferzero-sdk-1.16.1.gem
|
35
35
|
```
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.16.
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.16.1.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.16.
|
42
|
+
gem 'transferzero-sdk', '~> 1.16.1'
|
43
43
|
|
44
44
|
### Install from Git
|
45
45
|
|
data/docs/Recipient.md
CHANGED
@@ -26,6 +26,7 @@ Name | Type | Description | Notes
|
|
26
26
|
**output_amount** | **Float** | The amount that will be paid to the recipient | [optional]
|
27
27
|
**output_currency** | **String** | The currency the payment will be delivered in | [optional]
|
28
28
|
**id** | **String** | | [optional]
|
29
|
+
**type** | **String** | Type of recipient to create - either person or business (defaults to person) | [optional]
|
29
30
|
**errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
|
30
31
|
|
31
32
|
## Code Sample
|
@@ -55,6 +56,7 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
|
|
55
56
|
output_amount: 10000,
|
56
57
|
output_currency: NGN,
|
57
58
|
id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
|
59
|
+
type: person,
|
58
60
|
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]})
|
59
61
|
```
|
60
62
|
|
@@ -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.16.
|
38
|
+
@user_agent = "TransferZero-SDK/Ruby/1.16.1"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => 'application/json',
|
41
41
|
'User-Agent' => @user_agent
|
@@ -76,9 +76,34 @@ class Recipient
|
|
76
76
|
|
77
77
|
attr_accessor :id
|
78
78
|
|
79
|
+
# Type of recipient to create - either person or business (defaults to person)
|
80
|
+
attr_accessor :type
|
81
|
+
|
79
82
|
# The fields that have some problems and don't pass validation
|
80
83
|
attr_accessor :errors
|
81
84
|
|
85
|
+
class EnumAttributeValidator
|
86
|
+
attr_reader :datatype
|
87
|
+
attr_reader :allowable_values
|
88
|
+
|
89
|
+
def initialize(datatype, allowable_values)
|
90
|
+
@allowable_values = allowable_values.map do |value|
|
91
|
+
case datatype.to_s
|
92
|
+
when /Integer/i
|
93
|
+
value.to_i
|
94
|
+
when /Float/i
|
95
|
+
value.to_f
|
96
|
+
else
|
97
|
+
value
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def valid?(value)
|
103
|
+
!value || allowable_values.include?(value)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
82
107
|
# Attribute mapping from ruby-style variable name to JSON key.
|
83
108
|
def self.attribute_map
|
84
109
|
{
|
@@ -104,6 +129,7 @@ class Recipient
|
|
104
129
|
:'output_amount' => :'output_amount',
|
105
130
|
:'output_currency' => :'output_currency',
|
106
131
|
:'id' => :'id',
|
132
|
+
:'type' => :'type',
|
107
133
|
:'errors' => :'errors'
|
108
134
|
}
|
109
135
|
end
|
@@ -133,6 +159,7 @@ class Recipient
|
|
133
159
|
:'output_amount' => :'Float',
|
134
160
|
:'output_currency' => :'String',
|
135
161
|
:'id' => :'String',
|
162
|
+
:'type' => :'String',
|
136
163
|
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
137
164
|
}
|
138
165
|
end
|
@@ -240,6 +267,10 @@ class Recipient
|
|
240
267
|
self.id = attributes[:'id']
|
241
268
|
end
|
242
269
|
|
270
|
+
if attributes.key?(:'type')
|
271
|
+
self.type = attributes[:'type']
|
272
|
+
end
|
273
|
+
|
243
274
|
if attributes.key?(:'errors')
|
244
275
|
if (value = attributes[:'errors']).is_a?(Hash)
|
245
276
|
self.errors = value
|
@@ -272,9 +303,21 @@ class Recipient
|
|
272
303
|
return false if @requested_amount.nil?
|
273
304
|
return false if @requested_currency.nil?
|
274
305
|
return false if @payout_method.nil?
|
306
|
+
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
307
|
+
return false unless type_validator.valid?(@type)
|
275
308
|
true
|
276
309
|
end
|
277
310
|
|
311
|
+
# Custom attribute writer method checking allowed values (enum).
|
312
|
+
# @param [Object] type Object to be assigned
|
313
|
+
def type=(type)
|
314
|
+
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
315
|
+
unless validator.valid?(type) || type.empty?
|
316
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
317
|
+
end
|
318
|
+
@type = type
|
319
|
+
end
|
320
|
+
|
278
321
|
# Checks equality by comparing each attribute.
|
279
322
|
# @param [Object] Object to be compared
|
280
323
|
def ==(o)
|
@@ -302,6 +345,7 @@ class Recipient
|
|
302
345
|
output_amount == o.output_amount &&
|
303
346
|
output_currency == o.output_currency &&
|
304
347
|
id == o.id &&
|
348
|
+
type == o.type &&
|
305
349
|
errors == o.errors
|
306
350
|
end
|
307
351
|
|
@@ -314,7 +358,7 @@ class Recipient
|
|
314
358
|
# Calculates hash code according to all attributes.
|
315
359
|
# @return [Integer] Hash code
|
316
360
|
def hash
|
317
|
-
[requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
|
361
|
+
[requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, type, errors].hash
|
318
362
|
end
|
319
363
|
|
320
364
|
require 'active_support/core_ext/hash'
|
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.16.
|
4
|
+
version: 1.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TransferZero
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-23 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.0
|
68
65
|
- - "~>"
|
69
66
|
- !ruby/object:Gem::Version
|
70
67
|
version: '3.6'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 3.6.0
|
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.0
|
78
75
|
- - "~>"
|
79
76
|
- !ruby/object:Gem::Version
|
80
77
|
version: '3.6'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 3.6.0
|
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
|
@@ -601,7 +602,7 @@ homepage: https://github.com/transferzero/transferzero-sdk-ruby
|
|
601
602
|
licenses:
|
602
603
|
- MIT
|
603
604
|
metadata: {}
|
604
|
-
post_install_message:
|
605
|
+
post_install_message:
|
605
606
|
rdoc_options: []
|
606
607
|
require_paths:
|
607
608
|
- lib
|
@@ -616,8 +617,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
616
617
|
- !ruby/object:Gem::Version
|
617
618
|
version: '0'
|
618
619
|
requirements: []
|
619
|
-
rubygems_version: 3.
|
620
|
-
signing_key:
|
620
|
+
rubygems_version: 3.1.4
|
621
|
+
signing_key:
|
621
622
|
specification_version: 4
|
622
623
|
summary: TransferZero API Ruby Gem
|
623
624
|
test_files:
|