transferzero-sdk 1.7.0 → 1.8.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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -7
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/Currency.md +1 -1
  5. data/docs/CurrencyExchange.md +1 -1
  6. data/docs/CurrencyOpposite.md +1 -1
  7. data/docs/Document.md +3 -3
  8. data/docs/DocumentsApi.md +74 -2
  9. data/docs/FieldSelectValidation.md +1 -1
  10. data/docs/FieldValidation.md +1 -1
  11. data/docs/PayinMethodDetails.md +1 -3
  12. data/docs/PayinMethodDetailsMobile.md +1 -1
  13. data/docs/PaymentMethod.md +2 -2
  14. data/docs/PaymentMethodOpposite.md +2 -2
  15. data/docs/PayoutMethodDetails.md +1 -7
  16. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  17. data/docs/Recipient.md +4 -4
  18. data/docs/RecipientsApi.md +1 -1
  19. data/docs/Sender.md +33 -63
  20. data/lib/transferzero-sdk.rb +0 -3
  21. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  22. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  23. data/lib/transferzero-sdk/api_client.rb +3 -5
  24. data/lib/transferzero-sdk/models/account.rb +69 -70
  25. data/lib/transferzero-sdk/models/account_list_response.rb +66 -67
  26. data/lib/transferzero-sdk/models/account_meta.rb +60 -61
  27. data/lib/transferzero-sdk/models/account_response.rb +65 -66
  28. data/lib/transferzero-sdk/models/account_validation_error.rb +60 -61
  29. data/lib/transferzero-sdk/models/account_validation_request.rb +163 -164
  30. data/lib/transferzero-sdk/models/account_validation_response.rb +65 -66
  31. data/lib/transferzero-sdk/models/account_validation_result.rb +60 -61
  32. data/lib/transferzero-sdk/models/api_log.rb +135 -136
  33. data/lib/transferzero-sdk/models/api_log_list_response.rb +69 -70
  34. data/lib/transferzero-sdk/models/api_log_response.rb +59 -60
  35. data/lib/transferzero-sdk/models/currency.rb +141 -142
  36. data/lib/transferzero-sdk/models/currency_exchange.rb +157 -158
  37. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +61 -62
  38. data/lib/transferzero-sdk/models/currency_list_response.rb +61 -62
  39. data/lib/transferzero-sdk/models/currency_opposite.rb +165 -166
  40. data/lib/transferzero-sdk/models/debit.rb +150 -151
  41. data/lib/transferzero-sdk/models/debit_list_request.rb +60 -61
  42. data/lib/transferzero-sdk/models/debit_list_response.rb +66 -67
  43. data/lib/transferzero-sdk/models/debit_request.rb +59 -60
  44. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +79 -80
  45. data/lib/transferzero-sdk/models/debit_response.rb +59 -60
  46. data/lib/transferzero-sdk/models/document.rb +177 -179
  47. data/lib/transferzero-sdk/models/document_list_response.rb +66 -67
  48. data/lib/transferzero-sdk/models/document_request.rb +59 -60
  49. data/lib/transferzero-sdk/models/document_response.rb +59 -60
  50. data/lib/transferzero-sdk/models/document_webhook.rb +95 -96
  51. data/lib/transferzero-sdk/models/error_status.rb +65 -66
  52. data/lib/transferzero-sdk/models/field_description.rb +94 -95
  53. data/lib/transferzero-sdk/models/field_select_validation.rb +69 -70
  54. data/lib/transferzero-sdk/models/field_validation.rb +77 -78
  55. data/lib/transferzero-sdk/models/pagination.rb +96 -97
  56. data/lib/transferzero-sdk/models/pagination_meta.rb +59 -60
  57. data/lib/transferzero-sdk/models/payin_method.rb +96 -97
  58. data/lib/transferzero-sdk/models/payin_method_details.rb +110 -122
  59. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +74 -75
  60. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +70 -71
  61. data/lib/transferzero-sdk/models/payin_method_request.rb +59 -60
  62. data/lib/transferzero-sdk/models/payment_method.rb +108 -109
  63. data/lib/transferzero-sdk/models/payment_method_list_response.rb +60 -61
  64. data/lib/transferzero-sdk/models/payment_method_opposite.rb +123 -124
  65. data/lib/transferzero-sdk/models/payout_method.rb +106 -107
  66. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +19 -14
  67. data/lib/transferzero-sdk/models/payout_method_details.rb +297 -337
  68. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +60 -61
  69. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +96 -97
  70. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +104 -100
  71. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +161 -162
  72. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +85 -86
  73. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +103 -104
  74. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +107 -108
  75. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +96 -97
  76. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +19 -14
  77. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +20 -15
  78. data/lib/transferzero-sdk/models/payout_method_list_response.rb +66 -67
  79. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +19 -14
  80. data/lib/transferzero-sdk/models/payout_method_request.rb +59 -60
  81. data/lib/transferzero-sdk/models/payout_method_response.rb +59 -60
  82. data/lib/transferzero-sdk/models/payout_method_webhook.rb +95 -96
  83. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
  84. data/lib/transferzero-sdk/models/recipient.rb +229 -230
  85. data/lib/transferzero-sdk/models/recipient_list_response.rb +66 -67
  86. data/lib/transferzero-sdk/models/recipient_request.rb +59 -60
  87. data/lib/transferzero-sdk/models/recipient_response.rb +59 -60
  88. data/lib/transferzero-sdk/models/recipient_state.rb +27 -22
  89. data/lib/transferzero-sdk/models/recipient_webhook.rb +95 -96
  90. data/lib/transferzero-sdk/models/sender.rb +358 -521
  91. data/lib/transferzero-sdk/models/sender_list_response.rb +66 -67
  92. data/lib/transferzero-sdk/models/sender_request.rb +59 -60
  93. data/lib/transferzero-sdk/models/sender_response.rb +65 -66
  94. data/lib/transferzero-sdk/models/sender_response_existing.rb +59 -60
  95. data/lib/transferzero-sdk/models/sender_response_meta.rb +59 -60
  96. data/lib/transferzero-sdk/models/sender_state.rb +24 -19
  97. data/lib/transferzero-sdk/models/sender_webhook.rb +95 -96
  98. data/lib/transferzero-sdk/models/transaction.rb +191 -192
  99. data/lib/transferzero-sdk/models/transaction_list_response.rb +66 -67
  100. data/lib/transferzero-sdk/models/transaction_request.rb +59 -60
  101. data/lib/transferzero-sdk/models/transaction_response.rb +65 -66
  102. data/lib/transferzero-sdk/models/transaction_response_existing.rb +65 -66
  103. data/lib/transferzero-sdk/models/transaction_response_meta.rb +59 -60
  104. data/lib/transferzero-sdk/models/transaction_state.rb +28 -23
  105. data/lib/transferzero-sdk/models/transaction_traits.rb +70 -71
  106. data/lib/transferzero-sdk/models/transaction_webhook.rb +95 -96
  107. data/lib/transferzero-sdk/models/validation_error_description.rb +61 -62
  108. data/lib/transferzero-sdk/models/webhook.rb +91 -92
  109. data/lib/transferzero-sdk/models/webhook_definition.rb +106 -107
  110. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +60 -61
  111. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +66 -67
  112. data/lib/transferzero-sdk/models/webhook_definition_request.rb +59 -60
  113. data/lib/transferzero-sdk/models/webhook_definition_response.rb +59 -60
  114. data/lib/transferzero-sdk/models/webhook_log.rb +96 -97
  115. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +69 -70
  116. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +128 -129
  117. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +79 -80
  118. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +80 -81
  119. data/lib/transferzero-sdk/models/webhook_log_response.rb +59 -60
  120. data/lib/transferzero-sdk/version.rb +1 -1
  121. metadata +3 -15
  122. data/docs/PayinMethodDetailsBTC.md +0 -17
  123. data/docs/PayoutMethodDetailsBTC.md +0 -23
  124. data/docs/PayoutMethodDetailsGBPBank.md +0 -29
  125. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +0 -204
  126. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +0 -250
  127. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +0 -267
  128. data/spec/models/payin_method_details_btc_spec.rb +0 -41
  129. data/spec/models/payout_method_details_btc_spec.rb +0 -59
  130. data/spec/models/payout_method_details_gbp_bank_spec.rb +0 -77
