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,149 +13,149 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PaymentMethodOpposite
17
- # Details currency and type of payment.
18
- attr_accessor :type
19
-
20
- # Identifies the payment provider.
21
- attr_accessor :provider
22
-
23
- # Are over the counter transactions permitted?
24
- attr_accessor :otc_permitted
25
-
26
- # Fields required to make the payment depending on type.
27
- attr_accessor :details
28
-
29
- # Boolean revealing whether this is the default payout method. Only present on payout methods
30
- attr_accessor :default
31
-
32
- # The fields needed for payments with this payment method with details on validation requirements
33
- attr_accessor :fields
34
-
35
- # List of all providers that can be used in conjunction with the main provider
36
- attr_accessor :opposites
37
-
38
- # Attribute mapping from ruby-style variable name to JSON key.
39
- def self.attribute_map
40
- {
41
- :'type' => :'type',
42
- :'provider' => :'provider',
43
- :'otc_permitted' => :'otc_permitted',
44
- :'details' => :'details',
45
- :'default' => :'default',
46
- :'fields' => :'fields',
47
- :'opposites' => :'opposites'
48
- }
49
- end
16
+ class PaymentMethodOpposite
17
+ # Details currency and type of payment.
18
+ attr_accessor :type
19
+
20
+ # Identifies the payment provider.
21
+ attr_accessor :provider
22
+
23
+ # Are over the counter transactions permitted?
24
+ attr_accessor :otc_permitted
25
+
26
+ # Fields required to make the payment depending on type.
27
+ attr_accessor :details
28
+
29
+ # Boolean revealing whether this is the default payout method. Only present on payout methods
30
+ attr_accessor :default
31
+
32
+ # The fields needed for payments with this payment method with details on validation requirements
33
+ attr_accessor :fields
34
+
35
+ # List of all providers that can be used in conjunction with the main provider
36
+ attr_accessor :opposites
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'type' => :'type',
42
+ :'provider' => :'provider',
43
+ :'otc_permitted' => :'otc_permitted',
44
+ :'details' => :'details',
45
+ :'default' => :'default',
46
+ :'fields' => :'fields',
47
+ :'opposites' => :'opposites'
48
+ }
49
+ end
50
50
 
51
- # Attribute type mapping.
52
- def self.openapi_types
53
- {
54
- :'type' => :'String',
55
- :'provider' => :'String',
56
- :'otc_permitted' => :'Boolean',
57
- :'details' => :'Array<String>',
58
- :'default' => :'Boolean',
59
- :'fields' => :'Hash<String, FieldDescription>',
60
- :'opposites' => :'Array<PaymentMethod>'
61
- }
62
- end
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'type' => :'String',
55
+ :'provider' => :'String',
56
+ :'otc_permitted' => :'Boolean',
57
+ :'details' => :'Array<String>',
58
+ :'default' => :'Boolean',
59
+ :'fields' => :'Hash<String, FieldDescription>',
60
+ :'opposites' => :'Array<PaymentMethod>'
61
+ }
62
+ end
63
63
 
64
- # List of class defined in allOf (OpenAPI v3)
65
- def self.openapi_all_of
66
- [
67
- :'PaymentMethod'
68
- ]
64
+ # List of class defined in allOf (OpenAPI v3)
65
+ def self.openapi_all_of
66
+ [
67
+ :'PaymentMethod'
68
+ ]
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PaymentMethodOpposite` initialize method"
69
76
  end
70
77
 
71
- # Initializes the object
72
- # @param [Hash] attributes Model attributes in the form of hash
73
- def initialize(attributes = {})
74
- if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PaymentMethodOpposite` initialize method"
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PaymentMethodOpposite`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
82
  end
83
+ h[k.to_sym] = v
84
+ }
77
85
 
78
- # check to see if the attribute exists and convert string to symbol for hash key
79
- attributes = attributes.each_with_object({}) { |(k, v), h|
80
- if (!self.class.attribute_map.key?(k.to_sym))
81
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PaymentMethodOpposite`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
- end
83
- h[k.to_sym] = v
84
- }
85
-
86
- if attributes.key?(:'type')
87
- self.type = attributes[:'type']
88
- end
86
+ if attributes.key?(:'type')
87
+ self.type = attributes[:'type']
88
+ end
89
89
 
90
- if attributes.key?(:'provider')
91
- self.provider = attributes[:'provider']
92
- end
90
+ if attributes.key?(:'provider')
91
+ self.provider = attributes[:'provider']
92
+ end
93
93
 
94
- if attributes.key?(:'otc_permitted')
95
- self.otc_permitted = attributes[:'otc_permitted']
96
- end
94
+ if attributes.key?(:'otc_permitted')
95
+ self.otc_permitted = attributes[:'otc_permitted']
96
+ end
97
97
 
