transferzero-sdk 1.16.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +92 -0
  3. data/README.md +15 -4
  4. data/docs/Document.md +2 -0
  5. data/docs/PayinMethod.md +12 -4
  6. data/docs/PayinMethodDetails.md +5 -5
  7. data/docs/PayinMethodDetailsMobile.md +3 -3
  8. data/docs/PayinMethodDetailsNGNBank.md +2 -2
  9. data/docs/PayinMethodResponse.md +17 -0
  10. data/docs/PayinMethodState.md +16 -0
  11. data/docs/PayinMethodUxFlow.md +16 -0
  12. data/docs/PayinMethodsApi.md +256 -0
  13. data/docs/PayoutMethod.md +1 -1
  14. data/docs/PayoutMethodDetails.md +4 -2
  15. data/docs/PayoutMethodDetailsGNFMobile.md +23 -0
  16. data/docs/PayoutMethodDetailsKESBank.md +3 -1
  17. data/docs/PayoutMethodDetailsKESMobile.md +3 -1
  18. data/docs/PayoutMethodDetailsXAFMobile.md +25 -0
  19. data/docs/PayoutMethodDetailsXOFBank.md +3 -1
  20. data/docs/PayoutMethodDetailsXOFCash.md +1 -1
  21. data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
  22. data/docs/PayoutMethodDetailsZARBank.md +2 -0
  23. data/docs/PayoutMethodTransferReasonEnum.md +16 -0
  24. data/docs/Recipient.md +2 -0
  25. data/docs/RecipientStateReasonDetails.md +3 -3
  26. data/docs/Sender.md +4 -0
  27. data/docs/StateReasonDetails.md +23 -0
  28. data/lib/transferzero-sdk/api/payin_methods_api.rb +244 -0
  29. data/lib/transferzero-sdk/api_client.rb +1 -1
  30. data/lib/transferzero-sdk/models/document.rb +11 -1
  31. data/lib/transferzero-sdk/models/payin_method.rb +47 -9
  32. data/lib/transferzero-sdk/models/payin_method_details.rb +9 -15
  33. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +8 -14
  34. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +2 -2
  35. data/lib/transferzero-sdk/models/payin_method_response.rb +202 -0
  36. data/lib/transferzero-sdk/models/payin_method_state.rb +39 -0
  37. data/lib/transferzero-sdk/models/payin_method_ux_flow.rb +31 -0
  38. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  39. data/lib/transferzero-sdk/models/payout_method_details.rb +17 -6
  40. data/lib/transferzero-sdk/models/payout_method_details_gnf_mobile.rb +250 -0
  41. data/lib/transferzero-sdk/models/payout_method_details_kes_bank.rb +11 -7
  42. data/lib/transferzero-sdk/models/payout_method_details_kes_mobile.rb +11 -7
  43. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +1 -1
  44. data/lib/transferzero-sdk/models/payout_method_details_xaf_mobile.rb +259 -0
  45. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +14 -5
  46. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +6 -1
  47. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +14 -5
  48. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +11 -2
  49. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +1 -0
  50. data/lib/transferzero-sdk/models/payout_method_transfer_reason_enum.rb +137 -0
  51. data/lib/transferzero-sdk/models/recipient.rb +45 -1
  52. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +21 -2
  53. data/lib/transferzero-sdk/models/sender.rb +21 -1
  54. data/lib/transferzero-sdk/models/state_reason_details.rb +235 -0
  55. data/lib/transferzero-sdk/version.rb +1 -1
  56. data/lib/transferzero-sdk.rb +8 -0
  57. data/spec/api/payin_methods_api_spec.rb +84 -0
  58. data/spec/models/payin_method_response_spec.rb +41 -0
  59. data/spec/models/payin_method_state_spec.rb +35 -0
  60. data/spec/models/payin_method_ux_flow_spec.rb +35 -0
  61. data/spec/models/payout_method_details_gnf_mobile_spec.rb +59 -0
  62. data/spec/models/payout_method_details_xaf_mobile_spec.rb +65 -0
  63. data/spec/models/payout_method_transfer_reason_enum_spec.rb +35 -0
  64. data/spec/models/state_reason_details_spec.rb +59 -0
  65. metadata +35 -2
