transferzero-sdk 1.4.0 → 1.5.0

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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -15
  3. data/docs/Document.md +5 -1
  4. data/docs/DocumentsApi.md +74 -2
  5. data/docs/PayinMethod.md +4 -4
  6. data/docs/PayinMethodDetails.md +4 -2
  7. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  8. data/docs/PayoutMethod.md +1 -1
  9. data/docs/RecipientsApi.md +2 -2
  10. data/docs/Transaction.md +1 -1
  11. data/docs/TransactionTraits.md +2 -2
  12. data/example/client.rb +14 -14
  13. data/lib/transferzero-sdk.rb +0 -7
  14. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  15. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  16. data/lib/transferzero-sdk/api_client.rb +1 -1
  17. data/lib/transferzero-sdk/models/currency_exchange.rb +1 -2
  18. data/lib/transferzero-sdk/models/currency_opposite.rb +1 -2
  19. data/lib/transferzero-sdk/models/document.rb +20 -1
  20. data/lib/transferzero-sdk/models/document_webhook.rb +0 -1
  21. data/lib/transferzero-sdk/models/payin_method.rb +4 -4
  22. data/lib/transferzero-sdk/models/payin_method_details.rb +12 -7
  23. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +11 -6
  24. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  25. data/lib/transferzero-sdk/models/payout_method_webhook.rb +0 -1
  26. data/lib/transferzero-sdk/models/recipient_webhook.rb +0 -1
  27. data/lib/transferzero-sdk/models/sender.rb +1 -1
  28. data/lib/transferzero-sdk/models/sender_state.rb +1 -0
  29. data/lib/transferzero-sdk/models/sender_webhook.rb +0 -1
  30. data/lib/transferzero-sdk/models/transaction.rb +1 -1
  31. data/lib/transferzero-sdk/models/transaction_traits.rb +3 -3
  32. data/lib/transferzero-sdk/models/transaction_webhook.rb +0 -1
  33. data/lib/transferzero-sdk/models/webhook.rb +1 -1
  34. data/lib/transferzero-sdk/version.rb +1 -1
  35. data/spec/api/account_validation_api_spec.rb +2 -2
  36. data/spec/api/currency_info_api_spec.rb +2 -0
  37. data/spec/api/documents_api_spec.rb +15 -0
  38. data/spec/api/recipients_api_spec.rb +1 -1
  39. data/spec/api/transactions_api_spec.rb +13 -0
  40. data/spec/models/account_validation_request_spec.rb +7 -1
  41. data/spec/models/currency_opposite_spec.rb +6 -0
  42. data/spec/models/document_spec.rb +12 -0
  43. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  44. data/spec/models/payin_method_details_spec.rb +6 -0
  45. data/spec/models/payout_method_details_spec.rb +7 -1
  46. data/spec/models/payout_method_details_xof_bank_spec.rb +1 -1
  47. data/spec/models/recipient_spec.rb +6 -0
  48. data/spec/models/sender_spec.rb +16 -0
  49. data/transferzero-sdk-1.4.0.gem +0 -0
  50. metadata +3 -32
  51. data/docs/CurrencyExchangeAllOf.md +0 -17
  52. data/docs/CurrencyOppositeAllOf.md +0 -19
  53. data/docs/DocumentWebhookAllOf.md +0 -17
  54. data/docs/PayoutMethodWebhookAllOf.md +0 -17
  55. data/docs/RecipientWebhookAllOf.md +0 -17
  56. data/docs/SenderWebhookAllOf.md +0 -17
  57. data/docs/TransactionWebhookAllOf.md +0 -17
  58. data/lib/transferzero-sdk/models/currency_exchange_all_of.rb +0 -204
  59. data/lib/transferzero-sdk/models/currency_opposite_all_of.rb +0 -212
  60. data/lib/transferzero-sdk/models/document_webhook_all_of.rb +0 -201
  61. data/lib/transferzero-sdk/models/payout_method_webhook_all_of.rb +0 -201
  62. data/lib/transferzero-sdk/models/recipient_webhook_all_of.rb +0 -201
  63. data/lib/transferzero-sdk/models/sender_webhook_all_of.rb +0 -201
  64. data/lib/transferzero-sdk/models/transaction_webhook_all_of.rb +0 -201
  65. data/spec/api_client_spec.rb +0 -189
  66. data/spec/models/currency_exchange_all_of_spec.rb +0 -41
  67. data/spec/models/currency_opposite_all_of_spec.rb +0 -41
  68. data/spec/models/document_webhook_all_of_spec.rb +0 -41
  69. data/spec/models/payout_method_webhook_all_of_spec.rb +0 -41
  70. data/spec/models/recipient_webhook_all_of_spec.rb +0 -41
  71. data/spec/models/sender_webhook_all_of_spec.rb +0 -41
  72. data/spec/models/transaction_webhook_all_of_spec.rb +0 -41
