masspay_ruby_sdk 1.0.0 → 2.0.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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/CODE_OF_CONDUCT.md +43 -0
  4. data/CONTRIBUTING.md +48 -9
  5. data/LICENSE.md +21 -0
  6. data/README.md +141 -176
  7. data/assets/logo.webp +0 -0
  8. data/lib/masspay_ruby_sdk/api/account_service.rb +35 -0
  9. data/lib/masspay_ruby_sdk/api/attribute_service.rb +41 -0
  10. data/lib/masspay_ruby_sdk/api/card_service.rb +35 -0
  11. data/lib/masspay_ruby_sdk/api/catalog_service.rb +74 -0
  12. data/lib/masspay_ruby_sdk/api/kyc_service.rb +56 -0
  13. data/lib/masspay_ruby_sdk/api/load_service.rb +62 -0
  14. data/lib/masspay_ruby_sdk/api/payout_service.rb +61 -0
  15. data/lib/masspay_ruby_sdk/api/spend_back_service.rb +35 -0
  16. data/lib/masspay_ruby_sdk/api/subaccount_service.rb +47 -0
  17. data/lib/masspay_ruby_sdk/api/tax_service.rb +38 -0
  18. data/lib/masspay_ruby_sdk/api/user_service.rb +71 -0
  19. data/lib/masspay_ruby_sdk/api/wallet_service.rb +50 -0
  20. data/lib/masspay_ruby_sdk/client.rb +93 -0
  21. data/lib/masspay_ruby_sdk/constants.rb +20 -0
  22. data/lib/masspay_ruby_sdk/version.rb +6 -8
  23. data/lib/masspay_ruby_sdk.rb +23 -75
  24. data/masspay_ruby_sdk.gemspec +9 -13
  25. metadata +24 -120
  26. data/Rakefile +0 -10
  27. data/docs/AccountApi.md +0 -150
  28. data/docs/ApiResponse.md +0 -22
  29. data/docs/AttrTxn.md +0 -20
  30. data/docs/AttrValue.md +0 -20
  31. data/docs/AttrVelocityRequestInner.md +0 -20
  32. data/docs/AttributeApi.md +0 -168
  33. data/docs/AttrsRequirement.md +0 -36
  34. data/docs/AutopayResp.md +0 -22
  35. data/docs/AutopayRule.md +0 -20
  36. data/docs/AvailableBalanceTxnResp.md +0 -22
  37. data/docs/CardApi.md +0 -160
  38. data/docs/CatalogApi.md +0 -469
  39. data/docs/CompaniesResp.md +0 -18
  40. data/docs/Company.md +0 -26
  41. data/docs/Country.md +0 -22
  42. data/docs/Exception.md +0 -20
  43. data/docs/FoundUser.md +0 -24
  44. data/docs/GetAccountStatement200Response.md +0 -18
  45. data/docs/GetTransactionConfirmationDetails200Response.md +0 -18
  46. data/docs/GetUserAgreement200Response.md +0 -26
  47. data/docs/GetUserAgreementsNames200ResponseInner.md +0 -24
  48. data/docs/GetUserUserTokenKycAu10tix200Response.md +0 -18
  49. data/docs/GetUserUserTokenKycVeriff200Response.md +0 -18
  50. data/docs/GetWalletCardInfo200Response.md +0 -30
  51. data/docs/IDUpload.md +0 -20
  52. data/docs/KYCApi.md +0 -305
  53. data/docs/LoadApi.md +0 -621
  54. data/docs/LoadTxn.md +0 -32
  55. data/docs/LoadTxnResp.md +0 -20
  56. data/docs/Loads.md +0 -36
  57. data/docs/PayoutApi.md +0 -403
  58. data/docs/PayoutTxn.md +0 -36
  59. data/docs/PayoutTxnCommitResp.md +0 -24
  60. data/docs/PayoutTxnResp.md +0 -60
  61. data/docs/ResendBalanceNotification200Response.md +0 -18
  62. data/docs/Service.md +0 -22
  63. data/docs/ServicePayersInner.md +0 -38
  64. data/docs/ServicePayersInnerExchangeRateInner.md +0 -20
  65. data/docs/SpendBackApi.md +0 -161
  66. data/docs/SpendBackTxn.md +0 -28
  67. data/docs/SpendBackTxnResp.md +0 -22
  68. data/docs/SpendBacks.md +0 -34
  69. data/docs/StoredUser.md +0 -56
  70. data/docs/TaxApi.md +0 -81
  71. data/docs/TaxYearUserResp.md +0 -48
  72. data/docs/TxnHistoryResp.md +0 -52
  73. data/docs/UpdateUser.md +0 -52
  74. data/docs/User.md +0 -50
  75. data/docs/UserApi.md +0 -403
  76. data/docs/WalletApi.md +0 -463
  77. data/docs/WalletTxnResp.md +0 -34
  78. data/docs/logo.webp +0 -0
  79. data/lib/masspay_ruby_sdk/api/account_api.rb +0 -149
  80. data/lib/masspay_ruby_sdk/api/attribute_api.rb +0 -214
  81. data/lib/masspay_ruby_sdk/api/card_api.rb +0 -174
  82. data/lib/masspay_ruby_sdk/api/catalog_api.rb +0 -443
  83. data/lib/masspay_ruby_sdk/api/kyc_api.rb +0 -290
  84. data/lib/masspay_ruby_sdk/api/load_api.rb +0 -598
  85. data/lib/masspay_ruby_sdk/api/payout_api.rb +0 -397
  86. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +0 -160
  87. data/lib/masspay_ruby_sdk/api/tax_api.rb +0 -82
  88. data/lib/masspay_ruby_sdk/api/user_api.rb +0 -418
  89. data/lib/masspay_ruby_sdk/api/wallet_api.rb +0 -461
  90. data/lib/masspay_ruby_sdk/api_client.rb +0 -391
  91. data/lib/masspay_ruby_sdk/api_error.rb +0 -57
  92. data/lib/masspay_ruby_sdk/configuration.rb +0 -315
  93. data/lib/masspay_ruby_sdk/models/api_response.rb +0 -236
  94. data/lib/masspay_ruby_sdk/models/attr_txn.rb +0 -235
  95. data/lib/masspay_ruby_sdk/models/attr_value.rb +0 -239
  96. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +0 -273
  97. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +0 -372
  98. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +0 -256
  99. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +0 -241
  100. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +0 -254
  101. data/lib/masspay_ruby_sdk/models/companies_resp.rb +0 -225
  102. data/lib/masspay_ruby_sdk/models/company.rb +0 -285
  103. data/lib/masspay_ruby_sdk/models/country.rb +0 -296
  104. data/lib/masspay_ruby_sdk/models/exception.rb +0 -241
  105. data/lib/masspay_ruby_sdk/models/found_user.rb +0 -270
  106. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +0 -225
  107. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +0 -218
  108. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +0 -280
  109. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +0 -270
  110. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +0 -224
  111. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +0 -224
  112. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +0 -460
  113. data/lib/masspay_ruby_sdk/models/id_upload.rb +0 -273
  114. data/lib/masspay_ruby_sdk/models/load_txn.rb +0 -321
  115. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +0 -273
  116. data/lib/masspay_ruby_sdk/models/loads.rb +0 -388
  117. data/lib/masspay_ruby_sdk/models/payout_txn.rb +0 -328
  118. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +0 -293
  119. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +0 -613
  120. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +0 -225
  121. data/lib/masspay_ruby_sdk/models/service.rb +0 -318
  122. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +0 -373
  123. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +0 -239
  124. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +0 -325
  125. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +0 -307
  126. data/lib/masspay_ruby_sdk/models/spend_backs.rb +0 -340
  127. data/lib/masspay_ruby_sdk/models/stored_user.rb +0 -500
  128. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +0 -388
  129. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +0 -571
  130. data/lib/masspay_ruby_sdk/models/update_user.rb +0 -490
  131. data/lib/masspay_ruby_sdk/models/user.rb +0 -423
  132. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +0 -375
  133. data/spec/api_client_spec.rb +0 -227
  134. data/spec/configuration_spec.rb +0 -41
  135. data/spec/spec_helper.rb +0 -110