@@ -76,9 +76,34 @@ class Recipient
76
76
 
77
77
  attr_accessor :id
78
78
 
79
+ # Type of recipient to create - either person or business (defaults to person)
80
+ attr_accessor :type
81
+
79
82
  # The fields that have some problems and don't pass validation
80
83
  attr_accessor :errors
81
84
 
85
+ class EnumAttributeValidator
86
+ attr_reader :datatype
87
+ attr_reader :allowable_values
88
+
89
+ def initialize(datatype, allowable_values)
90
+ @allowable_values = allowable_values.map do |value|
91
+ case datatype.to_s
92
+ when /Integer/i
93
+ value.to_i
94
+ when /Float/i
95
+ value.to_f
96
+ else
97
+ value
98
+ end
99
+ end
100
+ end
101
+
102
+ def valid?(value)
103
+ !value || allowable_values.include?(value)
104
+ end
105
+ end
106
+
82
107
  # Attribute mapping from ruby-style variable name to JSON key.
83
108
  def self.attribute_map
84
109
  {
@@ -104,6 +129,7 @@ class Recipient
104
129
  :'output_amount' => :'output_amount',
105
130
  :'output_currency' => :'output_currency',
106
131
  :'id' => :'id',
132
+ :'type' => :'type',
107
133
  :'errors' => :'errors'
108
134
  }
109
135
  end
@@ -133,6 +159,7 @@ class Recipient
133
159
  :'output_amount' => :'Float',
134
160
  :'output_currency' => :'String',
135
161
  :'id' => :'String',
162
+ :'type' => :'String',
136
163
  :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
137
164
  }
138
165
  end
@@ -240,6 +267,10 @@ class Recipient
240
267
  self.id = attributes[:'id']
241
268
  end
242
269
 
270
+ if attributes.key?(:'type')
271
+ self.type = attributes[:'type']
272
+ end
273
+
243
274
  if attributes.key?(:'errors')
244
275
  if (value = attributes[:'errors']).is_a?(Hash)
245
276
  self.errors = value
@@ -272,9 +303,21 @@ class Recipient
272
303
  return false if @requested_amount.nil?
273
304
  return false if @requested_currency.nil?
274
305
  return false if @payout_method.nil?
306
+ type_validator = EnumAttributeValidator.new('String', ["person", "business"])
307
+ return false unless type_validator.valid?(@type)
275
308
  true
276
309
  end
277
310
 
311
+ # Custom attribute writer method checking allowed values (enum).
312
+ # @param [Object] type Object to be assigned
313
+ def type=(type)
314
+ validator = EnumAttributeValidator.new('String', ["person", "business"])
315
+ unless validator.valid?(type) || type.empty?
316
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
317
+ end
318
+ @type = type
319
+ end
320
+
278
321
  # Checks equality by comparing each attribute.
279
322
  # @param [Object] Object to be compared
280
323
  def ==(o)
@@ -302,6 +345,7 @@ class Recipient
302
345
  output_amount == o.output_amount &&
303
346
  output_currency == o.output_currency &&
304
347
  id == o.id &&
348
+ type == o.type &&
305
349
  errors == o.errors
306
350
  end
307
351
 
@@ -314,7 +358,7 @@ class Recipient
314
358
  # Calculates hash code according to all attributes.
315
359
  # @return [Integer] Hash code
316
360
  def hash
317
- [requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
361
+ [requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, type, errors].hash
318
362
  end
319
363
 
320
364
  require 'active_support/core_ext/hash'
@@ -14,10 +14,10 @@ require 'date'
14
14
 
15
15
  module TransferZero
16
16
  class RecipientStateReasonDetails
17
- # Status code of failed transaction
17
+ # Status code of transaction
18
18
  attr_accessor :code
19
19
 
20
- # Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error
20
+ # Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required
21
21
  attr_accessor :category
22
22
 
23
23
  # Tiered messages
@@ -46,6 +46,13 @@ class RecipientStateReasonDetails
46
46
  }
47
47
  end
48
48
 
49
+ # List of class defined in anyOf (OpenAPI v3)
50
+ def self.openapi_any_of
51
+ [
52
+ :'StateReasonDetails'
53
+ ]
54
+ end
55
+
49
56
  # Initializes the object