@@ -52,7 +52,6 @@ require 'transferzero-sdk/models/pagination'
52
52
  require 'transferzero-sdk/models/pagination_meta'
53
53
  require 'transferzero-sdk/models/payin_method'
54
54
  require 'transferzero-sdk/models/payin_method_details'
55
- require 'transferzero-sdk/models/payin_method_details_btc'
56
55
  require 'transferzero-sdk/models/payin_method_details_mobile'
57
56
  require 'transferzero-sdk/models/payin_method_details_ngn_bank'
58
57
  require 'transferzero-sdk/models/payin_method_request'
@@ -62,9 +61,7 @@ require 'transferzero-sdk/models/payment_method_opposite'
62
61
  require 'transferzero-sdk/models/payout_method'
63
62
  require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
64
63
  require 'transferzero-sdk/models/payout_method_details'
65
- require 'transferzero-sdk/models/payout_method_details_btc'
66
64
  require 'transferzero-sdk/models/payout_method_details_balance'
67
- require 'transferzero-sdk/models/payout_method_details_gbp_bank'
68
65
  require 'transferzero-sdk/models/payout_method_details_ghs_bank'
69
66
  require 'transferzero-sdk/models/payout_method_details_iban'
70
67
  require 'transferzero-sdk/models/payout_method_details_mad_cash'
