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
@@ -13,129 +13,129 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # This describes the specific details on how the payment has to be routed to the recipient.
17
- class PayoutMethod
18
- # Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `XOF::Bank` - for Senegalese bank account payments. *** Currently in Beta phase *** - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance
19
- attr_accessor :type
20
-
21
- attr_accessor :details
22
-
23
- # Metadata of payout method. You can store any kind of information in this field.
24
- attr_accessor :metadata
25
-
26
- attr_accessor :id
27
-
28
- # The fields that have some problems and don't pass validation
29
- attr_accessor :errors
30
-
31
- # The fields needed for payments with this payment method with details on validation requirements
32
- attr_accessor :fields
33
-
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- def self.attribute_map
36
- {
37
- :'type' => :'type',
38
- :'details' => :'details',
39
- :'metadata' => :'metadata',
40
- :'id' => :'id',
41
- :'errors' => :'errors',
42
- :'fields' => :'fields'
43
- }
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'type' => :'String',
50
- :'details' => :'PayoutMethodDetails',
51
- :'metadata' => :'Object',
52
- :'id' => :'String',
53
- :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
54
- :'fields' => :'Hash<String, FieldDescription>'
55
- }
56
- end
16
+ # This describes the specific details on how the payment has to be routed to the recipient.
17
+ class PayoutMethod
18
+ # Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `XOF::Bank` - for Senegalese bank account payments. *** Currently in Beta phase *** - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance
19
+ attr_accessor :type
20
+
21
+ attr_accessor :details
22
+
23
+ # Metadata of payout method. You can store any kind of information in this field.
24
+ attr_accessor :metadata
25
+
26
+ attr_accessor :id
27
+
28
+ # The fields that have some problems and don't pass validation
29
+ attr_accessor :errors
30
+
31
+ # The fields needed for payments with this payment method with details on validation requirements
32
+ attr_accessor :fields
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'type' => :'type',
38
+ :'details' => :'details',
39
+ :'metadata' => :'metadata',
40
+ :'id' => :'id',
41
+ :'errors' => :'errors',
42
+ :'fields' => :'fields'
43
+ }
44
+ end
57
45
 
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethod` initialize method"
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'type' => :'String',
50
+ :'details' => :'PayoutMethodDetails',
51
+ :'metadata' => :'Object',
52
+ :'id' => :'String',
53
+ :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
54
+ :'fields' => :'Hash<String, FieldDescription>'
55
+ }
63
56
  end
64
57
 
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}) { |(k, v), h|
67
- if (!self.class.attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethod` initialize method"
69
63
  end
70
- h[k.to_sym] = v
71
- }
72
64
 
73
- if attributes.key?(:'type')
74
- self.type = attributes[:'type']
75
- end
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
76
72
 
77
- if attributes.key?(:'details')
78
- self.details = attributes[:'details']
79
- end
73
+ if attributes.key?(:'type')
74
+ self.type = attributes[:'type']
75
+ end
80
76
 
81
- if attributes.key?(:'metadata')
82
- self.metadata = attributes[:'metadata']
83
- end
77
+ if attributes.key?(:'details')
78
+ self.details = attributes[:'details']
79
+ end
84
80
 
85
- if attributes.key?(:'id')
86
- self.id = attributes[:'id']
87
- end
81
+ if attributes.key?(:'metadata')
82
+ self.metadata = attributes[:'metadata']
83
+ end
88
84
 
89
- if attributes.key?(:'errors')
90
- if (value = attributes[:'errors']).is_a?(Hash)
91
- self.errors = value
85
+ if attributes.key?(:'id')
86
+ self.id = attributes[:'id']
92
87
  end
93
- end
94
88
 
95
- if attributes.key?(:'fields')
96
- if (value = attributes[:'fields']).is_a?(Hash)
97
- self.fields = value
89
+ if attributes.key?(:'errors')
90
+ if (value = attributes[:'errors']).is_a?(Hash)
91
+ self.errors = value
92
+ end
93
+ end
94
+
95
+ if attributes.key?(:'fields')
96
+ if (value = attributes[:'fields']).is_a?(Hash)
97
+ self.fields = value
98
+ end
98
99
  end
99
100
  end
100
- end
101
101
 