50
57
  # @param [Hash] attributes Model attributes in the form of hash
51
58
  def initialize(attributes = {})
@@ -90,6 +97,18 @@ class RecipientStateReasonDetails
90
97
  # Check to see if the all the properties in the model are valid
91
98
  # @return true if the model is valid
92
99
  def valid?
100
+ _any_of_found = false
101
+ openapi_any_of.each do |_class|
102
+ _any_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
103
+ if _any_of.valid?
104
+ _any_of_found = true
105
+ end
106
+ end
107
+
108
+ if !_any_of_found?
109
+ return false
110
+ end
111
+
93
112
  true
94
113
  end
95
114
 
@@ -124,6 +124,9 @@ class Sender
124
124
  # The Business trading address (used only with a Business sender)
125
125
  attr_accessor :trading_address
126
126
 
127
+ # The Business trading name (used only with a Business sender)
128
+ attr_accessor :trading_name
129
+
127
130
  # The estimated number of monthly transactions (used only with a Business sender)
128
131
  attr_accessor :number_monthly_transactions
129
132
 
@@ -157,6 +160,9 @@ class Sender
157
160
  # The gender of the sender: - `M`: Male - `F`: Female - `O`: Other
158
161
  attr_accessor :gender
159
162
 
163
+ # Sales Lead ID for tracking (optional)
164
+ attr_accessor :sales_lead_id
165
+
160
166
  # Date and time of sender was created
161
167
  attr_accessor :created_at
162
168
 
@@ -222,6 +228,7 @@ class Sender
222
228
  :'contact_person_email' => :'contact_person_email',
223
229
  :'trading_country' => :'trading_country',
224
230
  :'trading_address' => :'trading_address',
231
+ :'trading_name' => :'trading_name',
225
232
  :'number_monthly_transactions' => :'number_monthly_transactions',
226
233
  :'amount_monthly_transactions' => :'amount_monthly_transactions',
227
234
  :'documents' => :'documents',
@@ -233,6 +240,7 @@ class Sender
233
240
  :'city_of_birth' => :'city_of_birth',
234
241
  :'country_of_birth' => :'country_of_birth',
235
242
  :'gender' => :'gender',
243
+ :'sales_lead_id' => :'sales_lead_id',
236
244
  :'created_at' => :'created_at'
237
245
  }
238
246
  end
@@ -277,6 +285,7 @@ class Sender
277
285
  :'contact_person_email' => :'String',
278
286
  :'trading_country' => :'String',
279
287
  :'trading_address' => :'String',
288
+ :'trading_name' => :'String',
280
289
  :'number_monthly_transactions' => :'String',
281
290
  :'amount_monthly_transactions' => :'String',
282
291
  :'documents' => :'Array<Document>',
@@ -288,6 +297,7 @@ class Sender
288
297
  :'city_of_birth' => :'String',
289
298
  :'country_of_birth' => :'String',
290
299
  :'gender' => :'String',
300
+ :'sales_lead_id' => :'String',
291
301
  :'created_at' => :'String'
292
302
  }
293
303
  end
@@ -455,6 +465,10 @@ class Sender
455
465
  self.trading_address = attributes[:'trading_address']
456
466
  end
457
467
 
468
+ if attributes.key?(:'trading_name')
469
+ self.trading_name = attributes[:'trading_name']
470
+ end
471
+
458
472
  if attributes.key?(:'number_monthly_transactions')
459
473
  self.number_monthly_transactions = attributes[:'number_monthly_transactions']
460
474
  end
@@ -505,6 +519,10 @@ class Sender
505
519
  self.gender = attributes[:'gender']
506
520
  end
507
521
 
522
+ if attributes.key?(:'sales_lead_id')
523
+ self.sales_lead_id = attributes[:'sales_lead_id']
524
+ end
525
+
508
526
  if attributes.key?(:'created_at')
509
527
  self.created_at = attributes[:'created_at']
510
528
  end
@@ -665,6 +683,7 @@ class Sender
665
683
  contact_person_email == o.contact_person_email &&
666
684
  trading_country == o.trading_country &&
667
685
  trading_address == o.trading_address &&
686
+ trading_name == o.trading_name &&
668
687
  number_monthly_transactions == o.number_monthly_transactions &&
