transferzero-sdk 1.37.6 → 1.37.8

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: 3e00d6dbf0674d41081f8f7e3e980e1f9245ae246b3cf0aeec9ed5c3590e3b79
4
- data.tar.gz: 42a2a021c4ebeb796eeb0bc558930792fea07072e927661d3da6f8975196db43
3
+ metadata.gz: 49564cac674443946231ee62c221f24a9e0290ef1d0f9016e958db309abebecb
4
+ data.tar.gz: 3a8f03ab40bab1ad34212f3933a13efa5d7e04a18ced67ba0a12d92cb4a7510f
5
5
  SHA512:
6
- metadata.gz: 4cb98b73c7883f8cb3a63bdce3ffed988f9b12f0f22cf0d8f2d947f61ef156735010c7780efbed39272374fa1eeb00ac6e48cd1911ce9b9b690fc5ef8aadacd4
7
- data.tar.gz: c9e94f681e474e1bf2d736e3cacfb773765361ce3d250d5e09ff68342ff36831c33589edcde9439ff32502c755b0ff1fca0100a311915d2f49c1ac1f846f7ec4
6
+ metadata.gz: f2abd293a2f4015eba6b2e83306e81ae603bbd4094a456ed113cdc4d4396523799ae109ff9ca2203bf4246a11fa8b0217e36a2d5b916b0c459e87ddec9349c68
7
+ data.tar.gz: a5c3df6d383b35ef996053fb02e8765e8ef7cc249b5ceecef6c583d22bfa9e086276490d7cf6118f0f4bc6939a07962b6abc04691fedcb190f53aa35d4cf5132
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transferzero-sdk (1.37.6)
4
+ transferzero-sdk (1.37.8)
5
5
  activesupport (>= 4)
6
6
  faraday (~> 1.0, >= 1.0.1)
