mx-platform-ruby 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -2
- data/Gemfile.lock +84 -0
- data/README.md +236 -33
- data/Rakefile +8 -9
- data/lib/mx-platform-ruby.rb +126 -35
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +4917 -0
- data/lib/mx-platform-ruby/api_client.rb +395 -0
- data/lib/mx-platform-ruby/api_error.rb +57 -0
- data/lib/mx-platform-ruby/configuration.rb +276 -0
- data/lib/mx-platform-ruby/models/account.rb +569 -0
- data/lib/mx-platform-ruby/models/account_number.rb +281 -0
- data/lib/mx-platform-ruby/models/account_numbers_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/account_owner.rb +317 -0
- data/lib/mx-platform-ruby/models/account_owners_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/account_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/account_update_request.rb +218 -0
- data/lib/mx-platform-ruby/models/account_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/accounts_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/categories_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/category.rb +281 -0
- data/lib/mx-platform-ruby/models/category_create_request.rb +241 -0
- data/lib/mx-platform-ruby/models/category_create_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/category_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/category_update_request.rb +227 -0
- data/lib/mx-platform-ruby/models/category_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/challenge.rb +276 -0
- data/lib/mx-platform-ruby/models/challenge_image_options.rb +236 -0
- data/lib/mx-platform-ruby/models/challenge_options.rb +227 -0
- data/lib/mx-platform-ruby/models/challenges_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/connect_widget.rb +227 -0
- data/lib/mx-platform-ruby/models/connect_widget_request.rb +308 -0
- data/lib/mx-platform-ruby/models/connect_widget_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/connect_widget_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/credential.rb +254 -0
- data/lib/mx-platform-ruby/models/credential_request.rb +227 -0
- data/lib/mx-platform-ruby/models/credentials_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/enhance_transaction.rb +353 -0
- data/lib/mx-platform-ruby/models/enhance_transactions_request.rb +264 -0
- data/lib/mx-platform-ruby/models/enhance_transactions_request_body.rb +220 -0
- data/lib/mx-platform-ruby/models/enhance_transactions_response_body.rb +220 -0
- data/lib/mx-platform-ruby/models/holding.rb +371 -0
- data/lib/mx-platform-ruby/models/holding_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/holdings_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/inline_response200.rb +218 -0
- data/lib/mx-platform-ruby/models/institution.rb +299 -0
- data/lib/mx-platform-ruby/models/institution_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/institutions_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/member.rb +317 -0
- data/lib/mx-platform-ruby/models/member_create_request.rb +284 -0
- data/lib/mx-platform-ruby/models/member_create_request_body.rb +236 -0
- data/lib/mx-platform-ruby/models/member_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/member_resume_request.rb +220 -0
- data/lib/mx-platform-ruby/models/member_resume_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/member_status.rb +292 -0
- data/lib/mx-platform-ruby/models/member_status_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/member_update_request.rb +256 -0
- data/lib/mx-platform-ruby/models/member_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/members_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/merchant.rb +263 -0
- data/lib/mx-platform-ruby/models/merchant_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/merchants_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/o_auth_window.rb +227 -0
- data/lib/mx-platform-ruby/models/o_auth_window_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/pagination.rb +245 -0
- data/lib/mx-platform-ruby/models/statement.rb +281 -0
- data/lib/mx-platform-ruby/models/statement_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/statements_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/tag.rb +236 -0
- data/lib/mx-platform-ruby/models/tag_create_request.rb +223 -0
- data/lib/mx-platform-ruby/models/tag_create_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/tag_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/tag_update_request.rb +223 -0
- data/lib/mx-platform-ruby/models/tag_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/tagging.rb +254 -0
- data/lib/mx-platform-ruby/models/tagging_create_request.rb +237 -0
- data/lib/mx-platform-ruby/models/tagging_create_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/tagging_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/tagging_update_request.rb +223 -0
- data/lib/mx-platform-ruby/models/tagging_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/taggings_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/tags_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/transaction.rb +533 -0
- data/lib/mx-platform-ruby/models/transaction_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/transaction_rule.rb +272 -0
- data/lib/mx-platform-ruby/models/transaction_rule_create_request.rb +246 -0
- data/lib/mx-platform-ruby/models/transaction_rule_create_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/transaction_rule_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/transaction_rule_update_request.rb +236 -0
- data/lib/mx-platform-ruby/models/transaction_rule_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/transaction_rules_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/transaction_update_request.rb +223 -0
- data/lib/mx-platform-ruby/models/transaction_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/transactions_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/user.rb +254 -0
- data/lib/mx-platform-ruby/models/user_create_request.rb +245 -0
- data/lib/mx-platform-ruby/models/user_create_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/user_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/user_update_request.rb +245 -0
- data/lib/mx-platform-ruby/models/user_update_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/users_response_body.rb +229 -0
- data/lib/mx-platform-ruby/models/widget.rb +236 -0
- data/lib/mx-platform-ruby/models/widget_request.rb +331 -0
- data/lib/mx-platform-ruby/models/widget_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/widget_response_body.rb +218 -0
- data/lib/mx-platform-ruby/version.rb +13 -3
- data/mx-platform-ruby.gemspec +34 -27
- data/openapi/mx_platform_ruby.yml +11 -0
- data/spec/api/mx_platform_api_spec.rb +979 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_number_spec.rb +76 -0
- data/spec/models/account_numbers_response_body_spec.rb +40 -0
- data/spec/models/account_owner_spec.rb +100 -0
- data/spec/models/account_owners_response_body_spec.rb +40 -0
- data/spec/models/account_response_body_spec.rb +34 -0
- data/spec/models/account_spec.rb +268 -0
- data/spec/models/account_update_request_body_spec.rb +34 -0
- data/spec/models/account_update_request_spec.rb +34 -0
- data/spec/models/accounts_response_body_spec.rb +40 -0
- data/spec/models/categories_response_body_spec.rb +40 -0
- data/spec/models/category_create_request_body_spec.rb +34 -0
- data/spec/models/category_create_request_spec.rb +46 -0
- data/spec/models/category_response_body_spec.rb +34 -0
- data/spec/models/category_spec.rb +76 -0
- data/spec/models/category_update_request_body_spec.rb +34 -0
- data/spec/models/category_update_request_spec.rb +40 -0
- data/spec/models/challenge_image_options_spec.rb +46 -0
- data/spec/models/challenge_options_spec.rb +40 -0
- data/spec/models/challenge_spec.rb +70 -0
- data/spec/models/challenges_response_body_spec.rb +40 -0
- data/spec/models/connect_widget_request_body_spec.rb +34 -0
- data/spec/models/connect_widget_request_spec.rb +94 -0
- data/spec/models/connect_widget_response_body_spec.rb +34 -0
- data/spec/models/connect_widget_spec.rb +40 -0
- data/spec/models/credential_request_spec.rb +40 -0
- data/spec/models/credential_spec.rb +58 -0
- data/spec/models/credentials_response_body_spec.rb +40 -0
- data/spec/models/enhance_transaction_spec.rb +124 -0
- data/spec/models/enhance_transactions_request_body_spec.rb +34 -0
- data/spec/models/enhance_transactions_request_spec.rb +58 -0
- data/spec/models/enhance_transactions_response_body_spec.rb +34 -0
- data/spec/models/holding_response_body_spec.rb +34 -0
- data/spec/models/holding_spec.rb +136 -0
- data/spec/models/holdings_response_body_spec.rb +40 -0
- data/spec/models/inline_response200_spec.rb +34 -0
- data/spec/models/institution_response_body_spec.rb +34 -0
- data/spec/models/institution_spec.rb +88 -0
- data/spec/models/institutions_response_body_spec.rb +40 -0
- data/spec/models/member_create_request_body_spec.rb +46 -0
- data/spec/models/member_create_request_spec.rb +70 -0
- data/spec/models/member_response_body_spec.rb +34 -0
- data/spec/models/member_resume_request_body_spec.rb +34 -0
- data/spec/models/member_resume_request_spec.rb +34 -0
- data/spec/models/member_spec.rb +100 -0
- data/spec/models/member_status_response_body_spec.rb +34 -0
- data/spec/models/member_status_spec.rb +82 -0
- data/spec/models/member_update_request_body_spec.rb +34 -0
- data/spec/models/member_update_request_spec.rb +58 -0
- data/spec/models/members_response_body_spec.rb +40 -0
- data/spec/models/merchant_response_body_spec.rb +34 -0
- data/spec/models/merchant_spec.rb +64 -0
- data/spec/models/merchants_response_body_spec.rb +40 -0
- data/spec/models/o_auth_window_response_body_spec.rb +34 -0
- data/spec/models/o_auth_window_spec.rb +40 -0
- data/spec/models/pagination_spec.rb +52 -0
- data/spec/models/statement_response_body_spec.rb +34 -0
- data/spec/models/statement_spec.rb +76 -0
- data/spec/models/statements_response_body_spec.rb +40 -0
- data/spec/models/tag_create_request_body_spec.rb +34 -0
- data/spec/models/tag_create_request_spec.rb +34 -0
- data/spec/models/tag_response_body_spec.rb +34 -0
- data/spec/models/tag_spec.rb +46 -0
- data/spec/models/tag_update_request_body_spec.rb +34 -0
- data/spec/models/tag_update_request_spec.rb +34 -0
- data/spec/models/tagging_create_request_body_spec.rb +34 -0
- data/spec/models/tagging_create_request_spec.rb +40 -0
- data/spec/models/tagging_response_body_spec.rb +34 -0
- data/spec/models/tagging_spec.rb +58 -0
- data/spec/models/tagging_update_request_body_spec.rb +34 -0
- data/spec/models/tagging_update_request_spec.rb +34 -0
- data/spec/models/taggings_response_body_spec.rb +40 -0
- data/spec/models/tags_response_body_spec.rb +40 -0
- data/spec/models/transaction_response_body_spec.rb +34 -0
- data/spec/models/transaction_rule_create_request_body_spec.rb +34 -0
- data/spec/models/transaction_rule_create_request_spec.rb +46 -0
- data/spec/models/transaction_rule_response_body_spec.rb +34 -0
- data/spec/models/transaction_rule_spec.rb +70 -0
- data/spec/models/transaction_rule_update_request_body_spec.rb +34 -0
- data/spec/models/transaction_rule_update_request_spec.rb +46 -0
- data/spec/models/transaction_rules_response_body_spec.rb +40 -0
- data/spec/models/transaction_spec.rb +244 -0
- data/spec/models/transaction_update_request_body_spec.rb +34 -0
- data/spec/models/transaction_update_request_spec.rb +34 -0
- data/spec/models/transactions_response_body_spec.rb +40 -0
- data/spec/models/user_create_request_body_spec.rb +34 -0
- data/spec/models/user_create_request_spec.rb +52 -0
- data/spec/models/user_response_body_spec.rb +34 -0
- data/spec/models/user_spec.rb +58 -0
- data/spec/models/user_update_request_body_spec.rb +34 -0
- data/spec/models/user_update_request_spec.rb +52 -0
- data/spec/models/users_response_body_spec.rb +40 -0
- data/spec/models/widget_request_body_spec.rb +34 -0
- data/spec/models/widget_request_spec.rb +106 -0
- data/spec/models/widget_response_body_spec.rb +34 -0
- data/spec/models/widget_spec.rb +46 -0
- data/spec/spec_helper.rb +100 -13
- metadata +317 -144
- data/.github/workflows/test.yml +0 -20
- data/.gitignore +0 -13
- data/.rubocop.yml +0 -44
- data/lib/mx-platform-ruby/account.rb +0 -107
- data/lib/mx-platform-ruby/account_number.rb +0 -57
- data/lib/mx-platform-ruby/account_owner.rb +0 -42
- data/lib/mx-platform-ruby/category.rb +0 -127
- data/lib/mx-platform-ruby/challenge.rb +0 -37
- data/lib/mx-platform-ruby/client.rb +0 -59
- data/lib/mx-platform-ruby/connect_widget.rb +0 -43
- data/lib/mx-platform-ruby/credential.rb +0 -54
- data/lib/mx-platform-ruby/enhanced_transaction.rb +0 -44
- data/lib/mx-platform-ruby/error.rb +0 -6
- data/lib/mx-platform-ruby/holding.rb +0 -87
- data/lib/mx-platform-ruby/institution.rb +0 -78
- data/lib/mx-platform-ruby/member.rb +0 -242
- data/lib/mx-platform-ruby/member_status.rb +0 -35
- data/lib/mx-platform-ruby/merchant.rb +0 -52
- data/lib/mx-platform-ruby/oauth_window.rb +0 -32
- data/lib/mx-platform-ruby/pageable.rb +0 -29
- data/lib/mx-platform-ruby/statement.rb +0 -70
- data/lib/mx-platform-ruby/tag.rb +0 -104
- data/lib/mx-platform-ruby/tagging.rb +0 -107
- data/lib/mx-platform-ruby/transaction.rb +0 -162
- data/lib/mx-platform-ruby/transaction_rule.rb +0 -112
- data/lib/mx-platform-ruby/user.rb +0 -112
- data/lib/mx-platform-ruby/widget.rb +0 -49
- data/spec/lib/mx-platform-ruby/account_number_spec.rb +0 -100
- data/spec/lib/mx-platform-ruby/account_owner_spec.rb +0 -71
- data/spec/lib/mx-platform-ruby/account_spec.rb +0 -267
- data/spec/lib/mx-platform-ruby/category_spec.rb +0 -244
- data/spec/lib/mx-platform-ruby/challenge_spec.rb +0 -72
- data/spec/lib/mx-platform-ruby/client_spec.rb +0 -101
- data/spec/lib/mx-platform-ruby/connect_widget_spec.rb +0 -66
- data/spec/lib/mx-platform-ruby/credential_spec.rb +0 -90
- data/spec/lib/mx-platform-ruby/enhanced_transaction_spec.rb +0 -89
- data/spec/lib/mx-platform-ruby/holding_spec.rb +0 -178
- data/spec/lib/mx-platform-ruby/institution_spec.rb +0 -141
- data/spec/lib/mx-platform-ruby/member_spec.rb +0 -557
- data/spec/lib/mx-platform-ruby/member_status_spec.rb +0 -76
- data/spec/lib/mx-platform-ruby/merchant_spec.rb +0 -89
- data/spec/lib/mx-platform-ruby/oauth_window_spec.rb +0 -47
- data/spec/lib/mx-platform-ruby/pageable_spec.rb +0 -75
- data/spec/lib/mx-platform-ruby/statement_spec.rb +0 -130
- data/spec/lib/mx-platform-ruby/tag_spec.rb +0 -179
- data/spec/lib/mx-platform-ruby/tagging_spec.rb +0 -191
- data/spec/lib/mx-platform-ruby/transaction_rule_spec.rb +0 -207
- data/spec/lib/mx-platform-ruby/transaction_spec.rb +0 -449
- data/spec/lib/mx-platform-ruby/user_spec.rb +0 -196
- data/spec/lib/mx-platform-ruby/widget_spec.rb +0 -76
- data/spec/lib/mx-platform-ruby_spec.rb +0 -15
- data/spec/sample.pdf +0 -0
@@ -0,0 +1,229 @@
|
|
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 InstitutionsResponseBody
|
18
|
+
attr_accessor :institutions
|
19
|
+
|
20
|
+
attr_accessor :pagination
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'institutions' => :'institutions',
|
26
|
+
:'pagination' => :'pagination'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'institutions' => :'Array<Institution>',
|
39
|
+
:'pagination' => :'Pagination'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::InstitutionsResponseBody` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::InstitutionsResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'institutions')
|
65
|
+
if (value = attributes[:'institutions']).is_a?(Array)
|
66
|
+
self.institutions = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'pagination')
|
71
|
+
self.pagination = attributes[:'pagination']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
institutions == o.institutions &&
|
94
|
+
pagination == o.pagination
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[institutions, pagination].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.openapi_types.each_pair do |key, type|
|
122
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
123
|
+
self.send("#{key}=", nil)
|
124
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :Time
|
145
|
+
Time.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :Boolean
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
# models (e.g. Pet) or oneOf
|
176
|
+
klass = MxPlatformRuby.const_get(type)
|
177
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
@@ -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 Member
|
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::Member` 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::Member`. 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
|