669
688
  amount_monthly_transactions == o.amount_monthly_transactions &&
670
689
  documents == o.documents &&
@@ -676,6 +695,7 @@ class Sender
676
695
  city_of_birth == o.city_of_birth &&
677
696
  country_of_birth == o.country_of_birth &&
678
697
  gender == o.gender &&
698
+ sales_lead_id == o.sales_lead_id &&
679
699
  created_at == o.created_at
680
700
  end
681
701
 
@@ -688,7 +708,7 @@ class Sender
688
708
  # Calculates hash code according to all attributes.
689
709
  # @return [Integer] Hash code
690
710
  def hash
691
- [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, lang, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash
711
+ [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, lang, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, trading_name, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, sales_lead_id, created_at].hash
692
712
  end
693
713
 
694
714
  require 'active_support/core_ext/hash'
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TransferZero
16
+ class StateReasonDetails
17
+ # Status code of transaction
18
+ attr_accessor :code
19
+
20
+ # Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required
21
+ attr_accessor :category
22
+
23
+ # Tiered messages
24
+ attr_accessor :messages
25
+
26
+ # Public, human readable, detailed error message
27
+ attr_accessor :description
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'code' => :'code',
33
+ :'category' => :'category',
34
+ :'messages' => :'messages',
35
+ :'description' => :'description'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'code' => :'String',
43
+ :'category' => :'String',
44
+ :'messages' => :'Array<String>',
45
+ :'description' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::StateReasonDetails` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::StateReasonDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'code')
65
+ self.code = attributes[:'code']
66
+ end
67
+
68
+ if attributes.key?(:'category')
69
+ self.category = attributes[:'category']
70
+ end
71
+
72
+ if attributes.key?(:'messages')
73
+ if (value = attributes[:'messages']).is_a?(Array)
74
+ self.messages = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'description')
79
+ self.description = attributes[:'description']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ code == o.code &&
102
+ category == o.category &&
103
+ messages == o.messages &&
104
+ description == o.description
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [code, category, messages, description].hash
117
+ end
118
+
119
+ require 'active_support/core_ext/hash'
120
+ require 'active_support/hash_with_indifferent_access.rb'
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.openapi_types.each_pair do |key, type|
127
+ if type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ temp_model = TransferZero.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ ::ActiveSupport::HashWithIndifferentAccess.new(hash)
205
+ end
206
+
207
+ def [](key)
208
+ to_hash[key]
209
+ end
210
+
211
+ def dig(*args)
212
+ to_hash.dig(*args)
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.16.0'
14
+ VERSION = '1.19.0'
15
15
  end
@@ -56,6 +56,9 @@ require 'transferzero-sdk/models/payin_method_details_btc'
56
56
  require 'transferzero-sdk/models/payin_method_details_mobile'
57
57
  require 'transferzero-sdk/models/payin_method_details_ngn_bank'
58
58
  require 'transferzero-sdk/models/payin_method_request'
59
+ require 'transferzero-sdk/models/payin_method_response'
60
+ require 'transferzero-sdk/models/payin_method_state'
61
+ require 'transferzero-sdk/models/payin_method_ux_flow'
59
62
  require 'transferzero-sdk/models/payment_method'
60
63
  require 'transferzero-sdk/models/payment_method_list_response'
61
64
  require 'transferzero-sdk/models/payment_method_opposite'
@@ -69,6 +72,7 @@ require 'transferzero-sdk/models/payout_method_details_balance'
69
72
  require 'transferzero-sdk/models/payout_method_details_gbp_bank'
70
73
  require 'transferzero-sdk/models/payout_method_details_ghs_bank'
71
74
  require 'transferzero-sdk/models/payout_method_details_ghs_cash'
75
+ require 'transferzero-sdk/models/payout_method_details_gnf_mobile'
72
76
  require 'transferzero-sdk/models/payout_method_details_iban'
73
77
  require 'transferzero-sdk/models/payout_method_details_kes_bank'
74
78
  require 'transferzero-sdk/models/payout_method_details_kes_mobile'
@@ -77,6 +81,7 @@ require 'transferzero-sdk/models/payout_method_details_mobile'
77
81
  require 'transferzero-sdk/models/payout_method_details_ngn_bank'
78
82
  require 'transferzero-sdk/models/payout_method_details_usd_bank'
79
83
  require 'transferzero-sdk/models/payout_method_details_usd_cash'
84
+ require 'transferzero-sdk/models/payout_method_details_xaf_mobile'
80
85
  require 'transferzero-sdk/models/payout_method_details_xof_bank'
81
86
  require 'transferzero-sdk/models/payout_method_details_xof_cash'
82
87
  require 'transferzero-sdk/models/payout_method_details_xof_mobile'
@@ -89,6 +94,7 @@ require 'transferzero-sdk/models/payout_method_mobile_provider_enum'
89
94
  require 'transferzero-sdk/models/payout_method_nature_of_business_enum'
90
95
  require 'transferzero-sdk/models/payout_method_request'
91
96
  require 'transferzero-sdk/models/payout_method_response'
97
+ require 'transferzero-sdk/models/payout_method_transfer_reason_enum'
92
98
  require 'transferzero-sdk/models/payout_method_webhook'
93
99
  require 'transferzero-sdk/models/politically_exposed_person'
94
100
  require 'transferzero-sdk/models/proof_of_payment'
@@ -108,6 +114,7 @@ require 'transferzero-sdk/models/sender_response_existing'
108
114
  require 'transferzero-sdk/models/sender_response_meta'
109
115
  require 'transferzero-sdk/models/sender_state'
110
116
  require 'transferzero-sdk/models/sender_webhook'
117
+ require 'transferzero-sdk/models/state_reason_details'
111
118
  require 'transferzero-sdk/models/transaction'
112
119
  require 'transferzero-sdk/models/transaction_list_response'
113
120
  require 'transferzero-sdk/models/transaction_request'
@@ -139,6 +146,7 @@ require 'transferzero-sdk/api/accounts_api'
139
146
  require 'transferzero-sdk/api/currency_info_api'
140
147
  require 'transferzero-sdk/api/documents_api'
141
148
  require 'transferzero-sdk/api/logs_api'
149
+ require 'transferzero-sdk/api/payin_methods_api'
142
150
  require 'transferzero-sdk/api/payment_methods_api'
143
151
  require 'transferzero-sdk/api/payout_methods_api'
144
152
  require 'transferzero-sdk/api/recipients_api'
@@ -0,0 +1,84 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TransferZero::PayinMethodsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'PayinMethodsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TransferZero::PayinMethodsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of PayinMethodsApi' do
30
+ it 'should create an instance of PayinMethodsApi' do
31
+ expect(@api_instance).to be_instance_of(TransferZero::PayinMethodsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for delete_payin_method
36
+ # Deleting a payin method
37
+ # Initiates a cancellation request for the specified payin method
38
+ # @param payin_method_id ID of the payin method to delete. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [PayinMethodResponse]
41
+ describe 'delete_payin_method test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_payin_method
48
+ # Fetching a payin method
49
+ # Show a payin method by id
50
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [PayinMethodResponse]
53
+ describe 'get_payin_method test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for patch_payin_method
60
+ # Updating a payin method
61
+ # Updates the payin method specified in the URL path.
62
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
63
+ # @param payin_method
64
+ # @param [Hash] opts the optional parameters
65
+ # @return [PayinMethodResponse]
66
+ describe 'patch_payin_method test' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ # unit tests for retry_payin_method
73
+ # Retries PayinMethod
74
+ # Retries the collection process for the payin method. Please note only payin methods in &#x60;error&#x60; state can be retried.
75
+ # @param payin_method_id ID of the payin method whose collection process should be retried Example: &#x60;/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry&#x60;
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [nil]
78
+ describe 'retry_payin_method test' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ end
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::PayinMethodResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'PayinMethodResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::PayinMethodResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PayinMethodResponse' do
31
+ it 'should create an instance of PayinMethodResponse' do
32
+ expect(@instance).to be_instance_of(TransferZero::PayinMethodResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "object"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,35 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::PayinMethodState
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'PayinMethodState' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::PayinMethodState.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PayinMethodState' do
31
+ it 'should create an instance of PayinMethodState' do
32
+ expect(@instance).to be_instance_of(TransferZero::PayinMethodState)
33
+ end
34
+ end
35
+ end