mx-platform-ruby 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +29 -222
  4. data/docs/ChallengeResponse.md +2 -2
  5. data/docs/{ChallengeImageOptions.md → ImageOptionResponse.md} +2 -2
  6. data/docs/{ChallengeOptions.md → OptionResponse.md} +2 -2
  7. data/lib/mx-platform-ruby/models/challenge_response.rb +2 -2
  8. data/lib/mx-platform-ruby/models/{challenge_image_options.rb → image_option_response.rb} +3 -3
  9. data/lib/mx-platform-ruby/models/{challenge_options.rb → option_response.rb} +3 -3
  10. data/lib/mx-platform-ruby/version.rb +1 -1
  11. data/lib/mx-platform-ruby.rb +2 -2
  12. data/openapi/config.yml +1 -1
  13. data/openapi/templates/README.mustache +71 -0
  14. data/spec/models/{challenge_image_options_spec.rb → image_option_response_spec.rb} +6 -6
  15. data/spec/models/{challenge_options_spec.rb → option_response_spec.rb} +6 -6
  16. metadata +88 -190
  17. data/docs/Account.md +0 -96
  18. data/docs/AccountNumber.md +0 -32
  19. data/docs/AccountOwner.md +0 -40
  20. data/docs/Category.md +0 -32
  21. data/docs/Challenge.md +0 -30
  22. data/docs/ChallengeResponseImageOptions.md +0 -22
  23. data/docs/ChallengeResponseOptions.md +0 -20
  24. data/docs/ConnectWidget.md +0 -20
  25. data/docs/Credential.md +0 -26
  26. data/docs/EnhanceTransaction.md +0 -48
  27. data/docs/Holding.md +0 -52
  28. data/docs/InlineResponse200.md +0 -18
  29. data/docs/Institution.md +0 -36
  30. data/docs/Member.md +0 -40
  31. data/docs/MemberStatus.md +0 -34
  32. data/docs/Merchant.md +0 -28
  33. data/docs/OAuthWindow.md +0 -20
  34. data/docs/Pagination.md +0 -24
  35. data/docs/Statement.md +0 -32
  36. data/docs/Tag.md +0 -22
  37. data/docs/Tagging.md +0 -26
  38. data/docs/Transaction.md +0 -88
  39. data/docs/TransactionRule.md +0 -30
  40. data/docs/User.md +0 -26
  41. data/docs/Widget.md +0 -22
  42. data/lib/mx-platform-ruby/models/account.rb +0 -569
  43. data/lib/mx-platform-ruby/models/account_number.rb +0 -281
  44. data/lib/mx-platform-ruby/models/account_owner.rb +0 -317
  45. data/lib/mx-platform-ruby/models/category.rb +0 -281
  46. data/lib/mx-platform-ruby/models/challenge.rb +0 -276
  47. data/lib/mx-platform-ruby/models/challenge_response_image_options.rb +0 -236
  48. data/lib/mx-platform-ruby/models/challenge_response_options.rb +0 -227
  49. data/lib/mx-platform-ruby/models/connect_widget.rb +0 -227
  50. data/lib/mx-platform-ruby/models/credential.rb +0 -254
  51. data/lib/mx-platform-ruby/models/enhance_transaction.rb +0 -353
  52. data/lib/mx-platform-ruby/models/holding.rb +0 -371
  53. data/lib/mx-platform-ruby/models/inline_response200.rb +0 -218
  54. data/lib/mx-platform-ruby/models/institution.rb +0 -299
  55. data/lib/mx-platform-ruby/models/member.rb +0 -317
  56. data/lib/mx-platform-ruby/models/member_status.rb +0 -292
  57. data/lib/mx-platform-ruby/models/merchant.rb +0 -263
  58. data/lib/mx-platform-ruby/models/o_auth_window.rb +0 -227
  59. data/lib/mx-platform-ruby/models/pagination.rb +0 -245
  60. data/lib/mx-platform-ruby/models/statement.rb +0 -281
  61. data/lib/mx-platform-ruby/models/tag.rb +0 -236
  62. data/lib/mx-platform-ruby/models/tagging.rb +0 -254
  63. data/lib/mx-platform-ruby/models/transaction.rb +0 -533
  64. data/lib/mx-platform-ruby/models/transaction_rule.rb +0 -272
  65. data/lib/mx-platform-ruby/models/user.rb +0 -254
  66. data/lib/mx-platform-ruby/models/widget.rb +0 -236
  67. data/openapi/mx_platform_ruby.yml +0 -11
  68. data/pkg/mx-platform-ruby-0.2.0.gem +0 -0
  69. data/pkg/mx-platform-ruby-0.2.1.gem +0 -0
  70. data/spec/models/account_number_spec.rb +0 -76
  71. data/spec/models/account_owner_spec.rb +0 -100
  72. data/spec/models/account_spec.rb +0 -268
  73. data/spec/models/category_spec.rb +0 -76
  74. data/spec/models/challenge_response_image_options_spec.rb +0 -46
  75. data/spec/models/challenge_response_options_spec.rb +0 -40
  76. data/spec/models/challenge_spec.rb +0 -70
  77. data/spec/models/connect_widget_spec.rb +0 -40
  78. data/spec/models/credential_spec.rb +0 -58
  79. data/spec/models/enhance_transaction_spec.rb +0 -124
  80. data/spec/models/holding_spec.rb +0 -136
  81. data/spec/models/inline_response200_spec.rb +0 -34
  82. data/spec/models/institution_spec.rb +0 -88
  83. data/spec/models/member_spec.rb +0 -100
  84. data/spec/models/member_status_spec.rb +0 -82
  85. data/spec/models/merchant_spec.rb +0 -64
  86. data/spec/models/o_auth_window_spec.rb +0 -40
  87. data/spec/models/pagination_spec.rb +0 -52
  88. data/spec/models/statement_spec.rb +0 -76
  89. data/spec/models/tag_spec.rb +0 -46
  90. data/spec/models/tagging_spec.rb +0 -58
  91. data/spec/models/transaction_rule_spec.rb +0 -70
  92. data/spec/models/transaction_spec.rb +0 -244
  93. data/spec/models/user_spec.rb +0 -58
  94. data/spec/models/widget_spec.rb +0 -46
