transferzero-sdk 1.0.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -11
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/AccountValidationApi.md +4 -4
  5. data/docs/AccountValidationRequest.md +6 -4
  6. data/docs/Currency.md +1 -1
  7. data/docs/CurrencyExchange.md +1 -1
  8. data/docs/CurrencyInfoApi.md +20 -6
  9. data/docs/CurrencyOpposite.md +4 -2
  10. data/docs/Debit.md +2 -2
  11. data/docs/Document.md +4 -0
  12. data/docs/FieldSelectValidation.md +1 -1
  13. data/docs/FieldValidation.md +1 -1
  14. data/docs/PayinMethod.md +4 -4
  15. data/docs/PayinMethodDetails.md +7 -3
  16. data/docs/PayinMethodDetailsBTC.md +17 -0
  17. data/docs/PayinMethodDetailsMobile.md +1 -1
  18. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  19. data/docs/PaymentMethod.md +2 -2
  20. data/docs/PaymentMethodOpposite.md +2 -2
  21. data/docs/PayoutMethod.md +1 -1
  22. data/docs/PayoutMethodDetails.md +12 -4
  23. data/docs/PayoutMethodDetailsBTC.md +23 -0
  24. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  25. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  26. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  27. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  28. data/docs/PoliticallyExposedPerson.md +31 -0
  29. data/docs/Recipient.md +5 -3
  30. data/docs/RecipientsApi.md +3 -3
  31. data/docs/Sender.md +63 -27
  32. data/docs/Transaction.md +5 -5
  33. data/docs/TransactionTraits.md +2 -2
  34. data/docs/TransactionsApi.md +64 -0
  35. data/example/client.rb +14 -14
  36. data/git_push.sh +1 -1
  37. data/lib/transferzero-sdk.rb +5 -0
  38. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  39. data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
  40. data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
  41. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  42. data/lib/transferzero-sdk/api_client.rb +5 -5
  43. data/lib/transferzero-sdk/models/account.rb +70 -69
  44. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  45. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  46. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  47. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  48. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  49. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  50. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  51. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  52. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  53. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  54. data/lib/transferzero-sdk/models/currency.rb +142 -141
  55. data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
  56. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  57. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  58. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -155
  59. data/lib/transferzero-sdk/models/debit.rb +151 -155
  60. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  61. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  62. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  63. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  64. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  65. data/lib/transferzero-sdk/models/document.rb +181 -160
  66. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  67. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  68. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  69. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  70. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  71. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  72. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  73. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  74. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  75. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  76. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  77. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -105
  78. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
  79. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  80. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -65
  81. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  82. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  83. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  84. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  85. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  86. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  87. data/lib/transferzero-sdk/models/payout_method_details.rb +338 -288
  88. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  89. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
  90. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  91. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  92. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  93. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  94. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
  95. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -108
  96. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
  97. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  98. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  99. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  100. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  101. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
  102. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  103. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  104. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  105. data/lib/transferzero-sdk/models/politically_exposed_person.rb +272 -0
  106. data/lib/transferzero-sdk/models/recipient.rb +230 -219
  107. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  108. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  109. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  110. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  111. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  112. data/lib/transferzero-sdk/models/sender.rb +529 -322
  113. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  114. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  115. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  116. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  117. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  118. data/lib/transferzero-sdk/models/sender_state.rb +19 -23
  119. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  120. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  121. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  122. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  123. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  124. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  125. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  126. data/lib/transferzero-sdk/models/transaction_state.rb +23 -27
  127. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  128. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  129. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  130. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  131. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  132. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  133. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  134. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  135. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  136. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  137. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  138. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  139. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  140. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  141. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  142. data/lib/transferzero-sdk/version.rb +1 -1
  143. data/spec/api/account_validation_api_spec.rb +2 -2
  144. data/spec/api/currency_info_api_spec.rb +2 -0
  145. data/spec/api/documents_api_spec.rb +15 -0
  146. data/spec/api/recipients_api_spec.rb +1 -1
  147. data/spec/api/transactions_api_spec.rb +13 -0
  148. data/spec/models/account_validation_request_spec.rb +7 -1
  149. data/spec/models/currency_opposite_spec.rb +6 -0
  150. data/spec/models/document_spec.rb +12 -0
  151. data/spec/models/payin_method_details_btc_spec.rb +41 -0
  152. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  153. data/spec/models/payin_method_details_spec.rb +6 -0
  154. data/spec/models/payout_method_details_btc_spec.rb +59 -0
  155. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  156. data/spec/models/payout_method_details_spec.rb +7 -1
  157. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  158. data/spec/models/politically_exposed_person_spec.rb +83 -0
  159. data/spec/models/recipient_spec.rb +6 -0
  160. data/spec/models/sender_spec.rb +16 -0
  161. data/transferzero-sdk.gemspec +2 -2
  162. metadata +35 -24
  163. data/spec/api_client_spec.rb +0 -189