102
- # Show invalid properties with the reasons. Usually used together with valid?
103
- # @return Array for valid properties with the reasons
104
- def list_invalid_properties
105
- invalid_properties = Array.new
106
- invalid_properties
107
- end
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
108
 
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
- true
113
- end
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
+ true
113
+ end
114
114
 
115
- # Checks equality by comparing each attribute.
116
- # @param [Object] Object to be compared
117
- def ==(o)
118
- return true if self.equal?(o)
119
- self.class == o.class &&
120
- type == o.type &&
121
- details == o.details &&
122
- metadata == o.metadata &&
123
- id == o.id &&
124
- errors == o.errors &&
125
- fields == o.fields
126
- end
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ type == o.type &&
121
+ details == o.details &&
122
+ metadata == o.metadata &&
123
+ id == o.id &&
124
+ errors == o.errors &&
125
+ fields == o.fields
126
+ end
127
127
 
128
- # @see the `==` method
129
- # @param [Object] Object to be compared
130
- def eql?(o)
131
- self == o
132
- end
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
133
 
134
- # Calculates hash code according to all attributes.
135
- # @return [Integer] Hash code
136
- def hash
137
- [type, details, metadata, id, errors, fields].hash
138
- end
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [type, details, metadata, id, errors, fields].hash
138
+ end
139
139
 
140
140
  require 'active_support/core_ext/hash'
141
141
  require 'active_support/hash_with_indifferent_access.rb'
@@ -251,6 +251,5 @@ def _to_hash(value)
251
251
  end
252
252
  end
253
253
 
254
- end
255
-
254
+ end
256
255
  end
@@ -13,19 +13,24 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PayoutMethodBankAccountTypeEnum
17
-
18
- N10 = "10".freeze
19
- N20 = "20".freeze
20
-
21
- # Builds the enum from string
22
- # @param [String] The enum value in the form of the string
23
- # @return [String] The enum value
24
- def build_from_hash(value)
25
- constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
26
- raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty? && !value.empty?
27
- value
16
+ class PayoutMethodBankAccountTypeEnum
17
+ N10 = "10".freeze
18
+ N20 = "20".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty?
33
+ value
34
+ end
28
35
  end
29
36
  end
30
-
31
- end
@@ -13,385 +13,346 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PayoutMethodDetails
17
- attr_accessor :first_name
16
+ class PayoutMethodDetails
17
+ attr_accessor :first_name
18
+
19
+ attr_accessor :last_name
20
+
21
+ attr_accessor :bank_code
18
22
 