@@ -1,423 +0,0 @@
1
- =begin
2
- #MassPay API
3
-
4
- #MassPay API
5
-
6
- The version of the OpenAPI document: 0.1.4
7
- Contact: support@masspay.io
8
- Generated by: MassPay Inc.
9
- OpenAPI Generator version: 6.5.0
10
- =end
11
-
12
- require 'date'
13
- require 'time'
14
-
15
- module MassPayRubySdk
16
- class User
17
- # A client-defined identifier for the user. This is the unique ID assigned to the user on your system. Max 75 characters. Allows letters, numbers, and + , - . / _ ~ |
18
- attr_accessor :internal_user_id
19
-
20
- # The user's street address. Required in order to process a payout.
21
- attr_accessor :address1
22
-
23
- # The user's street address, line 2.
24
- attr_accessor :address2
25
-
26
- # The user's city. Required in order to process a payout.
27
- attr_accessor :city
28
-
29
- # The user's state/province.
30
- attr_accessor :state_province
31
-
32
- # The user's postal code.
33
- attr_accessor :postal_code
34
-
35
- # The user's country code. [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code. Required in order to process a payout.
36
- attr_accessor :country
37
-
38
- # The user's first name. (If Business account, the first name of the representative)
39
- attr_accessor :first_name
40
-
41
- # The user's middle name. (If Business account, the middle name of the representative)
42
- attr_accessor :middle_name
43
-
44
- # The user's last name. (If Business account, the last name of the representative)
45
- attr_accessor :last_name
46
-
47
- # The user's e-mail address. Must be unique. Cannot have two users with the same e-mail address.
48
- attr_accessor :email
49
-
50
- # The user's preferred language of communication. If not provided, defaults to English (en)
51
- attr_accessor :language
52
-
53
- # (Optional) Mobile number of user. Allows for SMS notifications upon availability of funds
54
- attr_accessor :mobile_number
55
-
56
- # Company legal name (Only if Business account)
57
- attr_accessor :business_name
58
-
59
- # Date of birth. (optional). Minimum 18 years old
60
- attr_accessor :date_of_birth
61
-
62
- # Optional JSON object with attributes that can later be searched to locate this user. Do not include PII as this object is not encrypted.
63
- attr_accessor :metadata
64
-
65
- # Should we notify the user via email that their user has been created in the system? They will receive instructions to establish such account.
66
- attr_accessor :notify_user
67
-
68
- # Attribute mapping from ruby-style variable name to JSON key.
69
- def self.attribute_map
70
- {
71
- :'internal_user_id' => :'internal_user_id',
72
- :'address1' => :'address1',
73
- :'address2' => :'address2',
74
- :'city' => :'city',
75
- :'state_province' => :'state_province',
76
- :'postal_code' => :'postal_code',
77
- :'country' => :'country',
78
- :'first_name' => :'first_name',
79
- :'middle_name' => :'middle_name',
80
- :'last_name' => :'last_name',
81
- :'email' => :'email',
82
- :'language' => :'language',
83
- :'mobile_number' => :'mobile_number',
84
- :'business_name' => :'business_name',
85
- :'date_of_birth' => :'date_of_birth',
86
- :'metadata' => :'metadata',
87
- :'notify_user' => :'notify_user'
88
- }
89
- end
90
-
91
- # Returns all the JSON keys this model knows about
92
- def self.acceptable_attributes
93
- attribute_map.values
94
- end
95
-
96
- # Attribute type mapping.
97
- def self.openapi_types
98
- {
99
- :'internal_user_id' => :'String',
100
- :'address1' => :'String',
101
- :'address2' => :'String',
102
- :'city' => :'String',
103
- :'state_province' => :'String',
104
- :'postal_code' => :'String',
105
- :'country' => :'String',
106
- :'first_name' => :'String',
107
- :'middle_name' => :'String',
108
- :'last_name' => :'String',
109
- :'email' => :'String',
110
- :'language' => :'String',
111
- :'mobile_number' => :'String',
112
- :'business_name' => :'String',
113
- :'date_of_birth' => :'Date',
114
- :'metadata' => :'Object',
115
- :'notify_user' => :'Boolean'
116
- }
117
- end
118
-
119
- # List of attributes with nullable: true
120
- def self.openapi_nullable
121
- Set.new([
122
- ])
123
- end
124
-
125
- # Initializes the object
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- def initialize(attributes = {})
128
- if (!attributes.is_a?(Hash))
129
- fail ArgumentError, "The input argument (attributes) must be a hash in `MassPayRubySdk::User` initialize method"
130
- end
131
-
132
- # check to see if the attribute exists and convert string to symbol for hash key
133
- attributes = attributes.each_with_object({}) { |(k, v), h|
134
- if (!self.class.attribute_map.key?(k.to_sym))
135
- fail ArgumentError, "`#{k}` is not a valid attribute in `MassPayRubySdk::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
136
- end
137
- h[k.to_sym] = v
138
- }
139
-
140
- if attributes.key?(:'internal_user_id')
141
- self.internal_user_id = attributes[:'internal_user_id']
142
- end
143
-
144
- if attributes.key?(:'address1')
145
- self.address1 = attributes[:'address1']
146
- end
147
-
148
- if attributes.key?(:'address2')
149
- self.address2 = attributes[:'address2']
150
- end
151
-
152
- if attributes.key?(:'city')
153
- self.city = attributes[:'city']
154
- end
155
-
156
- if attributes.key?(:'state_province')
157
- self.state_province = attributes[:'state_province']
158
- end
159
-
160
- if attributes.key?(:'postal_code')
161
- self.postal_code = attributes[:'postal_code']
162
- end
163
-
164
- if attributes.key?(:'country')
165
- self.country = attributes[:'country']
166
- end
167
-
168
- if attributes.key?(:'first_name')
169
- self.first_name = attributes[:'first_name']
170
- end
171
-
172
- if attributes.key?(:'middle_name')
173
- self.middle_name = attributes[:'middle_name']
174
- end
175
-
176
- if attributes.key?(:'last_name')
177
- self.last_name = attributes[:'last_name']
178
- end
179
-
180
- if attributes.key?(:'email')
181
- self.email = attributes[:'email']
182
- end
183
-
184
- if attributes.key?(:'language')
185
- self.language = attributes[:'language']
186
- end
187
-
188
- if attributes.key?(:'mobile_number')
189
- self.mobile_number = attributes[:'mobile_number']
190
- end
191
-
192
- if attributes.key?(:'business_name')
193
- self.business_name = attributes[:'business_name']
194
- end
195
-
196
- if attributes.key?(:'date_of_birth')
197
- self.date_of_birth = attributes[:'date_of_birth']
198
- end
199
-
200
- if attributes.key?(:'metadata')
201
- self.metadata = attributes[:'metadata']
202
- end
203
-
204
- if attributes.key?(:'notify_user')
205
- self.notify_user = attributes[:'notify_user']
206
- else
207
- self.notify_user = false
208
- end
209
- end
210
-
211
- # Show invalid properties with the reasons. Usually used together with valid?
212
- # @return Array for valid properties with the reasons
213
- def list_invalid_properties
214
- invalid_properties = Array.new
215
- if @internal_user_id.nil?
216
- invalid_properties.push('invalid value for "internal_user_id", internal_user_id cannot be nil.')
217
- end
218
-
219
- if @country.nil?
220
- invalid_properties.push('invalid value for "country", country cannot be nil.')
221
- end
222
-
223
- if @first_name.nil?
224
- invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
225
- end
226
-
227
- if @last_name.nil?
228
- invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
229
- end
230
-
231
- if @email.nil?
232
- invalid_properties.push('invalid value for "email", email cannot be nil.')
233
- end
234
-
235
- pattern = Regexp.new(/^[0-9]+$/)
236
- if !@mobile_number.nil? && @mobile_number !~ pattern
237
- invalid_properties.push("invalid value for \"mobile_number\", must conform to the pattern #{pattern}.")
238
- end
239
-
240
- invalid_properties
241
- end
242
-
243
- # Check to see if the all the properties in the model are valid
244
- # @return true if the model is valid
245
- def valid?
246
- return false if @internal_user_id.nil?
247
- return false if @country.nil?
248
- return false if @first_name.nil?
249
- return false if @last_name.nil?
250
- return false if @email.nil?
251
- return false if !@mobile_number.nil? && @mobile_number !~ Regexp.new(/^[0-9]+$/)
252
- true
253
- end
254
-
255
- # Custom attribute writer method with validation
256
- # @param [Object] mobile_number Value to be assigned
257
- def mobile_number=(mobile_number)
258
- pattern = Regexp.new(/^[0-9]+$/)
259
- if !mobile_number.nil? && mobile_number !~ pattern
260
- fail ArgumentError, "invalid value for \"mobile_number\", must conform to the pattern #{pattern}."
261
- end
262
-
263
- @mobile_number = mobile_number
264
- end
265
-
266
- # Checks equality by comparing each attribute.
267
- # @param [Object] Object to be compared
268
- def ==(o)
269
- return true if self.equal?(o)
270
- self.class == o.class &&
271
- internal_user_id == o.internal_user_id &&
272
- address1 == o.address1 &&
273
- address2 == o.address2 &&
274
- city == o.city &&
275
- state_province == o.state_province &&
276
- postal_code == o.postal_code &&
277
- country == o.country &&
278
- first_name == o.first_name &&
279
- middle_name == o.middle_name &&
280
- last_name == o.last_name &&
281
- email == o.email &&
282
- language == o.language &&
283
- mobile_number == o.mobile_number &&
284
- business_name == o.business_name &&
285
- date_of_birth == o.date_of_birth &&
286
- metadata == o.metadata &&
287
- notify_user == o.notify_user
288
- end
289
-
290
- # @see the `==` method
291
- # @param [Object] Object to be compared
292
- def eql?(o)
293
- self == o
294
- end
295
-
296
- # Calculates hash code according to all attributes.
297
- # @return [Integer] Hash code
298
- def hash
299
- [internal_user_id, address1, address2, city, state_province, postal_code, country, first_name, middle_name, last_name, email, language, mobile_number, business_name, date_of_birth, metadata, notify_user].hash
300
- end
301
-
302
- # Builds the object from hash
303
- # @param [Hash] attributes Model attributes in the form of hash
304
- # @return [Object] Returns the model itself
305
- def self.build_from_hash(attributes)
306
- new.build_from_hash(attributes)
307
- end
308
-
309
- # Builds the object from hash
310
- # @param [Hash] attributes Model attributes in the form of hash
311
- # @return [Object] Returns the model itself
312
- def build_from_hash(attributes)
313
- return nil unless attributes.is_a?(Hash)
314
- attributes = attributes.transform_keys(&:to_sym)
315
- self.class.openapi_types.each_pair do |key, type|
316
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
317
- self.send("#{key}=", nil)
318
- elsif type =~ /\AArray<(.*)>/i
319
- # check to ensure the input is an array given that the attribute
320
- # is documented as an array but the input is not
321
- if attributes[self.class.attribute_map[key]].is_a?(Array)
322
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
323
- end
324
- elsif !attributes[self.class.attribute_map[key]].nil?
325
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
326
- end
327
- end
328
-
329
- self
330
- end
331
-
332
- # Deserializes the data based on type
333
- # @param string type Data type
334
- # @param string value Value to be deserialized
335
- # @return [Object] Deserialized data
336
- def _deserialize(type, value)
337
- case type.to_sym
338
- when :Time
339
- Time.parse(value)
340
- when :Date
341
- Date.parse(value)
342
- when :String
343
- value.to_s
344
- when :Integer
345
- value.to_i
346
- when :Float
347
- value.to_f
348
- when :Boolean
349
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
350
- true
351
- else
352
- false
353
- end
354
- when :Object
355
- # generic object (usually a Hash), return directly
356
- value
357
- when /\AArray<(?<inner_type>.+)>\z/
358
- inner_type = Regexp.last_match[:inner_type]
359
- value.map { |v| _deserialize(inner_type, v) }
360
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
361
- k_type = Regexp.last_match[:k_type]
362
- v_type = Regexp.last_match[:v_type]
363
- {}.tap do |hash|
364
- value.each do |k, v|
365
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
366
- end
367
- end
368
- else # model
369
- # models (e.g. Pet) or oneOf
370
- klass = MassPayRubySdk.const_get(type)
371
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
372
- end
373
- end
374
-
375
- # Returns the string representation of the object
376
- # @return [String] String presentation of the object
377
- def to_s
378
- to_hash.to_s
379
- end
380
-
381
- # to_body is an alias to to_hash (backward compatibility)
382
- # @return [Hash] Returns the object in the form of hash
383
- def to_body
384
- to_hash
385
- end
386
-
387
- # Returns the object in the form of hash
388
- # @return [Hash] Returns the object in the form of hash
389
- def to_hash
390
- hash = {}
391
- self.class.attribute_map.each_pair do |attr, param|
392
- value = self.send(attr)
393
- if value.nil?
394
- is_nullable = self.class.openapi_nullable.include?(attr)
395
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
396
- end
397
-
398
- hash[param] = _to_hash(value)
399
- end
400
- hash
401
- end
402
-
403
- # Outputs non-array value in the form of hash
404
- # For object, use to_hash. Otherwise, just return the value
405
- # @param [Object] value Any valid value
406
- # @return [Hash] Returns the value in the form of hash
407
- def _to_hash(value)
408
- if value.is_a?(Array)
409
- value.compact.map { |v| _to_hash(v) }
410
- elsif value.is_a?(Hash)
411
- {}.tap do |hash|
412
- value.each { |k, v| hash[k] = _to_hash(v) }
413
- end
414
- elsif value.respond_to? :to_hash
415
- value.to_hash
416
- else
417
- value
418
- end
419
- end
420
-
421
- end
422
-
423
- end