@@ -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 = {}
@@ -22,7 +22,7 @@ module TransferZero
22
22
 
23
23
 
24
24
  # Cancelling a recipient
25
- # Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
25
+ # Cancels the payment to the recipient specified in the URL path. Please note only recipients where the `may_cancel` attribute is true can be cancelled.
26
26
  # @param recipient_id ID of recipient to cancel. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33&#x60;
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @return [RecipientResponse]
@@ -32,7 +32,7 @@ module TransferZero
32
32
  end
33
33
 
34
34
  # Cancelling a recipient
35
- # Cancels the payment to the recipient specified in the URL path. Please note recipients where the &#x60;may_cancel&#x60; attribute is true will be cancelled immediately. If the &#x60;may_cancel&#x60; attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
35
+ # Cancels the payment to the recipient specified in the URL path. Please note only recipients where the &#x60;may_cancel&#x60; attribute is true can be cancelled.
36
36
  # @param recipient_id ID of recipient to cancel. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33&#x60;
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(RecipientResponse, Fixnum, Hash)>] RecipientResponse data, response status code and response headers
@@ -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.7.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.8.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -106,14 +106,12 @@ module TransferZero
106
106
  url_with_params = add_query(url, query_params)
107
107
  form_params = opts[:form_params] || {}
108
108
 
109
- request_body = opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip
110
-
111
109
  request_nonce = SecureRandom.uuid
112
110
  request_signature = sign_request([
113
111
  request_nonce,
114
112
  http_method.to_s.upcase,
115
113
  url_with_params,
116
- DIGEST.hexdigest(request_body)
114
+ DIGEST.hexdigest(opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip)
117
115
  ])
118
116
 
119
117
  header_params['Authorization-Nonce'] = request_nonce
@@ -140,7 +138,7 @@ module TransferZero
140
138
  req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
141
139
 
142
140
  if [:post, :patch, :put, :delete].include?(http_method)
143
- req_body = build_request_body(header_params, form_params, request_body)
141
+ req_body = build_request_body(header_params, form_params, opts[:body])
144
142
  req_opts.update :body => req_body
145
143
  if @config.debugging
146
144
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class Account
17
- # The account balance for the given currency
18
- attr_accessor :amount
19
-
20
- # The currency of this balance
21
- attr_accessor :currency
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'amount' => :'amount',
27
- :'currency' => :'currency'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.openapi_types
33
- {
34
- :'amount' => :'Float',
35
- :'currency' => :'String'
36
- }
37
- end
16
+ class Account
17
+ # The account balance for the given currency
18
+ attr_accessor :amount
19
+
20
+ # The currency of this balance
21
+ attr_accessor :currency
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'amount' => :'amount',
27
+ :'currency' => :'currency'
28
+ }
29
+ end
38
30
 
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(attributes = {})
42
- if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'amount' => :'Float',
35
+ :'currency' => :'String'
36
+ }
44
37
  end
45
38
 
46
- # check to see if the attribute exists and convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}) { |(k, v), h|
48
- if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
50
44
  end
51
- h[k.to_sym] = v
52
- }
53
45
 
54
- if attributes.key?(:'amount')
55
- self.amount = attributes[:'amount']
56
- end
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'amount')
55
+ self.amount = attributes[:'amount']
56
+ end
57
57
 
58
- if attributes.key?(:'currency')
59
- self.currency = attributes[:'currency']
58
+ if attributes.key?(:'currency')
59
+ self.currency = attributes[:'currency']
60
+ end
60
61
  end
