mx-platform-ruby 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +40 -41
  4. data/docs/AccountNumberResponse.md +32 -0
  5. data/docs/AccountNumbersResponseBody.md +2 -2
  6. data/docs/AccountOwnerResponse.md +40 -0
  7. data/docs/AccountOwnersResponseBody.md +2 -2
  8. data/docs/AccountResponse.md +96 -0
  9. data/docs/AccountResponseBody.md +1 -1
  10. data/docs/AccountsResponseBody.md +2 -2
  11. data/docs/CategoriesResponseBody.md +2 -2
  12. data/docs/CategoryResponse.md +32 -0
  13. data/docs/CategoryResponseBody.md +1 -1
  14. data/docs/ChallengeResponse.md +30 -0
  15. data/docs/ChallengeResponseImageOptions.md +22 -0
  16. data/docs/ChallengeResponseOptions.md +20 -0
  17. data/docs/ChallengesResponseBody.md +2 -2
  18. data/docs/ConnectWidgetResponse.md +20 -0
  19. data/docs/ConnectWidgetResponseBody.md +1 -1
  20. data/docs/CredentialResponse.md +26 -0
  21. data/docs/CredentialsResponseBody.md +2 -2
  22. data/docs/EnhanceTransactionResponse.md +48 -0
  23. data/docs/EnhanceTransactionsResponseBody.md +1 -1
  24. data/docs/HoldingResponse.md +52 -0
  25. data/docs/HoldingResponseBody.md +1 -1
  26. data/docs/HoldingsResponseBody.md +2 -2
  27. data/docs/InstitutionResponse.md +36 -0
  28. data/docs/InstitutionResponseBody.md +1 -1
  29. data/docs/InstitutionsResponseBody.md +2 -2
  30. data/docs/MemberResponse.md +40 -0
  31. data/docs/MemberResponseBody.md +1 -1
  32. data/docs/MemberStatusResponse.md +34 -0
  33. data/docs/MemberStatusResponseBody.md +1 -1
  34. data/docs/MembersResponseBody.md +2 -2
  35. data/docs/MerchantResponse.md +28 -0
  36. data/docs/MerchantResponseBody.md +1 -1
  37. data/docs/MerchantsResponseBody.md +2 -2
  38. data/docs/MxPlatformApi.md +196 -196
  39. data/docs/OAuthWindowResponse.md +20 -0
  40. data/docs/OAuthWindowResponseBody.md +1 -1
  41. data/docs/PaginationResponse.md +24 -0
  42. data/docs/StatementResponse.md +32 -0
  43. data/docs/StatementResponseBody.md +1 -1
  44. data/docs/StatementsResponseBody.md +2 -2
  45. data/docs/TagResponse.md +22 -0
  46. data/docs/TagResponseBody.md +1 -1
  47. data/docs/TaggingResponse.md +26 -0
  48. data/docs/TaggingResponseBody.md +1 -1
  49. data/docs/TaggingsResponseBody.md +2 -2
  50. data/docs/TagsResponseBody.md +2 -2
  51. data/docs/TransactionResponse.md +88 -0
  52. data/docs/TransactionResponseBody.md +1 -1
  53. data/docs/TransactionRuleResponse.md +30 -0
  54. data/docs/TransactionRuleResponseBody.md +1 -1
  55. data/docs/TransactionRulesResponseBody.md +2 -2
  56. data/docs/TransactionsResponseBody.md +2 -2
  57. data/docs/UserResponse.md +26 -0
  58. data/docs/UserResponseBody.md +1 -1
  59. data/docs/UsersResponseBody.md +2 -2
  60. data/docs/WidgetResponse.md +22 -0
  61. data/docs/WidgetResponseBody.md +1 -1
  62. data/lib/mx-platform-ruby.rb +24 -25
  63. data/lib/mx-platform-ruby/api/mx_platform_api.rb +185 -185
  64. data/lib/mx-platform-ruby/models/account_number_response.rb +281 -0
  65. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +2 -2
  66. data/lib/mx-platform-ruby/models/account_owner_response.rb +317 -0
  67. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +2 -2
  68. data/lib/mx-platform-ruby/models/account_response.rb +569 -0
  69. data/lib/mx-platform-ruby/models/account_response_body.rb +1 -1
  70. data/lib/mx-platform-ruby/models/accounts_response_body.rb +2 -2
  71. data/lib/mx-platform-ruby/models/categories_response_body.rb +2 -2
  72. data/lib/mx-platform-ruby/models/category_response.rb +281 -0
  73. data/lib/mx-platform-ruby/models/category_response_body.rb +1 -1
  74. data/lib/mx-platform-ruby/models/challenge_response.rb +276 -0
  75. data/lib/mx-platform-ruby/models/challenge_response_image_options.rb +236 -0
  76. data/lib/mx-platform-ruby/models/challenge_response_options.rb +227 -0
  77. data/lib/mx-platform-ruby/models/challenges_response_body.rb +2 -2
  78. data/lib/mx-platform-ruby/models/connect_widget_response.rb +227 -0
  79. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +1 -1
  80. data/lib/mx-platform-ruby/models/credential_response.rb +254 -0
  81. data/lib/mx-platform-ruby/models/credentials_response_body.rb +2 -2
  82. data/lib/mx-platform-ruby/models/enhance_transaction_response.rb +353 -0
  83. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +1 -1
  84. data/lib/mx-platform-ruby/models/holding_response.rb +371 -0
  85. data/lib/mx-platform-ruby/models/holding_response_body.rb +1 -1
  86. data/lib/mx-platform-ruby/models/holdings_response_body.rb +2 -2
  87. data/lib/mx-platform-ruby/models/institution_response.rb +299 -0
  88. data/lib/mx-platform-ruby/models/institution_response_body.rb +1 -1
  89. data/lib/mx-platform-ruby/models/institutions_response_body.rb +2 -2
  90. data/lib/mx-platform-ruby/models/member_response.rb +317 -0
  91. data/lib/mx-platform-ruby/models/member_response_body.rb +1 -1
  92. data/lib/mx-platform-ruby/models/member_status_response.rb +292 -0
  93. data/lib/mx-platform-ruby/models/member_status_response_body.rb +1 -1
  94. data/lib/mx-platform-ruby/models/members_response_body.rb +2 -2
  95. data/lib/mx-platform-ruby/models/merchant_response.rb +263 -0
  96. data/lib/mx-platform-ruby/models/merchant_response_body.rb +1 -1
  97. data/lib/mx-platform-ruby/models/merchants_response_body.rb +2 -2
  98. data/lib/mx-platform-ruby/models/o_auth_window_response.rb +227 -0
  99. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +1 -1
  100. data/lib/mx-platform-ruby/models/pagination_response.rb +245 -0
  101. data/lib/mx-platform-ruby/models/statement_response.rb +281 -0
  102. data/lib/mx-platform-ruby/models/statement_response_body.rb +1 -1
  103. data/lib/mx-platform-ruby/models/statements_response_body.rb +2 -2
  104. data/lib/mx-platform-ruby/models/tag_response.rb +236 -0
  105. data/lib/mx-platform-ruby/models/tag_response_body.rb +1 -1
  106. data/lib/mx-platform-ruby/models/tagging_response.rb +254 -0
  107. data/lib/mx-platform-ruby/models/tagging_response_body.rb +1 -1
  108. data/lib/mx-platform-ruby/models/taggings_response_body.rb +2 -2
  109. data/lib/mx-platform-ruby/models/tags_response_body.rb +2 -2
  110. data/lib/mx-platform-ruby/models/transaction_response.rb +533 -0
  111. data/lib/mx-platform-ruby/models/transaction_response_body.rb +1 -1
  112. data/lib/mx-platform-ruby/models/transaction_rule_response.rb +272 -0
  113. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +1 -1
  114. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +2 -2
  115. data/lib/mx-platform-ruby/models/transactions_response_body.rb +2 -2
  116. data/lib/mx-platform-ruby/models/user_response.rb +254 -0
  117. data/lib/mx-platform-ruby/models/user_response_body.rb +1 -1
  118. data/lib/mx-platform-ruby/models/users_response_body.rb +2 -2
  119. data/lib/mx-platform-ruby/models/widget_response.rb +236 -0
  120. data/lib/mx-platform-ruby/models/widget_response_body.rb +1 -1
  121. data/lib/mx-platform-ruby/version.rb +1 -1
  122. data/openapi/config.yml +11 -0
  123. data/pkg/mx-platform-ruby-0.2.1.gem +0 -0
  124. data/spec/api/mx_platform_api_spec.rb +51 -51
  125. data/spec/models/account_number_response_spec.rb +76 -0
  126. data/spec/models/account_owner_response_spec.rb +100 -0
  127. data/spec/models/account_response_spec.rb +268 -0
  128. data/spec/models/category_response_spec.rb +76 -0
  129. data/spec/models/challenge_response_image_options_spec.rb +46 -0
  130. data/spec/models/challenge_response_options_spec.rb +40 -0
  131. data/spec/models/challenge_response_spec.rb +70 -0
  132. data/spec/models/connect_widget_response_spec.rb +40 -0
  133. data/spec/models/credential_response_spec.rb +58 -0
  134. data/spec/models/enhance_transaction_response_spec.rb +124 -0
  135. data/spec/models/holding_response_spec.rb +136 -0
  136. data/spec/models/institution_response_spec.rb +88 -0
  137. data/spec/models/member_response_spec.rb +100 -0
  138. data/spec/models/member_status_response_spec.rb +82 -0
  139. data/spec/models/merchant_response_spec.rb +64 -0
  140. data/spec/models/o_auth_window_response_spec.rb +40 -0
  141. data/spec/models/pagination_response_spec.rb +52 -0
  142. data/spec/models/statement_response_spec.rb +76 -0
  143. data/spec/models/tag_response_spec.rb +46 -0
  144. data/spec/models/tagging_response_spec.rb +58 -0
  145. data/spec/models/transaction_response_spec.rb +244 -0
  146. data/spec/models/transaction_rule_response_spec.rb +70 -0
  147. data/spec/models/user_response_spec.rb +58 -0
  148. data/spec/models/widget_response_spec.rb +46 -0
  149. metadata +100 -2