@@ -30,11 +30,9 @@ require 'transferzero-sdk/models/api_log_list_response'
30
30
  require 'transferzero-sdk/models/api_log_response'
31
31
  require 'transferzero-sdk/models/currency'
32
32
  require 'transferzero-sdk/models/currency_exchange'
33
- require 'transferzero-sdk/models/currency_exchange_all_of'
34
33
  require 'transferzero-sdk/models/currency_exchange_list_response'
35
34
  require 'transferzero-sdk/models/currency_list_response'
36
35
  require 'transferzero-sdk/models/currency_opposite'
37
- require 'transferzero-sdk/models/currency_opposite_all_of'
38
36
  require 'transferzero-sdk/models/debit'
39
37
  require 'transferzero-sdk/models/debit_list_request'
40
38
  require 'transferzero-sdk/models/debit_list_response'
@@ -46,7 +44,6 @@ require 'transferzero-sdk/models/document_list_response'
46
44
  require 'transferzero-sdk/models/document_request'
47
45
  require 'transferzero-sdk/models/document_response'
48
46
  require 'transferzero-sdk/models/document_webhook'
49
- require 'transferzero-sdk/models/document_webhook_all_of'
50
47
  require 'transferzero-sdk/models/error_status'
51
48
  require 'transferzero-sdk/models/field_description'
52
49
  require 'transferzero-sdk/models/field_select_validation'
@@ -79,14 +76,12 @@ require 'transferzero-sdk/models/payout_method_mobile_provider_enum'
79
76
  require 'transferzero-sdk/models/payout_method_request'
80
77
  require 'transferzero-sdk/models/payout_method_response'
81
78
  require 'transferzero-sdk/models/payout_method_webhook'
82
- require 'transferzero-sdk/models/payout_method_webhook_all_of'
83
79
  require 'transferzero-sdk/models/recipient'
84
80
  require 'transferzero-sdk/models/recipient_list_response'
85
81
  require 'transferzero-sdk/models/recipient_request'
86
82
  require 'transferzero-sdk/models/recipient_response'
87
83
  require 'transferzero-sdk/models/recipient_state'
88
84
  require 'transferzero-sdk/models/recipient_webhook'
89
- require 'transferzero-sdk/models/recipient_webhook_all_of'
90
85
  require 'transferzero-sdk/models/sender'
91
86
  require 'transferzero-sdk/models/sender_list_response'
92
87
  require 'transferzero-sdk/models/sender_request'
@@ -95,7 +90,6 @@ require 'transferzero-sdk/models/sender_response_existing'
95
90
  require 'transferzero-sdk/models/sender_response_meta'
96
91
  require 'transferzero-sdk/models/sender_state'
97
92
  require 'transferzero-sdk/models/sender_webhook'
98
- require 'transferzero-sdk/models/sender_webhook_all_of'
99
93
  require 'transferzero-sdk/models/transaction'
100
94
  require 'transferzero-sdk/models/transaction_list_response'
101
95
  require 'transferzero-sdk/models/transaction_request'
@@ -105,7 +99,6 @@ require 'transferzero-sdk/models/transaction_response_meta'
105
99
  require 'transferzero-sdk/models/transaction_state'