@@ -13,124 +13,124 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"bank_code\": \"030100\", \"bank_account\": \"123456789\" } ``` The current banks supported and their bank_codes values are: - Access Bank: 280100 - Barclays Bank: 030100 - GCB Bank: 040100 - Ecobank: 130100 - First National Bank: 330100 - Heritage Bank: 370100 - Prudential Bank: 180100 - Stanbic Bank: 190100 - Standard Chartered Bank: 020100 - United Bank for Africa: 060100 - Zenith Bank: 120100
17
- class PayoutMethodDetailsGHSBank
18
- attr_accessor :first_name
16
+ # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"bank_code\": \"030100\", \"bank_account\": \"123456789\" } ``` The current banks supported and their bank_codes values are: - Access Bank: 280100 - Barclays Bank: 030100 - GCB Bank: 040100 - Ecobank: 130100 - First National Bank: 330100 - Heritage Bank: 370100 - Prudential Bank: 180100 - Stanbic Bank: 190100 - Standard Chartered Bank: 020100 - United Bank for Africa: 060100 - Zenith Bank: 120100
17
+ class PayoutMethodDetailsGHSBank
18
+ attr_accessor :first_name
19
19
 
20
- attr_accessor :last_name
20
+ attr_accessor :last_name
21
21
 
22
- attr_accessor :bank_code
22
+ attr_accessor :bank_code
23
23
 
24
- attr_accessor :bank_account
24
+ attr_accessor :bank_account
25
25
 
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'first_name' => :'first_name',
30
- :'last_name' => :'last_name',
31
- :'bank_code' => :'bank_code',
32
- :'bank_account' => :'bank_account'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.openapi_types
38
- {
39
- :'first_name' => :'String',
40
- :'last_name' => :'String',
41
- :'bank_code' => :'String',
42
- :'bank_account' => :'String'
43
- }
44
- end
45
-
46
- # Initializes the object
47
- # @param [Hash] attributes Model attributes in the form of hash
48
- def initialize(attributes = {})
49
- if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsGHSBank` initialize method"
51
- end
52
-
53
- # check to see if the attribute exists and convert string to symbol for hash key
54
- attributes = attributes.each_with_object({}) { |(k, v), h|
55
- if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsGHSBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
- end
58
- h[k.to_sym] = v
59
- }
60
-
61
- if attributes.key?(:'first_name')
62
- self.first_name = attributes[:'first_name']
63
- end
64
-
65
- if attributes.key?(:'last_name')
66
- self.last_name = attributes[:'last_name']
67
- end
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'first_name' => :'first_name',
30
+ :'last_name' => :'last_name',
31
+ :'bank_code' => :'bank_code',
32
+ :'bank_account' => :'bank_account'
33
+ }
34
+ end
68
35
 
69
- if attributes.key?(:'bank_code')
70
- self.bank_code = attributes[:'bank_code']
71
- end
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'first_name' => :'String',
40
+ :'last_name' => :'String',
41
+ :'bank_code' => :'String',
42
+ :'bank_account' => :'String'
43
+ }
44
+ end
72
45
 
73
- if attributes.key?(:'bank_account')
74
- self.bank_account = attributes[:'bank_account']
75
- end
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsGHSBank` initialize method"
76
51
  end
77
52
 
78
- # Show invalid properties with the reasons. Usually used together with valid?
79
- # @return Array for valid properties with the reasons
80
- def list_invalid_properties
81
- invalid_properties = Array.new
82
- if @first_name.nil?
83
- invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsGHSBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
57
  end
58
+ h[k.to_sym] = v
59
+ }
85
60
 