98
- if attributes.key?(:'details')
99
- if (value = attributes[:'details']).is_a?(Array)
100
- self.details = value
101
- end
98
+ if attributes.key?(:'details')
99
+ if (value = attributes[:'details']).is_a?(Array)
100
+ self.details = value
102
101
  end
102
+ end
103
103
 
104
- if attributes.key?(:'default')
105
- self.default = attributes[:'default']
106
- end
104
+ if attributes.key?(:'default')
105
+ self.default = attributes[:'default']
106
+ end
107
107
 
108
- if attributes.key?(:'fields')
109
- if (value = attributes[:'fields']).is_a?(Hash)
110
- self.fields = value
111
- end
108
+ if attributes.key?(:'fields')
109
+ if (value = attributes[:'fields']).is_a?(Hash)
110
+ self.fields = value
112
111
  end
112
+ end
113
113
 
114
- if attributes.key?(:'opposites')
115
- if (value = attributes[:'opposites']).is_a?(Array)
116
- self.opposites = value
117
- end
114
+ if attributes.key?(:'opposites')
115
+ if (value = attributes[:'opposites']).is_a?(Array)
116
+ self.opposites = value
118
117
  end
119
118
  end
119
+ end
120
120
 
121
- # Show invalid properties with the reasons. Usually used together with valid?
122
- # @return Array for valid properties with the reasons
123
- def list_invalid_properties
124
- invalid_properties = Array.new
125
- invalid_properties
126
- end
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
127
 
128
- # Check to see if the all the properties in the model are valid
129
- # @return true if the model is valid
130
- def valid?
131
- true
132
- end
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ true
132
+ end
133
133
 
134
- # Checks equality by comparing each attribute.
135
- # @param [Object] Object to be compared
136
- def ==(o)
137
- return true if self.equal?(o)
138
- self.class == o.class &&
139
- type == o.type &&
140
- provider == o.provider &&
141
- otc_permitted == o.otc_permitted &&
142
- details == o.details &&
143
- default == o.default &&
144
- fields == o.fields &&
145
- opposites == o.opposites
146
- end
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ type == o.type &&
140
+ provider == o.provider &&
141
+ otc_permitted == o.otc_permitted &&
142
+ details == o.details &&
143
+ default == o.default &&
144
+ fields == o.fields &&
145
+ opposites == o.opposites
146
+ end
147
147
 
148
- # @see the `==` method
149
- # @param [Object] Object to be compared
150
- def eql?(o)
151
- self == o
152
- end
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
153
 
154
- # Calculates hash code according to all attributes.
155
- # @return [Integer] Hash code
156
- def hash
157
- [type, provider, otc_permitted, details, default, fields, opposites].hash
158
- end
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [type, provider, otc_permitted, details, default, fields, opposites].hash
158
+ end
159
159
 
160
160
  require 'active_support/core_ext/hash'
161
161
  require 'active_support/hash_with_indifferent_access.rb'
@@ -271,5 +271,6 @@ def _to_hash(value)
271
271
  end
272
272
  end
273
273
 
274
- end
274
+ end
275
+
275
276
  end
@@ -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. - `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://github.com/transferzero/api-documentation/blob/master/additional-features.md#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
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
45
57
 
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
- }
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"
56
63
  end
57
64
 
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"
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
63
69
  end
70
+ h[k.to_sym] = v
71
+ }
64
72
 
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
- }
72
-
73
- if attributes.key?(:'type')
74
- self.type = attributes[:'type']
75
- end
73
+ if attributes.key?(:'type')
74
+ self.type = attributes[:'type']
75
+ end
76
76
 
77
- if attributes.key?(:'details')
78
- self.details = attributes[:'details']
79
- end
77
+ if attributes.key?(:'details')
78
+ self.details = attributes[:'details']
79
+ end
80
80
 
81
- if attributes.key?(:'metadata')
82
- self.metadata = attributes[:'metadata']
83
- end
81
+ if attributes.key?(:'metadata')
82
+ self.metadata = attributes[:'metadata']
83
+ end
84
84
 
85
- if attributes.key?(:'id')
86
- self.id = attributes[:'id']
87
- end
85
+ if attributes.key?(:'id')
86
+ self.id = attributes[:'id']
87
+ end
88
88
 
89
- if attributes.key?(:'errors')
90
- if (value = attributes[:'errors']).is_a?(Hash)
91
- self.errors = value
92
- end
89
+ if attributes.key?(:'errors')
90
+ if (value = attributes[:'errors']).is_a?(Hash)
91
+ self.errors = value
93
92
  end
93
+ end
94
94
 
95
- if attributes.key?(:'fields')
96
- if (value = attributes[:'fields']).is_a?(Hash)
97
- self.fields = value
98
- end
95
+ if attributes.key?(:'fields')
96
+ if (value = attributes[:'fields']).is_a?(Hash)
97
+ self.fields = value
99
98
  end
100
99
  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,5 +251,6 @@ def _to_hash(value)
251
251
  end
252
252
  end
253
253
 
254
- end
254
+ end
255
+
255
256
  end