transferzero-sdk 1.16.1 → 1.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -4
  3. data/docs/Document.md +2 -0
  4. data/docs/PayinMethod.md +12 -4
  5. data/docs/PayinMethodDetails.md +5 -5
  6. data/docs/PayinMethodDetailsMobile.md +3 -3
  7. data/docs/PayinMethodDetailsNGNBank.md +2 -2
  8. data/docs/PayinMethodResponse.md +17 -0
  9. data/docs/PayinMethodState.md +16 -0
  10. data/docs/PayinMethodUxFlow.md +16 -0
  11. data/docs/PayinMethodsApi.md +256 -0
  12. data/docs/PayoutMethod.md +1 -1
  13. data/docs/PayoutMethodDetails.md +4 -2
  14. data/docs/PayoutMethodDetailsGNFMobile.md +23 -0
  15. data/docs/PayoutMethodDetailsKESBank.md +3 -1
  16. data/docs/PayoutMethodDetailsKESMobile.md +3 -1
  17. data/docs/PayoutMethodDetailsXAFMobile.md +25 -0
  18. data/docs/PayoutMethodDetailsXOFBank.md +3 -1
  19. data/docs/PayoutMethodDetailsXOFCash.md +1 -1
  20. data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
  21. data/docs/PayoutMethodDetailsZARBank.md +2 -0
  22. data/docs/PayoutMethodTransferReasonEnum.md +16 -0
  23. data/docs/RecipientStateReasonDetails.md +3 -3
  24. data/docs/Sender.md +4 -0
  25. data/docs/StateReasonDetails.md +23 -0
  26. data/lib/transferzero-sdk/api/payin_methods_api.rb +244 -0
  27. data/lib/transferzero-sdk/api_client.rb +1 -1
  28. data/lib/transferzero-sdk/models/document.rb +11 -1
  29. data/lib/transferzero-sdk/models/payin_method.rb +47 -9
  30. data/lib/transferzero-sdk/models/payin_method_details.rb +9 -15
  31. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +8 -14
  32. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +2 -2
  33. data/lib/transferzero-sdk/models/payin_method_response.rb +202 -0
  34. data/lib/transferzero-sdk/models/payin_method_state.rb +39 -0
  35. data/lib/transferzero-sdk/models/payin_method_ux_flow.rb +34 -0
  36. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  37. data/lib/transferzero-sdk/models/payout_method_details.rb +17 -6
  38. data/lib/transferzero-sdk/models/payout_method_details_gnf_mobile.rb +250 -0
  39. data/lib/transferzero-sdk/models/payout_method_details_kes_bank.rb +11 -7
  40. data/lib/transferzero-sdk/models/payout_method_details_kes_mobile.rb +11 -7
  41. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +1 -1
  42. data/lib/transferzero-sdk/models/payout_method_details_xaf_mobile.rb +259 -0
  43. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +14 -5
  44. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +6 -1
  45. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +14 -5
  46. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +11 -2
  47. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +1 -0
  48. data/lib/transferzero-sdk/models/payout_method_transfer_reason_enum.rb +137 -0
  49. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +21 -2
  50. data/lib/transferzero-sdk/models/sender.rb +21 -1
  51. data/lib/transferzero-sdk/models/state_reason_details.rb +235 -0
  52. data/lib/transferzero-sdk/version.rb +1 -1
  53. data/lib/transferzero-sdk.rb +8 -0
  54. data/spec/api/payin_methods_api_spec.rb +84 -0
  55. data/spec/models/payin_method_response_spec.rb +41 -0
  56. data/spec/models/payin_method_state_spec.rb +35 -0
  57. data/spec/models/payin_method_ux_flow_spec.rb +35 -0
  58. data/spec/models/payout_method_details_gnf_mobile_spec.rb +59 -0
  59. data/spec/models/payout_method_details_xaf_mobile_spec.rb +65 -0
  60. data/spec/models/payout_method_transfer_reason_enum_spec.rb +35 -0
  61. data/spec/models/state_reason_details_spec.rb +59 -0
  62. data/transferzero-sdk-1.17.0.gem +0 -0
  63. metadata +36 -4
  64. data/Gemfile.lock +0 -89
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **first_name** | **String** | |
8
8
  **last_name** | **String** | |
9
9
  **phone_number** | **String** | |
10
- **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
10
+ **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | |
11
11
  **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
12
12
 
