mx-platform-ruby 0.4.1 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/LICENSE +1 -1
  4. data/README.md +4 -6
  5. data/docs/AccountResponse.md +15 -1
  6. data/docs/ManagedAccountCreateRequest.md +78 -0
  7. data/docs/ManagedAccountCreateRequestBody.md +18 -0
  8. data/docs/ManagedAccountUpdateRequest.md +78 -0
  9. data/docs/ManagedAccountUpdateRequestBody.md +18 -0
  10. data/docs/ManagedMemberCreateRequest.md +24 -0
  11. data/docs/ManagedMemberCreateRequestBody.md +18 -0
  12. data/docs/ManagedMemberUpdateRequest.md +22 -0
  13. data/docs/ManagedMemberUpdateRequestBody.md +18 -0
  14. data/docs/ManagedTransactionCreateRequest.md +56 -0
  15. data/docs/ManagedTransactionCreateRequestBody.md +18 -0
  16. data/docs/ManagedTransactionUpdateRequest.md +56 -0
  17. data/docs/ManagedTransactionUpdateRequestBody.md +18 -0
  18. data/docs/MemberResponse.md +5 -1
  19. data/docs/MerchantLocationResponse.md +40 -0
  20. data/docs/MerchantLocationResponseBody.md +18 -0
  21. data/docs/MxPlatformApi.md +1415 -117
  22. data/docs/TransactionResponse.md +11 -1
  23. data/lib/mx-platform-ruby/api/mx_platform_api.rb +1393 -115
  24. data/lib/mx-platform-ruby/api_client.rb +1 -1
  25. data/lib/mx-platform-ruby/api_error.rb +1 -1
  26. data/lib/mx-platform-ruby/configuration.rb +1 -1
  27. data/lib/mx-platform-ruby/models/account_number_response.rb +1 -1
  28. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +1 -1
  29. data/lib/mx-platform-ruby/models/account_owner_response.rb +1 -1
  30. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +1 -1
  31. data/lib/mx-platform-ruby/models/account_response.rb +68 -5
  32. data/lib/mx-platform-ruby/models/account_response_body.rb +1 -1
  33. data/lib/mx-platform-ruby/models/account_update_request.rb +1 -1
  34. data/lib/mx-platform-ruby/models/account_update_request_body.rb +1 -1
  35. data/lib/mx-platform-ruby/models/accounts_response_body.rb +1 -1
  36. data/lib/mx-platform-ruby/models/categories_response_body.rb +1 -1
  37. data/lib/mx-platform-ruby/models/category_create_request.rb +1 -1
  38. data/lib/mx-platform-ruby/models/category_create_request_body.rb +1 -1
  39. data/lib/mx-platform-ruby/models/category_response.rb +1 -1
  40. data/lib/mx-platform-ruby/models/category_response_body.rb +1 -1
  41. data/lib/mx-platform-ruby/models/category_update_request.rb +1 -1
  42. data/lib/mx-platform-ruby/models/category_update_request_body.rb +1 -1
  43. data/lib/mx-platform-ruby/models/challenge_response.rb +1 -1
  44. data/lib/mx-platform-ruby/models/challenges_response_body.rb +1 -1
  45. data/lib/mx-platform-ruby/models/connect_widget_request.rb +1 -1
  46. data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +1 -1
  47. data/lib/mx-platform-ruby/models/connect_widget_response.rb +1 -1
  48. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +1 -1
  49. data/lib/mx-platform-ruby/models/credential_request.rb +1 -1
  50. data/lib/mx-platform-ruby/models/credential_response.rb +1 -1
  51. data/lib/mx-platform-ruby/models/credentials_response_body.rb +1 -1
  52. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +1 -1
  53. data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +1 -1
  54. data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +1 -1
  55. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +1 -1
  56. data/lib/mx-platform-ruby/models/holding_response.rb +1 -1
  57. data/lib/mx-platform-ruby/models/holding_response_body.rb +1 -1
  58. data/lib/mx-platform-ruby/models/holdings_response_body.rb +1 -1
  59. data/lib/mx-platform-ruby/models/image_option_response.rb +1 -1
  60. data/lib/mx-platform-ruby/models/institution_response.rb +1 -1
  61. data/lib/mx-platform-ruby/models/institution_response_body.rb +1 -1
  62. data/lib/mx-platform-ruby/models/institutions_response_body.rb +1 -1
  63. data/lib/mx-platform-ruby/models/managed_account_create_request.rb +503 -0
  64. data/lib/mx-platform-ruby/models/managed_account_create_request_body.rb +218 -0
  65. data/lib/mx-platform-ruby/models/managed_account_update_request.rb +488 -0
  66. data/lib/mx-platform-ruby/models/managed_account_update_request_body.rb +218 -0
  67. data/lib/mx-platform-ruby/models/managed_member_create_request.rb +250 -0
  68. data/lib/mx-platform-ruby/models/managed_member_create_request_body.rb +218 -0
  69. data/lib/mx-platform-ruby/models/managed_member_update_request.rb +236 -0
  70. data/lib/mx-platform-ruby/models/managed_member_update_request_body.rb +218 -0
  71. data/lib/mx-platform-ruby/models/managed_transaction_create_request.rb +414 -0
  72. data/lib/mx-platform-ruby/models/managed_transaction_create_request_body.rb +218 -0
  73. data/lib/mx-platform-ruby/models/managed_transaction_update_request.rb +389 -0
  74. data/lib/mx-platform-ruby/models/managed_transaction_update_request_body.rb +218 -0
  75. data/lib/mx-platform-ruby/models/member_create_request.rb +1 -1
  76. data/lib/mx-platform-ruby/models/member_create_request_body.rb +1 -1
  77. data/lib/mx-platform-ruby/models/member_response.rb +23 -5
  78. data/lib/mx-platform-ruby/models/member_response_body.rb +1 -1
  79. data/lib/mx-platform-ruby/models/member_resume_request.rb +1 -1
  80. data/lib/mx-platform-ruby/models/member_resume_request_body.rb +1 -1
  81. data/lib/mx-platform-ruby/models/member_status_response.rb +1 -1
  82. data/lib/mx-platform-ruby/models/member_status_response_body.rb +1 -1
  83. data/lib/mx-platform-ruby/models/member_update_request.rb +1 -1
  84. data/lib/mx-platform-ruby/models/member_update_request_body.rb +1 -1
  85. data/lib/mx-platform-ruby/models/members_response_body.rb +1 -1
  86. data/lib/mx-platform-ruby/models/merchant_location_response.rb +317 -0
  87. data/lib/mx-platform-ruby/models/merchant_location_response_body.rb +218 -0
  88. data/lib/mx-platform-ruby/models/merchant_response.rb +1 -1
  89. data/lib/mx-platform-ruby/models/merchant_response_body.rb +1 -1
  90. data/lib/mx-platform-ruby/models/merchants_response_body.rb +1 -1
  91. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +1 -1
  92. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +1 -1
  93. data/lib/mx-platform-ruby/models/option_response.rb +1 -1
  94. data/lib/mx-platform-ruby/models/pagination_response.rb +1 -1
  95. data/lib/mx-platform-ruby/models/statement_response.rb +1 -1
  96. data/lib/mx-platform-ruby/models/statement_response_body.rb +1 -1
  97. data/lib/mx-platform-ruby/models/statements_response_body.rb +1 -1
  98. data/lib/mx-platform-ruby/models/tag_create_request.rb +1 -1
  99. data/lib/mx-platform-ruby/models/tag_create_request_body.rb +1 -1
  100. data/lib/mx-platform-ruby/models/tag_response.rb +1 -1
  101. data/lib/mx-platform-ruby/models/tag_response_body.rb +1 -1
  102. data/lib/mx-platform-ruby/models/tag_update_request.rb +1 -1
  103. data/lib/mx-platform-ruby/models/tag_update_request_body.rb +1 -1
  104. data/lib/mx-platform-ruby/models/tagging_create_request.rb +1 -1
  105. data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +1 -1
  106. data/lib/mx-platform-ruby/models/tagging_response.rb +1 -1
  107. data/lib/mx-platform-ruby/models/tagging_response_body.rb +1 -1
  108. data/lib/mx-platform-ruby/models/tagging_update_request.rb +1 -1
  109. data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +1 -1
  110. data/lib/mx-platform-ruby/models/taggings_response_body.rb +1 -1
  111. data/lib/mx-platform-ruby/models/tags_response_body.rb +1 -1
  112. data/lib/mx-platform-ruby/models/transaction_response.rb +50 -5
  113. data/lib/mx-platform-ruby/models/transaction_response_body.rb +1 -1
  114. data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +1 -1
  115. data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +1 -1
  116. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +1 -1
  117. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +1 -1
  118. data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +1 -1
  119. data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +1 -1
  120. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +1 -1
  121. data/lib/mx-platform-ruby/models/transaction_update_request.rb +1 -1
  122. data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +1 -1
  123. data/lib/mx-platform-ruby/models/transactions_response_body.rb +1 -1
  124. data/lib/mx-platform-ruby/models/user_create_request.rb +1 -1
  125. data/lib/mx-platform-ruby/models/user_create_request_body.rb +1 -1
  126. data/lib/mx-platform-ruby/models/user_response.rb +1 -1
  127. data/lib/mx-platform-ruby/models/user_response_body.rb +1 -1
  128. data/lib/mx-platform-ruby/models/user_update_request.rb +1 -1
  129. data/lib/mx-platform-ruby/models/user_update_request_body.rb +1 -1
  130. data/lib/mx-platform-ruby/models/users_response_body.rb +1 -1
  131. data/lib/mx-platform-ruby/models/widget_request.rb +1 -1
  132. data/lib/mx-platform-ruby/models/widget_request_body.rb +1 -1
  133. data/lib/mx-platform-ruby/models/widget_response.rb +1 -1
  134. data/lib/mx-platform-ruby/models/widget_response_body.rb +1 -1
  135. data/lib/mx-platform-ruby/version.rb +2 -2
  136. data/lib/mx-platform-ruby.rb +15 -1
  137. data/mx-platform-ruby.gemspec +1 -1
  138. data/openapi/config.yml +1 -1
  139. data/openapi/templates/README.mustache +4 -6
  140. data/spec/api/mx_platform_api_spec.rb +246 -1
  141. data/spec/api_client_spec.rb +1 -1
  142. data/spec/configuration_spec.rb +1 -1
  143. data/spec/models/account_number_response_spec.rb +1 -1
  144. data/spec/models/account_numbers_response_body_spec.rb +1 -1
  145. data/spec/models/account_owner_response_spec.rb +1 -1
  146. data/spec/models/account_owners_response_body_spec.rb +1 -1
  147. data/spec/models/account_response_body_spec.rb +1 -1
  148. data/spec/models/account_response_spec.rb +43 -1
  149. data/spec/models/account_update_request_body_spec.rb +1 -1
  150. data/spec/models/account_update_request_spec.rb +1 -1
  151. data/spec/models/accounts_response_body_spec.rb +1 -1
  152. data/spec/models/categories_response_body_spec.rb +1 -1
  153. data/spec/models/category_create_request_body_spec.rb +1 -1
  154. data/spec/models/category_create_request_spec.rb +1 -1
  155. data/spec/models/category_response_body_spec.rb +1 -1
  156. data/spec/models/category_response_spec.rb +1 -1
  157. data/spec/models/category_update_request_body_spec.rb +1 -1
  158. data/spec/models/category_update_request_spec.rb +1 -1
  159. data/spec/models/challenge_response_spec.rb +1 -1
  160. data/spec/models/challenges_response_body_spec.rb +1 -1
  161. data/spec/models/connect_widget_request_body_spec.rb +1 -1
  162. data/spec/models/connect_widget_request_spec.rb +1 -1
  163. data/spec/models/connect_widget_response_body_spec.rb +1 -1
  164. data/spec/models/connect_widget_response_spec.rb +1 -1
  165. data/spec/models/credential_request_spec.rb +1 -1
  166. data/spec/models/credential_response_spec.rb +1 -1
  167. data/spec/models/credentials_response_body_spec.rb +1 -1
  168. data/spec/models/enhance_transaction_response_spec.rb +1 -1
  169. data/spec/models/enhance_transactions_request_body_spec.rb +1 -1
  170. data/spec/models/enhance_transactions_request_spec.rb +1 -1
  171. data/spec/models/enhance_transactions_response_body_spec.rb +1 -1
  172. data/spec/models/holding_response_body_spec.rb +1 -1
  173. data/spec/models/holding_response_spec.rb +1 -1
  174. data/spec/models/holdings_response_body_spec.rb +1 -1
  175. data/spec/models/image_option_response_spec.rb +1 -1
  176. data/spec/models/institution_response_body_spec.rb +1 -1
  177. data/spec/models/institution_response_spec.rb +1 -1
  178. data/spec/models/institutions_response_body_spec.rb +1 -1
  179. data/spec/models/managed_account_create_request_body_spec.rb +34 -0
  180. data/spec/models/managed_account_create_request_spec.rb +214 -0
  181. data/spec/models/managed_account_update_request_body_spec.rb +34 -0
  182. data/spec/models/managed_account_update_request_spec.rb +214 -0
  183. data/spec/models/managed_member_create_request_body_spec.rb +34 -0
  184. data/spec/models/managed_member_create_request_spec.rb +52 -0
  185. data/spec/models/managed_member_update_request_body_spec.rb +34 -0
  186. data/spec/models/managed_member_update_request_spec.rb +46 -0
  187. data/spec/models/managed_transaction_create_request_body_spec.rb +34 -0
  188. data/spec/models/managed_transaction_create_request_spec.rb +148 -0
  189. data/spec/models/managed_transaction_update_request_body_spec.rb +34 -0
  190. data/spec/models/managed_transaction_update_request_spec.rb +148 -0
  191. data/spec/models/member_create_request_body_spec.rb +1 -1
  192. data/spec/models/member_create_request_spec.rb +1 -1
  193. data/spec/models/member_response_body_spec.rb +1 -1
  194. data/spec/models/member_response_spec.rb +13 -1
  195. data/spec/models/member_resume_request_body_spec.rb +1 -1
  196. data/spec/models/member_resume_request_spec.rb +1 -1
  197. data/spec/models/member_status_response_body_spec.rb +1 -1
  198. data/spec/models/member_status_response_spec.rb +1 -1
  199. data/spec/models/member_update_request_body_spec.rb +1 -1
  200. data/spec/models/member_update_request_spec.rb +1 -1
  201. data/spec/models/members_response_body_spec.rb +1 -1
  202. data/spec/models/merchant_location_response_body_spec.rb +34 -0
  203. data/spec/models/merchant_location_response_spec.rb +100 -0
  204. data/spec/models/merchant_response_body_spec.rb +1 -1
  205. data/spec/models/merchant_response_spec.rb +1 -1
  206. data/spec/models/merchants_response_body_spec.rb +1 -1
  207. data/spec/models/o_auth_window_response_body_spec.rb +1 -1
  208. data/spec/models/o_auth_window_response_spec.rb +1 -1
  209. data/spec/models/option_response_spec.rb +1 -1
  210. data/spec/models/pagination_response_spec.rb +1 -1
  211. data/spec/models/statement_response_body_spec.rb +1 -1
  212. data/spec/models/statement_response_spec.rb +1 -1
  213. data/spec/models/statements_response_body_spec.rb +1 -1
  214. data/spec/models/tag_create_request_body_spec.rb +1 -1
  215. data/spec/models/tag_create_request_spec.rb +1 -1
  216. data/spec/models/tag_response_body_spec.rb +1 -1
  217. data/spec/models/tag_response_spec.rb +1 -1
  218. data/spec/models/tag_update_request_body_spec.rb +1 -1
  219. data/spec/models/tag_update_request_spec.rb +1 -1
  220. data/spec/models/tagging_create_request_body_spec.rb +1 -1
  221. data/spec/models/tagging_create_request_spec.rb +1 -1
  222. data/spec/models/tagging_response_body_spec.rb +1 -1
  223. data/spec/models/tagging_response_spec.rb +1 -1
  224. data/spec/models/tagging_update_request_body_spec.rb +1 -1
  225. data/spec/models/tagging_update_request_spec.rb +1 -1
  226. data/spec/models/taggings_response_body_spec.rb +1 -1
  227. data/spec/models/tags_response_body_spec.rb +1 -1
  228. data/spec/models/transaction_response_body_spec.rb +1 -1
  229. data/spec/models/transaction_response_spec.rb +31 -1
  230. data/spec/models/transaction_rule_create_request_body_spec.rb +1 -1
  231. data/spec/models/transaction_rule_create_request_spec.rb +1 -1
  232. data/spec/models/transaction_rule_response_body_spec.rb +1 -1
  233. data/spec/models/transaction_rule_response_spec.rb +1 -1
  234. data/spec/models/transaction_rule_update_request_body_spec.rb +1 -1
  235. data/spec/models/transaction_rule_update_request_spec.rb +1 -1
  236. data/spec/models/transaction_rules_response_body_spec.rb +1 -1
  237. data/spec/models/transaction_update_request_body_spec.rb +1 -1
  238. data/spec/models/transaction_update_request_spec.rb +1 -1
  239. data/spec/models/transactions_response_body_spec.rb +1 -1
  240. data/spec/models/user_create_request_body_spec.rb +1 -1
  241. data/spec/models/user_create_request_spec.rb +1 -1
  242. data/spec/models/user_response_body_spec.rb +1 -1
  243. data/spec/models/user_response_spec.rb +1 -1
  244. data/spec/models/user_update_request_body_spec.rb +1 -1
  245. data/spec/models/user_update_request_spec.rb +1 -1
  246. data/spec/models/users_response_body_spec.rb +1 -1
  247. data/spec/models/widget_request_body_spec.rb +1 -1
  248. data/spec/models/widget_request_spec.rb +1 -1
  249. data/spec/models/widget_response_body_spec.rb +1 -1
  250. data/spec/models/widget_response_spec.rb +1 -1
  251. data/spec/spec_helper.rb +1 -1
  252. metadata +136 -80
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class ManagedAccountUpdateRequestBody
18
+ attr_accessor :account
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'account' => :'account'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'account' => :'ManagedAccountUpdateRequest'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::ManagedAccountUpdateRequestBody` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::ManagedAccountUpdateRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'account')
61
+ self.account = attributes[:'account']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ account == o.account
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [account].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = MxPlatformRuby.const_get(type)
166
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class ManagedMemberCreateRequest
18
+ attr_accessor :id
19
+
20
+ attr_accessor :institution_code
21
+
22
+ attr_accessor :metadata
23
+
24
+ attr_accessor :name
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'institution_code' => :'institution_code',
31
+ :'metadata' => :'metadata',
32
+ :'name' => :'name'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'id' => :'String',
45
+ :'institution_code' => :'String',
46
+ :'metadata' => :'String',
47
+ :'name' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::ManagedMemberCreateRequest` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::ManagedMemberCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'id')
73
+ self.id = attributes[:'id']
74
+ end
75
+
76
+ if attributes.key?(:'institution_code')
77
+ self.institution_code = attributes[:'institution_code']
78
+ end
79
+
80
+ if attributes.key?(:'metadata')
81
+ self.metadata = attributes[:'metadata']
82
+ end
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ if @institution_code.nil?
94
+ invalid_properties.push('invalid value for "institution_code", institution_code cannot be nil.')
95
+ end
96
+
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ return false if @institution_code.nil?
104
+ true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ id == o.id &&
113
+ institution_code == o.institution_code &&
114
+ metadata == o.metadata &&
115
+ name == o.name
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [id, institution_code, metadata, name].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ new.build_from_hash(attributes)
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
+ self.send("#{key}=", nil)
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :Time
166
+ Time.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ # models (e.g. Pet) or oneOf
197
+ klass = MxPlatformRuby.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #MX Platform API
3
+
4
+ #The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class ManagedMemberCreateRequestBody
18
+ attr_accessor :member
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'member' => :'member'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'member' => :'ManagedMemberCreateRequest'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::ManagedMemberCreateRequestBody` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::ManagedMemberCreateRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'member')
61
+ self.member = attributes[:'member']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ member == o.member
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [member].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = MxPlatformRuby.const_get(type)
166
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end