86
- if @last_name.nil?
87
- invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
88
- end
61
+ if attributes.key?(:'first_name')
62
+ self.first_name = attributes[:'first_name']
63
+ end
89
64
 
90
- if @bank_code.nil?
91
- invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
92
- end
65
+ if attributes.key?(:'last_name')
66
+ self.last_name = attributes[:'last_name']
67
+ end
93
68
 
94
- if @bank_account.nil?
95
- invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
96
- end
69
+ if attributes.key?(:'bank_code')
70
+ self.bank_code = attributes[:'bank_code']
71
+ end
97
72
 
98
- invalid_properties
73
+ if attributes.key?(:'bank_account')
74
+ self.bank_account = attributes[:'bank_account']
99
75
  end
76
+ end
100
77
 
101
- # Check to see if the all the properties in the model are valid
102
- # @return true if the model is valid
103
- def valid?
104
- return false if @first_name.nil?
105
- return false if @last_name.nil?
106
- return false if @bank_code.nil?
107
- return false if @bank_account.nil?
108
- true
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @first_name.nil?
83
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
109
84
  end
110
85
 
111
- # Checks equality by comparing each attribute.
112
- # @param [Object] Object to be compared
113
- def ==(o)
114
- return true if self.equal?(o)
115
- self.class == o.class &&
116
- first_name == o.first_name &&
117
- last_name == o.last_name &&
118
- bank_code == o.bank_code &&
119
- bank_account == o.bank_account
86
+ if @last_name.nil?
87
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
120
88
  end
121
89
 
122
- # @see the `==` method
123
- # @param [Object] Object to be compared
124
- def eql?(o)
125
- self == o
90
+ if @bank_code.nil?
91
+ invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
126
92
  end
127
93
 
128
- # Calculates hash code according to all attributes.
129
- # @return [Integer] Hash code
130
- def hash
131
- [first_name, last_name, bank_code, bank_account].hash
94
+ if @bank_account.nil?
95
+ invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
132
96
  end
133
97
 
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ return false if @first_name.nil?
105
+ return false if @last_name.nil?
106
+ return false if @bank_code.nil?
107
+ return false if @bank_account.nil?
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ first_name == o.first_name &&
117
+ last_name == o.last_name &&
118
+ bank_code == o.bank_code &&
119
+ bank_account == o.bank_account
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [first_name, last_name, bank_code, bank_account].hash
132
+ end
133
+
134
134
  require 'active_support/core_ext/hash'
135
135
  require 'active_support/hash_with_indifferent_access.rb'
136
136
  # Builds the object from hash
@@ -245,5 +245,6 @@ def _to_hash(value)
245
245
  end
246
246
  end
247
247
 
248
- end
248
+ end
249
+
249
250
  end
@@ -13,133 +13,128 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"bank_name\": \"Deutsche Bank\", \"iban\": \"DE89370400440532013000\", \"bic\": \"DEUTDEBBXXX\" // Optional } ```
17
- class PayoutMethodDetailsIBAN
18
- attr_accessor :first_name
16
+ # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"bank_name\": \"Deutsche Bank\", \"iban\": \"DE89370400440532013000\", \"bic\": \"DEUTDEBBXXX\" // Optional } ```
17
+ class PayoutMethodDetailsIBAN
18
+ attr_accessor :first_name
19
19
 
20
- attr_accessor :last_name
20
+ attr_accessor :last_name
21
21
 
22
- attr_accessor :bank_name
22
+ attr_accessor :bank_name
23
23
 
24
- attr_accessor :iban
24
+ attr_accessor :iban
25
25
 
26
- attr_accessor :bic
26
+ attr_accessor :bic
27
27
 
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'first_name' => :'first_name',
32
- :'last_name' => :'last_name',
33
- :'bank_name' => :'bank_name',
34
- :'iban' => :'iban',
35
- :'bic' => :'bic'
36
- }
37
- end
38
-
39
- # Attribute type mapping.
40
- def self.openapi_types
41
- {
42
- :'first_name' => :'String',
43
- :'last_name' => :'String',
44
- :'bank_name' => :'String',
45
- :'iban' => :'String',
46
- :'bic' => :'String'
47
- }
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsIBAN` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsIBAN`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
- end
62
- h[k.to_sym] = v
63
- }
64
-
65
- if attributes.key?(:'first_name')
66
- self.first_name = attributes[:'first_name']
67
- end
68
-
69
- if attributes.key?(:'last_name')
70
- self.last_name = attributes[:'last_name']
71
- end
72
-
73
- if attributes.key?(:'bank_name')
74
- self.bank_name = attributes[:'bank_name']
75
- end
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'first_name' => :'first_name',
32
+ :'last_name' => :'last_name',
33
+ :'bank_name' => :'bank_name',
34
+ :'iban' => :'iban',
35
+ :'bic' => :'bic'
36
+ }
37
+ end
76
38
 