19
- attr_accessor :last_name
20
-
21
- attr_accessor :bank_code
22
-
23
- attr_accessor :bank_account
24
-
25
- attr_accessor :bank_account_type
26
-
27
- attr_accessor :phone_number
28
-
29
- attr_accessor :mobile_provider
30
-
31
- attr_accessor :iban
32
-
33
- attr_accessor :bank_name
34
-
35
- attr_accessor :bank_country
36
-
37
- attr_accessor :sort_code
38
-
39
- attr_accessor :bic
40
-
41
- attr_accessor :sender_identity_card_type
42
-
43
- attr_accessor :sender_identity_card_id
44
-
45
- attr_accessor :sender_city_of_birth
46
-
47
- attr_accessor :sender_country_of_birth
48
-
49
- attr_accessor :sender_gender
50
-
51
- attr_accessor :reason
52
-
53
- attr_accessor :identity_card_type
54
-
55
- attr_accessor :identity_card_id
56
-
57
- attr_accessor :reference
58
-
59
- attr_accessor :name
60
-
61
- attr_accessor :address
62
-
63
- # Attribute mapping from ruby-style variable name to JSON key.
64
- def self.attribute_map
65
- {
66
- :'first_name' => :'first_name',
67
- :'last_name' => :'last_name',
68
- :'bank_code' => :'bank_code',
69
- :'bank_account' => :'bank_account',
70
- :'bank_account_type' => :'bank_account_type',
71
- :'phone_number' => :'phone_number',
72
- :'mobile_provider' => :'mobile_provider',
73
- :'iban' => :'iban',
74
- :'bank_name' => :'bank_name',
75
- :'bank_country' => :'bank_country',
76
- :'sort_code' => :'sort_code',
77
- :'bic' => :'bic',
78
- :'sender_identity_card_type' => :'sender_identity_card_type',
79
- :'sender_identity_card_id' => :'sender_identity_card_id',
80
- :'sender_city_of_birth' => :'sender_city_of_birth',
81
- :'sender_country_of_birth' => :'sender_country_of_birth',
82
- :'sender_gender' => :'sender_gender',
83
- :'reason' => :'reason',
84
- :'identity_card_type' => :'identity_card_type',
85
- :'identity_card_id' => :'identity_card_id',
86
- :'reference' => :'reference',
87
- :'name' => :'name',
88
- :'address' => :'address'
89
- }
90
- end
91
-
92
- # Attribute type mapping.
93
- def self.openapi_types
94
- {
95
- :'first_name' => :'String',
96
- :'last_name' => :'String',
97
- :'bank_code' => :'String',
98
- :'bank_account' => :'String',
99
- :'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
100
- :'phone_number' => :'String',
101
- :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
102
- :'iban' => :'String',
103
- :'bank_name' => :'String',
104
- :'bank_country' => :'String',
105
- :'sort_code' => :'String',
106
- :'bic' => :'String',
107
- :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
108
- :'sender_identity_card_id' => :'String',
109
- :'sender_city_of_birth' => :'String',
110
- :'sender_country_of_birth' => :'String',
111
- :'sender_gender' => :'PayoutMethodGenderEnum',
112
- :'reason' => :'String',
113
- :'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
114
- :'identity_card_id' => :'String',
115
- :'reference' => :'String',
116
- :'name' => :'String',
117
- :'address' => :'String'
118
- }
119
- end
120
-
121
- # List of class defined in oneOf (OpenAPI v3)
122
- def self.openapi_one_of
123
- [
124
- :'PayoutMethodDetailsBTC',
125
- :'PayoutMethodDetailsBalance',
126
- :'PayoutMethodDetailsGBPBank',
127
- :'PayoutMethodDetailsGHSBank',
128
- :'PayoutMethodDetailsIBAN',
129
- :'PayoutMethodDetailsMADCash',
130
- :'PayoutMethodDetailsMobile',
131
- :'PayoutMethodDetailsNGNBank',
132
- :'PayoutMethodDetailsXOFBank',
133
- :'PayoutMethodDetailsXOFMobile'
134
- ]
135
- end
136
-
137
- # Initializes the object
138
- # @param [Hash] attributes Model attributes in the form of hash
139
- def initialize(attributes = {})
140
- if (!attributes.is_a?(Hash))
141
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
142
- end
143
-
144
- # check to see if the attribute exists and convert string to symbol for hash key
145
- attributes = attributes.each_with_object({}) { |(k, v), h|
146
- if (!self.class.attribute_map.key?(k.to_sym))
147
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
23
+ attr_accessor :bank_account
24
+
25
+ attr_accessor :bank_account_type
26
+
27
+ attr_accessor :phone_number
28
+
29
+ attr_accessor :mobile_provider
30
+
31
+ attr_accessor :iban
32
+
33
+ attr_accessor :bank_name
34
+
35
+ attr_accessor :bank_country
36
+
37
+ attr_accessor :bic
38
+
39
+ attr_accessor :sender_identity_card_type
40
+
41
+ attr_accessor :sender_identity_card_id
42
+
43
+ attr_accessor :sender_city_of_birth
44
+
45
+ attr_accessor :sender_country_of_birth
46
+
47
+ attr_accessor :sender_gender
48
+
49
+ attr_accessor :reason
50
+
51
+ attr_accessor :identity_card_type
52
+
53
+ attr_accessor :identity_card_id
54
+
55
+ attr_accessor :reference
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'first_name' => :'first_name',
61
+ :'last_name' => :'last_name',
62
+ :'bank_code' => :'bank_code',
63
+ :'bank_account' => :'bank_account',
64
+ :'bank_account_type' => :'bank_account_type',
65
+ :'phone_number' => :'phone_number',
66
+ :'mobile_provider' => :'mobile_provider',
67
+ :'iban' => :'iban',
68
+ :'bank_name' => :'bank_name',
69
+ :'bank_country' => :'bank_country',
70
+ :'bic' => :'bic',
71
+ :'sender_identity_card_type' => :'sender_identity_card_type',
72
+ :'sender_identity_card_id' => :'sender_identity_card_id',
73
+ :'sender_city_of_birth' => :'sender_city_of_birth',
74
+ :'sender_country_of_birth' => :'sender_country_of_birth',
75
+ :'sender_gender' => :'sender_gender',
76
+ :'reason' => :'reason',
77
+ :'identity_card_type' => :'identity_card_type',
78
+ :'identity_card_id' => :'identity_card_id',
79
+ :'reference' => :'reference'
80
+ }
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'first_name' => :'String',
87
+ :'last_name' => :'String',
88
+ :'bank_code' => :'String',
89
+ :'bank_account' => :'String',
90
+ :'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
91
+ :'phone_number' => :'String',
92
+ :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
93
+ :'iban' => :'String',
94
+ :'bank_name' => :'String',
95
+ :'bank_country' => :'String',
96
+ :'bic' => :'String',
97
+ :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
98
+ :'sender_identity_card_id' => :'String',
99
+ :'sender_city_of_birth' => :'String',
100
+ :'sender_country_of_birth' => :'String',
101
+ :'sender_gender' => :'PayoutMethodGenderEnum',
102
+ :'reason' => :'String',
103
+ :'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
104
+ :'identity_card_id' => :'String',
105
+ :'reference' => :'String'
106
+ }
107
+ end
108
+
109
+ # List of class defined in oneOf (OpenAPI v3)
110
+ def self.openapi_one_of
111
+ [
112
+ :'PayoutMethodDetailsBalance',
113
+ :'PayoutMethodDetailsGHSBank',
114
+ :'PayoutMethodDetailsIBAN',
115
+ :'PayoutMethodDetailsMADCash',
116
+ :'PayoutMethodDetailsMobile',
117
+ :'PayoutMethodDetailsNGNBank',
118
+ :'PayoutMethodDetailsXOFBank',
119
+ :'PayoutMethodDetailsXOFMobile'
120
+ ]
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ def initialize(attributes = {})
126
+ if (!attributes.is_a?(Hash))
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
148
128
  end