106
100
  require 'transferzero-sdk/models/transaction_traits'
107
101
  require 'transferzero-sdk/models/transaction_webhook'
108
- require 'transferzero-sdk/models/transaction_webhook_all_of'
109
102
  require 'transferzero-sdk/models/validation_error_description'
110
103
  require 'transferzero-sdk/models/webhook'
111
104
  require 'transferzero-sdk/models/webhook_definition'
@@ -21,10 +21,68 @@ module TransferZero
21
21
  end
22
22
 
23
23
 
24
+ # Deleting a document
25
+ # Deletes a single document by the Document ID
26
+ # @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
29
+ # @return [DocumentResponse]
30
+ def delete_document(document_id, opts = {})
31
+ data, _status_code, _headers = delete_document_with_http_info(document_id, opts)
32
+ data
33
+ end
34
+
35
+ # Deleting a document
36
+ # Deletes a single document by the Document ID
37
+ # @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
40
+ # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
41
+ def delete_document_with_http_info(document_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: DocumentsApi.delete_document ...'
44
+ end
45
+ # verify the required parameter 'document_id' is set
46
+ if @api_client.config.client_side_validation && document_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'document_id' when calling DocumentsApi.delete_document"
48
+ end
49
+ # resource path
50
+ local_var_path = '/documents/{Document ID}'.sub('{' + 'Document ID' + '}', document_id.to_s)
51
+
52
+ # query parameters
53
+ query_params = {}
54
+ query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
55
+
56
+ # header parameters
57
+ header_params = {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = {}
63
+
64
+ # http body (model)
65
+ post_body = nil
66
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
67
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => 'DocumentResponse')
74
+ if @api_client.config.debugging
75
+ @api_client.config.logger.debug "API called: DocumentsApi#delete_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ end
77
+ return data, status_code, headers
78
+ end
79
+
80
+
24
81
  # Fetching a document
25
82
  # Returns a single document by the Documents ID
26
83
  # @param document_id ID of the document to get. Example: &#x60;/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
27
84
  # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
28
86
  # @return [DocumentResponse]
29
87
  def get_document(document_id, opts = {})
30
88
  data, _status_code, _headers = get_document_with_http_info(document_id, opts)
@@ -35,6 +93,7 @@ module TransferZero
35
93
  # Returns a single document by the Documents ID
36
94
  # @param document_id ID of the document to get. Example: &#x60;/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
37
95
  # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
38
97
  # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
39
98
  def get_document_with_http_info(document_id, opts = {})
40
99
  if @api_client.config.debugging
@@ -49,6 +108,7 @@ module TransferZero
49
108
 
50
109
  # query parameters
51
110
  query_params = {}
111
+ query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
52
112
 
53
113
  # header parameters
54
114
  header_params = {}
@@ -90,6 +150,7 @@ module TransferZero
90
150
  # @param [Hash] opts the optional parameters
91
151
  # @option opts [Integer] :page The page number to request (defaults to 1)
92
152
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
153
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
93
154
  # @return [DocumentListResponse]
94
155
  def get_documents(opts = {})
95
156
  data, _status_code, _headers = get_documents_with_http_info(opts)
@@ -101,6 +162,7 @@ module TransferZero
101
162
  # @param [Hash] opts the optional parameters
102
163
  # @option opts [Integer] :page The page number to request (defaults to 1)
103
164
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
165
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
104
166
  # @return [Array<(DocumentListResponse, Fixnum, Hash)>] DocumentListResponse data, response status code and response headers
105
167
  def get_documents_with_http_info(opts = {})
106
168
  if @api_client.config.debugging
@@ -113,6 +175,7 @@ module TransferZero
113
175
  query_params = {}
114
176
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
115
177
  query_params[:'per'] = opts[:'per'] if !opts[:'per'].nil?
178
+ query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
116
179
 
117
180
  # header parameters
118
181
  header_params = {}
@@ -94,7 +94,7 @@ module TransferZero
94
94
  # @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified &#x60;created_at&#x60; timeframe. Example: &#x60;/v1/recipients?created_at_from&#x3D;2018-06-06&amp;created_at_to&#x3D;2018-06-08&#x60;
95
95
  # @option opts [String] :amount_from Minimum amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
96
96
  # @option opts [String] :amount_to Max amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
97
- # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#state-1) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
97
+ # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
98
98
  # @option opts [Array<String>] :currency Allows filtering results by &#x60;input_currency&#x60;. Additionally required when filtering by an amount range Example: &#x60;/v1/recipients?currency[]&#x3D;KES&amp;currency[]&#x3D;NGN&#x60;
99
99
  # @return [RecipientListResponse]
100
100
  def get_recipients(opts = {})
@@ -111,7 +111,7 @@ module TransferZero
111
111
  # @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified &#x60;created_at&#x60; timeframe. Example: &#x60;/v1/recipients?created_at_from&#x3D;2018-06-06&amp;created_at_to&#x3D;2018-06-08&#x60;
112
112
  # @option opts [String] :amount_from Minimum amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
113
113
  # @option opts [String] :amount_to Max amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
114
- # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#state-1) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
114
+ # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
115
115
  # @option opts [Array<String>] :currency Allows filtering results by &#x60;input_currency&#x60;. Additionally required when filtering by an amount range Example: &#x60;/v1/recipients?currency[]&#x3D;KES&amp;currency[]&#x3D;NGN&#x60;
116
116
  # @return [Array<(RecipientListResponse, Fixnum, Hash)>] RecipientListResponse data, response status code and response headers
117
117
  def get_recipients_with_http_info(opts = {})
@@ -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.4.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.5.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -84,8 +84,7 @@ module TransferZero
84
84
  # List of class defined in allOf (OpenAPI v3)
85
85
  def self.openapi_all_of
86
86
  [
87
- :'Currency',
88
- :'CurrencyExchangeAllOf'
87
+ :'Currency'
89
88
  ]
90
89
  end
91
90
 
@@ -89,8 +89,7 @@ module TransferZero
89
89
  # List of class defined in allOf (OpenAPI v3)
90
90
  def self.openapi_all_of
91
91
  [
92
- :'Currency',
93
- :'CurrencyOppositeAllOf'
92
+ :'Currency'
94
93
  ]
95
94
  end
96
95
 
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module TransferZero
16
16
  class Document
17
+ attr_accessor :sender_id
18
+
17
19
  # Base64 encoded data uri of an image/pdf file or a fully qualified url
18
20
  attr_accessor :upload
19
21
 
@@ -33,6 +35,9 @@ module TransferZero
33
35
  # The side of the KYC ID. One of 'front' or 'back'
34
36
  attr_accessor :side
35
37
 
38
+ # This is a brief description of the document type
39
+ attr_accessor :document_type
40
+
36
41
  # Issuing country of ID in 2-character alpha ISO 3166-2 country format
37
42
  attr_accessor :issuing_country
38
43
 
@@ -66,6 +71,7 @@ module TransferZero
66
71
  # Attribute mapping from ruby-style variable name to JSON key.
67
72
  def self.attribute_map
68
73
  {
74
+ :'sender_id' => :'sender_id',
69
75
  :'upload' => :'upload',
70
76
  :'upload_file_name' => :'upload_file_name',
71
77
  :'metadata' => :'metadata',
@@ -73,6 +79,7 @@ module TransferZero
73
79
  :'upload_file_size' => :'upload_file_size',
74
80
  :'category' => :'category',
75
81
  :'side' => :'side',
82
+ :'document_type' => :'document_type',
76
83
  :'issuing_country' => :'issuing_country',
77
84
  :'id' => :'id',
78
85
  :'errors' => :'errors'
@@ -82,6 +89,7 @@ module TransferZero
82
89
  # Attribute type mapping.
83
90
  def self.openapi_types
84
91
  {
92
+ :'sender_id' => :'String',
85
93
  :'upload' => :'String',
86
94
  :'upload_file_name' => :'String',
87
95
  :'metadata' => :'Object',
@@ -89,6 +97,7 @@ module TransferZero
89
97
  :'upload_file_size' => :'Integer',
90
98
  :'category' => :'String',
91
99
  :'side' => :'String',
100
+ :'document_type' => :'String',
92
101
  :'issuing_country' => :'String',
93
102
  :'id' => :'String',
94
103
  :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
@@ -110,6 +119,10 @@ module TransferZero
110
119
  h[k.to_sym] = v
111
120
  }
112
121
 
122
+ if attributes.key?(:'sender_id')
123
+ self.sender_id = attributes[:'sender_id']
124
+ end
125
+
113
126
  if attributes.key?(:'upload')
114
127
  self.upload = attributes[:'upload']
115
128
  end
@@ -138,6 +151,10 @@ module TransferZero
138
151
  self.side = attributes[:'side']
139
152
  end
140
153
 
154
+ if attributes.key?(:'document_type')
155
+ self.document_type = attributes[:'document_type']
156
+ end
157
+
141
158
  if attributes.key?(:'issuing_country')
142
159
  self.issuing_country = attributes[:'issuing_country']
143
160
  end
@@ -193,6 +210,7 @@ module TransferZero
193
210
  def ==(o)
194
211
  return true if self.equal?(o)
195
212
  self.class == o.class &&
213
+ sender_id == o.sender_id &&
196
214
  upload == o.upload &&
197
215
  upload_file_name == o.upload_file_name &&
198
216
  metadata == o.metadata &&
@@ -200,6 +218,7 @@ module TransferZero
200
218
  upload_file_size == o.upload_file_size &&
201
219
  category == o.category &&
202
220
  side == o.side &&
221
+ document_type == o.document_type &&
203
222
  issuing_country == o.issuing_country &&
204
223
  id == o.id &&
205
224
  errors == o.errors
@@ -214,7 +233,7 @@ module TransferZero
214
233
  # Calculates hash code according to all attributes.
215
234
  # @return [Integer] Hash code
216
235
  def hash
217
- [upload, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, issuing_country, id, errors].hash
236
+ [sender_id, upload, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, errors].hash
218
237
  end
219
238
 
220
239
  require 'active_support/core_ext/hash'
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'DocumentWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -15,18 +15,18 @@ 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 card collection requests - `GHS::Mobile`: GHS mobile collections - `TZS::Mobile`: TZS mobile collections - `UGX::Mobile`: UGX mobile collections
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
19
19
  attr_accessor :type
20
20
 
21
21
  attr_accessor :in_details
22
22
 
23
- # This will contain the description on where to pay the funds. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on what to expect here.
23
+ # 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
24
  attr_accessor :out_details
25
25
 
26
- # This will contain the instructions on how to pay the funds. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on what to expect here.
26
+ # 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
27
  attr_accessor :instructions
28
28
 
29
- # Describes which provider to use for collection. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on the valid values
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
30
  attr_accessor :provider
31
31
 
32
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -13,8 +13,11 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
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)
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.
19
+ attr_accessor :payment_method
20
+
18
21
  # This is where the user should be redirected back when the payment has been finished
19
22
  attr_accessor :redirect_url
20
23
 
@@ -27,6 +30,7 @@ module TransferZero
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
33
+ :'payment_method' => :'payment_method',
30
34
  :'redirect_url' => :'redirect_url',
31
35
  :'phone_number' => :'phone_number',
32
36
  :'send_instructions' => :'send_instructions'
@@ -36,6 +40,7 @@ module TransferZero
36
40
  # Attribute type mapping.
37
41
  def self.openapi_types
38
42
  {
43
+ :'payment_method' => :'String',
39
44
  :'redirect_url' => :'String',
40
45
  :'phone_number' => :'String',
41
46
  :'send_instructions' => :'Boolean'
@@ -65,6 +70,10 @@ module TransferZero
65
70
  h[k.to_sym] = v
66
71
  }
67
72
 
73
+ if attributes.key?(:'payment_method')
74
+ self.payment_method = attributes[:'payment_method']
75
+ end
76
+
68
77
  if attributes.key?(:'redirect_url')
69
78
  self.redirect_url = attributes[:'redirect_url']
70
79
  end
@@ -82,10 +91,6 @@ module TransferZero
82
91
  # @return Array for valid properties with the reasons
83
92
  def list_invalid_properties
84
93
  invalid_properties = Array.new
85
- if @redirect_url.nil?
86
- invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
87
- end
88
-
89
94
  if @phone_number.nil?
90
95
  invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
91
96
  end
@@ -96,7 +101,6 @@ module TransferZero
96
101
  # Check to see if the all the properties in the model are valid
97
102
  # @return true if the model is valid
98
103
  def valid?
99
- return false if @redirect_url.nil?
100
104
  return false if @phone_number.nil?
101
105
  _one_of_found = false
102
106
  openapi_one_of.each do |_class|
@@ -122,6 +126,7 @@ module TransferZero
122
126
  def ==(o)
123
127
  return true if self.equal?(o)
124
128
  self.class == o.class &&
129
+ payment_method == o.payment_method &&
125
130
  redirect_url == o.redirect_url &&
126
131
  phone_number == o.phone_number &&
127
132
  send_instructions == o.send_instructions
@@ -136,7 +141,7 @@ module TransferZero
136
141
  # Calculates hash code according to all attributes.
137
142
  # @return [Integer] Hash code
138
143
  def hash
139
- [redirect_url, phone_number, send_instructions].hash
144
+ [payment_method, redirect_url, phone_number, send_instructions].hash
140
145
  end
141
146
 
142
147
  require 'active_support/core_ext/hash'
@@ -15,12 +15,16 @@ require 'date'
15
15
  module TransferZero
16
16
  # ```JSON \"details\": { \"redirect_url\": \"http://redirect.back.to\" } ```
17
17
  class PayinMethodDetailsNGNBank
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.
19
+ attr_accessor :payment_method
20
+
18
21
  # This is where the user should be redirected back when the payment has been finished
19
22
  attr_accessor :redirect_url
20
23
 
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
27
+ :'payment_method' => :'payment_method',
24
28
  :'redirect_url' => :'redirect_url'
25
29
  }