13
13
  ## Code Sample
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **phone_number** | **String** | |
10
10
  **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
11
11
  **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
12
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
12
13
 
13
14
  ## Code Sample
14
15
 
@@ -19,7 +20,8 @@ instance = TransferZero::PayoutMethodDetailsXOFMobile.new(first_name: null,
19
20
  last_name: null,
20
21
  phone_number: null,
21
22
  mobile_provider: null,
22
- country: null)
23
+ country: null,
24
+ transfer_reason: null)
23
25
  ```
24
26
 
25
27
 
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **bank_account** | **String** | |
15
15
  **phone_number** | **String** | |
16
16
  **transfer_reason_code** | **String** | | [optional]
17
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
17
18
  **name** | **String** | | [optional]
18
19
  **contact_first_name** | **String** | | [optional]
19
20
  **contact_last_name** | **String** | | [optional]
@@ -36,6 +37,7 @@ instance = TransferZero::PayoutMethodDetailsZARBank.new(first_name: null,
36
37
  bank_account: null,
37
38
  phone_number: null,
38
39
  transfer_reason_code: null,
40
+ transfer_reason: null,
39
41
  name: null,
40
42
  contact_first_name: null,
41
43
  contact_last_name: null,
@@ -0,0 +1,16 @@
1
+ # TransferZero::PayoutMethodTransferReasonEnum
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'TransferZero'
12
+
13
+ instance = TransferZero::PayoutMethodTransferReasonEnum.new()
14
+ ```
15
+
16
+
@@ -4,8 +4,8 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **code** | **String** | Status code of failed transaction | [optional]
8
- **category** | **String** | Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error | [optional]
7
+ **code** | **String** | Status code of transaction | [optional]
8
+ **category** | **String** | Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required | [optional]
9
9
  **messages** | **Array<String>** | Tiered messages | [optional]
10
10
  **description** | **String** | Public, human readable, detailed error message | [optional]
11
11
 
@@ -17,7 +17,7 @@ require 'TransferZero'
17
17
  instance = TransferZero::RecipientStateReasonDetails.new(code: 311,
18
18
  category: temporary_error,
19
19
  messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
20
- description: The central switch is not accepting transfers at the moment. We will retry the transaction. You can also edit or cancel this transaction.)
20
+ description: The central switch is not accepting transactions at the moment. We will retry the transaction)
21
21
  ```
22
22
 
23
23
 
data/docs/Sender.md CHANGED
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
41
41
  **contact_person_email** | **String** | The contact's email address (used only with a Business sender) | [optional]
42
42
  **trading_country** | **String** | The Business trading country (used only with a Business sender) | [optional]
43
43
  **trading_address** | **String** | The Business trading address (used only with a Business sender) | [optional]
44
+ **trading_name** | **String** | The Business trading name (used only with a Business sender) | [optional]
44
45
  **number_monthly_transactions** | **String** | The estimated number of monthly transactions (used only with a Business sender) | [optional]
45
46
  **amount_monthly_transactions** | **String** | The estimated amount for all transactions each month in USD (used only with a Business sender) | [optional]
46
47
  **documents** | [**Array<Document>**](Document.md) | Needed for KYC checks. Required to approve the sender unless KYC is waived for your account. Please send us an empty list of documents: `\"documents\": [ ]` in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. ```JSON \"documents\": [ { \"id\": \"b6648ba3-1c7b-4f59-8580-684899c84a07\" } ] ``` |
@@ -52,6 +53,7 @@ Name | Type | Description | Notes
52
53
  **city_of_birth** | **String** | City of birth of sender | [optional]
53
54
  **country_of_birth** | **String** | Country of birth of sender in 2-character alpha ISO 3166-2 country format | [optional]
54
55
  **gender** | **String** | The gender of the sender: - `M`: Male - `F`: Female - `O`: Other | [optional]
56
+ **sales_lead_id** | **String** | Sales Lead ID for tracking (optional) | [optional]
55
57
  **created_at** | **String** | Date and time of sender was created | [optional]
56
58
 
57
59
  ## Code Sample
@@ -96,6 +98,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
96
98
  contact_person_email: null,
97
99
  trading_country: null,
98
100
  trading_address: null,
101
+ trading_name: null,
99
102
  number_monthly_transactions: null,
100
103
  amount_monthly_transactions: null,
101
104
  documents: [{"id":"b6648ba3-1c7b-4f59-8580-684899c84a07"}],
