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
- :'tag' => :'Tag'
35
+ :'tag' => :'TagResponse'
36
36
  }
37
37
  end
38
38
 
@@ -0,0 +1,254 @@
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 TaggingResponse
18
+ attr_accessor :guid
19
+
20
+ attr_accessor :member_is_managed_by_user
21
+
22
+ attr_accessor :tag_guid
23
+
24
+ attr_accessor :transaction_guid
25
+
26
+ attr_accessor :user_guid
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'guid' => :'guid',
32
+ :'member_is_managed_by_user' => :'member_is_managed_by_user',
33
+ :'tag_guid' => :'tag_guid',
34
+ :'transaction_guid' => :'transaction_guid',
35
+ :'user_guid' => :'user_guid'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'guid' => :'String',
48
+ :'member_is_managed_by_user' => :'Boolean',
49
+ :'tag_guid' => :'String',
50
+ :'transaction_guid' => :'String',
51
+ :'user_guid' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::TaggingResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::TaggingResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'guid')
77
+ self.guid = attributes[:'guid']
78
+ end
79
+
80
+ if attributes.key?(:'member_is_managed_by_user')
81
+ self.member_is_managed_by_user = attributes[:'member_is_managed_by_user']
82
+ end
83
+
84
+ if attributes.key?(:'tag_guid')
85
+ self.tag_guid = attributes[:'tag_guid']
86
+ end
87
+
88
+ if attributes.key?(:'transaction_guid')
89
+ self.transaction_guid = attributes[:'transaction_guid']
90
+ end
91
+
92
+ if attributes.key?(:'user_guid')
93
+ self.user_guid = attributes[:'user_guid']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ guid == o.guid &&
116
+ member_is_managed_by_user == o.member_is_managed_by_user &&
117
+ tag_guid == o.tag_guid &&
118
+ transaction_guid == o.transaction_guid &&
119
+ user_guid == o.user_guid
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [guid, member_is_managed_by_user, tag_guid, transaction_guid, user_guid].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ new.build_from_hash(attributes)
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ self.class.openapi_types.each_pair do |key, type|
147
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
+ self.send("#{key}=", nil)
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
153
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ end
155
+ elsif !attributes[self.class.attribute_map[key]].nil?
156
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ end
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = MxPlatformRuby.const_get(type)
202
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -32,7 +32,7 @@ module MxPlatformRuby
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'tagging' => :'Tagging'
35
+ :'tagging' => :'TaggingResponse'
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
- :'pagination' => :'Pagination',
39
- :'taggings' => :'Array<Tagging>'
38
+ :'pagination' => :'PaginationResponse',
39
+ :'taggings' => :'Array<TaggingResponse>'
40
40
  }
41
41
  end
42
42
 
@@ -35,8 +35,8 @@ module MxPlatformRuby
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
- :'pagination' => :'Pagination',
39
- :'tags' => :'Array<Tag>'
38
+ :'pagination' => :'PaginationResponse',
39
+ :'tags' => :'Array<TagResponse>'
40
40
  }
41
41
  end
42
42
 