149
- h[k.to_sym] = v
150
- }
151
-
152
- if attributes.key?(:'first_name')
153
- self.first_name = attributes[:'first_name']
154
- end
155
129
 
156
- if attributes.key?(:'last_name')
157
- self.last_name = attributes[:'last_name']
158
- end
159
-
160
- if attributes.key?(:'bank_code')
161
- self.bank_code = attributes[:'bank_code']
162
- end
163
-
164
- if attributes.key?(:'bank_account')
165
- self.bank_account = attributes[:'bank_account']
166
- end
167
-
168
- if attributes.key?(:'bank_account_type')
169
- self.bank_account_type = attributes[:'bank_account_type']
170
- end
171
-
172
- if attributes.key?(:'phone_number')
173
- self.phone_number = attributes[:'phone_number']
174
- end
130
+ # check to see if the attribute exists and convert string to symbol for hash key
131
+ attributes = attributes.each_with_object({}) { |(k, v), h|
132
+ if (!self.class.attribute_map.key?(k.to_sym))
133
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
134
+ end
135
+ h[k.to_sym] = v
136
+ }
175
137
 
176
- if attributes.key?(:'mobile_provider')
177
- self.mobile_provider = attributes[:'mobile_provider']
178
- end
138
+ if attributes.key?(:'first_name')
139
+ self.first_name = attributes[:'first_name']
140
+ end
179
141
 
180
- if attributes.key?(:'iban')
181
- self.iban = attributes[:'iban']
182
- end
142
+ if attributes.key?(:'last_name')
143
+ self.last_name = attributes[:'last_name']
144
+ end
183
145
 
184
- if attributes.key?(:'bank_name')
185
- self.bank_name = attributes[:'bank_name']
186
- end
146
+ if attributes.key?(:'bank_code')
147
+ self.bank_code = attributes[:'bank_code']
148
+ end
187
149
 
188
- if attributes.key?(:'bank_country')
189
- self.bank_country = attributes[:'bank_country']
190
- end
150
+ if attributes.key?(:'bank_account')
151
+ self.bank_account = attributes[:'bank_account']
152
+ end
191
153
 
192
- if attributes.key?(:'sort_code')
193
- self.sort_code = attributes[:'sort_code']
194
- end
154
+ if attributes.key?(:'bank_account_type')
155
+ self.bank_account_type = attributes[:'bank_account_type']
156
+ end
195
157
 
