smplkit 3.0.13 → 3.0.14
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/lib/smplkit/_generated/app/lib/smplkit_app_client/api/api_keys_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +20 -2
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_values_api.rb +97 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb +16 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/environments_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/invitations_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/metrics_api.rb +27 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/plans_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/products_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/services_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/users_api.rb +8 -17
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb +12 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_resource.rb +1 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value.rb +166 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_list_response.rb +193 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_resource.rb +225 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{user_list_meta.rb → list_meta.rb} +20 -19
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_names_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{page_meta.rb → pagination_meta.rb} +43 -75
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb +18 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +6 -2
- data/lib/smplkit/_generated/app/spec/api/api_keys_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +7 -1
- data/lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/context_values_api_spec.rb +52 -0
- data/lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb +6 -2
- data/lib/smplkit/_generated/app/spec/api/environments_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/invitations_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/metrics_api_spec.rb +9 -0
- data/lib/smplkit/_generated/app/spec/api/plans_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/products_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/services_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/users_api_spec.rb +3 -2
- data/lib/smplkit/_generated/app/spec/models/api_key_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_type_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_value_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/app/spec/models/context_value_resource_spec.rb +52 -0
- data/lib/smplkit/_generated/app/spec/models/{user_list_meta_spec.rb → context_value_spec.rb} +7 -7
- data/lib/smplkit/_generated/app/spec/models/environment_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/invitation_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/invoice_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/list_meta_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/metric_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/metric_names_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/metric_rollup_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/{page_meta_spec.rb → pagination_meta_spec.rb} +9 -9
- data/lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/plan_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/product_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/service_list_response_spec.rb +6 -0
- metadata +13 -5
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API collection response envelope for distinct context values.
|
|
18
|
+
class ContextValueListResponse < ApiModelBase
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'data' => :'Array<ContextValueResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::ContextValueListResponse` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::ContextValueListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'data')
|
|
72
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
73
|
+
self.data = value
|
|
74
|
+
end
|
|
75
|
+
else
|
|
76
|
+
self.data = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @data.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Custom attribute writer method with validation
|
|
112
|
+
# @param [Object] data Value to be assigned
|
|
113
|
+
def data=(data)
|
|
114
|
+
if data.nil?
|
|
115
|
+
fail ArgumentError, 'data cannot be nil'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
@data = data
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[data, meta].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
if value.nil?
|
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash[param] = _to_hash(value)
|
|
187
|
+
end
|
|
188
|
+
hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::App
|
|
17
|
+
# JSON:API resource envelope for a distinct context-attribute value. `id` is the value itself.
|
|
18
|
+
class ContextValueResource < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
attr_accessor :attributes
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'id' => :'id',
|
|
51
|
+
:'type' => :'type',
|
|
52
|
+
:'attributes' => :'attributes'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'id' => :'String',
|
|
70
|
+
:'type' => :'String',
|
|
71
|
+
:'attributes' => :'ContextValue'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
:'id',
|
|
79
|
+
])
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::ContextValueResource` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::ContextValueResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'id')
|
|
99
|
+
self.id = attributes[:'id']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'type')
|
|
103
|
+
self.type = attributes[:'type']
|
|
104
|
+
else
|
|
105
|
+
self.type = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'attributes')
|
|
109
|
+
self.attributes = attributes[:'attributes']
|
|
110
|
+
else
|
|
111
|
+
self.attributes = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @type.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @attributes.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @type.nil?
|
|
136
|
+
type_validator = EnumAttributeValidator.new('String', ["context_value"])
|
|
137
|
+
return false unless type_validator.valid?(@type)
|
|
138
|
+
return false if @attributes.nil?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
143
|
+
# @param [Object] type Object to be assigned
|
|
144
|
+
def type=(type)
|
|
145
|
+
validator = EnumAttributeValidator.new('String', ["context_value"])
|
|
146
|
+
unless validator.valid?(type)
|
|
147
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
148
|
+
end
|
|
149
|
+
@type = type
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] attributes Value to be assigned
|
|
154
|
+
def attributes=(attributes)
|
|
155
|
+
if attributes.nil?
|
|
156
|
+
fail ArgumentError, 'attributes cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@attributes = attributes
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Checks equality by comparing each attribute.
|
|
163
|
+
# @param [Object] Object to be compared
|
|
164
|
+
def ==(o)
|
|
165
|
+
return true if self.equal?(o)
|
|
166
|
+
self.class == o.class &&
|
|
167
|
+
id == o.id &&
|
|
168
|
+
type == o.type &&
|
|
169
|
+
attributes == o.attributes
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @see the `==` method
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Integer] Hash code
|
|
180
|
+
def hash
|
|
181
|
+
[id, type, attributes].hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Builds the object from hash
|
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
186
|
+
# @return [Object] Returns the model itself
|
|
187
|
+
def self.build_from_hash(attributes)
|
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
|
189
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
190
|
+
transformed_hash = {}
|
|
191
|
+
openapi_types.each_pair do |key, type|
|
|
192
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = nil
|
|
194
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
195
|
+
# check to ensure the input is an array given that the attribute
|
|
196
|
+
# is documented as an array but the input is not
|
|
197
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
198
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
199
|
+
end
|
|
200
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
201
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
new(transformed_hash)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns the object in the form of hash
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_hash
|
|
210
|
+
hash = {}
|
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
212
|
+
value = self.send(attr)
|
|
213
|
+
if value.nil?
|
|
214
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
hash[param] = _to_hash(value)
|
|
219
|
+
end
|
|
220
|
+
hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
|
|
|
18
18
|
class EnvironmentListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<EnvironmentResource>'
|
|
44
|
+
:'data' => :'Array<EnvironmentResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
|
|
|
18
18
|
class InvitationListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<InvitationResource>'
|
|
44
|
+
:'data' => :'Array<InvitationResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
|
|
|
18
18
|
class InvoiceListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<InvoiceResource>'
|
|
44
|
+
:'data' => :'Array<InvoiceResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|