@@ -32,7 +32,7 @@ module MxPlatformRuby
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'holding' => :'Holding'
35
+ :'holding' => :'HoldingResponse'
36
36
  }
37
37
  end
38
38
 
@@ -35,8 +35,8 @@ module MxPlatformRuby
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
- :'holdings' => :'Array<Holding>',
39
- :'pagination' => :'Pagination'
38
+ :'holdings' => :'Array<HoldingResponse>',
39
+ :'pagination' => :'PaginationResponse'
40
40
  }
41
41
  end
42
42
 
@@ -0,0 +1,299 @@
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.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class InstitutionResponse
18
+ attr_accessor :code
19
+
20
+ attr_accessor :medium_logo_url
21
+
22
+ attr_accessor :name
23
+
24
+ attr_accessor :small_logo_url
25
+
26
+ attr_accessor :supports_account_identification
27
+
28
+ attr_accessor :supports_account_statement
29
+
30
+ attr_accessor :supports_account_verification
31
+
32
+ attr_accessor :supports_oauth
33
+
34
+ attr_accessor :supports_transaction_history
35
+
36
+ attr_accessor :url
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'code' => :'code',
42
+ :'medium_logo_url' => :'medium_logo_url',
43
+ :'name' => :'name',
44
+ :'small_logo_url' => :'small_logo_url',
45
+ :'supports_account_identification' => :'supports_account_identification',
46
+ :'supports_account_statement' => :'supports_account_statement',
47
+ :'supports_account_verification' => :'supports_account_verification',
48
+ :'supports_oauth' => :'supports_oauth',
49
+ :'supports_transaction_history' => :'supports_transaction_history',
50
+ :'url' => :'url'
51
+ }
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'code' => :'String',
63
+ :'medium_logo_url' => :'String',
64
+ :'name' => :'String',
65
+ :'small_logo_url' => :'String',
66
+ :'supports_account_identification' => :'Boolean',
67
+ :'supports_account_statement' => :'Boolean',
68
+ :'supports_account_verification' => :'Boolean',
69
+ :'supports_oauth' => :'Boolean',
70
+ :'supports_transaction_history' => :'Boolean',
71
+ :'url' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::InstitutionResponse` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::InstitutionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'code')
97
+ self.code = attributes[:'code']
98
+ end
99
+
100
+ if attributes.key?(:'medium_logo_url')
101
+ self.medium_logo_url = attributes[:'medium_logo_url']
102
+ end
103
+
104
+ if attributes.key?(:'name')
105
+ self.name = attributes[:'name']
106
+ end
107
+
108
+ if attributes.key?(:'small_logo_url')
109
+ self.small_logo_url = attributes[:'small_logo_url']
110
+ end
111
+
112
+ if attributes.key?(:'supports_account_identification')
113
+ self.supports_account_identification = attributes[:'supports_account_identification']
114
+ end
115
+
116
+ if attributes.key?(:'supports_account_statement')
117
+ self.supports_account_statement = attributes[:'supports_account_statement']
118
+ end
119
+
120
+ if attributes.key?(:'supports_account_verification')
121
+ self.supports_account_verification = attributes[:'supports_account_verification']
122
+ end
123
+
124
+ if attributes.key?(:'supports_oauth')
125
+ self.supports_oauth = attributes[:'supports_oauth']
126
+ end
127
+
128
+ if attributes.key?(:'supports_transaction_history')
129
+ self.supports_transaction_history = attributes[:'supports_transaction_history']
130
+ end
131
+
132
+ if attributes.key?(:'url')
133
+ self.url = attributes[:'url']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ invalid_properties = Array.new
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ true
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ code == o.code &&
156
+ medium_logo_url == o.medium_logo_url &&
157
+ name == o.name &&
158
+ small_logo_url == o.small_logo_url &&
159
+ supports_account_identification == o.supports_account_identification &&
160
+ supports_account_statement == o.supports_account_statement &&
161
+ supports_account_verification == o.supports_account_verification &&
162
+ supports_oauth == o.supports_oauth &&
163
+ supports_transaction_history == o.supports_transaction_history &&
164
+ url == o.url
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [code, medium_logo_url, name, small_logo_url, supports_account_identification, supports_account_statement, supports_account_verification, supports_oauth, supports_transaction_history, url].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ new.build_from_hash(attributes)
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def build_from_hash(attributes)
190
+ return nil unless attributes.is_a?(Hash)
191
+ self.class.openapi_types.each_pair do |key, type|
192
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
+ self.send("#{key}=", nil)
194
+ elsif type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
198
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
199
+ end
200
+ elsif !attributes[self.class.attribute_map[key]].nil?
201
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ end
203
+ end
204
+
205
+ self
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def _deserialize(type, value)
213
+ case type.to_sym
214
+ when :Time
215
+ Time.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :Boolean
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ # models (e.g. Pet) or oneOf
246
+ klass = MxPlatformRuby.const_get(type)
247
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ end
249
+ end
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # to_body is an alias to to_hash (backward compatibility)
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_body
260
+ to_hash
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+
299
+ end
@@ -32,7 +32,7 @@ module MxPlatformRuby
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'institution' => :'Institution'
35
+ :'institution' => :'InstitutionResponse'
36
36
  }
37
37
  end
38
38
 
@@ -35,8 +35,8 @@ module MxPlatformRuby
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
- :'institutions' => :'Array<Institution>',
39
- :'pagination' => :'Pagination'
38
+ :'institutions' => :'Array<InstitutionResponse>',
39
+ :'pagination' => :'PaginationResponse'
40
40
  }
41
41
  end
42
42
 
@@ -0,0 +1,317 @@
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.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MxPlatformRuby
17
+ class MemberResponse
18
+ attr_accessor :aggregated_at
19
+
20
+ attr_accessor :connection_status
21
+
22
+ attr_accessor :guid
23
+
24
+ attr_accessor :id
25
+
26
+ attr_accessor :institution_code
27
+
28
+ attr_accessor :is_being_aggregated
29
+
30
+ attr_accessor :is_oauth
31
+
32
+ attr_accessor :metadata
33
+
34
+ attr_accessor :name
35
+
36
+ attr_accessor :oauth_window_uri
37
+
38
+ attr_accessor :successfully_aggregated_at
39
+
40
+ attr_accessor :user_guid
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'aggregated_at' => :'aggregated_at',
46
+ :'connection_status' => :'connection_status',
47
+ :'guid' => :'guid',
48
+ :'id' => :'id',
49
+ :'institution_code' => :'institution_code',
50
+ :'is_being_aggregated' => :'is_being_aggregated',
51
+ :'is_oauth' => :'is_oauth',
52
+ :'metadata' => :'metadata',
53
+ :'name' => :'name',
54
+ :'oauth_window_uri' => :'oauth_window_uri',
55
+ :'successfully_aggregated_at' => :'successfully_aggregated_at',
56
+ :'user_guid' => :'user_guid'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'aggregated_at' => :'String',
69
+ :'connection_status' => :'String',
70
+ :'guid' => :'String',
71
+ :'id' => :'String',
72
+ :'institution_code' => :'String',
73
+ :'is_being_aggregated' => :'Boolean',
74
+ :'is_oauth' => :'Boolean',
75
+ :'metadata' => :'String',
76
+ :'name' => :'String',
77
+ :'oauth_window_uri' => :'String',
78
+ :'successfully_aggregated_at' => :'String',
79
+ :'user_guid' => :'String'
80
+ }
81
+ end
82
+
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::MemberResponse` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!self.class.attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::MemberResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'aggregated_at')
105
+ self.aggregated_at = attributes[:'aggregated_at']
106
+ end
107
+
108
+ if attributes.key?(:'connection_status')
109
+ self.connection_status = attributes[:'connection_status']
110
+ end
111
+
112
+ if attributes.key?(:'guid')
113
+ self.guid = attributes[:'guid']
114
+ end
115
+
116
+ if attributes.key?(:'id')
117
+ self.id = attributes[:'id']
118
+ end
119
+
120
+ if attributes.key?(:'institution_code')
121
+ self.institution_code = attributes[:'institution_code']
122
+ end
123
+
124
+ if attributes.key?(:'is_being_aggregated')
125
+ self.is_being_aggregated = attributes[:'is_being_aggregated']
126
+ end
127
+
128
+ if attributes.key?(:'is_oauth')
129
+ self.is_oauth = attributes[:'is_oauth']
130
+ end
131
+
132
+ if attributes.key?(:'metadata')
133
+ self.metadata = attributes[:'metadata']
134
+ end
135
+
136
+ if attributes.key?(:'name')
137
+ self.name = attributes[:'name']
138
+ end
139
+
140
+ if attributes.key?(:'oauth_window_uri')
141
+ self.oauth_window_uri = attributes[:'oauth_window_uri']
142
+ end
143
+
144
+ if attributes.key?(:'successfully_aggregated_at')
145
+ self.successfully_aggregated_at = attributes[:'successfully_aggregated_at']
146
+ end
147
+
148
+ if attributes.key?(:'user_guid')
149
+ self.user_guid = attributes[:'user_guid']
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = Array.new
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ true
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ aggregated_at == o.aggregated_at &&
172
+ connection_status == o.connection_status &&
173
+ guid == o.guid &&
174
+ id == o.id &&
175
+ institution_code == o.institution_code &&
176
+ is_being_aggregated == o.is_being_aggregated &&
177
+ is_oauth == o.is_oauth &&
178
+ metadata == o.metadata &&
179
+ name == o.name &&
180
+ oauth_window_uri == o.oauth_window_uri &&
181
+ successfully_aggregated_at == o.successfully_aggregated_at &&
182
+ user_guid == o.user_guid
183
+ end
184
+
185
+ # @see the `==` method
186
+ # @param [Object] Object to be compared
187
+ def eql?(o)
188
+ self == o
189
+ end
190
+
191
+ # Calculates hash code according to all attributes.
192
+ # @return [Integer] Hash code
193
+ def hash
194
+ [aggregated_at, connection_status, guid, id, institution_code, is_being_aggregated, is_oauth, metadata, name, oauth_window_uri, successfully_aggregated_at, user_guid].hash
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def self.build_from_hash(attributes)
201
+ new.build_from_hash(attributes)
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ self.class.openapi_types.each_pair do |key, type|
210
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
211
+ self.send("#{key}=", nil)
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
216
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
217
+ end
218
+ elsif !attributes[self.class.attribute_map[key]].nil?
219
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
220
+ end
221
+ end
222
+
223
+ self
224
+ end
225
+
226
+ # Deserializes the data based on type
227
+ # @param string type Data type
228
+ # @param string value Value to be deserialized
229
+ # @return [Object] Deserialized data
230
+ def _deserialize(type, value)
231
+ case type.to_sym
232
+ when :Time
233
+ Time.parse(value)
234
+ when :Date
235
+ Date.parse(value)
236
+ when :String
237
+ value.to_s
238
+ when :Integer
239
+ value.to_i
240
+ when :Float
241
+ value.to_f
242
+ when :Boolean
243
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
244
+ true
245
+ else
246
+ false
247
+ end
248
+ when :Object
249
+ # generic object (usually a Hash), return directly
250
+ value
251
+ when /\AArray<(?<inner_type>.+)>\z/
252
+ inner_type = Regexp.last_match[:inner_type]
253
+ value.map { |v| _deserialize(inner_type, v) }
254
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
255
+ k_type = Regexp.last_match[:k_type]
256
+ v_type = Regexp.last_match[:v_type]
257
+ {}.tap do |hash|
258
+ value.each do |k, v|
259
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
260
+ end
261
+ end
262
+ else # model
263
+ # models (e.g. Pet) or oneOf
264
+ klass = MxPlatformRuby.const_get(type)
265
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
266
+ end
267
+ end
268
+
269
+ # Returns the string representation of the object
270
+ # @return [String] String presentation of the object
271
+ def to_s
272
+ to_hash.to_s
273
+ end
274
+
275
+ # to_body is an alias to to_hash (backward compatibility)
276
+ # @return [Hash] Returns the object in the form of hash
277
+ def to_body
278
+ to_hash
279
+ end
280
+
281
+ # Returns the object in the form of hash
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_hash
284
+ hash = {}
285
+ self.class.attribute_map.each_pair do |attr, param|
286
+ value = self.send(attr)
287
+ if value.nil?
288
+ is_nullable = self.class.openapi_nullable.include?(attr)
289
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
290
+ end
291
+
292
+ hash[param] = _to_hash(value)
293
+ end
294
+ hash
295
+ end
296
+
297
+ # Outputs non-array value in the form of hash
298
+ # For object, use to_hash. Otherwise, just return the value
299
+ # @param [Object] value Any valid value
300
+ # @return [Hash] Returns the value in the form of hash
301
+ def _to_hash(value)
302
+ if value.is_a?(Array)
303
+ value.compact.map { |v| _to_hash(v) }
304
+ elsif value.is_a?(Hash)
305
+ {}.tap do |hash|
306
+ value.each { |k, v| hash[k] = _to_hash(v) }
307
+ end
308
+ elsif value.respond_to? :to_hash
309
+ value.to_hash
310
+ else
311
+ value
312
+ end
313
+ end
314
+
315
+ end
316
+
317
+ end