196
- if attributes.key?(:'bic')
197
- self.bic = attributes[:'bic']
198
- end
158
+ if attributes.key?(:'phone_number')
159
+ self.phone_number = attributes[:'phone_number']
160
+ end
199
161
 
200
- if attributes.key?(:'sender_identity_card_type')
201
- self.sender_identity_card_type = attributes[:'sender_identity_card_type']
202
- end
162
+ if attributes.key?(:'mobile_provider')
163
+ self.mobile_provider = attributes[:'mobile_provider']
164
+ end
203
165
 
204
- if attributes.key?(:'sender_identity_card_id')
205
- self.sender_identity_card_id = attributes[:'sender_identity_card_id']
206
- end
166
+ if attributes.key?(:'iban')
167
+ self.iban = attributes[:'iban']
168
+ end
207
169
 
208
- if attributes.key?(:'sender_city_of_birth')
209
- self.sender_city_of_birth = attributes[:'sender_city_of_birth']
210
- end
170
+ if attributes.key?(:'bank_name')
171
+ self.bank_name = attributes[:'bank_name']
172
+ end
211
173
 
212
- if attributes.key?(:'sender_country_of_birth')
213
- self.sender_country_of_birth = attributes[:'sender_country_of_birth']
214
- end
174
+ if attributes.key?(:'bank_country')
175
+ self.bank_country = attributes[:'bank_country']
176
+ end
215
177
 
216
- if attributes.key?(:'sender_gender')
217
- self.sender_gender = attributes[:'sender_gender']
218
- end
178
+ if attributes.key?(:'bic')
179
+ self.bic = attributes[:'bic']
180
+ end
219
181
 
220
- if attributes.key?(:'reason')
221
- self.reason = attributes[:'reason']
222
- end
182
+ if attributes.key?(:'sender_identity_card_type')
183
+ self.sender_identity_card_type = attributes[:'sender_identity_card_type']
184
+ end
223
185
 
224
- if attributes.key?(:'identity_card_type')
225
- self.identity_card_type = attributes[:'identity_card_type']
226
- end
186
+ if attributes.key?(:'sender_identity_card_id')
187
+ self.sender_identity_card_id = attributes[:'sender_identity_card_id']
188
+ end
227
189
 
228
- if attributes.key?(:'identity_card_id')
229
- self.identity_card_id = attributes[:'identity_card_id']
230
- end
190
+ if attributes.key?(:'sender_city_of_birth')
191
+ self.sender_city_of_birth = attributes[:'sender_city_of_birth']
192
+ end
231
193
 
232
- if attributes.key?(:'reference')
233
- self.reference = attributes[:'reference']
234
- end
194
+ if attributes.key?(:'sender_country_of_birth')
195
+ self.sender_country_of_birth = attributes[:'sender_country_of_birth']
196
+ end
235
197
 
236
- if attributes.key?(:'name')
237
- self.name = attributes[:'name']
238
- end
198
+ if attributes.key?(:'sender_gender')
199
+ self.sender_gender = attributes[:'sender_gender']
200
+ end
239
201
 
240
- if attributes.key?(:'address')
241
- self.address = attributes[:'address']
242
- end
243
- end
202
+ if attributes.key?(:'reason')
203
+ self.reason = attributes[:'reason']
204
+ end
244
205
 
245
- # Show invalid properties with the reasons. Usually used together with valid?
246
- # @return Array for valid properties with the reasons
247
- def list_invalid_properties
248
- invalid_properties = Array.new
249
- if @first_name.nil?
250
- invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
251
- end
206
+ if attributes.key?(:'identity_card_type')
207
+ self.identity_card_type = attributes[:'identity_card_type']
208
+ end
252
209
 
253
- if @last_name.nil?
254
- invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
255
- end
210
+ if attributes.key?(:'identity_card_id')
211
+ self.identity_card_id = attributes[:'identity_card_id']
212
+ end
256
213
 
257
- if @bank_code.nil?
258
- invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
214
+ if attributes.key?(:'reference')
215
+ self.reference = attributes[:'reference']
216
+ end
259
217
  end
260
218
 
