transferzero-sdk 1.37.3 → 1.37.5

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: 5fb87b24b8a7d091333fef22151dd9074d30175b4541daec2a9445890aa6f8f7
4
- data.tar.gz: 50598dbcf998aa3e2a4bfd62916e39b71cebf1d97e13772f7323b3cf175f9353
3
+ metadata.gz: ed72b9320b1de46c51f07501731dec006607d453c539a8d9dc37c21d719016b0
4
+ data.tar.gz: 7fc11d2c96e8b9697352b827b83c460c0cdbbad13eb0803354715f075be7a63c
5
5
  SHA512:
6
- metadata.gz: 512655aa70d98a2b08cd17cd908dda64af040ef194b11f6a65516f96a870095d5fdf1bfd41f870a6b76662792d03a88ba54b87a6d5514c5dec0de4f5d7a1dd90
7
- data.tar.gz: a756008a7a0d8cbad169df5477d0e0d67f12e2ffee2c830ef3f2869e246ddec8a2307e811c7717cbb7830a3a6bcb0add69877bda70b5ad4a5ac4b8fb068e74cf
6
+ metadata.gz: ab416c5db52b52ef4f9f29bf034f8f35404457309910083b631a4fb6afbb888f04a6c11789c452f9b7384705d65db49032d2116c25a301b80c85f177a3535480
7
+ data.tar.gz: c92635d6382fd87c264a8135a45dae55891e7ef3d79893397eaf16757ba4e02b4abf4b6d6a422a2916ff7a5164890807b09287551056e01914308bd6d5dc050d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transferzero-sdk (1.37.3)
4
+ transferzero-sdk (1.37.5)
5
5
  activesupport (>= 4)
6
6
  faraday (~> 1.0, >= 1.0.1)
7
7
  json (>= 1.4)
@@ -10,7 +10,7 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ZenTest (4.12.2)
13
- activesupport (8.1.2)
13
+ activesupport (8.1.3)
14
14
  base64
15
15
  bigdecimal
16
16
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -24,7 +24,7 @@ GEM
24
24
  tzinfo (~> 2.0, >= 2.0.5)
25
25
  uri (>= 0.13.1)
26
26
  base64 (0.3.0)
27
- bigdecimal (4.0.1)
27
+ bigdecimal (4.1.2)
28
28
  byebug (13.0.0)
29
29
  reline (>= 0.6.0)
30
30
  coderay (1.1.3)
@@ -32,7 +32,7 @@ GEM
32
32
  connection_pool (3.0.2)
33
33
  diff-lcs (1.6.2)
34
34
  drb (2.2.3)
35
- faraday (1.10.4)
35
+ faraday (1.10.5)
36
36
  faraday-em_http (~> 1.0)
37
37
  faraday-em_synchrony (~> 1.0)
38
38
  faraday-excon (~> 1.1)
@@ -54,14 +54,15 @@ GEM
54
54
  faraday-net_http_persistent (1.2.0)
55
55
  faraday-patron (1.0.0)
56
56
  faraday-rack (1.0.0)
57
- faraday-retry (1.0.3)
57
+ faraday-retry (1.0.4)
58
58
  i18n (1.14.8)
59
59
  concurrent-ruby (~> 1.0)
60
60
  io-console (0.8.2)
61
- json (2.18.1)
61
+ json (2.19.5)
62
62
  logger (1.7.0)
63
63
  method_source (1.1.0)
64
- minitest (6.0.1)
64
+ minitest (6.0.6)
65
+ drb (~> 2.0)
65
66
  prism (~> 1.5)
66
67
  multipart-post (2.4.1)
67
68
  prism (1.9.0)
@@ -84,7 +85,7 @@ GEM
84
85
  rspec-expectations (3.13.5)
85
86
  diff-lcs (>= 1.2.0, < 2.0)
86
87
  rspec-support (~> 3.13.0)
87
- rspec-mocks (3.13.7)
88
+ rspec-mocks (3.13.8)
88
89
  diff-lcs (>= 1.2.0, < 2.0)
89
90
  rspec-support (~> 3.13.0)
90
91
  rspec-support (3.13.7)
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.37.3
10
+ - Package version: 1.37.5
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.37.3.gem
34
+ gem install ./transferzero-sdk-1.37.5.gem
35
35
  ```
36
- (for development, run `gem install --dev ./transferzero-sdk-1.37.3.gem` to install the development dependencies)
36
+ (for development, run `gem install --dev ./transferzero-sdk-1.37.5.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.37.3'
42
+ gem 'transferzero-sdk', '~> 1.37.5'
43
43
 
44
44
  ### Install from Git
45
45
 