@@ -0,0 +1,533 @@
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 TransactionResponse
18
+ attr_accessor :account_guid
19
+
20
+ attr_accessor :amount
21
+
22
+ attr_accessor :category
23
+
24
+ attr_accessor :check_number_string
25
+
26
+ attr_accessor :created_at
27
+
28
+ attr_accessor :currency_code
29
+
30
+ attr_accessor :date
31
+
32
+ attr_accessor :description
33
+
34
+ attr_accessor :guid
35
+
36
+ attr_accessor :id
37
+
38
+ attr_accessor :is_bill_pay
39
+
40
+ attr_accessor :is_direct_deposit
41
+
42
+ attr_accessor :is_expense
43
+
44
+ attr_accessor :is_fee
45
+
46
+ attr_accessor :is_income
47
+
48
+ attr_accessor :is_international
49
+
50
+ attr_accessor :is_overdraft_fee
51
+
52
+ attr_accessor :is_payroll_advance
53
+
54
+ attr_accessor :is_recurring
55
+
56
+ attr_accessor :is_subscription
57
+
58
+ attr_accessor :latitude
59
+
60
+ attr_accessor :localized_description
61
+
62
+ attr_accessor :localized_memo
63
+
64
+ attr_accessor :longitude
65
+
66
+ attr_accessor :member_guid
67
+
68
+ attr_accessor :memo
69
+
70
+ attr_accessor :merchant_category_code
71
+
72
+ attr_accessor :merchant_guid
73
+
74
+ attr_accessor :original_description
75
+
76
+ attr_accessor :posted_at
77
+
78
+ attr_accessor :status
79
+
80
+ attr_accessor :top_level_category
81
+
82
+ attr_accessor :transacted_at
83
+
84
+ attr_accessor :type
85
+
86
+ attr_accessor :updated_at
87
+
88
+ attr_accessor :user_guid
89
+
90
+ # Attribute mapping from ruby-style variable name to JSON key.
91
+ def self.attribute_map
92
+ {
93
+ :'account_guid' => :'account_guid',
94
+ :'amount' => :'amount',
95
+ :'category' => :'category',
96
+ :'check_number_string' => :'check_number_string',
97
+ :'created_at' => :'created_at',
98
+ :'currency_code' => :'currency_code',
99
+ :'date' => :'date',
100
+ :'description' => :'description',
101
+ :'guid' => :'guid',
102
+ :'id' => :'id',
103
+ :'is_bill_pay' => :'is_bill_pay',
104
+ :'is_direct_deposit' => :'is_direct_deposit',
105
+ :'is_expense' => :'is_expense',
106
+ :'is_fee' => :'is_fee',
107
+ :'is_income' => :'is_income',
108
+ :'is_international' => :'is_international',
109
+ :'is_overdraft_fee' => :'is_overdraft_fee',
110
+ :'is_payroll_advance' => :'is_payroll_advance',
111
+ :'is_recurring' => :'is_recurring',
112
+ :'is_subscription' => :'is_subscription',
113
+ :'latitude' => :'latitude',
114
+ :'localized_description' => :'localized_description',
115
+ :'localized_memo' => :'localized_memo',
116
+ :'longitude' => :'longitude',
117
+ :'member_guid' => :'member_guid',
118
+ :'memo' => :'memo',
119
+ :'merchant_category_code' => :'merchant_category_code',
120
+ :'merchant_guid' => :'merchant_guid',
121
+ :'original_description' => :'original_description',
122
+ :'posted_at' => :'posted_at',
123
+ :'status' => :'status',
124
+ :'top_level_category' => :'top_level_category',
125
+ :'transacted_at' => :'transacted_at',
126
+ :'type' => :'type',
127
+ :'updated_at' => :'updated_at',
128
+ :'user_guid' => :'user_guid'
129
+ }
130
+ end
131
+
132
+ # Returns all the JSON keys this model knows about
133
+ def self.acceptable_attributes
134
+ attribute_map.values
135
+ end
136
+
137
+ # Attribute type mapping.
138
+ def self.openapi_types
139
+ {
140
+ :'account_guid' => :'String',
141
+ :'amount' => :'Float',
142
+ :'category' => :'String',
143
+ :'check_number_string' => :'String',
144
+ :'created_at' => :'String',
145
+ :'currency_code' => :'String',
146
+ :'date' => :'String',
147
+ :'description' => :'String',
148
+ :'guid' => :'String',
149
+ :'id' => :'String',
150
+ :'is_bill_pay' => :'Boolean',
151
+ :'is_direct_deposit' => :'Boolean',
152
+ :'is_expense' => :'Boolean',
153
+ :'is_fee' => :'Boolean',
154
+ :'is_income' => :'Boolean',
155
+ :'is_international' => :'Boolean',
156
+ :'is_overdraft_fee' => :'Boolean',
157
+ :'is_payroll_advance' => :'Boolean',
158
+ :'is_recurring' => :'Boolean',
159
+ :'is_subscription' => :'Boolean',
160
+ :'latitude' => :'Float',
161
+ :'localized_description' => :'String',
162
+ :'localized_memo' => :'String',
163
+ :'longitude' => :'Float',
164
+ :'member_guid' => :'String',
165
+ :'memo' => :'String',
166
+ :'merchant_category_code' => :'Integer',
167
+ :'merchant_guid' => :'String',
168
+ :'original_description' => :'String',
169
+ :'posted_at' => :'String',
170
+ :'status' => :'String',
171
+ :'top_level_category' => :'String',
172
+ :'transacted_at' => :'String',
173
+ :'type' => :'String',
174
+ :'updated_at' => :'String',
175
+ :'user_guid' => :'String'
176
+ }
177
+ end
178
+
179
+ # List of attributes with nullable: true
180
+ def self.openapi_nullable
181
+ Set.new([
182
+ ])
183
+ end
184
+
185
+ # Initializes the object
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ def initialize(attributes = {})
188
+ if (!attributes.is_a?(Hash))
189
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::TransactionResponse` initialize method"
190
+ end
191
+
192
+ # check to see if the attribute exists and convert string to symbol for hash key
193
+ attributes = attributes.each_with_object({}) { |(k, v), h|
194
+ if (!self.class.attribute_map.key?(k.to_sym))
195
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::TransactionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
196
+ end
197
+ h[k.to_sym] = v
198
+ }
199
+
200
+ if attributes.key?(:'account_guid')
201
+ self.account_guid = attributes[:'account_guid']
202
+ end
203
+
204
+ if attributes.key?(:'amount')
205
+ self.amount = attributes[:'amount']
206
+ end
207
+
208
+ if attributes.key?(:'category')
209
+ self.category = attributes[:'category']
210
+ end
211
+
212
+ if attributes.key?(:'check_number_string')
213
+ self.check_number_string = attributes[:'check_number_string']
214
+ end
215
+
216
+ if attributes.key?(:'created_at')
217
+ self.created_at = attributes[:'created_at']
218
+ end
219
+
220
+ if attributes.key?(:'currency_code')
221
+ self.currency_code = attributes[:'currency_code']
222
+ end
223
+
224
+ if attributes.key?(:'date')
225
+ self.date = attributes[:'date']
226
+ end
227
+
228
+ if attributes.key?(:'description')
229
+ self.description = attributes[:'description']
230
+ end
231
+
232
+ if attributes.key?(:'guid')
233
+ self.guid = attributes[:'guid']
234
+ end
235
+
236
+ if attributes.key?(:'id')
237
+ self.id = attributes[:'id']
238
+ end
239
+
240
+ if attributes.key?(:'is_bill_pay')
241
+ self.is_bill_pay = attributes[:'is_bill_pay']
242
+ end
243
+
244
+ if attributes.key?(:'is_direct_deposit')
245
+ self.is_direct_deposit = attributes[:'is_direct_deposit']
246
+ end
247
+
248
+ if attributes.key?(:'is_expense')
249
+ self.is_expense = attributes[:'is_expense']
250
+ end
251
+
252
+ if attributes.key?(:'is_fee')
253
+ self.is_fee = attributes[:'is_fee']
254
+ end
255
+
256
+ if attributes.key?(:'is_income')
257
+ self.is_income = attributes[:'is_income']
258
+ end
259
+
260
+ if attributes.key?(:'is_international')
261
+ self.is_international = attributes[:'is_international']
262
+ end
263
+
264
+ if attributes.key?(:'is_overdraft_fee')
265
+ self.is_overdraft_fee = attributes[:'is_overdraft_fee']
266
+ end
267
+
268
+ if attributes.key?(:'is_payroll_advance')
269
+ self.is_payroll_advance = attributes[:'is_payroll_advance']
270
+ end
271
+
272
+ if attributes.key?(:'is_recurring')
273
+ self.is_recurring = attributes[:'is_recurring']
274
+ end
275
+
276
+ if attributes.key?(:'is_subscription')
277
+ self.is_subscription = attributes[:'is_subscription']
278
+ end
279
+
280
+ if attributes.key?(:'latitude')
281
+ self.latitude = attributes[:'latitude']
282
+ end
283
+
284
+ if attributes.key?(:'localized_description')
285
+ self.localized_description = attributes[:'localized_description']
286
+ end
287
+
288
+ if attributes.key?(:'localized_memo')
289
+ self.localized_memo = attributes[:'localized_memo']
290
+ end
291
+
292
+ if attributes.key?(:'longitude')
293
+ self.longitude = attributes[:'longitude']
294
+ end
295
+
296
+ if attributes.key?(:'member_guid')
297
+ self.member_guid = attributes[:'member_guid']
298
+ end
299
+
300
+ if attributes.key?(:'memo')
301
+ self.memo = attributes[:'memo']
302
+ end
303
+
304
+ if attributes.key?(:'merchant_category_code')
305
+ self.merchant_category_code = attributes[:'merchant_category_code']
306
+ end
307
+
308
+ if attributes.key?(:'merchant_guid')
309
+ self.merchant_guid = attributes[:'merchant_guid']
310
+ end
311
+
312
+ if attributes.key?(:'original_description')
313
+ self.original_description = attributes[:'original_description']
314
+ end
315
+
316
+ if attributes.key?(:'posted_at')
317
+ self.posted_at = attributes[:'posted_at']
318
+ end
319
+
320
+ if attributes.key?(:'status')
321
+ self.status = attributes[:'status']
322
+ end
323
+
324
+ if attributes.key?(:'top_level_category')
325
+ self.top_level_category = attributes[:'top_level_category']
326
+ end
327
+
328
+ if attributes.key?(:'transacted_at')
329
+ self.transacted_at = attributes[:'transacted_at']
330
+ end
331
+
332
+ if attributes.key?(:'type')
333
+ self.type = attributes[:'type']
334
+ end
335
+
336
+ if attributes.key?(:'updated_at')
337
+ self.updated_at = attributes[:'updated_at']
338
+ end
339
+
340
+ if attributes.key?(:'user_guid')
341
+ self.user_guid = attributes[:'user_guid']
342
+ end
343
+ end
344
+
345
+ # Show invalid properties with the reasons. Usually used together with valid?
346
+ # @return Array for valid properties with the reasons
347
+ def list_invalid_properties
348
+ invalid_properties = Array.new
349
+ invalid_properties
350
+ end
351
+
352
+ # Check to see if the all the properties in the model are valid
353
+ # @return true if the model is valid
354
+ def valid?
355
+ true
356
+ end
357
+
358
+ # Checks equality by comparing each attribute.
359
+ # @param [Object] Object to be compared
360
+ def ==(o)
361
+ return true if self.equal?(o)
362
+ self.class == o.class &&
363
+ account_guid == o.account_guid &&
364
+ amount == o.amount &&
365
+ category == o.category &&
366
+ check_number_string == o.check_number_string &&
367
+ created_at == o.created_at &&
368
+ currency_code == o.currency_code &&
369
+ date == o.date &&
370
+ description == o.description &&
371
+ guid == o.guid &&
372
+ id == o.id &&
373
+ is_bill_pay == o.is_bill_pay &&
374
+ is_direct_deposit == o.is_direct_deposit &&
375
+ is_expense == o.is_expense &&
376
+ is_fee == o.is_fee &&
377
+ is_income == o.is_income &&
378
+ is_international == o.is_international &&
379
+ is_overdraft_fee == o.is_overdraft_fee &&
380
+ is_payroll_advance == o.is_payroll_advance &&
381
+ is_recurring == o.is_recurring &&
382
+ is_subscription == o.is_subscription &&
383
+ latitude == o.latitude &&
384
+ localized_description == o.localized_description &&
385
+ localized_memo == o.localized_memo &&
386
+ longitude == o.longitude &&
387
+ member_guid == o.member_guid &&
388
+ memo == o.memo &&
389
+ merchant_category_code == o.merchant_category_code &&
390
+ merchant_guid == o.merchant_guid &&
391
+ original_description == o.original_description &&
392
+ posted_at == o.posted_at &&
393
+ status == o.status &&
394
+ top_level_category == o.top_level_category &&
395
+ transacted_at == o.transacted_at &&
396
+ type == o.type &&
397
+ updated_at == o.updated_at &&
398
+ user_guid == o.user_guid
399
+ end
400
+
401
+ # @see the `==` method
402
+ # @param [Object] Object to be compared
403
+ def eql?(o)
404
+ self == o
405
+ end
406
+
407
+ # Calculates hash code according to all attributes.
408
+ # @return [Integer] Hash code
409
+ def hash
410
+ [account_guid, amount, category, check_number_string, created_at, currency_code, date, description, guid, id, is_bill_pay, is_direct_deposit, is_expense, is_fee, is_income, is_international, is_overdraft_fee, is_payroll_advance, is_recurring, is_subscription, latitude, localized_description, localized_memo, longitude, member_guid, memo, merchant_category_code, merchant_guid, original_description, posted_at, status, top_level_category, transacted_at, type, updated_at, user_guid].hash
411
+ end
412
+
413
+ # Builds the object from hash
414
+ # @param [Hash] attributes Model attributes in the form of hash
415
+ # @return [Object] Returns the model itself
416
+ def self.build_from_hash(attributes)
417
+ new.build_from_hash(attributes)
418
+ end
419
+
420
+ # Builds the object from hash
421
+ # @param [Hash] attributes Model attributes in the form of hash
422
+ # @return [Object] Returns the model itself
423
+ def build_from_hash(attributes)
424
+ return nil unless attributes.is_a?(Hash)
425
+ self.class.openapi_types.each_pair do |key, type|
426
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
427
+ self.send("#{key}=", nil)
428
+ elsif type =~ /\AArray<(.*)>/i
429
+ # check to ensure the input is an array given that the attribute
430
+ # is documented as an array but the input is not
431
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
432
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
433
+ end
434
+ elsif !attributes[self.class.attribute_map[key]].nil?
435
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
436
+ end
437
+ end
438
+
439
+ self
440
+ end
441
+
442
+ # Deserializes the data based on type
443
+ # @param string type Data type
444
+ # @param string value Value to be deserialized
445
+ # @return [Object] Deserialized data
446
+ def _deserialize(type, value)
447
+ case type.to_sym
448
+ when :Time
449
+ Time.parse(value)
450
+ when :Date
451
+ Date.parse(value)
452
+ when :String
453
+ value.to_s
454
+ when :Integer
455
+ value.to_i
456
+ when :Float
457
+ value.to_f
458
+ when :Boolean
459
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
460
+ true
461
+ else
462
+ false
463
+ end
464
+ when :Object
465
+ # generic object (usually a Hash), return directly
466
+ value
467
+ when /\AArray<(?<inner_type>.+)>\z/
468
+ inner_type = Regexp.last_match[:inner_type]
469
+ value.map { |v| _deserialize(inner_type, v) }
470
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
471
+ k_type = Regexp.last_match[:k_type]
472
+ v_type = Regexp.last_match[:v_type]
473
+ {}.tap do |hash|
474
+ value.each do |k, v|
475
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
476
+ end
477
+ end
478
+ else # model
479
+ # models (e.g. Pet) or oneOf
480
+ klass = MxPlatformRuby.const_get(type)
481
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
482
+ end
483
+ end
484
+
485
+ # Returns the string representation of the object
486
+ # @return [String] String presentation of the object
487
+ def to_s
488
+ to_hash.to_s
489
+ end
490
+
491
+ # to_body is an alias to to_hash (backward compatibility)
492
+ # @return [Hash] Returns the object in the form of hash
493
+ def to_body
494
+ to_hash
495
+ end
496
+
497
+ # Returns the object in the form of hash
498
+ # @return [Hash] Returns the object in the form of hash
499
+ def to_hash
500
+ hash = {}
501
+ self.class.attribute_map.each_pair do |attr, param|
502
+ value = self.send(attr)
503
+ if value.nil?
504
+ is_nullable = self.class.openapi_nullable.include?(attr)
505
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
506
+ end
507
+
508
+ hash[param] = _to_hash(value)
509
+ end
510
+ hash
511
+ end
512
+
513
+ # Outputs non-array value in the form of hash
514
+ # For object, use to_hash. Otherwise, just return the value
515
+ # @param [Object] value Any valid value
516
+ # @return [Hash] Returns the value in the form of hash
517
+ def _to_hash(value)
518
+ if value.is_a?(Array)
519
+ value.compact.map { |v| _to_hash(v) }
520
+ elsif value.is_a?(Hash)
521
+ {}.tap do |hash|
522
+ value.each { |k, v| hash[k] = _to_hash(v) }
523
+ end
524
+ elsif value.respond_to? :to_hash
525
+ value.to_hash
526
+ else
527
+ value
528
+ end
529
+ end
530
+
531
+ end
532
+
533
+ end