26
30
  end
@@ -28,6 +32,7 @@ module TransferZero
28
32
  # Attribute type mapping.
29
33
  def self.openapi_types
30
34
  {
35
+ :'payment_method' => :'String',
31
36
  :'redirect_url' => :'String'
32
37
  }
33
38
  end
@@ -47,6 +52,10 @@ module TransferZero
47
52
  h[k.to_sym] = v
48
53
  }
49
54
 
55
+ if attributes.key?(:'payment_method')
56
+ self.payment_method = attributes[:'payment_method']
57
+ end
58
+
50
59
  if attributes.key?(:'redirect_url')
51
60
  self.redirect_url = attributes[:'redirect_url']
52
61
  end
@@ -56,17 +65,12 @@ module TransferZero
56
65
  # @return Array for valid properties with the reasons
57
66
  def list_invalid_properties
58
67
  invalid_properties = Array.new
59
- if @redirect_url.nil?
60
- invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
61
- end
62
-
63
68
  invalid_properties
64
69
  end
65
70
 
66
71
  # Check to see if the all the properties in the model are valid
67
72
  # @return true if the model is valid
68
73
  def valid?
69
- return false if @redirect_url.nil?
70
74
  true
71
75
  end
72
76
 
@@ -75,6 +79,7 @@ module TransferZero
75
79
  def ==(o)
76
80
  return true if self.equal?(o)
77
81
  self.class == o.class &&
82
+ payment_method == o.payment_method &&
78
83
  redirect_url == o.redirect_url
79
84
  end
80
85
 
@@ -87,7 +92,7 @@ module TransferZero
87
92
  # Calculates hash code according to all attributes.
88
93
  # @return [Integer] Hash code
89
94
  def hash
90
- [redirect_url].hash
95
+ [payment_method, redirect_url].hash
91
96
  end
92
97
 
93
98
  require 'active_support/core_ext/hash'