261
- if @bank_account.nil?
262
- invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
263
- end
219
+ # Show invalid properties with the reasons. Usually used together with valid?
220
+ # @return Array for valid properties with the reasons
221
+ def list_invalid_properties
222
+ invalid_properties = Array.new
223
+ if @first_name.nil?
224
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
225
+ end
264
226
 
265
- if @phone_number.nil?
266
- invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
267
- end
227
+ if @last_name.nil?
228
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
229
+ end
268
230
 
269
- if @mobile_provider.nil?
270
- invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
271
- end
231
+ if @bank_code.nil?
232
+ invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
233
+ end
272
234
 
273
- if @iban.nil?
274
- invalid_properties.push('invalid value for "iban", iban cannot be nil.')
275
- end
235
+ if @bank_account.nil?
236
+ invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
237
+ end
276
238
 
277
- if @bank_name.nil?
278
- invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
279
- end
239
+ if @phone_number.nil?
240
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
241
+ end
280
242
 
281
- if @bank_country.nil?
282
- invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
283
- end
243
+ if @mobile_provider.nil?
244
+ invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
245
+ end
284
246
 
285
- if @sender_identity_card_type.nil?
286
- invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
287
- end
247
+ if @iban.nil?
248
+ invalid_properties.push('invalid value for "iban", iban cannot be nil.')
249
+ end
288
250
 
289
- if @sender_identity_card_id.nil?
290
- invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
291
- end
251
+ if @bank_name.nil?
252
+ invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
253
+ end
292
254
 
293
- if @sender_city_of_birth.nil?
294
- invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
295
- end
255
+ if @bank_country.nil?
256
+ invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
257
+ end
296
258
 
297
- if @sender_country_of_birth.nil?
298
- invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
299
- end
259
+ if @sender_identity_card_type.nil?
260
+ invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
261
+ end
300
262
 
301
- if @sender_gender.nil?
302
- invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
303
- end
263
+ if @sender_identity_card_id.nil?
264
+ invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
265
+ end
304
266
 
305
- if @name.nil?
306
- invalid_properties.push('invalid value for "name", name cannot be nil.')
307
- end
267
+ if @sender_city_of_birth.nil?
268
+ invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
269
+ end
308
270
 
309
- if @address.nil?
310
- invalid_properties.push('invalid value for "address", address cannot be nil.')
311
- end
271
+ if @sender_country_of_birth.nil?
272
+ invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
273
+ end
312
274
 
313
- invalid_properties
314
- end
275
+ if @sender_gender.nil?
276
+ invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
277
+ end
315
278
 
316
- # Check to see if the all the properties in the model are valid
317
- # @return true if the model is valid
318
- def valid?
319
- return false if @first_name.nil?
320
- return false if @last_name.nil?
321
- return false if @bank_code.nil?
322
- return false if @bank_account.nil?
323
- return false if @phone_number.nil?
324
- return false if @mobile_provider.nil?
325
- return false if @iban.nil?
326
- return false if @bank_name.nil?
327
- return false if @bank_country.nil?
328
- return false if @sender_identity_card_type.nil?
329
- return false if @sender_identity_card_id.nil?
330
- return false if @sender_city_of_birth.nil?
331
- return false if @sender_country_of_birth.nil?
332
- return false if @sender_gender.nil?
333
- return false if @name.nil?
334
- return false if @address.nil?
335
- _one_of_found = false
336
- openapi_one_of.each do |_class|
337
- _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
338
- if _one_of.valid?
339
- if _one_of_found?
340
- return false
341
- else
342
- _one_of_found = true
279
+ invalid_properties
280
+ end
281
+
282
+ # Check to see if the all the properties in the model are valid
283
+ # @return true if the model is valid
284
+ def valid?
285
+ return false if @first_name.nil?
286
+ return false if @last_name.nil?
287
+ return false if @bank_code.nil?
288
+ return false if @bank_account.nil?
289
+ return false if @phone_number.nil?
290
+ return false if @mobile_provider.nil?
291
+ return false if @iban.nil?
292
+ return false if @bank_name.nil?
293
+ return false if @bank_country.nil?
294
+ return false if @sender_identity_card_type.nil?
295
+ return false if @sender_identity_card_id.nil?
296
+ return false if @sender_city_of_birth.nil?
297
+ return false if @sender_country_of_birth.nil?
298
+ return false if @sender_gender.nil?
299
+ _one_of_found = false
300
+ openapi_one_of.each do |_class|
301
+ _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
302
+ if _one_of.valid?
303
+ if _one_of_found?
304
+ return false
305
+ else
306
+ _one_of_found = true
307
+ end
343
308
  end
