solifyn 1.1.3 → 1.1.4
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/README.md +7 -4
- data/docs/Brand.md +2 -2
- data/docs/CheckoutLinkResponseDto.md +3 -3
- data/docs/CollectionDetailResponseDto.md +3 -3
- data/docs/CollectionProductDto.md +11 -5
- data/docs/CollectionResponseDto.md +3 -3
- data/docs/CreateCustomerDto.md +1 -1
- data/docs/CreateMeterDto.md +1 -1
- data/docs/CreateWebhookEndpointDto.md +1 -1
- data/docs/CustomerResponseDto.md +3 -3
- data/docs/CustomerSharedInviteResponseDto.md +1 -1
- data/docs/DefaultApi.md +1214 -0
- data/docs/DeveloperApi.md +1 -1
- data/docs/DiscordIntegrationApi.md +135 -0
- data/docs/DiscordRolesResponseDto.md +24 -0
- data/docs/Dispute.md +3 -3
- data/docs/EntitlementGrantResponseDto.md +13 -5
- data/docs/Invoice.md +1 -1
- data/docs/MeterDetailResponseDto.md +3 -3
- data/docs/MeterIngestEventDto.md +1 -1
- data/docs/MeterIngestResponseDto.md +1 -1
- data/docs/MeterResponseDto.md +3 -3
- data/docs/MeterUsageEventDto.md +3 -3
- data/docs/OperationalWebhookEndpointHeadersInDto.md +1 -1
- data/docs/OperationalWebhookEndpointHeadersResponseDto.md +2 -2
- data/docs/OperationalWebhookEndpointInDto.md +2 -2
- data/docs/OperationalWebhookEndpointResponseDto.md +2 -2
- data/docs/OperationalWebhookEndpointUpdateDto.md +2 -2
- data/docs/Order.md +2 -2
- data/docs/OrderRefund.md +1 -1
- data/docs/Product.md +11 -5
- data/docs/ProductCreate.md +8 -2
- data/docs/ProductUpdate.md +8 -2
- data/docs/Refund.md +5 -5
- data/docs/Subscription.md +4 -4
- data/docs/UpdateCustomerDto.md +1 -1
- data/docs/UpdateMeterDto.md +1 -1
- data/docs/UpdateWebhookEndpointDto.md +1 -1
- data/docs/WebhookDeliveryResponseDto.md +1 -1
- data/docs/WebhookEndpointApi.md +1 -1
- data/docs/WebhookEndpointResponseDto.md +1 -1
- data/docs/WebhookEntitlementGrantPayload.md +5 -5
- data/lib/solifyn/api/default_api.rb +1076 -0
- data/lib/solifyn/api/discord_integration_api.rb +137 -0
- data/lib/solifyn/models/addon.rb +10 -2
- data/lib/solifyn/models/brand.rb +0 -6
- data/lib/solifyn/models/brand_create.rb +5 -6
- data/lib/solifyn/models/brand_update.rb +5 -6
- data/lib/solifyn/models/checkout_link_response_dto.rb +0 -12
- data/lib/solifyn/models/checkout_session_details_dto.rb +0 -1
- data/lib/solifyn/models/collection_detail_response_dto.rb +0 -2
- data/lib/solifyn/models/collection_product_dto.rb +132 -18
- data/lib/solifyn/models/collection_response_dto.rb +0 -2
- data/lib/solifyn/models/customer_response_dto.rb +0 -6
- data/lib/solifyn/models/discord_roles_response_dto.rb +273 -0
- data/lib/solifyn/models/discount.rb +10 -2
- data/lib/solifyn/models/discount_create.rb +0 -3
- data/lib/solifyn/models/discount_update.rb +0 -3
- data/lib/solifyn/models/dispute.rb +0 -10
- data/lib/solifyn/models/dispute_evidence_dto.rb +0 -4
- data/lib/solifyn/models/entitlement_grant_response_dto.rb +41 -1
- data/lib/solifyn/models/instance.rb +20 -4
- data/lib/solifyn/models/license.rb +40 -8
- data/lib/solifyn/models/license_sub_dto.rb +15 -3
- data/lib/solifyn/models/meter_detail_response_dto.rb +0 -4
- data/lib/solifyn/models/meter_response_dto.rb +0 -4
- data/lib/solifyn/models/meter_usage_event_dto.rb +0 -1
- data/lib/solifyn/models/product.rb +132 -18
- data/lib/solifyn/models/product_create.rb +33 -3
- data/lib/solifyn/models/product_sub_dto.rb +5 -1
- data/lib/solifyn/models/product_update.rb +33 -3
- data/lib/solifyn/models/refund.rb +0 -5
- data/lib/solifyn/models/resolved_addon.rb +5 -1
- data/lib/solifyn/models/subscription.rb +35 -10
- data/lib/solifyn/models/subscription_detail.rb +5 -1
- data/lib/solifyn/models/webhook_dispute_payload.rb +0 -5
- data/lib/solifyn/models/webhook_entitlement_grant_payload.rb +0 -6
- data/lib/solifyn/models/webhook_license_payload.rb +40 -8
- data/lib/solifyn/models/webhook_payment_payload.rb +0 -40
- data/lib/solifyn/models/webhook_refund_payload.rb +0 -4
- data/lib/solifyn/models/webhook_subscription_payload.rb +0 -9
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +2 -0
- data/spec/api/default_api_spec.rb +239 -0
- data/spec/api/discord_integration_api_spec.rb +58 -0
- data/spec/models/discord_roles_response_dto_spec.rb +54 -0
- metadata +145 -133
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Solifyn API
|
|
3
|
+
|
|
4
|
+
#Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Solifyn
|
|
17
|
+
class DiscordRolesResponseDto
|
|
18
|
+
# The Discord Role ID
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The Discord Role Name
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# The position of the role in the server hierarchy
|
|
25
|
+
attr_accessor :position
|
|
26
|
+
|
|
27
|
+
# The color of the role (hex integer code)
|
|
28
|
+
attr_accessor :color
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'id' => :'id',
|
|
34
|
+
:'name' => :'name',
|
|
35
|
+
:'position' => :'position',
|
|
36
|
+
:'color' => :'color'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'id' => :'String',
|
|
49
|
+
:'name' => :'String',
|
|
50
|
+
:'position' => :'Float',
|
|
51
|
+
:'color' => :'Float'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::DiscordRolesResponseDto` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::DiscordRolesResponseDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'id')
|
|
77
|
+
self.id = attributes[:'id']
|
|
78
|
+
else
|
|
79
|
+
self.id = nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'name')
|
|
83
|
+
self.name = attributes[:'name']
|
|
84
|
+
else
|
|
85
|
+
self.name = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'position')
|
|
89
|
+
self.position = attributes[:'position']
|
|
90
|
+
else
|
|
91
|
+
self.position = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'color')
|
|
95
|
+
self.color = attributes[:'color']
|
|
96
|
+
else
|
|
97
|
+
self.color = nil
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
if @id.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @name.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @position.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "position", position cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @color.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "color", color cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if @id.nil?
|
|
130
|
+
return false if @name.nil?
|
|
131
|
+
return false if @position.nil?
|
|
132
|
+
return false if @color.nil?
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Checks equality by comparing each attribute.
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def ==(o)
|
|
139
|
+
return true if self.equal?(o)
|
|
140
|
+
self.class == o.class &&
|
|
141
|
+
id == o.id &&
|
|
142
|
+
name == o.name &&
|
|
143
|
+
position == o.position &&
|
|
144
|
+
color == o.color
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Integer] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[id, name, position, color].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Builds the object from hash
|
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
+
# @return [Object] Returns the model itself
|
|
162
|
+
def self.build_from_hash(attributes)
|
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
|
164
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
165
|
+
transformed_hash = {}
|
|
166
|
+
openapi_types.each_pair do |key, type|
|
|
167
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = nil
|
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
170
|
+
# check to ensure the input is an array given that the attribute
|
|
171
|
+
# is documented as an array but the input is not
|
|
172
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
173
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
174
|
+
end
|
|
175
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
new(transformed_hash)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Deserializes the data based on type
|
|
183
|
+
# @param string type Data type
|
|
184
|
+
# @param string value Value to be deserialized
|
|
185
|
+
# @return [Object] Deserialized data
|
|
186
|
+
def self._deserialize(type, value)
|
|
187
|
+
case type.to_sym
|
|
188
|
+
when :Time
|
|
189
|
+
Time.parse(value)
|
|
190
|
+
when :Date
|
|
191
|
+
Date.parse(value)
|
|
192
|
+
when :String
|
|
193
|
+
value.to_s
|
|
194
|
+
when :Integer
|
|
195
|
+
value.to_i
|
|
196
|
+
when :Float
|
|
197
|
+
value.to_f
|
|
198
|
+
when :Boolean
|
|
199
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
200
|
+
true
|
|
201
|
+
else
|
|
202
|
+
false
|
|
203
|
+
end
|
|
204
|
+
when :Object
|
|
205
|
+
# generic object (usually a Hash), return directly
|
|
206
|
+
value
|
|
207
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
208
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
209
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
210
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
211
|
+
k_type = Regexp.last_match[:k_type]
|
|
212
|
+
v_type = Regexp.last_match[:v_type]
|
|
213
|
+
{}.tap do |hash|
|
|
214
|
+
value.each do |k, v|
|
|
215
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
else # model
|
|
219
|
+
# models (e.g. Pet) or oneOf
|
|
220
|
+
klass = Solifyn.const_get(type)
|
|
221
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the string representation of the object
|
|
226
|
+
# @return [String] String presentation of the object
|
|
227
|
+
def to_s
|
|
228
|
+
to_hash.to_s
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_body
|
|
234
|
+
to_hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the object in the form of hash
|
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
|
239
|
+
def to_hash
|
|
240
|
+
hash = {}
|
|
241
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
242
|
+
value = self.send(attr)
|
|
243
|
+
if value.nil?
|
|
244
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
245
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
hash[param] = _to_hash(value)
|
|
249
|
+
end
|
|
250
|
+
hash
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Outputs non-array value in the form of hash
|
|
254
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
255
|
+
# @param [Object] value Any valid value
|
|
256
|
+
# @return [Hash] Returns the value in the form of hash
|
|
257
|
+
def _to_hash(value)
|
|
258
|
+
if value.is_a?(Array)
|
|
259
|
+
value.compact.map { |v| _to_hash(v) }
|
|
260
|
+
elsif value.is_a?(Hash)
|
|
261
|
+
{}.tap do |hash|
|
|
262
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
263
|
+
end
|
|
264
|
+
elsif value.respond_to? :to_hash
|
|
265
|
+
value.to_hash
|
|
266
|
+
else
|
|
267
|
+
value
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
end
|
|
@@ -123,8 +123,6 @@ module Solifyn
|
|
|
123
123
|
# List of attributes with nullable: true
|
|
124
124
|
def self.openapi_nullable
|
|
125
125
|
Set.new([
|
|
126
|
-
:'usage_limit',
|
|
127
|
-
:'expires_at',
|
|
128
126
|
])
|
|
129
127
|
end
|
|
130
128
|
|
|
@@ -245,10 +243,18 @@ module Solifyn
|
|
|
245
243
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
246
244
|
end
|
|
247
245
|
|
|
246
|
+
if @usage_limit.nil?
|
|
247
|
+
invalid_properties.push('invalid value for "usage_limit", usage_limit cannot be nil.')
|
|
248
|
+
end
|
|
249
|
+
|
|
248
250
|
if @times_used.nil?
|
|
249
251
|
invalid_properties.push('invalid value for "times_used", times_used cannot be nil.')
|
|
250
252
|
end
|
|
251
253
|
|
|
254
|
+
if @expires_at.nil?
|
|
255
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
256
|
+
end
|
|
257
|
+
|
|
252
258
|
if @status.nil?
|
|
253
259
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
254
260
|
end
|
|
@@ -279,7 +285,9 @@ module Solifyn
|
|
|
279
285
|
type_validator = EnumAttributeValidator.new('String', ["percentage", "fixed_amount"])
|
|
280
286
|
return false unless type_validator.valid?(@type)
|
|
281
287
|
return false if @amount.nil?
|
|
288
|
+
return false if @usage_limit.nil?
|
|
282
289
|
return false if @times_used.nil?
|
|
290
|
+
return false if @expires_at.nil?
|
|
283
291
|
return false if @status.nil?
|
|
284
292
|
status_validator = EnumAttributeValidator.new('String', ["active", "expired"])
|
|
285
293
|
return false unless status_validator.valid?(@status)
|
|
@@ -140,16 +140,6 @@ module Solifyn
|
|
|
140
140
|
# List of attributes with nullable: true
|
|
141
141
|
def self.openapi_nullable
|
|
142
142
|
Set.new([
|
|
143
|
-
:'reason',
|
|
144
|
-
:'needs_response_by',
|
|
145
|
-
:'billing_address',
|
|
146
|
-
:'customer_name',
|
|
147
|
-
:'customer_email',
|
|
148
|
-
:'notes',
|
|
149
|
-
:'product_description',
|
|
150
|
-
:'service_date',
|
|
151
|
-
:'access_activity_log',
|
|
152
|
-
:'evidence',
|
|
153
143
|
])
|
|
154
144
|
end
|
|
155
145
|
|
|
@@ -42,6 +42,18 @@ module Solifyn
|
|
|
42
42
|
# The connected customer GitHub username.
|
|
43
43
|
attr_accessor :github_username
|
|
44
44
|
|
|
45
|
+
# Target Discord Guild ID if type is DISCORD.
|
|
46
|
+
attr_accessor :discord_guild_id
|
|
47
|
+
|
|
48
|
+
# Target Discord Role ID if type is DISCORD.
|
|
49
|
+
attr_accessor :discord_role_id
|
|
50
|
+
|
|
51
|
+
# The connected customer Discord username.
|
|
52
|
+
attr_accessor :discord_username
|
|
53
|
+
|
|
54
|
+
# The connected customer Discord user ID.
|
|
55
|
+
attr_accessor :discord_user_id
|
|
56
|
+
|
|
45
57
|
# Delivery status of the collaborator invite (PENDING, DELIVERED, FAILED, REVOKED).
|
|
46
58
|
attr_accessor :status
|
|
47
59
|
|
|
@@ -72,6 +84,10 @@ module Solifyn
|
|
|
72
84
|
:'github_repo' => :'githubRepo',
|
|
73
85
|
:'github_permission' => :'githubPermission',
|
|
74
86
|
:'github_username' => :'githubUsername',
|
|
87
|
+
:'discord_guild_id' => :'discordGuildId',
|
|
88
|
+
:'discord_role_id' => :'discordRoleId',
|
|
89
|
+
:'discord_username' => :'discordUsername',
|
|
90
|
+
:'discord_user_id' => :'discordUserId',
|
|
75
91
|
:'status' => :'status',
|
|
76
92
|
:'oauth_url' => :'oauthUrl',
|
|
77
93
|
:'error_details' => :'errorDetails',
|
|
@@ -98,6 +114,10 @@ module Solifyn
|
|
|
98
114
|
:'github_repo' => :'String',
|
|
99
115
|
:'github_permission' => :'String',
|
|
100
116
|
:'github_username' => :'String',
|
|
117
|
+
:'discord_guild_id' => :'String',
|
|
118
|
+
:'discord_role_id' => :'String',
|
|
119
|
+
:'discord_username' => :'String',
|
|
120
|
+
:'discord_user_id' => :'String',
|
|
101
121
|
:'status' => :'String',
|
|
102
122
|
:'oauth_url' => :'String',
|
|
103
123
|
:'error_details' => :'String',
|
|
@@ -174,6 +194,22 @@ module Solifyn
|
|
|
174
194
|
self.github_username = attributes[:'github_username']
|
|
175
195
|
end
|
|
176
196
|
|
|
197
|
+
if attributes.key?(:'discord_guild_id')
|
|
198
|
+
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'discord_role_id')
|
|
202
|
+
self.discord_role_id = attributes[:'discord_role_id']
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'discord_username')
|
|
206
|
+
self.discord_username = attributes[:'discord_username']
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'discord_user_id')
|
|
210
|
+
self.discord_user_id = attributes[:'discord_user_id']
|
|
211
|
+
end
|
|
212
|
+
|
|
177
213
|
if attributes.key?(:'status')
|
|
178
214
|
self.status = attributes[:'status']
|
|
179
215
|
else
|
|
@@ -274,6 +310,10 @@ module Solifyn
|
|
|
274
310
|
github_repo == o.github_repo &&
|
|
275
311
|
github_permission == o.github_permission &&
|
|
276
312
|
github_username == o.github_username &&
|
|
313
|
+
discord_guild_id == o.discord_guild_id &&
|
|
314
|
+
discord_role_id == o.discord_role_id &&
|
|
315
|
+
discord_username == o.discord_username &&
|
|
316
|
+
discord_user_id == o.discord_user_id &&
|
|
277
317
|
status == o.status &&
|
|
278
318
|
oauth_url == o.oauth_url &&
|
|
279
319
|
error_details == o.error_details &&
|
|
@@ -291,7 +331,7 @@ module Solifyn
|
|
|
291
331
|
# Calculates hash code according to all attributes.
|
|
292
332
|
# @return [Integer] Hash code
|
|
293
333
|
def hash
|
|
294
|
-
[id, business_id, customer_id, payment_id, product_id, type, github_repo, github_permission, github_username, status, oauth_url, error_details, metadata, created_at, updated_at].hash
|
|
334
|
+
[id, business_id, customer_id, payment_id, product_id, type, github_repo, github_permission, github_username, discord_guild_id, discord_role_id, discord_username, discord_user_id, status, oauth_url, error_details, metadata, created_at, updated_at].hash
|
|
295
335
|
end
|
|
296
336
|
|
|
297
337
|
# Builds the object from hash
|
|
@@ -71,10 +71,6 @@ module Solifyn
|
|
|
71
71
|
# List of attributes with nullable: true
|
|
72
72
|
def self.openapi_nullable
|
|
73
73
|
Set.new([
|
|
74
|
-
:'instance_id',
|
|
75
|
-
:'instance_name',
|
|
76
|
-
:'ip_address',
|
|
77
|
-
:'last_seen_at'
|
|
78
74
|
])
|
|
79
75
|
end
|
|
80
76
|
|
|
@@ -149,10 +145,26 @@ module Solifyn
|
|
|
149
145
|
invalid_properties.push('invalid value for "license_id", license_id cannot be nil.')
|
|
150
146
|
end
|
|
151
147
|
|
|
148
|
+
if @instance_id.nil?
|
|
149
|
+
invalid_properties.push('invalid value for "instance_id", instance_id cannot be nil.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @instance_name.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "instance_name", instance_name cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if @ip_address.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "ip_address", ip_address cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
152
160
|
if @activated_at.nil?
|
|
153
161
|
invalid_properties.push('invalid value for "activated_at", activated_at cannot be nil.')
|
|
154
162
|
end
|
|
155
163
|
|
|
164
|
+
if @last_seen_at.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "last_seen_at", last_seen_at cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
156
168
|
invalid_properties
|
|
157
169
|
end
|
|
158
170
|
|
|
@@ -162,7 +174,11 @@ module Solifyn
|
|
|
162
174
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
175
|
return false if @id.nil?
|
|
164
176
|
return false if @license_id.nil?
|
|
177
|
+
return false if @instance_id.nil?
|
|
178
|
+
return false if @instance_name.nil?
|
|
179
|
+
return false if @ip_address.nil?
|
|
165
180
|
return false if @activated_at.nil?
|
|
181
|
+
return false if @last_seen_at.nil?
|
|
166
182
|
true
|
|
167
183
|
end
|
|
168
184
|
|
|
@@ -138,14 +138,6 @@ module Solifyn
|
|
|
138
138
|
# List of attributes with nullable: true
|
|
139
139
|
def self.openapi_nullable
|
|
140
140
|
Set.new([
|
|
141
|
-
:'product_id',
|
|
142
|
-
:'payment_id',
|
|
143
|
-
:'customer_id',
|
|
144
|
-
:'activation_limit',
|
|
145
|
-
:'activation_message',
|
|
146
|
-
:'expiry_hours',
|
|
147
|
-
:'expires_at',
|
|
148
|
-
:'filters',
|
|
149
141
|
])
|
|
150
142
|
end
|
|
151
143
|
|
|
@@ -282,10 +274,42 @@ module Solifyn
|
|
|
282
274
|
invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
|
|
283
275
|
end
|
|
284
276
|
|
|
277
|
+
if @product_id.nil?
|
|
278
|
+
invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if @payment_id.nil?
|
|
282
|
+
invalid_properties.push('invalid value for "payment_id", payment_id cannot be nil.')
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if @customer_id.nil?
|
|
286
|
+
invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
if @activation_limit.nil?
|
|
290
|
+
invalid_properties.push('invalid value for "activation_limit", activation_limit cannot be nil.')
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if @activation_message.nil?
|
|
294
|
+
invalid_properties.push('invalid value for "activation_message", activation_message cannot be nil.')
|
|
295
|
+
end
|
|
296
|
+
|
|
285
297
|
if @instances_count.nil?
|
|
286
298
|
invalid_properties.push('invalid value for "instances_count", instances_count cannot be nil.')
|
|
287
299
|
end
|
|
288
300
|
|
|
301
|
+
if @expiry_hours.nil?
|
|
302
|
+
invalid_properties.push('invalid value for "expiry_hours", expiry_hours cannot be nil.')
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if @expires_at.nil?
|
|
306
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if @filters.nil?
|
|
310
|
+
invalid_properties.push('invalid value for "filters", filters cannot be nil.')
|
|
311
|
+
end
|
|
312
|
+
|
|
289
313
|
if @archived.nil?
|
|
290
314
|
invalid_properties.push('invalid value for "archived", archived cannot be nil.')
|
|
291
315
|
end
|
|
@@ -311,7 +335,15 @@ module Solifyn
|
|
|
311
335
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DISABLED", "REVOKED"])
|
|
312
336
|
return false unless status_validator.valid?(@status)
|
|
313
337
|
return false if @business_id.nil?
|
|
338
|
+
return false if @product_id.nil?
|
|
339
|
+
return false if @payment_id.nil?
|
|
340
|
+
return false if @customer_id.nil?
|
|
341
|
+
return false if @activation_limit.nil?
|
|
342
|
+
return false if @activation_message.nil?
|
|
314
343
|
return false if @instances_count.nil?
|
|
344
|
+
return false if @expiry_hours.nil?
|
|
345
|
+
return false if @expires_at.nil?
|
|
346
|
+
return false if @filters.nil?
|
|
315
347
|
return false if @archived.nil?
|
|
316
348
|
return false if @created_at.nil?
|
|
317
349
|
return false if @updated_at.nil?
|
|
@@ -63,9 +63,6 @@ module Solifyn
|
|
|
63
63
|
# List of attributes with nullable: true
|
|
64
64
|
def self.openapi_nullable
|
|
65
65
|
Set.new([
|
|
66
|
-
:'activation_limit',
|
|
67
|
-
:'activation_message',
|
|
68
|
-
:'expires_at',
|
|
69
66
|
])
|
|
70
67
|
end
|
|
71
68
|
|
|
@@ -142,6 +139,18 @@ module Solifyn
|
|
|
142
139
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
143
140
|
end
|
|
144
141
|
|
|
142
|
+
if @activation_limit.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "activation_limit", activation_limit cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if @activation_message.nil?
|
|
147
|
+
invalid_properties.push('invalid value for "activation_message", activation_message cannot be nil.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @expires_at.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
145
154
|
invalid_properties
|
|
146
155
|
end
|
|
147
156
|
|
|
@@ -152,6 +161,9 @@ module Solifyn
|
|
|
152
161
|
return false if @id.nil?
|
|
153
162
|
return false if @key.nil?
|
|
154
163
|
return false if @status.nil?
|
|
164
|
+
return false if @activation_limit.nil?
|
|
165
|
+
return false if @activation_message.nil?
|
|
166
|
+
return false if @expires_at.nil?
|
|
155
167
|
true
|
|
156
168
|
end
|
|
157
169
|
|