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,245 @@
|
|
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 UserCreateRequest
|
18
|
+
attr_accessor :email
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :is_disabled
|
23
|
+
|
24
|
+
attr_accessor :metadata
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'email' => :'email',
|
30
|
+
:'id' => :'id',
|
31
|
+
:'is_disabled' => :'is_disabled',
|
32
|
+
:'metadata' => :'metadata'
|
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
|
+
:'email' => :'String',
|
45
|
+
:'id' => :'String',
|
46
|
+
:'is_disabled' => :'Boolean',
|
47
|
+
:'metadata' => :'String'
|
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::UserCreateRequest` 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::UserCreateRequest`. 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?(:'email')
|
73
|
+
self.email = attributes[:'email']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'id')
|
77
|
+
self.id = attributes[:'id']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'is_disabled')
|
81
|
+
self.is_disabled = attributes[:'is_disabled']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'metadata')
|
85
|
+
self.metadata = attributes[:'metadata']
|
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
|
+
email == o.email &&
|
108
|
+
id == o.id &&
|
109
|
+
is_disabled == o.is_disabled &&
|
110
|
+
metadata == o.metadata
|
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
|
+
[email, id, is_disabled, metadata].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
|
@@ -0,0 +1,218 @@
|
|
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 UserCreateRequestBody
|
18
|
+
attr_accessor :user
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'user' => :'user'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'user' => :'UserCreateRequest'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::UserCreateRequestBody` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::UserCreateRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'user')
|
61
|
+
self.user = attributes[:'user']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
user == o.user
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[user].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
112
|
+
self.send("#{key}=", nil)
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = MxPlatformRuby.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|