budgea_client 1.4.4 → 2.0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +67 -725
- data/budgea_client.gemspec +15 -3
- data/budgea_openapi.json +2011 -524
- data/docs/Account.md +3 -1
- data/docs/AccountLog.md +2 -2
- data/docs/AdministrationApi.md +354 -34
- data/docs/AuthenticationApi.md +264 -18
- data/docs/BankCategory.md +1 -1
- data/docs/BanksApi.md +939 -550
- data/docs/Certificate.md +12 -0
- data/docs/Client.md +5 -2
- data/docs/Connection.md +1 -1
- data/docs/ConnectionLog.md +3 -2
- data/docs/ConnectionsApi.md +162 -103
- data/docs/Connector.md +21 -0
- data/docs/ConnectorCategory.md +9 -0
- data/docs/ConnectorLogo.md +1 -1
- data/docs/Currency.md +4 -0
- data/docs/DocumentsApi.md +350 -350
- data/docs/Field.md +3 -2
- data/docs/InlineResponse20010.md +1 -1
- data/docs/InlineResponse20011.md +1 -1
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +1 -1
- data/docs/InlineResponse20014.md +1 -1
- data/docs/InlineResponse20015.md +1 -1
- data/docs/InlineResponse20016.md +1 -1
- data/docs/InlineResponse20017.md +1 -1
- data/docs/InlineResponse20018.md +1 -1
- data/docs/InlineResponse20019.md +1 -1
- data/docs/InlineResponse20020.md +1 -1
- data/docs/InlineResponse20021.md +1 -1
- data/docs/InlineResponse20022.md +1 -1
- data/docs/InlineResponse20023.md +1 -1
- data/docs/InlineResponse20024.md +1 -1
- data/docs/InlineResponse20025.md +1 -1
- data/docs/InlineResponse20026.md +1 -1
- data/docs/InlineResponse20027.md +1 -1
- data/docs/InlineResponse20028.md +1 -1
- data/docs/InlineResponse20029.md +1 -1
- data/docs/InlineResponse2003.md +2 -3
- data/docs/InlineResponse20030.md +1 -1
- data/docs/InlineResponse20031.md +1 -1
- data/docs/InlineResponse20032.md +1 -1
- data/docs/InlineResponse20033.md +1 -1
- data/docs/InlineResponse20034.md +8 -0
- data/docs/InlineResponse20035.md +8 -0
- data/docs/InlineResponse20036.md +8 -0
- data/docs/InlineResponse2004.md +0 -2
- data/docs/InlineResponse2005.md +5 -2
- data/docs/InlineResponse2006.md +2 -3
- data/docs/InlineResponse2007.md +3 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/OCRApi.md +5 -5
- data/docs/OIDCApi.md +5 -5
- data/docs/PFMApi.md +122 -122
- data/docs/Pocket.md +1 -1
- data/docs/Profile.md +1 -1
- data/docs/Project.md +1 -1
- data/docs/ProvidersApi.md +602 -604
- data/docs/Recipient.md +3 -0
- data/docs/RecipientLog.md +14 -0
- data/docs/RecipientsApi.md +28 -20
- data/docs/Subscription.md +2 -1
- data/docs/TermsApi.md +13 -15
- data/docs/Transaction.md +8 -3
- data/docs/Transfer.md +1 -0
- data/docs/TransferLog.md +14 -0
- data/docs/TransfersApi.md +165 -141
- data/docs/UserAlert.md +2 -2
- data/docs/UsersManagementApi.md +24 -24
- data/docs/WealthApi.md +54 -54
- data/docs/WebhookLog.md +15 -0
- data/lib/budgea_client.rb +27 -3
- data/lib/budgea_client/api/administration_api.rb +425 -106
- data/lib/budgea_client/api/authentication_api.rb +287 -46
- data/lib/budgea_client/api/banks_api.rb +1271 -974
- data/lib/budgea_client/api/connections_api.rb +207 -156
- data/lib/budgea_client/api/documents_api.rb +627 -693
- data/lib/budgea_client/api/ocr_api.rb +24 -16
- data/lib/budgea_client/api/oidc_api.rb +23 -16
- data/lib/budgea_client/api/pfm_api.rb +219 -248
- data/lib/budgea_client/api/providers_api.rb +998 -1099
- data/lib/budgea_client/api/recipients_api.rb +52 -34
- data/lib/budgea_client/api/terms_api.rb +34 -31
- data/lib/budgea_client/api/transfers_api.rb +245 -239
- data/lib/budgea_client/api/users_management_api.rb +56 -58
- data/lib/budgea_client/api/wealth_api.rb +81 -85
- data/lib/budgea_client/api_client.rb +20 -11
- data/lib/budgea_client/api_error.rb +11 -1
- data/lib/budgea_client/configuration.rb +12 -2
- data/lib/budgea_client/models/access.rb +18 -13
- data/lib/budgea_client/models/account.rb +44 -23
- data/lib/budgea_client/models/account_log.rb +33 -28
- data/lib/budgea_client/models/account_type.rb +22 -17
- data/lib/budgea_client/models/alert.rb +21 -16
- data/lib/budgea_client/models/bank.rb +21 -16
- data/lib/budgea_client/models/bank_category.rb +19 -14
- data/lib/budgea_client/models/category.rb +22 -17
- data/lib/budgea_client/models/certificate.rb +244 -0
- data/lib/budgea_client/models/client.rb +53 -20
- data/lib/budgea_client/models/connection.rb +29 -24
- data/lib/budgea_client/models/connection_log.rb +39 -24
- data/lib/budgea_client/models/connector.rb +345 -0
- data/lib/budgea_client/models/connector_category.rb +206 -0
- data/lib/budgea_client/models/connector_logo.rb +29 -24
- data/lib/budgea_client/models/currency.rb +63 -16
- data/lib/budgea_client/models/device.rb +23 -18
- data/lib/budgea_client/models/document.rb +21 -16
- data/lib/budgea_client/models/document_type.rb +19 -14
- data/lib/budgea_client/models/field.rb +44 -27
- data/lib/budgea_client/models/field_value.rb +18 -13
- data/lib/budgea_client/models/file.rb +20 -15
- data/lib/budgea_client/models/group.rb +17 -12
- data/lib/budgea_client/models/hash_table.rb +20 -15
- data/lib/budgea_client/models/inline_response_200.rb +17 -12
- data/lib/budgea_client/models/inline_response_200_1.rb +18 -13
- data/lib/budgea_client/models/inline_response_200_10.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_11.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_12.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_13.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_14.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_15.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_16.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_17.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_18.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_19.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_2.rb +18 -13
- data/lib/budgea_client/models/inline_response_200_20.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_21.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_22.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_23.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_24.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_25.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_26.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_27.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_28.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_29.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_3.rb +37 -47
- data/lib/budgea_client/models/inline_response_200_30.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_31.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_32.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_33.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_34.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_35.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_36.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_4.rb +20 -40
- data/lib/budgea_client/models/inline_response_200_5.rb +75 -30
- data/lib/budgea_client/models/inline_response_200_6.rb +37 -47
- data/lib/budgea_client/models/inline_response_200_7.rb +55 -21
- data/lib/budgea_client/models/inline_response_200_8.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_9.rb +27 -22
- data/lib/budgea_client/models/investment.rb +20 -15
- data/lib/budgea_client/models/investment_value.rb +20 -15
- data/lib/budgea_client/models/invite.rb +18 -13
- data/lib/budgea_client/models/locked_user.rb +18 -13
- data/lib/budgea_client/models/oidc_whitelist.rb +18 -13
- data/lib/budgea_client/models/pocket.rb +22 -17
- data/lib/budgea_client/models/profile.rb +26 -20
- data/lib/budgea_client/models/project.rb +26 -21
- data/lib/budgea_client/models/project_type.rb +18 -13
- data/lib/budgea_client/models/recipient.rb +52 -17
- data/lib/budgea_client/models/recipient_log.rb +254 -0
- data/lib/budgea_client/models/security.rb +18 -13
- data/lib/budgea_client/models/subscription.rb +31 -21
- data/lib/budgea_client/models/terms_of_service.rb +19 -14
- data/lib/budgea_client/models/transaction.rb +83 -33
- data/lib/budgea_client/models/transaction_information.rb +19 -14
- data/lib/budgea_client/models/transactions_cluster.rb +21 -16
- data/lib/budgea_client/models/transfer.rb +32 -16
- data/lib/budgea_client/models/transfer_log.rb +254 -0
- data/lib/budgea_client/models/user.rb +22 -16
- data/lib/budgea_client/models/user_alert.rb +22 -16
- data/lib/budgea_client/models/webhook.rb +19 -14
- data/lib/budgea_client/models/webhook_log.rb +264 -0
- data/lib/budgea_client/version.rb +12 -2
- data/original_budgea_openapi.json +23188 -0
- data/spec/models/certificate_spec.rb +65 -0
- data/spec/models/connector_category_spec.rb +47 -0
- data/spec/models/connector_spec.rb +119 -0
- data/spec/models/inline_response_200_34_spec.rb +41 -0
- data/spec/models/inline_response_200_35_spec.rb +41 -0
- data/spec/models/inline_response_200_36_spec.rb +41 -0
- data/spec/models/recipient_log_spec.rb +77 -0
- data/spec/models/transfer_log_spec.rb +77 -0
- data/spec/models/webhook_log_spec.rb +83 -0
- metadata +52 -18
- data/pkg/budgea_client-1.3.9.gem +0 -0
- data/pkg/budgea_client-1.4.2.gem +0 -0
- data/pkg/budgea_client-1.4.3.gem +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Budgea API Documentation
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module BudgeaClient
|
|
16
|
+
class InlineResponse20035
|
|
17
|
+
attr_accessor :webhooks
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'webhooks' => :'webhooks'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
:'webhooks' => :'Array<Webhook>'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
return unless attributes.is_a?(Hash)
|
|
37
|
+
|
|
38
|
+
# convert string to symbol for hash key
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'webhooks')
|
|
42
|
+
if (value = attributes[:'webhooks']).is_a?(Array)
|
|
43
|
+
self.webhooks = value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
+
# @return Array for valid properties with the reasons
|
|
50
|
+
def list_invalid_properties
|
|
51
|
+
invalid_properties = Array.new
|
|
52
|
+
if @webhooks.nil?
|
|
53
|
+
invalid_properties.push('invalid value for "webhooks", webhooks cannot be nil.')
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
invalid_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check to see if the all the properties in the model are valid
|
|
60
|
+
# @return true if the model is valid
|
|
61
|
+
def valid?
|
|
62
|
+
return false if @webhooks.nil?
|
|
63
|
+
true
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Checks equality by comparing each attribute.
|
|
67
|
+
# @param [Object] Object to be compared
|
|
68
|
+
def ==(o)
|
|
69
|
+
return true if self.equal?(o)
|
|
70
|
+
self.class == o.class &&
|
|
71
|
+
webhooks == o.webhooks
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @see the `==` method
|
|
75
|
+
# @param [Object] Object to be compared
|
|
76
|
+
def eql?(o)
|
|
77
|
+
self == o
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Calculates hash code according to all attributes.
|
|
81
|
+
# @return [Fixnum] Hash code
|
|
82
|
+
def hash
|
|
83
|
+
[webhooks].hash
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Builds the object from hash
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
# @return [Object] Returns the model itself
|
|
89
|
+
def build_from_hash(attributes)
|
|
90
|
+
return nil unless attributes.is_a?(Hash)
|
|
91
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
92
|
+
if type =~ /\AArray<(.*)>/i
|
|
93
|
+
# check to ensure the input is an array given that the the attribute
|
|
94
|
+
# is documented as an array but the input is not
|
|
95
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
96
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
97
|
+
end
|
|
98
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
99
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
100
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
self
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Deserializes the data based on type
|
|
107
|
+
# @param string type Data type
|
|
108
|
+
# @param string value Value to be deserialized
|
|
109
|
+
# @return [Object] Deserialized data
|
|
110
|
+
def _deserialize(type, value)
|
|
111
|
+
case type.to_sym
|
|
112
|
+
when :DateTime
|
|
113
|
+
DateTime.parse(value)
|
|
114
|
+
when :Date
|
|
115
|
+
Date.parse(value)
|
|
116
|
+
when :String
|
|
117
|
+
value.to_s
|
|
118
|
+
when :Integer
|
|
119
|
+
value.to_i
|
|
120
|
+
when :Float
|
|
121
|
+
value.to_f
|
|
122
|
+
when :BOOLEAN
|
|
123
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
124
|
+
true
|
|
125
|
+
else
|
|
126
|
+
false
|
|
127
|
+
end
|
|
128
|
+
when :Object
|
|
129
|
+
# generic object (usually a Hash), return directly
|
|
130
|
+
value
|
|
131
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
132
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
133
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
134
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
135
|
+
k_type = Regexp.last_match[:k_type]
|
|
136
|
+
v_type = Regexp.last_match[:v_type]
|
|
137
|
+
{}.tap do |hash|
|
|
138
|
+
value.each do |k, v|
|
|
139
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
else # model
|
|
143
|
+
temp_model = BudgeaClient.const_get(type).new
|
|
144
|
+
temp_model.build_from_hash(value)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the string representation of the object
|
|
149
|
+
# @return [String] String presentation of the object
|
|
150
|
+
def to_s
|
|
151
|
+
to_hash.to_s
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_body
|
|
157
|
+
to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
next if value.nil?
|
|
167
|
+
hash[param] = _to_hash(value)
|
|
168
|
+
end
|
|
169
|
+
hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Outputs non-array value in the form of hash
|
|
173
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
174
|
+
# @param [Object] value Any valid value
|
|
175
|
+
# @return [Hash] Returns the value in the form of hash
|
|
176
|
+
def _to_hash(value)
|
|
177
|
+
if value.is_a?(Array)
|
|
178
|
+
value.compact.map { |v| _to_hash(v) }
|
|
179
|
+
elsif value.is_a?(Hash)
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
182
|
+
end
|
|
183
|
+
elsif value.respond_to? :to_hash
|
|
184
|
+
value.to_hash
|
|
185
|
+
else
|
|
186
|
+
value
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Budgea API Documentation
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module BudgeaClient
|
|
16
|
+
class InlineResponse20036
|
|
17
|
+
attr_accessor :webhooklogs
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'webhooklogs' => :'webhooklogs'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
:'webhooklogs' => :'Array<WebhookLog>'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
return unless attributes.is_a?(Hash)
|
|
37
|
+
|
|
38
|
+
# convert string to symbol for hash key
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'webhooklogs')
|
|
42
|
+
if (value = attributes[:'webhooklogs']).is_a?(Array)
|
|
43
|
+
self.webhooklogs = value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
+
# @return Array for valid properties with the reasons
|
|
50
|
+
def list_invalid_properties
|
|
51
|
+
invalid_properties = Array.new
|
|
52
|
+
if @webhooklogs.nil?
|
|
53
|
+
invalid_properties.push('invalid value for "webhooklogs", webhooklogs cannot be nil.')
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
invalid_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check to see if the all the properties in the model are valid
|
|
60
|
+
# @return true if the model is valid
|
|
61
|
+
def valid?
|
|
62
|
+
return false if @webhooklogs.nil?
|
|
63
|
+
true
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Checks equality by comparing each attribute.
|
|
67
|
+
# @param [Object] Object to be compared
|
|
68
|
+
def ==(o)
|
|
69
|
+
return true if self.equal?(o)
|
|
70
|
+
self.class == o.class &&
|
|
71
|
+
webhooklogs == o.webhooklogs
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @see the `==` method
|
|
75
|
+
# @param [Object] Object to be compared
|
|
76
|
+
def eql?(o)
|
|
77
|
+
self == o
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Calculates hash code according to all attributes.
|
|
81
|
+
# @return [Fixnum] Hash code
|
|
82
|
+
def hash
|
|
83
|
+
[webhooklogs].hash
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Builds the object from hash
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
# @return [Object] Returns the model itself
|
|
89
|
+
def build_from_hash(attributes)
|
|
90
|
+
return nil unless attributes.is_a?(Hash)
|
|
91
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
92
|
+
if type =~ /\AArray<(.*)>/i
|
|
93
|
+
# check to ensure the input is an array given that the the attribute
|
|
94
|
+
# is documented as an array but the input is not
|
|
95
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
96
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
97
|
+
end
|
|
98
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
99
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
100
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
self
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Deserializes the data based on type
|
|
107
|
+
# @param string type Data type
|
|
108
|
+
# @param string value Value to be deserialized
|
|
109
|
+
# @return [Object] Deserialized data
|
|
110
|
+
def _deserialize(type, value)
|
|
111
|
+
case type.to_sym
|
|
112
|
+
when :DateTime
|
|
113
|
+
DateTime.parse(value)
|
|
114
|
+
when :Date
|
|
115
|
+
Date.parse(value)
|
|
116
|
+
when :String
|
|
117
|
+
value.to_s
|
|
118
|
+
when :Integer
|
|
119
|
+
value.to_i
|
|
120
|
+
when :Float
|
|
121
|
+
value.to_f
|
|
122
|
+
when :BOOLEAN
|
|
123
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
124
|
+
true
|
|
125
|
+
else
|
|
126
|
+
false
|
|
127
|
+
end
|
|
128
|
+
when :Object
|
|
129
|
+
# generic object (usually a Hash), return directly
|
|
130
|
+
value
|
|
131
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
132
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
133
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
134
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
135
|
+
k_type = Regexp.last_match[:k_type]
|
|
136
|
+
v_type = Regexp.last_match[:v_type]
|
|
137
|
+
{}.tap do |hash|
|
|
138
|
+
value.each do |k, v|
|
|
139
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
else # model
|
|
143
|
+
temp_model = BudgeaClient.const_get(type).new
|
|
144
|
+
temp_model.build_from_hash(value)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the string representation of the object
|
|
149
|
+
# @return [String] String presentation of the object
|
|
150
|
+
def to_s
|
|
151
|
+
to_hash.to_s
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_body
|
|
157
|
+
to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
next if value.nil?
|
|
167
|
+
hash[param] = _to_hash(value)
|
|
168
|
+
end
|
|
169
|
+
hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Outputs non-array value in the form of hash
|
|
173
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
174
|
+
# @param [Object] value Any valid value
|
|
175
|
+
# @return [Hash] Returns the value in the form of hash
|
|
176
|
+
def _to_hash(value)
|
|
177
|
+
if value.is_a?(Array)
|
|
178
|
+
value.compact.map { |v| _to_hash(v) }
|
|
179
|
+
elsif value.is_a?(Hash)
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
182
|
+
end
|
|
183
|
+
elsif value.respond_to? :to_hash
|
|
184
|
+
value.to_hash
|
|
185
|
+
else
|
|
186
|
+
value
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
=begin
|
|
2
|
+
#Budgea API Documentation
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
2
12
|
|
|
3
13
|
require 'date'
|
|
4
14
|
|
|
5
15
|
module BudgeaClient
|
|
6
|
-
|
|
7
16
|
class InlineResponse2004
|
|
8
17
|
# the user profile data object
|
|
9
18
|
attr_accessor :profile
|
|
10
19
|
|
|
11
|
-
# the token scope
|
|
12
|
-
attr_accessor :scope
|
|
13
|
-
|
|
14
20
|
# the requested token
|
|
15
21
|
attr_accessor :token
|
|
16
22
|
|
|
17
|
-
# duration in seconds of the token validity
|
|
18
|
-
attr_accessor :expires_in
|
|
19
|
-
|
|
20
23
|
# the user data object
|
|
21
24
|
attr_accessor :user
|
|
22
25
|
|
|
23
|
-
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
27
|
def self.attribute_map
|
|
26
28
|
{
|
|
27
29
|
:'profile' => :'profile',
|
|
28
|
-
:'scope' => :'scope',
|
|
29
30
|
:'token' => :'token',
|
|
30
|
-
:'expires_in' => :'expires_in',
|
|
31
31
|
:'user' => :'user'
|
|
32
32
|
}
|
|
33
33
|
end
|
|
@@ -36,9 +36,7 @@ module BudgeaClient
|
|
|
36
36
|
def self.swagger_types
|
|
37
37
|
{
|
|
38
38
|
:'profile' => :'Object',
|
|
39
|
-
:'scope' => :'String',
|
|
40
39
|
:'token' => :'String',
|
|
41
|
-
:'expires_in' => :'Integer',
|
|
42
40
|
:'user' => :'Object'
|
|
43
41
|
}
|
|
44
42
|
end
|
|
@@ -49,28 +47,19 @@ module BudgeaClient
|
|
|
49
47
|
return unless attributes.is_a?(Hash)
|
|
50
48
|
|
|
51
49
|
# convert string to symbol for hash key
|
|
52
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
53
51
|
|
|
54
52
|
if attributes.has_key?(:'profile')
|
|
55
53
|
self.profile = attributes[:'profile']
|
|
56
54
|
end
|
|
57
55
|
|
|
58
|
-
if attributes.has_key?(:'scope')
|
|
59
|
-
self.scope = attributes[:'scope']
|
|
60
|
-
end
|
|
61
|
-
|
|
62
56
|
if attributes.has_key?(:'token')
|
|
63
57
|
self.token = attributes[:'token']
|
|
64
58
|
end
|
|
65
59
|
|
|
66
|
-
if attributes.has_key?(:'expires_in')
|
|
67
|
-
self.expires_in = attributes[:'expires_in']
|
|
68
|
-
end
|
|
69
|
-
|
|
70
60
|
if attributes.has_key?(:'user')
|
|
71
61
|
self.user = attributes[:'user']
|
|
72
62
|
end
|
|
73
|
-
|
|
74
63
|
end
|
|
75
64
|
|
|
76
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -78,32 +67,27 @@ module BudgeaClient
|
|
|
78
67
|
def list_invalid_properties
|
|
79
68
|
invalid_properties = Array.new
|
|
80
69
|
if @profile.nil?
|
|
81
|
-
invalid_properties.push(
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
if @scope.nil?
|
|
85
|
-
invalid_properties.push("invalid value for 'scope', scope cannot be nil.")
|
|
70
|
+
invalid_properties.push('invalid value for "profile", profile cannot be nil.')
|
|
86
71
|
end
|
|
87
72
|
|
|
88
73
|
if @token.nil?
|
|
89
|
-
invalid_properties.push(
|
|
74
|
+
invalid_properties.push('invalid value for "token", token cannot be nil.')
|
|
90
75
|
end
|
|
91
76
|
|
|
92
77
|
if @user.nil?
|
|
93
|
-
invalid_properties.push(
|
|
78
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
94
79
|
end
|
|
95
80
|
|
|
96
|
-
|
|
81
|
+
invalid_properties
|
|
97
82
|
end
|
|
98
83
|
|
|
99
84
|
# Check to see if the all the properties in the model are valid
|
|
100
85
|
# @return true if the model is valid
|
|
101
86
|
def valid?
|
|
102
87
|
return false if @profile.nil?
|
|
103
|
-
return false if @scope.nil?
|
|
104
88
|
return false if @token.nil?
|
|
105
89
|
return false if @user.nil?
|
|
106
|
-
|
|
90
|
+
true
|
|
107
91
|
end
|
|
108
92
|
|
|
109
93
|
# Checks equality by comparing each attribute.
|
|
@@ -112,9 +96,7 @@ module BudgeaClient
|
|
|
112
96
|
return true if self.equal?(o)
|
|
113
97
|
self.class == o.class &&
|
|
114
98
|
profile == o.profile &&
|
|
115
|
-
scope == o.scope &&
|
|
116
99
|
token == o.token &&
|
|
117
|
-
expires_in == o.expires_in &&
|
|
118
100
|
user == o.user
|
|
119
101
|
end
|
|
120
102
|
|
|
@@ -127,7 +109,7 @@ module BudgeaClient
|
|
|
127
109
|
# Calculates hash code according to all attributes.
|
|
128
110
|
# @return [Fixnum] Hash code
|
|
129
111
|
def hash
|
|
130
|
-
[profile,
|
|
112
|
+
[profile, token, user].hash
|
|
131
113
|
end
|
|
132
114
|
|
|
133
115
|
# Builds the object from hash
|
|
@@ -140,7 +122,7 @@ module BudgeaClient
|
|
|
140
122
|
# check to ensure the input is an array given that the the attribute
|
|
141
123
|
# is documented as an array but the input is not
|
|
142
124
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
143
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
144
126
|
end
|
|
145
127
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
146
128
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -222,7 +204,7 @@ module BudgeaClient
|
|
|
222
204
|
# @return [Hash] Returns the value in the form of hash
|
|
223
205
|
def _to_hash(value)
|
|
224
206
|
if value.is_a?(Array)
|
|
225
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
226
208
|
elsif value.is_a?(Hash)
|
|
227
209
|
{}.tap do |hash|
|
|
228
210
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -233,7 +215,5 @@ module BudgeaClient
|
|
|
233
215
|
value
|
|
234
216
|
end
|
|
235
217
|
end
|
|
236
|
-
|
|
237
218
|
end
|
|
238
|
-
|
|
239
219
|
end
|