mx-platform-ruby 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -2
  3. data/Gemfile.lock +84 -0
  4. data/README.md +236 -33
  5. data/Rakefile +8 -9
  6. data/lib/mx-platform-ruby.rb +126 -35
  7. data/lib/mx-platform-ruby/api/mx_platform_api.rb +4917 -0
  8. data/lib/mx-platform-ruby/api_client.rb +395 -0
  9. data/lib/mx-platform-ruby/api_error.rb +57 -0
  10. data/lib/mx-platform-ruby/configuration.rb +276 -0
  11. data/lib/mx-platform-ruby/models/account.rb +569 -0
  12. data/lib/mx-platform-ruby/models/account_number.rb +281 -0
  13. data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +229 -0
  14. data/lib/mx-platform-ruby/models/account_owner.rb +317 -0
  15. data/lib/mx-platform-ruby/models/account_owners_response_body.rb +229 -0
  16. data/lib/mx-platform-ruby/models/account_response_body.rb +218 -0
  17. data/lib/mx-platform-ruby/models/account_update_request.rb +218 -0
  18. data/lib/mx-platform-ruby/models/account_update_request_body.rb +218 -0
  19. data/lib/mx-platform-ruby/models/accounts_response_body.rb +229 -0
  20. data/lib/mx-platform-ruby/models/categories_response_body.rb +229 -0
  21. data/lib/mx-platform-ruby/models/category.rb +281 -0
  22. data/lib/mx-platform-ruby/models/category_create_request.rb +241 -0
  23. data/lib/mx-platform-ruby/models/category_create_request_body.rb +218 -0
  24. data/lib/mx-platform-ruby/models/category_response_body.rb +218 -0
  25. data/lib/mx-platform-ruby/models/category_update_request.rb +227 -0
  26. data/lib/mx-platform-ruby/models/category_update_request_body.rb +218 -0
  27. data/lib/mx-platform-ruby/models/challenge.rb +276 -0
  28. data/lib/mx-platform-ruby/models/challenge_image_options.rb +236 -0
  29. data/lib/mx-platform-ruby/models/challenge_options.rb +227 -0
  30. data/lib/mx-platform-ruby/models/challenges_response_body.rb +229 -0
  31. data/lib/mx-platform-ruby/models/connect_widget.rb +227 -0
  32. data/lib/mx-platform-ruby/models/connect_widget_request.rb +308 -0
  33. data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +218 -0
  34. data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +218 -0
  35. data/lib/mx-platform-ruby/models/credential.rb +254 -0
  36. data/lib/mx-platform-ruby/models/credential_request.rb +227 -0
  37. data/lib/mx-platform-ruby/models/credentials_response_body.rb +229 -0
  38. data/lib/mx-platform-ruby/models/enhance_transaction.rb +353 -0
  39. data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +264 -0
  40. data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +220 -0
  41. data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +220 -0
  42. data/lib/mx-platform-ruby/models/holding.rb +371 -0
  43. data/lib/mx-platform-ruby/models/holding_response_body.rb +218 -0
  44. data/lib/mx-platform-ruby/models/holdings_response_body.rb +229 -0
  45. data/lib/mx-platform-ruby/models/inline_response200.rb +218 -0
  46. data/lib/mx-platform-ruby/models/institution.rb +299 -0
  47. data/lib/mx-platform-ruby/models/institution_response_body.rb +218 -0
  48. data/lib/mx-platform-ruby/models/institutions_response_body.rb +229 -0
  49. data/lib/mx-platform-ruby/models/member.rb +317 -0
  50. data/lib/mx-platform-ruby/models/member_create_request.rb +284 -0
  51. data/lib/mx-platform-ruby/models/member_create_request_body.rb +236 -0
  52. data/lib/mx-platform-ruby/models/member_response_body.rb +218 -0
  53. data/lib/mx-platform-ruby/models/member_resume_request.rb +220 -0
  54. data/lib/mx-platform-ruby/models/member_resume_request_body.rb +218 -0
  55. data/lib/mx-platform-ruby/models/member_status.rb +292 -0
  56. data/lib/mx-platform-ruby/models/member_status_response_body.rb +218 -0
  57. data/lib/mx-platform-ruby/models/member_update_request.rb +256 -0
  58. data/lib/mx-platform-ruby/models/member_update_request_body.rb +218 -0
  59. data/lib/mx-platform-ruby/models/members_response_body.rb +229 -0
  60. data/lib/mx-platform-ruby/models/merchant.rb +263 -0
  61. data/lib/mx-platform-ruby/models/merchant_response_body.rb +218 -0
  62. data/lib/mx-platform-ruby/models/merchants_response_body.rb +229 -0
  63. data/lib/mx-platform-ruby/models/o_auth_window.rb +227 -0
  64. data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +218 -0
  65. data/lib/mx-platform-ruby/models/pagination.rb +245 -0
  66. data/lib/mx-platform-ruby/models/statement.rb +281 -0
  67. data/lib/mx-platform-ruby/models/statement_response_body.rb +218 -0
  68. data/lib/mx-platform-ruby/models/statements_response_body.rb +229 -0
  69. data/lib/mx-platform-ruby/models/tag.rb +236 -0
  70. data/lib/mx-platform-ruby/models/tag_create_request.rb +223 -0
  71. data/lib/mx-platform-ruby/models/tag_create_request_body.rb +218 -0
  72. data/lib/mx-platform-ruby/models/tag_response_body.rb +218 -0
  73. data/lib/mx-platform-ruby/models/tag_update_request.rb +223 -0
  74. data/lib/mx-platform-ruby/models/tag_update_request_body.rb +218 -0
  75. data/lib/mx-platform-ruby/models/tagging.rb +254 -0
  76. data/lib/mx-platform-ruby/models/tagging_create_request.rb +237 -0
  77. data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +218 -0
  78. data/lib/mx-platform-ruby/models/tagging_response_body.rb +218 -0
  79. data/lib/mx-platform-ruby/models/tagging_update_request.rb +223 -0
  80. data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +218 -0
  81. data/lib/mx-platform-ruby/models/taggings_response_body.rb +229 -0
  82. data/lib/mx-platform-ruby/models/tags_response_body.rb +229 -0
  83. data/lib/mx-platform-ruby/models/transaction.rb +533 -0
  84. data/lib/mx-platform-ruby/models/transaction_response_body.rb +218 -0
  85. data/lib/mx-platform-ruby/models/transaction_rule.rb +272 -0
  86. data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +246 -0
  87. data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +218 -0
  88. data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +218 -0
  89. data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +236 -0
  90. data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +218 -0
  91. data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +229 -0
  92. data/lib/mx-platform-ruby/models/transaction_update_request.rb +223 -0
  93. data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +218 -0
  94. data/lib/mx-platform-ruby/models/transactions_response_body.rb +229 -0
  95. data/lib/mx-platform-ruby/models/user.rb +254 -0
  96. data/lib/mx-platform-ruby/models/user_create_request.rb +245 -0
  97. data/lib/mx-platform-ruby/models/user_create_request_body.rb +218 -0
  98. data/lib/mx-platform-ruby/models/user_response_body.rb +218 -0
  99. data/lib/mx-platform-ruby/models/user_update_request.rb +245 -0
  100. data/lib/mx-platform-ruby/models/user_update_request_body.rb +218 -0
  101. data/lib/mx-platform-ruby/models/users_response_body.rb +229 -0
  102. data/lib/mx-platform-ruby/models/widget.rb +236 -0
  103. data/lib/mx-platform-ruby/models/widget_request.rb +331 -0
  104. data/lib/mx-platform-ruby/models/widget_request_body.rb +218 -0
  105. data/lib/mx-platform-ruby/models/widget_response_body.rb +218 -0
  106. data/lib/mx-platform-ruby/version.rb +13 -3
  107. data/mx-platform-ruby.gemspec +34 -27
  108. data/openapi/mx_platform_ruby.yml +11 -0
  109. data/spec/api/mx_platform_api_spec.rb +979 -0
  110. data/spec/api_client_spec.rb +188 -0
  111. data/spec/configuration_spec.rb +42 -0
  112. data/spec/models/account_number_spec.rb +76 -0
  113. data/spec/models/account_numbers_response_body_spec.rb +40 -0
  114. data/spec/models/account_owner_spec.rb +100 -0
  115. data/spec/models/account_owners_response_body_spec.rb +40 -0
  116. data/spec/models/account_response_body_spec.rb +34 -0
  117. data/spec/models/account_spec.rb +268 -0
  118. data/spec/models/account_update_request_body_spec.rb +34 -0
  119. data/spec/models/account_update_request_spec.rb +34 -0
  120. data/spec/models/accounts_response_body_spec.rb +40 -0
  121. data/spec/models/categories_response_body_spec.rb +40 -0
  122. data/spec/models/category_create_request_body_spec.rb +34 -0
  123. data/spec/models/category_create_request_spec.rb +46 -0
  124. data/spec/models/category_response_body_spec.rb +34 -0
  125. data/spec/models/category_spec.rb +76 -0
  126. data/spec/models/category_update_request_body_spec.rb +34 -0
  127. data/spec/models/category_update_request_spec.rb +40 -0
  128. data/spec/models/challenge_image_options_spec.rb +46 -0
  129. data/spec/models/challenge_options_spec.rb +40 -0
  130. data/spec/models/challenge_spec.rb +70 -0
  131. data/spec/models/challenges_response_body_spec.rb +40 -0
  132. data/spec/models/connect_widget_request_body_spec.rb +34 -0
  133. data/spec/models/connect_widget_request_spec.rb +94 -0
  134. data/spec/models/connect_widget_response_body_spec.rb +34 -0
  135. data/spec/models/connect_widget_spec.rb +40 -0
  136. data/spec/models/credential_request_spec.rb +40 -0
  137. data/spec/models/credential_spec.rb +58 -0
  138. data/spec/models/credentials_response_body_spec.rb +40 -0
  139. data/spec/models/enhance_transaction_spec.rb +124 -0
  140. data/spec/models/enhance_transactions_request_body_spec.rb +34 -0
  141. data/spec/models/enhance_transactions_request_spec.rb +58 -0
  142. data/spec/models/enhance_transactions_response_body_spec.rb +34 -0
  143. data/spec/models/holding_response_body_spec.rb +34 -0
  144. data/spec/models/holding_spec.rb +136 -0
  145. data/spec/models/holdings_response_body_spec.rb +40 -0
  146. data/spec/models/inline_response200_spec.rb +34 -0
  147. data/spec/models/institution_response_body_spec.rb +34 -0
  148. data/spec/models/institution_spec.rb +88 -0
  149. data/spec/models/institutions_response_body_spec.rb +40 -0
  150. data/spec/models/member_create_request_body_spec.rb +46 -0
  151. data/spec/models/member_create_request_spec.rb +70 -0
  152. data/spec/models/member_response_body_spec.rb +34 -0
  153. data/spec/models/member_resume_request_body_spec.rb +34 -0
  154. data/spec/models/member_resume_request_spec.rb +34 -0
  155. data/spec/models/member_spec.rb +100 -0
  156. data/spec/models/member_status_response_body_spec.rb +34 -0
  157. data/spec/models/member_status_spec.rb +82 -0
  158. data/spec/models/member_update_request_body_spec.rb +34 -0
  159. data/spec/models/member_update_request_spec.rb +58 -0
  160. data/spec/models/members_response_body_spec.rb +40 -0
  161. data/spec/models/merchant_response_body_spec.rb +34 -0
  162. data/spec/models/merchant_spec.rb +64 -0
  163. data/spec/models/merchants_response_body_spec.rb +40 -0
  164. data/spec/models/o_auth_window_response_body_spec.rb +34 -0
  165. data/spec/models/o_auth_window_spec.rb +40 -0
  166. data/spec/models/pagination_spec.rb +52 -0
  167. data/spec/models/statement_response_body_spec.rb +34 -0
  168. data/spec/models/statement_spec.rb +76 -0
  169. data/spec/models/statements_response_body_spec.rb +40 -0
  170. data/spec/models/tag_create_request_body_spec.rb +34 -0
  171. data/spec/models/tag_create_request_spec.rb +34 -0
  172. data/spec/models/tag_response_body_spec.rb +34 -0
  173. data/spec/models/tag_spec.rb +46 -0
  174. data/spec/models/tag_update_request_body_spec.rb +34 -0
  175. data/spec/models/tag_update_request_spec.rb +34 -0
  176. data/spec/models/tagging_create_request_body_spec.rb +34 -0
  177. data/spec/models/tagging_create_request_spec.rb +40 -0
  178. data/spec/models/tagging_response_body_spec.rb +34 -0
  179. data/spec/models/tagging_spec.rb +58 -0
  180. data/spec/models/tagging_update_request_body_spec.rb +34 -0
  181. data/spec/models/tagging_update_request_spec.rb +34 -0
  182. data/spec/models/taggings_response_body_spec.rb +40 -0
  183. data/spec/models/tags_response_body_spec.rb +40 -0
  184. data/spec/models/transaction_response_body_spec.rb +34 -0
  185. data/spec/models/transaction_rule_create_request_body_spec.rb +34 -0
  186. data/spec/models/transaction_rule_create_request_spec.rb +46 -0
  187. data/spec/models/transaction_rule_response_body_spec.rb +34 -0
  188. data/spec/models/transaction_rule_spec.rb +70 -0
  189. data/spec/models/transaction_rule_update_request_body_spec.rb +34 -0
  190. data/spec/models/transaction_rule_update_request_spec.rb +46 -0
  191. data/spec/models/transaction_rules_response_body_spec.rb +40 -0
  192. data/spec/models/transaction_spec.rb +244 -0
  193. data/spec/models/transaction_update_request_body_spec.rb +34 -0
  194. data/spec/models/transaction_update_request_spec.rb +34 -0
  195. data/spec/models/transactions_response_body_spec.rb +40 -0
  196. data/spec/models/user_create_request_body_spec.rb +34 -0
  197. data/spec/models/user_create_request_spec.rb +52 -0
  198. data/spec/models/user_response_body_spec.rb +34 -0
  199. data/spec/models/user_spec.rb +58 -0
  200. data/spec/models/user_update_request_body_spec.rb +34 -0
  201. data/spec/models/user_update_request_spec.rb +52 -0
  202. data/spec/models/users_response_body_spec.rb +40 -0
  203. data/spec/models/widget_request_body_spec.rb +34 -0
  204. data/spec/models/widget_request_spec.rb +106 -0
  205. data/spec/models/widget_response_body_spec.rb +34 -0
  206. data/spec/models/widget_spec.rb +46 -0
  207. data/spec/spec_helper.rb +100 -13
  208. metadata +317 -144
  209. data/.github/workflows/test.yml +0 -20
  210. data/.gitignore +0 -13
  211. data/.rubocop.yml +0 -44
  212. data/lib/mx-platform-ruby/account.rb +0 -107
  213. data/lib/mx-platform-ruby/account_number.rb +0 -57
  214. data/lib/mx-platform-ruby/account_owner.rb +0 -42
  215. data/lib/mx-platform-ruby/category.rb +0 -127
  216. data/lib/mx-platform-ruby/challenge.rb +0 -37
  217. data/lib/mx-platform-ruby/client.rb +0 -59
  218. data/lib/mx-platform-ruby/connect_widget.rb +0 -43
  219. data/lib/mx-platform-ruby/credential.rb +0 -54
  220. data/lib/mx-platform-ruby/enhanced_transaction.rb +0 -44
  221. data/lib/mx-platform-ruby/error.rb +0 -6
  222. data/lib/mx-platform-ruby/holding.rb +0 -87
  223. data/lib/mx-platform-ruby/institution.rb +0 -78
  224. data/lib/mx-platform-ruby/member.rb +0 -242
  225. data/lib/mx-platform-ruby/member_status.rb +0 -35
  226. data/lib/mx-platform-ruby/merchant.rb +0 -52
  227. data/lib/mx-platform-ruby/oauth_window.rb +0 -32
  228. data/lib/mx-platform-ruby/pageable.rb +0 -29
  229. data/lib/mx-platform-ruby/statement.rb +0 -70
  230. data/lib/mx-platform-ruby/tag.rb +0 -104
  231. data/lib/mx-platform-ruby/tagging.rb +0 -107
  232. data/lib/mx-platform-ruby/transaction.rb +0 -162
  233. data/lib/mx-platform-ruby/transaction_rule.rb +0 -112
  234. data/lib/mx-platform-ruby/user.rb +0 -112
  235. data/lib/mx-platform-ruby/widget.rb +0 -49
  236. data/spec/lib/mx-platform-ruby/account_number_spec.rb +0 -100
  237. data/spec/lib/mx-platform-ruby/account_owner_spec.rb +0 -71
  238. data/spec/lib/mx-platform-ruby/account_spec.rb +0 -267
  239. data/spec/lib/mx-platform-ruby/category_spec.rb +0 -244
  240. data/spec/lib/mx-platform-ruby/challenge_spec.rb +0 -72
  241. data/spec/lib/mx-platform-ruby/client_spec.rb +0 -101
  242. data/spec/lib/mx-platform-ruby/connect_widget_spec.rb +0 -66
  243. data/spec/lib/mx-platform-ruby/credential_spec.rb +0 -90
  244. data/spec/lib/mx-platform-ruby/enhanced_transaction_spec.rb +0 -89
  245. data/spec/lib/mx-platform-ruby/holding_spec.rb +0 -178
  246. data/spec/lib/mx-platform-ruby/institution_spec.rb +0 -141
  247. data/spec/lib/mx-platform-ruby/member_spec.rb +0 -557
  248. data/spec/lib/mx-platform-ruby/member_status_spec.rb +0 -76
  249. data/spec/lib/mx-platform-ruby/merchant_spec.rb +0 -89
  250. data/spec/lib/mx-platform-ruby/oauth_window_spec.rb +0 -47
  251. data/spec/lib/mx-platform-ruby/pageable_spec.rb +0 -75
  252. data/spec/lib/mx-platform-ruby/statement_spec.rb +0 -130
  253. data/spec/lib/mx-platform-ruby/tag_spec.rb +0 -179
  254. data/spec/lib/mx-platform-ruby/tagging_spec.rb +0 -191
  255. data/spec/lib/mx-platform-ruby/transaction_rule_spec.rb +0 -207
  256. data/spec/lib/mx-platform-ruby/transaction_spec.rb +0 -449
  257. data/spec/lib/mx-platform-ruby/user_spec.rb +0 -196
  258. data/spec/lib/mx-platform-ruby/widget_spec.rb +0 -76
  259. data/spec/lib/mx-platform-ruby_spec.rb +0 -15
  260. data/spec/sample.pdf +0 -0
@@ -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 Transaction
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::Transaction` 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::Transaction`. 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