61
- end
62
62
 
63
- # Show invalid properties with the reasons. Usually used together with valid?
64
- # @return Array for valid properties with the reasons
65
- def list_invalid_properties
66
- invalid_properties = Array.new
67
- invalid_properties
68
- end
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
69
 
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- true
74
- end
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
75
 
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class &&
81
- amount == o.amount &&
82
- currency == o.currency
83
- end
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ amount == o.amount &&
82
+ currency == o.currency
83
+ end
84
84
 
85
- # @see the `==` method
86
- # @param [Object] Object to be compared
87
- def eql?(o)
88
- self == o
89
- end
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
90
 
91
- # Calculates hash code according to all attributes.
92
- # @return [Integer] Hash code
93
- def hash
94
- [amount, currency].hash
95
- end
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [amount, currency].hash
95
+ end
96
96
 
97
97
  require 'active_support/core_ext/hash'
98
98
  require 'active_support/hash_with_indifferent_access.rb'
@@ -208,6 +208,5 @@ def _to_hash(value)
208
208
  end
209
209
  end
210
210
 
211
- end
212
-
211
+ end
213
212
  end
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class AccountListResponse
17
- attr_accessor :object
16
+ class AccountListResponse
17
+ attr_accessor :object
18
18
 
19
- attr_accessor :meta
19
+ attr_accessor :meta
20
20
 
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'object' => :'object',
25
- :'meta' => :'meta'
26
- }
27
- end
28
-
29
- # Attribute type mapping.
30
- def self.openapi_types
31
- {
32
- :'object' => :'Array<Account>',
33
- :'meta' => :'AccountMeta'
34
- }
35
- end
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'object' => :'object',
25
+ :'meta' => :'meta'
26
+ }
27
+ end
36
28
 
37
- # Initializes the object
38
- # @param [Hash] attributes Model attributes in the form of hash
39
- def initialize(attributes = {})
40
- if (!attributes.is_a?(Hash))
41
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::AccountListResponse` initialize method"
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'object' => :'Array<Account>',
33
+ :'meta' => :'AccountMeta'
34
+ }
42
35
  end
43
36
 
44
- # check to see if the attribute exists and convert string to symbol for hash key
45
- attributes = attributes.each_with_object({}) { |(k, v), h|
46
- if (!self.class.attribute_map.key?(k.to_sym))
47
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::AccountListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ if (!attributes.is_a?(Hash))
41
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::AccountListResponse` initialize method"
48
42
  end
49
- h[k.to_sym] = v
50
- }
51
43
 
52
- if attributes.key?(:'object')
53
- if (value = attributes[:'object']).is_a?(Array)
54
- self.object = value
44
+ # check to see if the attribute exists and convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h|
46
+ if (!self.class.attribute_map.key?(k.to_sym))
47
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::AccountListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ end
49
+ h[k.to_sym] = v
50
+ }
51
+
52
+ if attributes.key?(:'object')
53
+ if (value = attributes[:'object']).is_a?(Array)
54
+ self.object = value
55
+ end
55
56
  end
56
- end
57
57
 
58
- if attributes.key?(:'meta')
59
- self.meta = attributes[:'meta']
58
+ if attributes.key?(:'meta')
59
+ self.meta = attributes[:'meta']
60
+ end
60
61
  end
61
- end
62
62
 
63
- # Show invalid properties with the reasons. Usually used together with valid?
64
- # @return Array for valid properties with the reasons
65
- def list_invalid_properties
66
- invalid_properties = Array.new
67
- invalid_properties
68
- end
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
69
 
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- true
74
- end
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
75
 
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class &&
81
- object == o.object &&
82
- meta == o.meta
83
- end
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ object == o.object &&
82
+ meta == o.meta
83
+ end
84
84
 
85
- # @see the `==` method
86
- # @param [Object] Object to be compared
87
- def eql?(o)
88
- self == o
89
- end
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
90
 
91
- # Calculates hash code according to all attributes.
92
- # @return [Integer] Hash code
93
- def hash
94
- [object, meta].hash
95
- end
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [object, meta].hash
95
+ end
96
96
 
97
97
  require 'active_support/core_ext/hash'
98
98
  require 'active_support/hash_with_indifferent_access.rb'
@@ -208,6 +208,5 @@ def _to_hash(value)
208
208
  end
209
209
  end
210
210
 
211
- end
212
-
211
+ end
213
212
  end