smplkit 1.0.21 → 1.0.23
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/billing_api.rb +0 -125
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account.rb +49 -5
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{catalog_bundle_resource.rb → next_tier_meta.rb} +60 -68
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_attributes.rb +1 -11
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_meta.rb +302 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_response.rb +13 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +2 -9
- data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +0 -23
- data/lib/smplkit/_generated/app/spec/models/account_spec.rb +24 -0
- data/lib/smplkit/_generated/app/spec/models/{bundle_attributes_spec.rb → next_tier_meta_spec.rb} +9 -15
- data/lib/smplkit/_generated/app/spec/models/subscription_attributes_spec.rb +0 -6
- data/lib/smplkit/_generated/app/spec/models/subscription_list_meta_spec.rb +70 -0
- data/lib/smplkit/_generated/app/spec/models/subscription_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb +23 -2
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb +22 -1
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +0 -1
- metadata +5 -21
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_attributes.rb +0 -246
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_list_response.rb +0 -166
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_resource.rb +0 -224
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_response.rb +0 -164
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/catalog_bundle_attributes.rb +0 -244
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_attributes.rb +0 -174
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_body.rb +0 -164
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_data.rb +0 -214
- data/lib/smplkit/_generated/app/spec/models/bundle_list_response_spec.rb +0 -36
- data/lib/smplkit/_generated/app/spec/models/bundle_resource_spec.rb +0 -52
- data/lib/smplkit/_generated/app/spec/models/bundle_response_spec.rb +0 -36
- data/lib/smplkit/_generated/app/spec/models/catalog_bundle_attributes_spec.rb +0 -54
- data/lib/smplkit/_generated/app/spec/models/catalog_bundle_resource_spec.rb +0 -52
- data/lib/smplkit/_generated/app/spec/models/create_bundle_attributes_spec.rb +0 -42
- data/lib/smplkit/_generated/app/spec/models/create_bundle_body_spec.rb +0 -36
- data/lib/smplkit/_generated/app/spec/models/create_bundle_data_spec.rb +0 -46
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/success_status.rb +0 -103
- data/lib/smplkit/_generated/audit/spec/models/success_status_spec.rb +0 -21
|
@@ -1,224 +0,0 @@
|
|
|
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
|
-
class BundleResource < ApiModelBase
|
|
18
|
-
attr_accessor :id
|
|
19
|
-
|
|
20
|
-
attr_accessor :type
|
|
21
|
-
|
|
22
|
-
attr_accessor :attributes
|
|
23
|
-
|
|
24
|
-
class EnumAttributeValidator
|
|
25
|
-
attr_reader :datatype
|
|
26
|
-
attr_reader :allowable_values
|
|
27
|
-
|
|
28
|
-
def initialize(datatype, allowable_values)
|
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
|
30
|
-
case datatype.to_s
|
|
31
|
-
when /Integer/i
|
|
32
|
-
value.to_i
|
|
33
|
-
when /Float/i
|
|
34
|
-
value.to_f
|
|
35
|
-
else
|
|
36
|
-
value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def valid?(value)
|
|
42
|
-
!value || allowable_values.include?(value)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
-
def self.attribute_map
|
|
48
|
-
{
|
|
49
|
-
:'id' => :'id',
|
|
50
|
-
:'type' => :'type',
|
|
51
|
-
:'attributes' => :'attributes'
|
|
52
|
-
}
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Returns attribute mapping this model knows about
|
|
56
|
-
def self.acceptable_attribute_map
|
|
57
|
-
attribute_map
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Returns all the JSON keys this model knows about
|
|
61
|
-
def self.acceptable_attributes
|
|
62
|
-
acceptable_attribute_map.values
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Attribute type mapping.
|
|
66
|
-
def self.openapi_types
|
|
67
|
-
{
|
|
68
|
-
:'id' => :'String',
|
|
69
|
-
:'type' => :'String',
|
|
70
|
-
:'attributes' => :'BundleAttributes'
|
|
71
|
-
}
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# List of attributes with nullable: true
|
|
75
|
-
def self.openapi_nullable
|
|
76
|
-
Set.new([
|
|
77
|
-
:'id',
|
|
78
|
-
])
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Initializes the object
|
|
82
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
-
def initialize(attributes = {})
|
|
84
|
-
if (!attributes.is_a?(Hash))
|
|
85
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::BundleResource` initialize method"
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::BundleResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
-
end
|
|
94
|
-
h[k.to_sym] = v
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if attributes.key?(:'id')
|
|
98
|
-
self.id = attributes[:'id']
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
if attributes.key?(:'type')
|
|
102
|
-
self.type = attributes[:'type']
|
|
103
|
-
else
|
|
104
|
-
self.type = nil
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
if attributes.key?(:'attributes')
|
|
108
|
-
self.attributes = attributes[:'attributes']
|
|
109
|
-
else
|
|
110
|
-
self.attributes = nil
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
-
# @return Array for valid properties with the reasons
|
|
116
|
-
def list_invalid_properties
|
|
117
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
118
|
-
invalid_properties = Array.new
|
|
119
|
-
if @type.nil?
|
|
120
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
if @attributes.nil?
|
|
124
|
-
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
invalid_properties
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# Check to see if the all the properties in the model are valid
|
|
131
|
-
# @return true if the model is valid
|
|
132
|
-
def valid?
|
|
133
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
134
|
-
return false if @type.nil?
|
|
135
|
-
type_validator = EnumAttributeValidator.new('String', ["bundle"])
|
|
136
|
-
return false unless type_validator.valid?(@type)
|
|
137
|
-
return false if @attributes.nil?
|
|
138
|
-
true
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
142
|
-
# @param [Object] type Object to be assigned
|
|
143
|
-
def type=(type)
|
|
144
|
-
validator = EnumAttributeValidator.new('String', ["bundle"])
|
|
145
|
-
unless validator.valid?(type)
|
|
146
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
147
|
-
end
|
|
148
|
-
@type = type
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
# Custom attribute writer method with validation
|
|
152
|
-
# @param [Object] attributes Value to be assigned
|
|
153
|
-
def attributes=(attributes)
|
|
154
|
-
if attributes.nil?
|
|
155
|
-
fail ArgumentError, 'attributes cannot be nil'
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
@attributes = attributes
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Checks equality by comparing each attribute.
|
|
162
|
-
# @param [Object] Object to be compared
|
|
163
|
-
def ==(o)
|
|
164
|
-
return true if self.equal?(o)
|
|
165
|
-
self.class == o.class &&
|
|
166
|
-
id == o.id &&
|
|
167
|
-
type == o.type &&
|
|
168
|
-
attributes == o.attributes
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
# @see the `==` method
|
|
172
|
-
# @param [Object] Object to be compared
|
|
173
|
-
def eql?(o)
|
|
174
|
-
self == o
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Calculates hash code according to all attributes.
|
|
178
|
-
# @return [Integer] Hash code
|
|
179
|
-
def hash
|
|
180
|
-
[id, type, attributes].hash
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Builds the object from hash
|
|
184
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
185
|
-
# @return [Object] Returns the model itself
|
|
186
|
-
def self.build_from_hash(attributes)
|
|
187
|
-
return nil unless attributes.is_a?(Hash)
|
|
188
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
189
|
-
transformed_hash = {}
|
|
190
|
-
openapi_types.each_pair do |key, type|
|
|
191
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
192
|
-
transformed_hash["#{key}"] = nil
|
|
193
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
194
|
-
# check to ensure the input is an array given that the attribute
|
|
195
|
-
# is documented as an array but the input is not
|
|
196
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
197
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
198
|
-
end
|
|
199
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
200
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
201
|
-
end
|
|
202
|
-
end
|
|
203
|
-
new(transformed_hash)
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
# Returns the object in the form of hash
|
|
207
|
-
# @return [Hash] Returns the object in the form of hash
|
|
208
|
-
def to_hash
|
|
209
|
-
hash = {}
|
|
210
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
211
|
-
value = self.send(attr)
|
|
212
|
-
if value.nil?
|
|
213
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
214
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
hash[param] = _to_hash(value)
|
|
218
|
-
end
|
|
219
|
-
hash
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
end
|
|
@@ -1,164 +0,0 @@
|
|
|
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
|
-
class BundleResponse < ApiModelBase
|
|
18
|
-
attr_accessor :data
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'data' => :'data'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns attribute mapping this model knows about
|
|
28
|
-
def self.acceptable_attribute_map
|
|
29
|
-
attribute_map
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns all the JSON keys this model knows about
|
|
33
|
-
def self.acceptable_attributes
|
|
34
|
-
acceptable_attribute_map.values
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Attribute type mapping.
|
|
38
|
-
def self.openapi_types
|
|
39
|
-
{
|
|
40
|
-
:'data' => :'BundleResource'
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# List of attributes with nullable: true
|
|
45
|
-
def self.openapi_nullable
|
|
46
|
-
Set.new([
|
|
47
|
-
])
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Initializes the object
|
|
51
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
-
def initialize(attributes = {})
|
|
53
|
-
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::BundleResponse` initialize method"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::BundleResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
-
end
|
|
63
|
-
h[k.to_sym] = v
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if attributes.key?(:'data')
|
|
67
|
-
self.data = attributes[:'data']
|
|
68
|
-
else
|
|
69
|
-
self.data = nil
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
-
# @return Array for valid properties with the reasons
|
|
75
|
-
def list_invalid_properties
|
|
76
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
-
invalid_properties = Array.new
|
|
78
|
-
if @data.nil?
|
|
79
|
-
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
invalid_properties
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Check to see if the all the properties in the model are valid
|
|
86
|
-
# @return true if the model is valid
|
|
87
|
-
def valid?
|
|
88
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
-
return false if @data.nil?
|
|
90
|
-
true
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Custom attribute writer method with validation
|
|
94
|
-
# @param [Object] data Value to be assigned
|
|
95
|
-
def data=(data)
|
|
96
|
-
if data.nil?
|
|
97
|
-
fail ArgumentError, 'data cannot be nil'
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
@data = data
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
# Checks equality by comparing each attribute.
|
|
104
|
-
# @param [Object] Object to be compared
|
|
105
|
-
def ==(o)
|
|
106
|
-
return true if self.equal?(o)
|
|
107
|
-
self.class == o.class &&
|
|
108
|
-
data == o.data
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# @see the `==` method
|
|
112
|
-
# @param [Object] Object to be compared
|
|
113
|
-
def eql?(o)
|
|
114
|
-
self == o
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
# Calculates hash code according to all attributes.
|
|
118
|
-
# @return [Integer] Hash code
|
|
119
|
-
def hash
|
|
120
|
-
[data].hash
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# Builds the object from hash
|
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
-
# @return [Object] Returns the model itself
|
|
126
|
-
def self.build_from_hash(attributes)
|
|
127
|
-
return nil unless attributes.is_a?(Hash)
|
|
128
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
-
transformed_hash = {}
|
|
130
|
-
openapi_types.each_pair do |key, type|
|
|
131
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
-
transformed_hash["#{key}"] = nil
|
|
133
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
-
# check to ensure the input is an array given that the attribute
|
|
135
|
-
# is documented as an array but the input is not
|
|
136
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
-
end
|
|
139
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
new(transformed_hash)
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Returns the object in the form of hash
|
|
147
|
-
# @return [Hash] Returns the object in the form of hash
|
|
148
|
-
def to_hash
|
|
149
|
-
hash = {}
|
|
150
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
-
value = self.send(attr)
|
|
152
|
-
if value.nil?
|
|
153
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
hash[param] = _to_hash(value)
|
|
158
|
-
end
|
|
159
|
-
hash
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
end
|
|
@@ -1,244 +0,0 @@
|
|
|
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
|
-
class CatalogBundleAttributes < ApiModelBase
|
|
18
|
-
attr_accessor :display_name
|
|
19
|
-
|
|
20
|
-
attr_accessor :plan
|
|
21
|
-
|
|
22
|
-
attr_accessor :products
|
|
23
|
-
|
|
24
|
-
attr_accessor :price_monthly_cents
|
|
25
|
-
|
|
26
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
-
def self.attribute_map
|
|
28
|
-
{
|
|
29
|
-
:'display_name' => :'display_name',
|
|
30
|
-
:'plan' => :'plan',
|
|
31
|
-
:'products' => :'products',
|
|
32
|
-
:'price_monthly_cents' => :'price_monthly_cents'
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Returns attribute mapping this model knows about
|
|
37
|
-
def self.acceptable_attribute_map
|
|
38
|
-
attribute_map
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# Returns all the JSON keys this model knows about
|
|
42
|
-
def self.acceptable_attributes
|
|
43
|
-
acceptable_attribute_map.values
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Attribute type mapping.
|
|
47
|
-
def self.openapi_types
|
|
48
|
-
{
|
|
49
|
-
:'display_name' => :'String',
|
|
50
|
-
:'plan' => :'String',
|
|
51
|
-
:'products' => :'Array<String>',
|
|
52
|
-
:'price_monthly_cents' => :'Integer'
|
|
53
|
-
}
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# List of attributes with nullable: true
|
|
57
|
-
def self.openapi_nullable
|
|
58
|
-
Set.new([
|
|
59
|
-
])
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Initializes the object
|
|
63
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
-
def initialize(attributes = {})
|
|
65
|
-
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::CatalogBundleAttributes` initialize method"
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::CatalogBundleAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
-
end
|
|
75
|
-
h[k.to_sym] = v
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if attributes.key?(:'display_name')
|
|
79
|
-
self.display_name = attributes[:'display_name']
|
|
80
|
-
else
|
|
81
|
-
self.display_name = nil
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
if attributes.key?(:'plan')
|
|
85
|
-
self.plan = attributes[:'plan']
|
|
86
|
-
else
|
|
87
|
-
self.plan = nil
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
if attributes.key?(:'products')
|
|
91
|
-
if (value = attributes[:'products']).is_a?(Array)
|
|
92
|
-
self.products = value
|
|
93
|
-
end
|
|
94
|
-
else
|
|
95
|
-
self.products = nil
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
if attributes.key?(:'price_monthly_cents')
|
|
99
|
-
self.price_monthly_cents = attributes[:'price_monthly_cents']
|
|
100
|
-
else
|
|
101
|
-
self.price_monthly_cents = nil
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
-
# @return Array for valid properties with the reasons
|
|
107
|
-
def list_invalid_properties
|
|
108
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
-
invalid_properties = Array.new
|
|
110
|
-
if @display_name.nil?
|
|
111
|
-
invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
if @plan.nil?
|
|
115
|
-
invalid_properties.push('invalid value for "plan", plan cannot be nil.')
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if @products.nil?
|
|
119
|
-
invalid_properties.push('invalid value for "products", products cannot be nil.')
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
if @price_monthly_cents.nil?
|
|
123
|
-
invalid_properties.push('invalid value for "price_monthly_cents", price_monthly_cents cannot be nil.')
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
invalid_properties
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Check to see if the all the properties in the model are valid
|
|
130
|
-
# @return true if the model is valid
|
|
131
|
-
def valid?
|
|
132
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
-
return false if @display_name.nil?
|
|
134
|
-
return false if @plan.nil?
|
|
135
|
-
return false if @products.nil?
|
|
136
|
-
return false if @price_monthly_cents.nil?
|
|
137
|
-
true
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Custom attribute writer method with validation
|
|
141
|
-
# @param [Object] display_name Value to be assigned
|
|
142
|
-
def display_name=(display_name)
|
|
143
|
-
if display_name.nil?
|
|
144
|
-
fail ArgumentError, 'display_name cannot be nil'
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
@display_name = display_name
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
# Custom attribute writer method with validation
|
|
151
|
-
# @param [Object] plan Value to be assigned
|
|
152
|
-
def plan=(plan)
|
|
153
|
-
if plan.nil?
|
|
154
|
-
fail ArgumentError, 'plan cannot be nil'
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
@plan = plan
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
# Custom attribute writer method with validation
|
|
161
|
-
# @param [Object] products Value to be assigned
|
|
162
|
-
def products=(products)
|
|
163
|
-
if products.nil?
|
|
164
|
-
fail ArgumentError, 'products cannot be nil'
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
@products = products
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Custom attribute writer method with validation
|
|
171
|
-
# @param [Object] price_monthly_cents Value to be assigned
|
|
172
|
-
def price_monthly_cents=(price_monthly_cents)
|
|
173
|
-
if price_monthly_cents.nil?
|
|
174
|
-
fail ArgumentError, 'price_monthly_cents cannot be nil'
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
@price_monthly_cents = price_monthly_cents
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
# Checks equality by comparing each attribute.
|
|
181
|
-
# @param [Object] Object to be compared
|
|
182
|
-
def ==(o)
|
|
183
|
-
return true if self.equal?(o)
|
|
184
|
-
self.class == o.class &&
|
|
185
|
-
display_name == o.display_name &&
|
|
186
|
-
plan == o.plan &&
|
|
187
|
-
products == o.products &&
|
|
188
|
-
price_monthly_cents == o.price_monthly_cents
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# @see the `==` method
|
|
192
|
-
# @param [Object] Object to be compared
|
|
193
|
-
def eql?(o)
|
|
194
|
-
self == o
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# Calculates hash code according to all attributes.
|
|
198
|
-
# @return [Integer] Hash code
|
|
199
|
-
def hash
|
|
200
|
-
[display_name, plan, products, price_monthly_cents].hash
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
# Builds the object from hash
|
|
204
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
|
-
# @return [Object] Returns the model itself
|
|
206
|
-
def self.build_from_hash(attributes)
|
|
207
|
-
return nil unless attributes.is_a?(Hash)
|
|
208
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
209
|
-
transformed_hash = {}
|
|
210
|
-
openapi_types.each_pair do |key, type|
|
|
211
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
212
|
-
transformed_hash["#{key}"] = nil
|
|
213
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
214
|
-
# check to ensure the input is an array given that the attribute
|
|
215
|
-
# is documented as an array but the input is not
|
|
216
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
217
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
218
|
-
end
|
|
219
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
220
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
new(transformed_hash)
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# Returns the object in the form of hash
|
|
227
|
-
# @return [Hash] Returns the object in the form of hash
|
|
228
|
-
def to_hash
|
|
229
|
-
hash = {}
|
|
230
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
231
|
-
value = self.send(attr)
|
|
232
|
-
if value.nil?
|
|
233
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
234
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
hash[param] = _to_hash(value)
|
|
238
|
-
end
|
|
239
|
-
hash
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
end
|