@@ -107,6 +110,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
107
110
  city_of_birth: London,
108
111
  country_of_birth: GB,
109
112
  gender: M,
113
+ sales_lead_id: HF6HJVF67,
110
114
  created_at: 2019-01-11T00:00:00.001+0000)
111
115
  ```
112
116
 
@@ -0,0 +1,23 @@
1
+ # TransferZero::StateReasonDetails
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **String** | Status code of transaction | [optional]
8
+ **category** | **String** | Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required | [optional]
9
+ **messages** | **Array<String>** | Tiered messages | [optional]
10
+ **description** | **String** | Public, human readable, detailed error message | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'TransferZero'
16
+
17
+ instance = TransferZero::StateReasonDetails.new(code: 311,
18
+ category: temporary_error,
19
+ messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
20
+ description: The central switch is not accepting transactions at the moment. We will retry the transaction)
21
+ ```
22
+
23
+
@@ -0,0 +1,244 @@
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 PayinMethodsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+
24
+ # Deleting a payin method
25
+ # Initiates a cancellation request for the specified payin method
26
+ # @param payin_method_id ID of the payin method to delete. Example: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [PayinMethodResponse]
29
+ def delete_payin_method(payin_method_id, opts = {})
30
+ data, _status_code, _headers = delete_payin_method_with_http_info(payin_method_id, opts)
31
+ data
32
+ end
33
+
34
+ # Deleting a payin method
35
+ # Initiates a cancellation request for the specified payin method
36
+ # @param payin_method_id ID of the payin method to delete. Example: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
39
+ def delete_payin_method_with_http_info(payin_method_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.delete_payin_method ...'
42
+ end
43
+ # verify the required parameter 'payin_method_id' is set
44
+ if @api_client.config.client_side_validation && payin_method_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.delete_payin_method"
46
+ end
47
+ # resource path
48
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_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(:DELETE, 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 => 'PayinMethodResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: PayinMethodsApi#delete_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+
78
+ # Fetching a payin method
79
+ # Show a payin method by id
80
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [PayinMethodResponse]
83
+ def get_payin_method(payin_method_id, opts = {})
84
+ data, _status_code, _headers = get_payin_method_with_http_info(payin_method_id, opts)
85
+ data
86
+ end
87
+
88
+ # Fetching a payin method
89
+ # Show a payin method by id
90
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
93
+ def get_payin_method_with_http_info(payin_method_id, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.get_payin_method ...'
96
+ end
97
+ # verify the required parameter 'payin_method_id' is set
98
+ if @api_client.config.client_side_validation && payin_method_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.get_payin_method"
100
+ end
101
+ # resource path
102
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+
112
+ # form parameters
113
+ form_params = {}
114
+
115
+ # http body (model)
116
+ post_body = nil
117
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
118
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => 'PayinMethodResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: PayinMethodsApi#get_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+
131
+
132
+ # Updating a payin method
133
+ # Updates the payin method specified in the URL path.
134
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
135
+ # @param payin_method
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [PayinMethodResponse]
138
+ def patch_payin_method(payin_method_id, payin_method, opts = {})
139
+ data, _status_code, _headers = patch_payin_method_with_http_info(payin_method_id, payin_method, opts)
140
+ data
141
+ end
142
+
143
+ # Updating a payin method
144
+ # Updates the payin method specified in the URL path.
145
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
146
+ # @param payin_method
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
149
+ def patch_payin_method_with_http_info(payin_method_id, payin_method, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.patch_payin_method ...'
152
+ end
153
+ # verify the required parameter 'payin_method_id' is set
154
+ if @api_client.config.client_side_validation && payin_method_id.nil?
155
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.patch_payin_method"
156
+ end
157
+ # verify the required parameter 'payin_method' is set
158
+ if @api_client.config.client_side_validation && payin_method.nil?
159
+ fail ArgumentError, "Missing the required parameter 'payin_method' when calling PayinMethodsApi.patch_payin_method"
160
+ end
161
+ # resource path
162
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
163
+
164
+ # query parameters
165
+ query_params = {}
166
+
167
+ # header parameters
168
+ header_params = {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+ # HTTP header 'Content-Type'
172
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
173
+
174
+ # form parameters
175
+ form_params = {}
176
+
177
+ # http body (model)
178
+ post_body = @api_client.object_to_http_body(payin_method)
179
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
180
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
181
+ :header_params => header_params,
182
+ :query_params => query_params,
183
+ :form_params => form_params,
184
+ :body => post_body,
185
+ :auth_names => auth_names,
186
+ :return_type => 'PayinMethodResponse')
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug "API called: PayinMethodsApi#patch_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
+ end
190
+ return data, status_code, headers
191
+ end
192
+
193
+
194
+ # Retries PayinMethod
195
+ # Retries the collection process for the payin method. Please note only payin methods in `error` state can be retried.
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
+ # @param [Hash] opts the optional parameters
198
+ # @return [nil]
199
+ def retry_payin_method(payin_method_id, opts = {})
200
+ retry_payin_method_with_http_info(payin_method_id, opts)
201
+ nil
202
+ end
203
+
204
+ # Retries PayinMethod
205
+ # Retries the collection process for the payin method. Please note only payin methods in &#x60;error&#x60; state can be retried.
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
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
209
+ def retry_payin_method_with_http_info(payin_method_id, opts = {})
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.retry_payin_method ...'
212
+ end
213
+ # verify the required parameter 'payin_method_id' is set
214
+ if @api_client.config.client_side_validation && payin_method_id.nil?
215
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.retry_payin_method"
216
+ end
217
+ # resource path
218
+ local_var_path = '/payin_methods/{PayinMethod ID}/retry'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
219
+
220
+ # query parameters
221
+ query_params = {}
222
+
223
+ # header parameters
224
+ header_params = {}
225
+
226
+ # form parameters
227
+ form_params = {}
228
+
229
+ # http body (model)
230
+ post_body = nil
231
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
232
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names)
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: PayinMethodsApi#retry_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+ end
244
+ 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.16.1"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.19.1"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -50,6 +50,9 @@ class Document
50
50
  # Document expiry date issued by government
51
51
  attr_accessor :expiry_date
52
52
 
53
+ # Determines the document's source. Default value \"Manual\"
54
+ attr_accessor :source
55
+
53
56
  # The fields that have some problems and don't pass validation
54
57
  attr_accessor :errors
55
58
 
@@ -91,6 +94,7 @@ class Document
91
94
  :'id' => :'id',
92
95
  :'document_id' => :'document_id',
93
96
  :'expiry_date' => :'expiry_date',
97
+ :'source' => :'source',
94
98
  :'errors' => :'errors'
95
99
  }
96
100
  end
@@ -111,6 +115,7 @@ class Document
111
115
  :'id' => :'String',
112
116
  :'document_id' => :'String',
113
117
  :'expiry_date' => :'Date',
118
+ :'source' => :'String',
114
119
  :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
115
120
  }
116
121
  end
@@ -182,6 +187,10 @@ class Document
182
187
  self.expiry_date = attributes[:'expiry_date']
183
188
  end
184
189
 
190
+ if attributes.key?(:'source')
191
+ self.source = attributes[:'source']
192
+ end
193
+
185
194
  if attributes.key?(:'errors')
186
195
  if (value = attributes[:'errors']).is_a?(Hash)
187
196
  self.errors = value
@@ -242,6 +251,7 @@ class Document
242
251
  id == o.id &&
243
252
  document_id == o.document_id &&
244
253
  expiry_date == o.expiry_date &&
254
+ source == o.source &&
245
255
  errors == o.errors
246
256
  end
247
257
 
@@ -254,7 +264,7 @@ class Document
254
264
  # Calculates hash code according to all attributes.
255
265
  # @return [Integer] Hash code
256
266
  def hash
257
- [upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, document_id, expiry_date, errors].hash
267
+ [upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, document_id, expiry_date, source, errors].hash
258
268
  end
259
269
 
260
270
  require 'active_support/core_ext/hash'
@@ -15,28 +15,40 @@ require 'date'
15
15
  module TransferZero
16
16
  # This describes the specific details on how the funds should be collected from the sender.
17
17
  class PayinMethod
18
- # Describes how the payment should be requested from the user. Possible values: - `NGN::Bank`: NGN bank and card collection requests - `NGN::Mobile`: NGN mobile collections - `GHS::Mobile`: GHS mobile collections - `TZS::Mobile`: TZS mobile collections - `UGX::Mobile`: UGX mobile collections - `EUR::Bank`: EUR IBAN collections - `GBP::Bank`: GBP IBAN collections
18
+ # Describes how the payment should be requested from the sender. Possible values: - `GHS::Mobile`: GHS mobile collections - `UGX::Mobile`: UGX mobile collections - `EUR::Bank`: EUR IBAN collections - `GBP::Bank`: GBP IBAN collections
19
19
  attr_accessor :type
20
20
 
21
+ attr_accessor :ux_flow
22
+
21
23
  attr_accessor :in_details
22
24
 
25
+ attr_accessor :id
26
+
27
+ attr_accessor :state
28
+
29
+ attr_accessor :state_reason_details
30
+
23
31
  # This will contain the description on where to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
24
32
  attr_accessor :out_details
25
33
 
26
34
  # This will contain the instructions on how to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
27
35
  attr_accessor :instructions
28
36
 
29
- # Describes which provider to use for collection. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on the valid values
30
- attr_accessor :provider
37
+ # The fields that have some problems and don't pass validation
38
+ attr_accessor :errors
31
39
 
32
40
  # Attribute mapping from ruby-style variable name to JSON key.
33
41
  def self.attribute_map
34
42
  {
35
43
  :'type' => :'type',
44
+ :'ux_flow' => :'ux_flow',
36
45
  :'in_details' => :'in_details',
46
+ :'id' => :'id',
47
+ :'state' => :'state',
48
+ :'state_reason_details' => :'state_reason_details',
37
49
  :'out_details' => :'out_details',
38
50
  :'instructions' => :'instructions',
39
- :'provider' => :'provider'
51
+ :'errors' => :'errors'
40
52
  }
41
53
  end
42
54
 
@@ -44,10 +56,14 @@ class PayinMethod
44
56
  def self.openapi_types
45
57
  {
46
58
  :'type' => :'String',
59
+ :'ux_flow' => :'PayinMethodUxFlow',
47
60
  :'in_details' => :'PayinMethodDetails',
61
+ :'id' => :'String',
62
+ :'state' => :'PayinMethodState',
63
+ :'state_reason_details' => :'StateReasonDetails',
48
64
  :'out_details' => :'Object',
49
65
  :'instructions' => :'Object',
50
- :'provider' => :'String'
66
+ :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
51
67
  }
52
68
  end
53
69
 
@@ -70,10 +86,26 @@ class PayinMethod
70
86
  self.type = attributes[:'type']
71
87
  end
72
88
 
89
+ if attributes.key?(:'ux_flow')
90
+ self.ux_flow = attributes[:'ux_flow']
91
+ end
92
+
73
93
  if attributes.key?(:'in_details')
74
94
  self.in_details = attributes[:'in_details']
75
95
  end
76
96
 
97
+ if attributes.key?(:'id')
98
+ self.id = attributes[:'id']
99
+ end
100
+
101
+ if attributes.key?(:'state')
102
+ self.state = attributes[:'state']
103
+ end
104
+
105
+ if attributes.key?(:'state_reason_details')
106
+ self.state_reason_details = attributes[:'state_reason_details']
107
+ end
108
+
77
109
  if attributes.key?(:'out_details')
78
110
  self.out_details = attributes[:'out_details']
79
111
  end
@@ -82,8 +114,10 @@ class PayinMethod
82
114
  self.instructions = attributes[:'instructions']
83
115
  end
84
116
 
85
- if attributes.key?(:'provider')
86
- self.provider = attributes[:'provider']
117
+ if attributes.key?(:'errors')
118
+ if (value = attributes[:'errors']).is_a?(Hash)
119
+ self.errors = value
120
+ end
87
121
  end
88
122
  end
89
123
 
@@ -106,10 +140,14 @@ class PayinMethod
106
140
  return true if self.equal?(o)
107
141
  self.class == o.class &&
108
142
  type == o.type &&
143
+ ux_flow == o.ux_flow &&
109
144
  in_details == o.in_details &&
145
+ id == o.id &&
146
+ state == o.state &&
147
+ state_reason_details == o.state_reason_details &&
110
148
  out_details == o.out_details &&
111
149
  instructions == o.instructions &&
112
- provider == o.provider
150
+ errors == o.errors
113
151
  end
114
152
 
115
153
  # @see the `==` method
@@ -121,7 +159,7 @@ class PayinMethod
121
159
  # Calculates hash code according to all attributes.
122
160
  # @return [Integer] Hash code
123
161
  def hash
124
- [type, in_details, out_details, instructions, provider].hash
162
+ [type, ux_flow, in_details, id, state, state_reason_details, out_details, instructions, errors].hash
125
163
  end
126
164
 
127
165
  require 'active_support/core_ext/hash'
@@ -15,17 +15,16 @@ require 'date'
15
15
  module TransferZero
16
16
  # Fields needed by the payment processor. Depends on the chose payin type. See the appropriate model details for more info: - `NGN::Bank`: see [`PayinMethodDetailsNGNBank`](#model-PayinMethodDetailsNGNBank) - `GHS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `UGX::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `TZS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) Note that some payin processors don't require additional input, these include `paga` through `NGN::Mobile`, `lhv` through `EUR::Bank` and `GBP::Bank`. Some providers like `providus` also have all of their fields set as optional, so you might not want to set any values. To use these providers please set this value to `{}` (an empty hash)
17
17
  class PayinMethodDetails
18
- # The payment method which the user will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
18
+ # The payment method which the sender will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
19
19
  attr_accessor :payment_method
20
20
 
21
- # This is where the user should be redirected back when the payment has been finished
21
+ # This is where the sender should be redirected back when the payment has been finished
22
22
  attr_accessor :redirect_url
23
23
 
24
24
  # The phone number where the funds should be collected from
25
25
  attr_accessor :phone_number
26
26
 
27
- # States whether to send out the instructions to the phone number on how to pay the funds or not. This shuold always be set to true, otherwise the sender might not receive a prompt for payment.
28
- attr_accessor :send_instructions
27
+ attr_accessor :mobile_provider
29
28
 
30
29
  # 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.
31
30
  attr_accessor :refund_address
@@ -36,7 +35,7 @@ class PayinMethodDetails
36
35
  :'payment_method' => :'payment_method',
37
36
  :'redirect_url' => :'redirect_url',
38
37
  :'phone_number' => :'phone_number',
39
- :'send_instructions' => :'send_instructions',
38
+ :'mobile_provider' => :'mobile_provider',
40
39
  :'refund_address' => :'refund_address'
41
40
  }