344
309
  end
345
- end
346
-
347
- if !_one_of_found?
348
- return false
349
- end
350
-
351
- true
352
- end
353
310
 
354
- # Checks equality by comparing each attribute.
355
- # @param [Object] Object to be compared
356
- def ==(o)
357
- return true if self.equal?(o)
358
- self.class == o.class &&
359
- first_name == o.first_name &&
360
- last_name == o.last_name &&
361
- bank_code == o.bank_code &&
362
- bank_account == o.bank_account &&
363
- bank_account_type == o.bank_account_type &&
364
- phone_number == o.phone_number &&
365
- mobile_provider == o.mobile_provider &&
366
- iban == o.iban &&
367
- bank_name == o.bank_name &&
368
- bank_country == o.bank_country &&
369
- sort_code == o.sort_code &&
370
- bic == o.bic &&
371
- sender_identity_card_type == o.sender_identity_card_type &&
372
- sender_identity_card_id == o.sender_identity_card_id &&
373
- sender_city_of_birth == o.sender_city_of_birth &&
374
- sender_country_of_birth == o.sender_country_of_birth &&
375
- sender_gender == o.sender_gender &&
376
- reason == o.reason &&
377
- identity_card_type == o.identity_card_type &&
378
- identity_card_id == o.identity_card_id &&
379
- reference == o.reference &&
380
- name == o.name &&
381
- address == o.address
382
- end
311
+ if !_one_of_found?
312
+ return false
313
+ end
383
314
 
384
- # @see the `==` method
385
- # @param [Object] Object to be compared
386
- def eql?(o)
387
- self == o
388
- end
315
+ true
316
+ end
389
317
 
390
- # Calculates hash code according to all attributes.
391
- # @return [Integer] Hash code
392
- def hash
393
- [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, sort_code, bic, sender_identity_card_type, sender_identity_card_id, sender_city_of_birth, sender_country_of_birth, sender_gender, reason, identity_card_type, identity_card_id, reference, name, address].hash
394
- end
318
+ # Checks equality by comparing each attribute.
319
+ # @param [Object] Object to be compared
320
+ def ==(o)
321
+ return true if self.equal?(o)
322
+ self.class == o.class &&
323
+ first_name == o.first_name &&
324
+ last_name == o.last_name &&
325
+ bank_code == o.bank_code &&
326
+ bank_account == o.bank_account &&
327
+ bank_account_type == o.bank_account_type &&
328
+ phone_number == o.phone_number &&
329
+ mobile_provider == o.mobile_provider &&
330
+ iban == o.iban &&
331
+ bank_name == o.bank_name &&
332
+ bank_country == o.bank_country &&
333
+ bic == o.bic &&
334
+ sender_identity_card_type == o.sender_identity_card_type &&
335
+ sender_identity_card_id == o.sender_identity_card_id &&
336
+ sender_city_of_birth == o.sender_city_of_birth &&
337
+ sender_country_of_birth == o.sender_country_of_birth &&
338
+ sender_gender == o.sender_gender &&
339
+ reason == o.reason &&
340
+ identity_card_type == o.identity_card_type &&
341
+ identity_card_id == o.identity_card_id &&
342
+ reference == o.reference
343
+ end
344
+
345
+ # @see the `==` method
346
+ # @param [Object] Object to be compared
347
+ def eql?(o)
348
+ self == o
349
+ end
350
+
351
+ # Calculates hash code according to all attributes.
352
+ # @return [Integer] Hash code
353
+ def hash
354
+ [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, bic, sender_identity_card_type, sender_identity_card_id, sender_city_of_birth, sender_country_of_birth, sender_gender, reason, identity_card_type, identity_card_id, reference].hash
355
+ end
395
356
 
396
357
  require 'active_support/core_ext/hash'
397
358
  require 'active_support/hash_with_indifferent_access.rb'
@@ -507,6 +468,5 @@ def _to_hash(value)
507
468
  end
508
469
  end
509
470
 
510
- end
511
-
471
+ end
512
472
  end