@@ -113,6 +113,7 @@ Class | Method | HTTP request | Description
113
113
  *TransferZero::CurrencyInfoApi* | [**info_currencies**](docs/CurrencyInfoApi.md#info_currencies) | **GET** /info/currencies | Getting a list of possible requested currencies
114
114
  *TransferZero::CurrencyInfoApi* | [**info_currencies_in**](docs/CurrencyInfoApi.md#info_currencies_in) | **GET** /info/currencies/in | Getting a list of possible input currencies
115
115
  *TransferZero::CurrencyInfoApi* | [**info_currencies_out**](docs/CurrencyInfoApi.md#info_currencies_out) | **GET** /info/currencies/out | Getting a list of possible output currencies
116
+ *TransferZero::DlocalBalanceApi* | [**get_balance**](docs/DlocalBalanceApi.md#get_balance) | **GET** /dlocal/balance | Get dlocal balances
116
117
  *TransferZero::DocumentsApi* | [**get_document**](docs/DocumentsApi.md#get_document) | **GET** /documents/{Document ID} | Fetching a document
117
118
  *TransferZero::DocumentsApi* | [**get_documents**](docs/DocumentsApi.md#get_documents) | **GET** /documents | Getting a list of documents
118
119
  *TransferZero::DocumentsApi* | [**post_documents**](docs/DocumentsApi.md#post_documents) | **POST** /documents | Creating a document
@@ -176,6 +177,8 @@ Class | Method | HTTP request | Description
176
177
  - [TransferZero::DebitListResponse](docs/DebitListResponse.md)
177
178
  - [TransferZero::DebitRequest](docs/DebitRequest.md)
178
179
  - [TransferZero::DebitRequestWrapper](docs/DebitRequestWrapper.md)
180
+ - [TransferZero::DlocalBalance](docs/DlocalBalance.md)
181
+ - [TransferZero::DlocalBalanceResponse](docs/DlocalBalanceResponse.md)
179
182
  - [TransferZero::Document](docs/Document.md)
180
183
  - [TransferZero::DocumentListResponse](docs/DocumentListResponse.md)
181
184
  - [TransferZero::DocumentRequest](docs/DocumentRequest.md)
@@ -0,0 +1,23 @@
1
+ # TransferZero::DlocalBalance
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **currency** | **String** | The currency of this balance | [optional]
8
+ **available_balance** | **Float** | The available balance for the given currency | [optional]
9
+ **previous_day_closing_balance** | **Float** | The balance at end of previous day | [optional]
10
+ **current_balance_date** | **String** | Current date | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'TransferZero'
16
+
17
+ instance = TransferZero::DlocalBalance.new(currency: USD,
18
+ available_balance: 1000,
19
+ previous_day_closing_balance: 1000,
20
+ current_balance_date: 2026-02-24)
21
+ ```
22
+
23
+
@@ -0,0 +1,66 @@
1
+ # TransferZero::DlocalBalanceApi
2
+
3
+ All URIs are relative to *https://api-sandbox.transferzero.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_balance**](DlocalBalanceApi.md#get_balance) | **GET** /dlocal/balance | Get dlocal balances
8
+
9
+
10
+ # **get_balance**
11
+ > DlocalBalanceResponse get_balance
12
+
13
+ Get dlocal balances
14
+
15
+ This endpoint retrieves dlocal account balances
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'transferzero-sdk'
21
+
22
+ api_instance = TransferZero::DlocalBalanceApi.new
23
+
24
+ begin
25
+ #Get dlocal balances
26
+ result = api_instance.get_balance
27
+ p result
28
+ rescue TransferZero::ApiError => e
29
+ if e.validation_error
30
+ puts "WARN: Validation error occured when calling the endpoint"
31
+ result = e.response_object("DlocalBalanceResponse")
32
+ p result
33
+ else
34
+ puts "Exception when calling DlocalBalanceApi->get_balance: #{e}"
35
+ end
36
+ end
37
+ ```
38
+
39
+ ### Parameters
40
+ This endpoint does not need any parameter.
41
+
42
+ ### Return type
43
+
44
+ [**DlocalBalanceResponse**](DlocalBalanceResponse.md)
45
+
46
+ ### Authorization
47
+
48
+ You can set the API Key and Secret on the TransferZero object when setting it up:
49
+
50
+ ```ruby
51
+
52
+ TransferZero.configure do |config|
53
+ config.api_key = '<key'
54
+ config.api_secret = '<secret>'
55
+ config.host = 'https://api-sandbox.transferzero.com/v1'
56
+ end
57
+
58
+ ```
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: Not defined
63
+ - **Accept**: application/json
64
+
65
+
66
+
@@ -0,0 +1,17 @@
1
+ # TransferZero::DlocalBalanceResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **object** | [**Array&lt;DlocalBalance&gt;**](DlocalBalance.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'TransferZero'
13
+
14
+ instance = TransferZero::DlocalBalanceResponse.new(object: null)
15
+ ```
16
+
17
+
data/docs/Recipient.md CHANGED
@@ -28,6 +28,7 @@ Name | Type | Description | Notes
28
28
  **id** | **String** | | [optional]
29
29
  **type** | **String** | Type of recipient to create - either person or business (defaults to person) | [optional]
30
30
  **errors** | **Hash&lt;String, Array&lt;ValidationErrorDescription&gt;&gt;** | The fields that have some problems and don&#39;t pass validation | [optional]
31
+ **mandate_id** | **String** | The ID of the mandate that is related to this recipient. This field is present when a ZAR bank mandate signing is required or has been completed. | [optional]
31
32
 
32
33
  ## Code Sample
33
34
 
@@ -57,7 +58,8 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
57
58
  output_currency: NGN,
58
59
  id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
59
60
  type: person,
60
- errors: {&quot;phone_number&quot;:[{&quot;error&quot;:&quot;invalid&quot;}],&quot;documents&quot;:[{&quot;error&quot;:&quot;blank&quot;}]})
61
+ errors: {&quot;phone_number&quot;:[{&quot;error&quot;:&quot;invalid&quot;}],&quot;documents&quot;:[{&quot;error&quot;:&quot;blank&quot;}]},
62
+ mandate_id: 97e79719-06e4-4794-aeeb-d2d9415d983a)
61
63
  ```
62
64
 
63
65
 
@@ -0,0 +1,71 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module TransferZero
16
+ class DlocalBalanceApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+
24
+ # Get dlocal balances
25
+ # This endpoint retrieves dlocal account balances
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [DlocalBalanceResponse]
28
+ def get_balance(opts = {})
29
+ data, _status_code, _headers = get_balance_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Get dlocal balances
34
+ # This endpoint retrieves dlocal account balances
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(DlocalBalanceResponse, Fixnum, Hash)>] DlocalBalanceResponse data, response status code and response headers
37
+ def get_balance_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DlocalBalanceApi.get_balance ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/dlocal/balance'
43
+
44
+ # query parameters
45
+ query_params = {}
46
+
47
+ # header parameters
48
+ header_params = {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = nil
57
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
58
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => 'DlocalBalanceResponse')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: DlocalBalanceApi#get_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+ end
71
+ end
@@ -36,7 +36,7 @@ module TransferZero
36
36
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
37
37
  def initialize(config = Configuration.default)
38
38
  @config = config
39
- @user_agent = "TransferZero-SDK/Ruby/1.37.3"
39
+ @user_agent = "TransferZero-SDK/Ruby/1.37.5"
40
40
  @default_headers = {
41
41
  'Content-Type' => 'application/json',
42
42
  'User-Agent' => @user_agent
@@ -0,0 +1,233 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TransferZero
16
+ class DlocalBalance
17
+ # The currency of this balance
18
+ attr_accessor :currency
19
+
20
+ # The available balance for the given currency
21
+ attr_accessor :available_balance
22
+
23
+ # The balance at end of previous day
24
+ attr_accessor :previous_day_closing_balance
25
+
26
+ # Current date
27
+ attr_accessor :current_balance_date
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'currency' => :'currency',
33
+ :'available_balance' => :'available_balance',
34
+ :'previous_day_closing_balance' => :'previous_day_closing_balance',
35
+ :'current_balance_date' => :'current_balance_date'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'currency' => :'String',
43
+ :'available_balance' => :'Float',
44
+ :'previous_day_closing_balance' => :'Float',
45
+ :'current_balance_date' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::DlocalBalance` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::DlocalBalance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'currency')
65
+ self.currency = attributes[:'currency']
66
+ end
67
+
68
+ if attributes.key?(:'available_balance')
69
+ self.available_balance = attributes[:'available_balance']
70
+ end
71
+
72
+ if attributes.key?(:'previous_day_closing_balance')
73
+ self.previous_day_closing_balance = attributes[:'previous_day_closing_balance']
74
+ end
75
+
76
+ if attributes.key?(:'current_balance_date')
77
+ self.current_balance_date = attributes[:'current_balance_date']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ currency == o.currency &&
100
+ available_balance == o.available_balance &&
101
+ previous_day_closing_balance == o.previous_day_closing_balance &&
102
+ current_balance_date == o.current_balance_date
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [currency, available_balance, previous_day_closing_balance, current_balance_date].hash
115
+ end
116
+
117
+ require 'active_support/core_ext/hash'
118
+ require 'active_support/hash_with_indifferent_access.rb'
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ self.class.openapi_types.each_pair do |key, type|
125
+ if type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :DateTime
146
+ DateTime.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ temp_model = TransferZero.const_get(type).new
177
+ temp_model.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ next if value.nil?
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ ::ActiveSupport::HashWithIndifferentAccess.new(hash)
203
+ end
204
+
205
+ def [](key)
206
+ to_hash[key]
207
+ end
208
+
209
+ def dig(*args)
210
+ to_hash.dig(*args)
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+
233
+ end