@@ -1,245 +0,0 @@
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 Pagination
18
- attr_accessor :current_page
19
-
20
- attr_accessor :per_page
21
-
22
- attr_accessor :total_entries
23
-
24
- attr_accessor :total_pages
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'current_page' => :'current_page',
30
- :'per_page' => :'per_page',
31
- :'total_entries' => :'total_entries',
32
- :'total_pages' => :'total_pages'
33
- }
34
- end
35
-
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- attribute_map.values
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'current_page' => :'Integer',
45
- :'per_page' => :'Integer',
46
- :'total_entries' => :'Integer',
47
- :'total_pages' => :'Integer'
48
- }
49
- end
50
-
51
- # List of attributes with nullable: true
52
- def self.openapi_nullable
53
- Set.new([
54
- ])
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::Pagination` initialize method"
62
- end
63
-
64
- # check to see if the attribute exists and convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'current_page')
73
- self.current_page = attributes[:'current_page']
74
- end
75
-
76
- if attributes.key?(:'per_page')
77
- self.per_page = attributes[:'per_page']
78
- end
79
-
80
- if attributes.key?(:'total_entries')
81
- self.total_entries = attributes[:'total_entries']
82
- end
83
-
84
- if attributes.key?(:'total_pages')
85
- self.total_pages = attributes[:'total_pages']
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- invalid_properties = Array.new
93
- invalid_properties
94
- end
95
-
96
- # Check to see if the all the properties in the model are valid
97
- # @return true if the model is valid
98
- def valid?
99
- true
100
- end
101
-
102
- # Checks equality by comparing each attribute.
103
- # @param [Object] Object to be compared
104
- def ==(o)
105
- return true if self.equal?(o)
106
- self.class == o.class &&
107
- current_page == o.current_page &&
108
- per_page == o.per_page &&
109
- total_entries == o.total_entries &&
110
- total_pages == o.total_pages
111
- end
112
-
113
- # @see the `==` method
114
- # @param [Object] Object to be compared
115
- def eql?(o)
116
- self == o
117
- end
118
-
119
- # Calculates hash code according to all attributes.
120
- # @return [Integer] Hash code
121
- def hash
122
- [current_page, per_page, total_entries, total_pages].hash
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def self.build_from_hash(attributes)
129
- new.build_from_hash(attributes)
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def build_from_hash(attributes)
136
- return nil unless attributes.is_a?(Hash)
137
- self.class.openapi_types.each_pair do |key, type|
138
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
139
- self.send("#{key}=", nil)
140
- elsif type =~ /\AArray<(.*)>/i
141
- # check to ensure the input is an array given that the attribute
142
- # is documented as an array but the input is not
143
- if attributes[self.class.attribute_map[key]].is_a?(Array)
144
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
- end
146
- elsif !attributes[self.class.attribute_map[key]].nil?
147
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
- end
149
- end
150
-
151
- self
152
- end
153
-
154
- # Deserializes the data based on type
155
- # @param string type Data type
156
- # @param string value Value to be deserialized
157
- # @return [Object] Deserialized data
158
- def _deserialize(type, value)
159
- case type.to_sym
160
- when :Time
161
- Time.parse(value)
162
- when :Date
163
- Date.parse(value)
164
- when :String
165
- value.to_s
166
- when :Integer
167
- value.to_i
168
- when :Float
169
- value.to_f
170
- when :Boolean
171
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
- true
173
- else
174
- false
175
- end
176
- when :Object
177
- # generic object (usually a Hash), return directly
178
- value
179
- when /\AArray<(?<inner_type>.+)>\z/
180
- inner_type = Regexp.last_match[:inner_type]
181
- value.map { |v| _deserialize(inner_type, v) }
182
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
- k_type = Regexp.last_match[:k_type]
184
- v_type = Regexp.last_match[:v_type]
185
- {}.tap do |hash|
186
- value.each do |k, v|
187
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
- end
189
- end
190
- else # model
191
- # models (e.g. Pet) or oneOf
192
- klass = MxPlatformRuby.const_get(type)
193
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
- end
195
- end
196
-
197
- # Returns the string representation of the object
198
- # @return [String] String presentation of the object
199
- def to_s
200
- to_hash.to_s
201
- end
202
-
203
- # to_body is an alias to to_hash (backward compatibility)
204
- # @return [Hash] Returns the object in the form of hash
205
- def to_body
206
- to_hash
207
- end
208
-
209
- # Returns the object in the form of hash
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_hash
212
- hash = {}
213
- self.class.attribute_map.each_pair do |attr, param|
214
- value = self.send(attr)
215
- if value.nil?
216
- is_nullable = self.class.openapi_nullable.include?(attr)
217
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
- end
219
-
220
- hash[param] = _to_hash(value)
221
- end
222
- hash
223
- end
224
-
225
- # Outputs non-array value in the form of hash
226
- # For object, use to_hash. Otherwise, just return the value
227
- # @param [Object] value Any valid value
228
- # @return [Hash] Returns the value in the form of hash
229
- def _to_hash(value)
230
- if value.is_a?(Array)
231
- value.compact.map { |v| _to_hash(v) }
232
- elsif value.is_a?(Hash)
233
- {}.tap do |hash|
234
- value.each { |k, v| hash[k] = _to_hash(v) }
235
- end
236
- elsif value.respond_to? :to_hash
237
- value.to_hash
238
- else
239
- value
240
- end
241
- end
242
-
243
- end
244
-
245
- end
@@ -1,281 +0,0 @@
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 Statement
18
- attr_accessor :account_guid
19
-
20
- attr_accessor :content_hash
21
-
22
- attr_accessor :created_at
23
-
24
- attr_accessor :guid
25
-
26
- attr_accessor :member_guid
27
-
28
- attr_accessor :updated_at
29
-
30
- attr_accessor :uri
31
-
32
- attr_accessor :user_guid
33
-
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- def self.attribute_map
36
- {
37
- :'account_guid' => :'account_guid',
38
- :'content_hash' => :'content_hash',
39
- :'created_at' => :'created_at',
40
- :'guid' => :'guid',
41
- :'member_guid' => :'member_guid',
42
- :'updated_at' => :'updated_at',
43
- :'uri' => :'uri',
44
- :'user_guid' => :'user_guid'
45
- }
46
- end
47
-
48
- # Returns all the JSON keys this model knows about
49
- def self.acceptable_attributes
50
- attribute_map.values
51
- end
52
-
53
- # Attribute type mapping.
54
- def self.openapi_types
55
- {
56
- :'account_guid' => :'String',
57
- :'content_hash' => :'String',
58
- :'created_at' => :'String',
59
- :'guid' => :'String',
60
- :'member_guid' => :'String',
61
- :'updated_at' => :'String',
62
- :'uri' => :'String',
63
- :'user_guid' => :'String'
64
- }
65
- end
66
-
67
- # List of attributes with nullable: true
68
- def self.openapi_nullable
69
- Set.new([
70
- ])
71
- end
72
-
73
- # Initializes the object
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- def initialize(attributes = {})
76
- if (!attributes.is_a?(Hash))
77
- fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::Statement` initialize method"
78
- end
79
-
80
- # check to see if the attribute exists and convert string to symbol for hash key
81
- attributes = attributes.each_with_object({}) { |(k, v), h|
82
- if (!self.class.attribute_map.key?(k.to_sym))
83
- fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::Statement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
- end
85
- h[k.to_sym] = v
86
- }
87
-
88
- if attributes.key?(:'account_guid')
89
- self.account_guid = attributes[:'account_guid']
90
- end
91
-
92
- if attributes.key?(:'content_hash')
93
- self.content_hash = attributes[:'content_hash']
94
- end
95
-
96
- if attributes.key?(:'created_at')
97
- self.created_at = attributes[:'created_at']
98
- end
99
-
100
- if attributes.key?(:'guid')
101
- self.guid = attributes[:'guid']
102
- end
103
-
104
- if attributes.key?(:'member_guid')
105
- self.member_guid = attributes[:'member_guid']
106
- end
107
-
108
- if attributes.key?(:'updated_at')
109
- self.updated_at = attributes[:'updated_at']
110
- end
111
-
112
- if attributes.key?(:'uri')
113
- self.uri = attributes[:'uri']
114
- end
115
-
116
- if attributes.key?(:'user_guid')
117
- self.user_guid = attributes[:'user_guid']
118
- end
119
- end
120
-
121
- # Show invalid properties with the reasons. Usually used together with valid?
122
- # @return Array for valid properties with the reasons
123
- def list_invalid_properties
124
- invalid_properties = Array.new
125
- invalid_properties
126
- end
127
-
128
- # Check to see if the all the properties in the model are valid
129
- # @return true if the model is valid
130
- def valid?
131
- true
132
- end
133
-
134
- # Checks equality by comparing each attribute.
135
- # @param [Object] Object to be compared
136
- def ==(o)
137
- return true if self.equal?(o)
138
- self.class == o.class &&
139
- account_guid == o.account_guid &&
140
- content_hash == o.content_hash &&
141
- created_at == o.created_at &&
142
- guid == o.guid &&
143
- member_guid == o.member_guid &&
144
- updated_at == o.updated_at &&
145
- uri == o.uri &&
146
- user_guid == o.user_guid
147
- end
148
-
149
- # @see the `==` method
150
- # @param [Object] Object to be compared
151
- def eql?(o)
152
- self == o
153
- end
154
-
155
- # Calculates hash code according to all attributes.
156
- # @return [Integer] Hash code
157
- def hash
158
- [account_guid, content_hash, created_at, guid, member_guid, updated_at, uri, user_guid].hash
159
- end
160
-
161
- # Builds the object from hash
162
- # @param [Hash] attributes Model attributes in the form of hash
163
- # @return [Object] Returns the model itself
164
- def self.build_from_hash(attributes)
165
- new.build_from_hash(attributes)
166
- end
167
-
168
- # Builds the object from hash
169
- # @param [Hash] attributes Model attributes in the form of hash
170
- # @return [Object] Returns the model itself
171
- def build_from_hash(attributes)
172
- return nil unless attributes.is_a?(Hash)
173
- self.class.openapi_types.each_pair do |key, type|
174
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
- self.send("#{key}=", nil)
176
- elsif type =~ /\AArray<(.*)>/i
177
- # check to ensure the input is an array given that the attribute
178
- # is documented as an array but the input is not
179
- if attributes[self.class.attribute_map[key]].is_a?(Array)
180
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
181
- end
182
- elsif !attributes[self.class.attribute_map[key]].nil?
183
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
- end
185
- end
186
-
187
- self
188
- end
189
-
190
- # Deserializes the data based on type
191
- # @param string type Data type
192
- # @param string value Value to be deserialized
193
- # @return [Object] Deserialized data
194
- def _deserialize(type, value)
195
- case type.to_sym
196
- when :Time
197
- Time.parse(value)
198
- when :Date
199
- Date.parse(value)
200
- when :String
201
- value.to_s
202
- when :Integer
203
- value.to_i
204
- when :Float
205
- value.to_f
206
- when :Boolean
207
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
- true
209
- else
210
- false
211
- end
212
- when :Object
213
- # generic object (usually a Hash), return directly
214
- value
215
- when /\AArray<(?<inner_type>.+)>\z/
216
- inner_type = Regexp.last_match[:inner_type]
217
- value.map { |v| _deserialize(inner_type, v) }
218
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
- k_type = Regexp.last_match[:k_type]
220
- v_type = Regexp.last_match[:v_type]
221
- {}.tap do |hash|
222
- value.each do |k, v|
223
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
- end
225
- end
226
- else # model
227
- # models (e.g. Pet) or oneOf
228
- klass = MxPlatformRuby.const_get(type)
229
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
230
- end
231
- end
232
-
233
- # Returns the string representation of the object
234
- # @return [String] String presentation of the object
235
- def to_s
236
- to_hash.to_s
237
- end
238
-
239
- # to_body is an alias to to_hash (backward compatibility)
240
- # @return [Hash] Returns the object in the form of hash
241
- def to_body
242
- to_hash
243
- end
244
-
245
- # Returns the object in the form of hash
246
- # @return [Hash] Returns the object in the form of hash
247
- def to_hash
248
- hash = {}
249
- self.class.attribute_map.each_pair do |attr, param|
250
- value = self.send(attr)
251
- if value.nil?
252
- is_nullable = self.class.openapi_nullable.include?(attr)
253
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
- end
255
-
256
- hash[param] = _to_hash(value)
257
- end
258
- hash
259
- end
260
-
261
- # Outputs non-array value in the form of hash
262
- # For object, use to_hash. Otherwise, just return the value
263
- # @param [Object] value Any valid value
264
- # @return [Hash] Returns the value in the form of hash
265
- def _to_hash(value)
266
- if value.is_a?(Array)
267
- value.compact.map { |v| _to_hash(v) }
268
- elsif value.is_a?(Hash)
269
- {}.tap do |hash|
270
- value.each { |k, v| hash[k] = _to_hash(v) }
271
- end
272
- elsif value.respond_to? :to_hash
273
- value.to_hash
274
- else
275
- value
276
- end
277
- end
278
-
279
- end
280
-
281
- end