7
7
  json (>= 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.37.6
10
+ - Package version: 1.37.8
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.6.gem
34
+ gem install ./transferzero-sdk-1.37.8.gem
35
35
  ```
36
- (for development, run `gem install --dev ./transferzero-sdk-1.37.6.gem` to install the development dependencies)
36
+ (for development, run `gem install --dev ./transferzero-sdk-1.37.8.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.6'
42
+ gem 'transferzero-sdk', '~> 1.37.8'
43
43
 
44
44
  ### Install from Git
45
45
 
@@ -119,6 +119,7 @@ Class | Method | HTTP request | Description
119
119
  *TransferZero::DocumentsApi* | [**post_documents**](docs/DocumentsApi.md#post_documents) | **POST** /documents | Creating a document
120
120
  *TransferZero::LogsApi* | [**get_webhook_log**](docs/LogsApi.md#get_webhook_log) | **GET** /logs/{Webhook Log ID} | Fetch an individual webhook log
121
121
  *TransferZero::LogsApi* | [**get_webhook_logs**](docs/LogsApi.md#get_webhook_logs) | **GET** /logs/webhooks | Fetch a list of webhook logs
122
+ *TransferZero::MandatesApi* | [**get_mandate**](docs/MandatesApi.md#get_mandate) | **GET** /mandates/{Mandate ID} | Fetch a single mandate
122
123
  *TransferZero::PayinMethodsApi* | [**delete_payin_method**](docs/PayinMethodsApi.md#delete_payin_method) | **DELETE** /payin_methods/{PayinMethod ID} | Deleting a payin method
123
124
  *TransferZero::PayinMethodsApi* | [**get_payin_method**](docs/PayinMethodsApi.md#get_payin_method) | **GET** /payin_methods/{PayinMethod ID} | Fetching a payin method
124
125
  *TransferZero::PayinMethodsApi* | [**patch_payin_method**](docs/PayinMethodsApi.md#patch_payin_method) | **PATCH** /payin_methods/{PayinMethod ID} | Updating a payin method
@@ -188,6 +189,9 @@ Class | Method | HTTP request | Description
188
189
  - [TransferZero::FieldDescription](docs/FieldDescription.md)
189
190
  - [TransferZero::FieldSelectValidation](docs/FieldSelectValidation.md)
190
191
  - [TransferZero::FieldValidation](docs/FieldValidation.md)
192
+ - [TransferZero::Mandate](docs/Mandate.md)
193
+ - [TransferZero::MandateResponse](docs/MandateResponse.md)
194
+ - [TransferZero::MandateStatus](docs/MandateStatus.md)
191
195
  - [TransferZero::Pagination](docs/Pagination.md)
192
196
  - [TransferZero::PaginationMeta](docs/PaginationMeta.md)
193
197
  - [TransferZero::PayinMethod](docs/PayinMethod.md)
data/docs/Mandate.md ADDED
@@ -0,0 +1,29 @@
1
+ # TransferZero::Mandate
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | ID of the mandate | [optional]
8
+ **status** | [**MandateStatus**](MandateStatus.md) | | [optional]
9
+ **type_id** | **Integer** | Numeric beneficiary type identifier. Identifies whether the mandate was issued for a natural person, sole proprietor, partnership, company, etc. | [optional]
10
+ **reference** | **String** | Human-readable reference assigned to the mandate at creation. | [optional]
11
+ **signed_at** | **DateTime** | Timestamp when the mandate transitioned to `signed`. `null` for mandates that are pending, notified, failed, or bypassed. | [optional]
12
+ **created_at** | **DateTime** | Timestamp when the mandate was created. | [optional]
13
+ **updated_at** | **DateTime** | Timestamp when the mandate was last updated. | [optional]
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'TransferZero'
19
+
20
+ instance = TransferZero::Mandate.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
21
+ status: null,
22
+ type_id: 1,
23
+ reference: 74a07630,
24
+ signed_at: null,
25
+ created_at: null,
26
+ updated_at: null)
27
+ ```
28
+
29
+
@@ -0,0 +1,17 @@
1
+ # TransferZero::MandateResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **object** | [**Mandate**](Mandate.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'TransferZero'
13
+
14
+ instance = TransferZero::MandateResponse.new(object: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,16 @@
1
+ # TransferZero::MandateStatus
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'TransferZero'
12
+
13
+ instance = TransferZero::MandateStatus.new()
14
+ ```
15
+
16
+
@@ -0,0 +1,70 @@
1
+ # TransferZero::MandatesApi
2
+
3
+ All URIs are relative to *https://api-sandbox.transferzero.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_mandate**](MandatesApi.md#get_mandate) | **GET** /mandates/{Mandate ID} | Fetch a single mandate
8
+
9
+
10
+ # **get_mandate**
11
+ > MandateResponse get_mandate(mandate_id)
12
+
13
+ Fetch a single mandate
14
+
15
+ Finds and returns a Mandate created within the current calendar year, where the mandate is linked to a Recipient owned by the authenticated API key. Returns 404 if the mandate is not owned by the API key or was not issued in the current calendar year — mandates are only valid for the year in which they were issued.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'transferzero-sdk'
21
+
22
+ api_instance = TransferZero::MandatesApi.new
23
+
24
+
25
+ begin
26
+ #Fetch a single mandate
27
+ result = api_instance.get_mandate(mandate_id)
28
+ p result
29
+ rescue TransferZero::ApiError => e
30
+ if e.validation_error
31
+ puts "WARN: Validation error occured when calling the endpoint"
32
+ result = e.response_object("MandateResponse")
33
+ p result
34
+ else
35
+ puts "Exception when calling MandatesApi->get_mandate: #{e}"
36
+ end
37
+ end
38
+ ```
39
+
40
+ ### Parameters
41
+
42
+ Name | Type | Description | Notes
43
+ ------------- | ------------- | ------------- | -------------
44
+ **mandate_id** | [**String**](.md)| ID of the mandate. Example: `/v1/mandates/bf9ff782-e182-45ac-abea-5bce83ad6670` |
45
+
46
+ ### Return type
47
+
48
+ [**MandateResponse**](MandateResponse.md)
49
+
50
+ ### Authorization
51
+
52
+ You can set the API Key and Secret on the TransferZero object when setting it up:
53
+
54
+ ```ruby
55
+
56
+ TransferZero.configure do |config|
57
+ config.api_key = '<key'
58
+ config.api_secret = '<secret>'
59
+ config.host = 'https://api-sandbox.transferzero.com/v1'
60
+ end
61
+
62
+ ```
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: Not defined
67
+ - **Accept**: application/json
68
+
69
+
70
+
@@ -0,0 +1,77 @@
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 MandatesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+
24
+ # Fetch a single mandate
25
+ # Finds and returns a Mandate created within the current calendar year, where the mandate is linked to a Recipient owned by the authenticated API key. Returns 404 if the mandate is not owned by the API key or was not issued in the current calendar year — mandates are only valid for the year in which they were issued.
26
+ # @param mandate_id ID of the mandate. Example: &#x60;/v1/mandates/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [MandateResponse]
29
+ def get_mandate(mandate_id, opts = {})
30
+ data, _status_code, _headers = get_mandate_with_http_info(mandate_id, opts)
31
+ data
32
+ end
33
+
34
+ # Fetch a single mandate
35
+ # Finds and returns a Mandate created within the current calendar year, where the mandate is linked to a Recipient owned by the authenticated API key. Returns 404 if the mandate is not owned by the API key or was not issued in the current calendar year — mandates are only valid for the year in which they were issued.
36
+ # @param mandate_id ID of the mandate. Example: &#x60;/v1/mandates/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(MandateResponse, Fixnum, Hash)>] MandateResponse data, response status code and response headers
39
+ def get_mandate_with_http_info(mandate_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: MandatesApi.get_mandate ...'
42
+ end
43
+ # verify the required parameter 'mandate_id' is set
44
+ if @api_client.config.client_side_validation && mandate_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'mandate_id' when calling MandatesApi.get_mandate"
46
+ end
47
+ # resource path
48
+ local_var_path = '/mandates/{Mandate ID}'.sub('{' + 'Mandate ID' + '}', mandate_id.to_s)
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # header parameters
54
+ header_params = {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
64
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'MandateResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: MandatesApi#get_mandate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ 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.6"
39
+ @user_agent = "TransferZero-SDK/Ruby/1.37.8"
40
40
  @default_headers = {
41
41
  'Content-Type' => 'application/json',
42
42
  'User-Agent' => @user_agent
@@ -0,0 +1,263 @@
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
+ # A Mandate authorises payouts to a Recipient. Mandates are issued per calendar year and must be in a `signed` (or `bypassed`) state before the linked Recipient can receive a payout.
17
+ class Mandate
18
+ # ID of the mandate
19
+ attr_accessor :id
20
+
21
+ attr_accessor :status
22
+
23
+ # Numeric beneficiary type identifier. Identifies whether the mandate was issued for a natural person, sole proprietor, partnership, company, etc.
24
+ attr_accessor :type_id
25
+
26
+ # Human-readable reference assigned to the mandate at creation.
27
+ attr_accessor :reference
28
+
29
+ # Timestamp when the mandate transitioned to `signed`. `null` for mandates that are pending, notified, failed, or bypassed.
30
+ attr_accessor :signed_at
31
+
32
+ # Timestamp when the mandate was created.
33
+ attr_accessor :created_at
34
+
35
+ # Timestamp when the mandate was last updated.
36
+ attr_accessor :updated_at
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'status' => :'status',
43
+ :'type_id' => :'type_id',
44
+ :'reference' => :'reference',
45
+ :'signed_at' => :'signed_at',
46
+ :'created_at' => :'created_at',
47
+ :'updated_at' => :'updated_at'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id' => :'String',
55
+ :'status' => :'MandateStatus',
56
+ :'type_id' => :'Integer',
57
+ :'reference' => :'String',
58
+ :'signed_at' => :'DateTime',
59
+ :'created_at' => :'DateTime',
60
+ :'updated_at' => :'DateTime'
61
+ }
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Mandate` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Mandate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'id')
80
+ self.id = attributes[:'id']
81
+ end
82
+
83
+ if attributes.key?(:'status')
84
+ self.status = attributes[:'status']
85
+ end
86
+
87
+ if attributes.key?(:'type_id')
88
+ self.type_id = attributes[:'type_id']
89
+ end
90
+
91
+ if attributes.key?(:'reference')
92
+ self.reference = attributes[:'reference']
93
+ end
94
+
95
+ if attributes.key?(:'signed_at')
96
+ self.signed_at = attributes[:'signed_at']
97
+ end
98
+
99
+ if attributes.key?(:'created_at')
100
+ self.created_at = attributes[:'created_at']
101
+ end
102
+
103
+ if attributes.key?(:'updated_at')
104
+ self.updated_at = attributes[:'updated_at']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ invalid_properties = Array.new
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ true
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ id == o.id &&
127
+ status == o.status &&
128
+ type_id == o.type_id &&
129
+ reference == o.reference &&
130
+ signed_at == o.signed_at &&
131
+ created_at == o.created_at &&
132
+ updated_at == o.updated_at
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Integer] Hash code
143
+ def hash
144
+ [id, status, type_id, reference, signed_at, created_at, updated_at].hash
145
+ end
146
+
147
+ require 'active_support/core_ext/hash'
148
+ require 'active_support/hash_with_indifferent_access.rb'
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ self.class.openapi_types.each_pair do |key, type|
155
+ if type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :DateTime
176
+ DateTime.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ temp_model = TransferZero.const_get(type).new
207
+ temp_model.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ next if value.nil?
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ ::ActiveSupport::HashWithIndifferentAccess.new(hash)
233
+ end
234
+
235
+ def [](key)
236
+ to_hash[key]
237
+ end
238
+
239
+ def dig(*args)
240
+ to_hash.dig(*args)
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+
261
+ end
262
+
263
+ end
@@ -0,0 +1,202 @@
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 MandateResponse
17
+ attr_accessor :object
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'object' => :'object'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'object' => :'Mandate'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::MandateResponse` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::MandateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'object')
49
+ self.object = attributes[:'object']
50
+ end
51
+ end
52
+
53
+ # Show invalid properties with the reasons. Usually used together with valid?
54
+ # @return Array for valid properties with the reasons
55
+ def list_invalid_properties
56
+ invalid_properties = Array.new
57
+ invalid_properties
58
+ end
59
+
60
+ # Check to see if the all the properties in the model are valid
61
+ # @return true if the model is valid
62
+ def valid?
63
+ true
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param [Object] Object to be compared
68
+ def ==(o)
69
+ return true if self.equal?(o)
70
+ self.class == o.class &&
71
+ object == o.object
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [object].hash
84
+ end
85
+
86
+ require 'active_support/core_ext/hash'
87
+ require 'active_support/hash_with_indifferent_access.rb'
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.openapi_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :Boolean
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = TransferZero.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ ::ActiveSupport::HashWithIndifferentAccess.new(hash)
172
+ end
173
+
174
+ def [](key)
175
+ to_hash[key]
176
+ end
177
+
178
+ def dig(*args)
179
+ to_hash.dig(*args)
180
+ end
181
+
182
+ # Outputs non-array value in the form of hash
183
+ # For object, use to_hash. Otherwise, just return the value
184
+ # @param [Object] value Any valid value
185
+ # @return [Hash] Returns the value in the form of hash
186
+ def _to_hash(value)
187
+ if value.is_a?(Array)
188
+ value.compact.map { |v| _to_hash(v) }
189
+ elsif value.is_a?(Hash)
190
+ {}.tap do |hash|
191
+ value.each { |k, v| hash[k] = _to_hash(v) }
192
+ end
193
+ elsif value.respond_to? :to_hash
194
+ value.to_hash
195
+ else
196
+ value
197
+ end
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -0,0 +1,34 @@
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 MandateStatus
17
+
18
+ PENDING = "pending".freeze
19
+ NOTIFIED = "notified".freeze
20
+ SIGNED = "signed".freeze
21
+ FAILED = "failed".freeze
22
+ BYPASSED = "bypassed".freeze
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def build_from_hash(value)
28
+ constantValues = MandateStatus.constants.select { |c| MandateStatus::const_get(c) == value }
29
+ raise "Invalid ENUM value #{value} for class #MandateStatus" if constantValues.empty? && !value.empty?
30
+ value
31
+ end
32
+ end
33
+
34
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.37.6'
14
+ VERSION = '1.37.8'
15
15
  end
@@ -49,6 +49,9 @@ require 'transferzero-sdk/models/error_status'
49
49
  require 'transferzero-sdk/models/field_description'
50
50
  require 'transferzero-sdk/models/field_select_validation'
51
51
  require 'transferzero-sdk/models/field_validation'
52
+ require 'transferzero-sdk/models/mandate'
53
+ require 'transferzero-sdk/models/mandate_response'
54
+ require 'transferzero-sdk/models/mandate_status'
52
55
  require 'transferzero-sdk/models/pagination'
53
56
  require 'transferzero-sdk/models/pagination_meta'
54
57
  require 'transferzero-sdk/models/payin_method'
@@ -158,6 +161,7 @@ require 'transferzero-sdk/api/currency_info_api'
158
161
  require 'transferzero-sdk/api/dlocal_balance_api'
159
162
  require 'transferzero-sdk/api/documents_api'
160
163
  require 'transferzero-sdk/api/logs_api'
164
+ require 'transferzero-sdk/api/mandates_api'
161
165
  require 'transferzero-sdk/api/payin_methods_api'
162
166
  require 'transferzero-sdk/api/payment_methods_api'
163
167
  require 'transferzero-sdk/api/payout_methods_api'
@@ -0,0 +1,47 @@
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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TransferZero::MandatesApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'MandatesApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TransferZero::MandatesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of MandatesApi' do
30
+ it 'should create an instance of MandatesApi' do
31
+ expect(@api_instance).to be_instance_of(TransferZero::MandatesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_mandate
36
+ # Fetch a single mandate
37
+ # Finds and returns a Mandate created within the current calendar year, where the mandate is linked to a Recipient owned by the authenticated API key. Returns 404 if the mandate is not owned by the API key or was not issued in the current calendar year — mandates are only valid for the year in which they were issued.
38
+ # @param mandate_id ID of the mandate. Example: &#x60;/v1/mandates/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [MandateResponse]
41
+ describe 'get_mandate test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -0,0 +1,41 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::MandateResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'MandateResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::MandateResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of MandateResponse' do
31
+ it 'should create an instance of MandateResponse' do
32
+ expect(@instance).to be_instance_of(TransferZero::MandateResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "object"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,81 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::Mandate
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Mandate' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::Mandate.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Mandate' do
31
+ it 'should create an instance of Mandate' do
32
+ expect(@instance).to be_instance_of(TransferZero::Mandate)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "status"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "notified", "signed", "failed", "bypassed"])
45
+ # validator.allowable_values.each do |value|
46
+ # expect { @instance.status = value }.not_to raise_error
47
+ # end
48
+ end
49
+ end
50
+
51
+ describe 'test attribute "type_id"' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ describe 'test attribute "reference"' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "signed_at"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "created_at"' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ describe 'test attribute "updated_at"' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
+ end
79
+ end
80
+
81
+ end
@@ -0,0 +1,35 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::MandateStatus
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'MandateStatus' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::MandateStatus.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of MandateStatus' do
31
+ it 'should create an instance of MandateStatus' do
32
+ expect(@instance).to be_instance_of(TransferZero::MandateStatus)
33
+ end
34
+ end
35
+ end
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.37.6
4
+ version: 1.37.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - TransferZero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-11 00:00:00.000000000 Z
11
+ date: 2026-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -134,6 +134,10 @@ files:
134
134
  - docs/FieldSelectValidation.md
135
135
  - docs/FieldValidation.md
136
136
  - docs/LogsApi.md
137
+ - docs/Mandate.md
138
+ - docs/MandateResponse.md
139
+ - docs/MandateStatus.md
140
+ - docs/MandatesApi.md
137
141
  - docs/Pagination.md
138
142
  - docs/PaginationMeta.md
139
143
  - docs/PayinMethod.md
@@ -258,6 +262,7 @@ files:
258
262
  - lib/transferzero-sdk/api/dlocal_balance_api.rb
259
263
  - lib/transferzero-sdk/api/documents_api.rb
260
264
  - lib/transferzero-sdk/api/logs_api.rb
265
+ - lib/transferzero-sdk/api/mandates_api.rb
261
266
  - lib/transferzero-sdk/api/payin_methods_api.rb
262
267
  - lib/transferzero-sdk/api/payment_methods_api.rb
263
268
  - lib/transferzero-sdk/api/payout_methods_api.rb
@@ -304,6 +309,9 @@ files:
304
309
  - lib/transferzero-sdk/models/field_description.rb
305
310
  - lib/transferzero-sdk/models/field_select_validation.rb
306
311
  - lib/transferzero-sdk/models/field_validation.rb
312
+ - lib/transferzero-sdk/models/mandate.rb
313
+ - lib/transferzero-sdk/models/mandate_response.rb
314
+ - lib/transferzero-sdk/models/mandate_status.rb
307
315
  - lib/transferzero-sdk/models/pagination.rb
308
316
  - lib/transferzero-sdk/models/pagination_meta.rb
309
317
  - lib/transferzero-sdk/models/payin_method.rb
@@ -419,6 +427,7 @@ files:
419
427
  - spec/api/dlocal_balance_api_spec.rb
420
428
  - spec/api/documents_api_spec.rb
421
429
  - spec/api/logs_api_spec.rb
430
+ - spec/api/mandates_api_spec.rb
422
431
  - spec/api/payin_methods_api_spec.rb
423
432
  - spec/api/payment_methods_api_spec.rb
424
433
  - spec/api/payout_methods_api_spec.rb
@@ -463,6 +472,9 @@ files:
463
472
  - spec/models/field_description_spec.rb
464
473
  - spec/models/field_select_validation_spec.rb
465
474
  - spec/models/field_validation_spec.rb
475
+ - spec/models/mandate_response_spec.rb
476
+ - spec/models/mandate_spec.rb
477
+ - spec/models/mandate_status_spec.rb
466
478
  - spec/models/pagination_meta_spec.rb
467
479
  - spec/models/pagination_spec.rb
468
480
  - spec/models/payin_method_details_btc_spec.rb
@@ -603,6 +615,7 @@ test_files:
603
615
  - spec/api/dlocal_balance_api_spec.rb
604
616
  - spec/api/payment_methods_api_spec.rb
605
617
  - spec/api/transactions_api_spec.rb
618
+ - spec/api/mandates_api_spec.rb
606
619
  - spec/api/recipients_api_spec.rb
607
620
  - spec/api/logs_api_spec.rb
608
621
  - spec/api/documents_api_spec.rb
@@ -635,6 +648,7 @@ test_files:
635
648
  - spec/models/sender_request_spec.rb
636
649
  - spec/models/sender_webhook_spec.rb
637
650
  - spec/models/webhook_log_metadata_request_spec.rb
651
+ - spec/models/mandate_spec.rb
638
652
  - spec/models/currency_exchange_list_response_spec.rb
639
653
  - spec/models/field_validation_spec.rb
640
654
  - spec/models/account_response_spec.rb
@@ -656,6 +670,8 @@ test_files:
656
670
  - spec/models/transaction_response_existing_spec.rb
657
671
  - spec/models/recipient_state_reason_details_spec.rb
658
672
  - spec/models/currency_opposite_all_of_spec.rb
673
+ - spec/models/mandate_status_spec.rb
674
+ - spec/models/mandate_response_spec.rb
659
675
  - spec/models/proof_of_payment_spec.rb
660
676
  - spec/models/payin_method_state_spec.rb
661
677
  - spec/models/payout_method_details_iban_spec.rb