77
- if attributes.key?(:'iban')
78
- self.iban = attributes[:'iban']
79
- end
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'first_name' => :'String',
43
+ :'last_name' => :'String',
44
+ :'bank_name' => :'String',
45
+ :'iban' => :'String',
46
+ :'bic' => :'String'
47
+ }
48
+ end
80
49
 
81
- if attributes.key?(:'bic')
82
- self.bic = attributes[:'bic']
83
- end
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsIBAN` initialize method"
84
55
  end
85
56
 
86
- # Show invalid properties with the reasons. Usually used together with valid?
87
- # @return Array for valid properties with the reasons
88
- def list_invalid_properties
89
- invalid_properties = Array.new
90
- if @first_name.nil?
91
- invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsIBAN`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
61
  end
62
+ h[k.to_sym] = v
63
+ }
93
64
 
94
- if @last_name.nil?
95
- invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
96
- end
65
+ if attributes.key?(:'first_name')
66
+ self.first_name = attributes[:'first_name']
67
+ end
97
68
 
98
- if @bank_name.nil?
99
- invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
100
- end
69
+ if attributes.key?(:'last_name')
70
+ self.last_name = attributes[:'last_name']
71
+ end
101
72
 
102
- if @iban.nil?
103
- invalid_properties.push('invalid value for "iban", iban cannot be nil.')
104
- end
73
+ if attributes.key?(:'bank_name')
74
+ self.bank_name = attributes[:'bank_name']
75
+ end
105
76
 
106
- invalid_properties
77
+ if attributes.key?(:'iban')
78
+ self.iban = attributes[:'iban']
107
79
  end
108
80
 
109
- # Check to see if the all the properties in the model are valid
110
- # @return true if the model is valid
111
- def valid?
112
- return false if @first_name.nil?
113
- return false if @last_name.nil?
114
- return false if @bank_name.nil?
115
- return false if @iban.nil?
116
- true
81
+ if attributes.key?(:'bic')
82
+ self.bic = attributes[:'bic']
117
83
  end
84
+ end
118
85
 
119
- # Checks equality by comparing each attribute.
120
- # @param [Object] Object to be compared
121
- def ==(o)
122
- return true if self.equal?(o)
123
- self.class == o.class &&
124
- first_name == o.first_name &&
125
- last_name == o.last_name &&
126
- bank_name == o.bank_name &&
127
- iban == o.iban &&
128
- bic == o.bic
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ if @first_name.nil?
91
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
129
92
  end
130
93
 
131
- # @see the `==` method
132
- # @param [Object] Object to be compared
133
- def eql?(o)
134
- self == o
94
+ if @last_name.nil?
95
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
135
96
  end
136
97
 
137
- # Calculates hash code according to all attributes.
138
- # @return [Integer] Hash code
139
- def hash
140
- [first_name, last_name, bank_name, iban, bic].hash
98
+ if @iban.nil?
99
+ invalid_properties.push('invalid value for "iban", iban cannot be nil.')
141
100
  end
142
101
 
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ return false if @first_name.nil?
109
+ return false if @last_name.nil?
110
+ return false if @iban.nil?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ first_name == o.first_name &&
120
+ last_name == o.last_name &&
121
+ bank_name == o.bank_name &&
122
+ iban == o.iban &&
123
+ bic == o.bic
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [first_name, last_name, bank_name, iban, bic].hash
136
+ end
137
+
143
138
  require 'active_support/core_ext/hash'
144
139
  require 'active_support/hash_with_indifferent_access.rb'
145
140
  # Builds the object from hash
@@ -254,5 +249,6 @@ def _to_hash(value)
254
249
  end
255
250
  end
256
251
 
257
- end
252
+ end
253
+
258
254
  end