42
41
  end
@@ -47,7 +46,7 @@ class PayinMethodDetails
47
46
  :'payment_method' => :'String',
48
47
  :'redirect_url' => :'String',
49
48
  :'phone_number' => :'String',
50
- :'send_instructions' => :'Boolean',
49
+ :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
51
50
  :'refund_address' => :'String'
52
51
  }
53
52
  end
@@ -88,8 +87,8 @@ class PayinMethodDetails
88
87
  self.phone_number = attributes[:'phone_number']
89
88
  end
90
89
 
91
- if attributes.key?(:'send_instructions')
92
- self.send_instructions = attributes[:'send_instructions']
90
+ if attributes.key?(:'mobile_provider')
91
+ self.mobile_provider = attributes[:'mobile_provider']
93
92
  end
94
93
 
95
94
  if attributes.key?(:'refund_address')
@@ -101,17 +100,12 @@ class PayinMethodDetails
101
100
  # @return Array for valid properties with the reasons
102
101
  def list_invalid_properties
103
102
  invalid_properties = Array.new
104
- if @phone_number.nil?
105
- invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
106
- end
107
-
108
103
  invalid_properties
109
104
  end
110
105
 
111
106
  # Check to see if the all the properties in the model are valid
112
107
  # @return true if the model is valid
113
108
  def valid?
114
- return false if @phone_number.nil?
115
109
  _one_of_found = false
116
110
  openapi_one_of.each do |_class|
117
111
  _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
@@ -139,7 +133,7 @@ class PayinMethodDetails
139
133
  payment_method == o.payment_method &&
140
134
  redirect_url == o.redirect_url &&
141
135
  phone_number == o.phone_number &&
142
- send_instructions == o.send_instructions &&
136
+ mobile_provider == o.mobile_provider &&
143
137
  refund_address == o.refund_address
144
138
  end
145
139
 
@@ -152,7 +146,7 @@ class PayinMethodDetails
152
146
  # Calculates hash code according to all attributes.
153
147
  # @return [Integer] Hash code
154
148
  def hash
155
- [payment_method, redirect_url, phone_number, send_instructions, refund_address].hash
149
+ [payment_method, redirect_url, phone_number, mobile_provider, refund_address].hash
156
150
  end
157
151
 
158
152
  require 'active_support/core_ext/hash'