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,137 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module Solifyn
|
|
16
|
+
class DiscordIntegrationApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get Discord Bot Installation URL
|
|
23
|
+
# Generates the URL to invite the system-wide Discord Bot onto the merchant's Discord server.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :product_id Optional Product ID to redirect back to after installation
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def discord_get_install_url(opts = {})
|
|
28
|
+
discord_get_install_url_with_http_info(opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get Discord Bot Installation URL
|
|
33
|
+
# Generates the URL to invite the system-wide Discord Bot onto the merchant's Discord server.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :product_id Optional Product ID to redirect back to after installation
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def discord_get_install_url_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DiscordIntegrationApi.discord_get_install_url ...'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/v1/discord/install'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil?
|
|
47
|
+
|
|
48
|
+
# header parameters
|
|
49
|
+
header_params = opts[:header_params] || {}
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:debug_body]
|
|
56
|
+
|
|
57
|
+
# return_type
|
|
58
|
+
return_type = opts[:debug_return_type]
|
|
59
|
+
|
|
60
|
+
# auth_names
|
|
61
|
+
auth_names = opts[:debug_auth_names] || []
|
|
62
|
+
|
|
63
|
+
new_options = opts.merge(
|
|
64
|
+
:operation => :"DiscordIntegrationApi.discord_get_install_url",
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
74
|
+
if @api_client.config.debugging
|
|
75
|
+
@api_client.config.logger.debug "API called: DiscordIntegrationApi#discord_get_install_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
76
|
+
end
|
|
77
|
+
return data, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List Guild Discord Roles
|
|
81
|
+
# Retrieves all roles available in the connected merchant's Discord server/guild.
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [Array<DiscordRolesResponseDto>]
|
|
84
|
+
def discord_list_roles(opts = {})
|
|
85
|
+
data, _status_code, _headers = discord_list_roles_with_http_info(opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# List Guild Discord Roles
|
|
90
|
+
# Retrieves all roles available in the connected merchant's Discord server/guild.
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @return [Array<(Array<DiscordRolesResponseDto>, Integer, Hash)>] Array<DiscordRolesResponseDto> data, response status code and response headers
|
|
93
|
+
def discord_list_roles_with_http_info(opts = {})
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug 'Calling API: DiscordIntegrationApi.discord_list_roles ...'
|
|
96
|
+
end
|
|
97
|
+
# resource path
|
|
98
|
+
local_var_path = '/v1/discord/roles'
|
|
99
|
+
|
|
100
|
+
# query parameters
|
|
101
|
+
query_params = opts[:query_params] || {}
|
|
102
|
+
|
|
103
|
+
# header parameters
|
|
104
|
+
header_params = opts[:header_params] || {}
|
|
105
|
+
# HTTP header 'Accept' (if needed)
|
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
107
|
+
|
|
108
|
+
# form parameters
|
|
109
|
+
form_params = opts[:form_params] || {}
|
|
110
|
+
|
|
111
|
+
# http body (model)
|
|
112
|
+
post_body = opts[:debug_body]
|
|
113
|
+
|
|
114
|
+
# return_type
|
|
115
|
+
return_type = opts[:debug_return_type] || 'Array<DiscordRolesResponseDto>'
|
|
116
|
+
|
|
117
|
+
# auth_names
|
|
118
|
+
auth_names = opts[:debug_auth_names] || []
|
|
119
|
+
|
|
120
|
+
new_options = opts.merge(
|
|
121
|
+
:operation => :"DiscordIntegrationApi.discord_list_roles",
|
|
122
|
+
:header_params => header_params,
|
|
123
|
+
:query_params => query_params,
|
|
124
|
+
:form_params => form_params,
|
|
125
|
+
:body => post_body,
|
|
126
|
+
:auth_names => auth_names,
|
|
127
|
+
:return_type => return_type
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug "API called: DiscordIntegrationApi#discord_list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
|
+
end
|
|
134
|
+
return data, status_code, headers
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
data/lib/solifyn/models/addon.rb
CHANGED
|
@@ -60,8 +60,6 @@ module Solifyn
|
|
|
60
60
|
# List of attributes with nullable: true
|
|
61
61
|
def self.openapi_nullable
|
|
62
62
|
Set.new([
|
|
63
|
-
:'max_quantity',
|
|
64
|
-
:'price_override',
|
|
65
63
|
])
|
|
66
64
|
end
|
|
67
65
|
|
|
@@ -124,6 +122,14 @@ module Solifyn
|
|
|
124
122
|
invalid_properties.push('invalid value for "min_quantity", min_quantity cannot be nil.')
|
|
125
123
|
end
|
|
126
124
|
|
|
125
|
+
if @max_quantity.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "max_quantity", max_quantity cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @price_override.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "price_override", price_override cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
127
133
|
if @is_seat_addon.nil?
|
|
128
134
|
invalid_properties.push('invalid value for "is_seat_addon", is_seat_addon cannot be nil.')
|
|
129
135
|
end
|
|
@@ -137,6 +143,8 @@ module Solifyn
|
|
|
137
143
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
144
|
return false if @product_id.nil?
|
|
139
145
|
return false if @min_quantity.nil?
|
|
146
|
+
return false if @max_quantity.nil?
|
|
147
|
+
return false if @price_override.nil?
|
|
140
148
|
return false if @is_seat_addon.nil?
|
|
141
149
|
true
|
|
142
150
|
end
|
data/lib/solifyn/models/brand.rb
CHANGED
|
@@ -65,11 +65,6 @@ module Solifyn
|
|
|
65
65
|
# List of attributes with nullable: true
|
|
66
66
|
def self.openapi_nullable
|
|
67
67
|
Set.new([
|
|
68
|
-
:'website_url',
|
|
69
|
-
:'support_email',
|
|
70
|
-
:'description',
|
|
71
|
-
:'logo_url',
|
|
72
|
-
:'statement_descriptor'
|
|
73
68
|
])
|
|
74
69
|
end
|
|
75
70
|
|
|
@@ -162,7 +157,11 @@ module Solifyn
|
|
|
162
157
|
# Custom attribute writer method with validation
|
|
163
158
|
# @param [Object] statement_descriptor Value to be assigned
|
|
164
159
|
def statement_descriptor=(statement_descriptor)
|
|
165
|
-
if
|
|
160
|
+
if statement_descriptor.nil?
|
|
161
|
+
fail ArgumentError, 'statement_descriptor cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if statement_descriptor.to_s.length > 22
|
|
166
165
|
fail ArgumentError, 'invalid value for "statement_descriptor", the character length must be smaller than or equal to 22.'
|
|
167
166
|
end
|
|
168
167
|
|
|
@@ -65,11 +65,6 @@ module Solifyn
|
|
|
65
65
|
# List of attributes with nullable: true
|
|
66
66
|
def self.openapi_nullable
|
|
67
67
|
Set.new([
|
|
68
|
-
:'website_url',
|
|
69
|
-
:'support_email',
|
|
70
|
-
:'description',
|
|
71
|
-
:'logo_url',
|
|
72
|
-
:'statement_descriptor'
|
|
73
68
|
])
|
|
74
69
|
end
|
|
75
70
|
|
|
@@ -155,7 +150,11 @@ module Solifyn
|
|
|
155
150
|
# Custom attribute writer method with validation
|
|
156
151
|
# @param [Object] statement_descriptor Value to be assigned
|
|
157
152
|
def statement_descriptor=(statement_descriptor)
|
|
158
|
-
if
|
|
153
|
+
if statement_descriptor.nil?
|
|
154
|
+
fail ArgumentError, 'statement_descriptor cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if statement_descriptor.to_s.length > 22
|
|
159
158
|
fail ArgumentError, 'invalid value for "statement_descriptor", the character length must be smaller than or equal to 22.'
|
|
160
159
|
end
|
|
161
160
|
|
|
@@ -120,18 +120,6 @@ module Solifyn
|
|
|
120
120
|
# List of attributes with nullable: true
|
|
121
121
|
def self.openapi_nullable
|
|
122
122
|
Set.new([
|
|
123
|
-
:'title',
|
|
124
|
-
:'product_id',
|
|
125
|
-
:'collection_id',
|
|
126
|
-
:'customer_name',
|
|
127
|
-
:'customer_email',
|
|
128
|
-
:'address_line1',
|
|
129
|
-
:'city',
|
|
130
|
-
:'state',
|
|
131
|
-
:'postal_code',
|
|
132
|
-
:'country',
|
|
133
|
-
:'redirect_url',
|
|
134
|
-
:'cancel_url',
|
|
135
123
|
])
|
|
136
124
|
end
|
|
137
125
|
|
|
@@ -60,6 +60,15 @@ module Solifyn
|
|
|
60
60
|
# GitHub collaborator permission level.
|
|
61
61
|
attr_accessor :github_permission
|
|
62
62
|
|
|
63
|
+
# Whether the product includes Discord role access.
|
|
64
|
+
attr_accessor :has_discord_access
|
|
65
|
+
|
|
66
|
+
# Discord Guild (Server) ID to grant access to.
|
|
67
|
+
attr_accessor :discord_guild_id
|
|
68
|
+
|
|
69
|
+
# Discord Role ID to assign to the user.
|
|
70
|
+
attr_accessor :discord_role_id
|
|
71
|
+
|
|
63
72
|
# Whether the product price already includes applicable sales taxes.
|
|
64
73
|
attr_accessor :is_tax_inclusive
|
|
65
74
|
|
|
@@ -166,6 +175,9 @@ module Solifyn
|
|
|
166
175
|
:'has_github_access' => :'hasGithubAccess',
|
|
167
176
|
:'github_repo' => :'githubRepo',
|
|
168
177
|
:'github_permission' => :'githubPermission',
|
|
178
|
+
:'has_discord_access' => :'hasDiscordAccess',
|
|
179
|
+
:'discord_guild_id' => :'discordGuildId',
|
|
180
|
+
:'discord_role_id' => :'discordRoleId',
|
|
169
181
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
170
182
|
:'billing_period' => :'billingPeriod',
|
|
171
183
|
:'trial_period_days' => :'trialPeriodDays',
|
|
@@ -214,6 +226,9 @@ module Solifyn
|
|
|
214
226
|
:'has_github_access' => :'Boolean',
|
|
215
227
|
:'github_repo' => :'String',
|
|
216
228
|
:'github_permission' => :'String',
|
|
229
|
+
:'has_discord_access' => :'Boolean',
|
|
230
|
+
:'discord_guild_id' => :'String',
|
|
231
|
+
:'discord_role_id' => :'String',
|
|
217
232
|
:'is_tax_inclusive' => :'Boolean',
|
|
218
233
|
:'billing_period' => :'Integer',
|
|
219
234
|
:'trial_period_days' => :'Integer',
|
|
@@ -242,23 +257,6 @@ module Solifyn
|
|
|
242
257
|
# List of attributes with nullable: true
|
|
243
258
|
def self.openapi_nullable
|
|
244
259
|
Set.new([
|
|
245
|
-
:'description',
|
|
246
|
-
:'image_url',
|
|
247
|
-
:'discount',
|
|
248
|
-
:'github_repo',
|
|
249
|
-
:'github_permission',
|
|
250
|
-
:'billing_period',
|
|
251
|
-
:'trial_period_days',
|
|
252
|
-
:'expiration_days',
|
|
253
|
-
:'statement_descriptor',
|
|
254
|
-
:'metadata',
|
|
255
|
-
:'custom_fields',
|
|
256
|
-
:'stock',
|
|
257
|
-
:'brand_id',
|
|
258
|
-
:'digital_link',
|
|
259
|
-
:'instructions',
|
|
260
|
-
:'activation_message',
|
|
261
|
-
:'expiry_hours',
|
|
262
260
|
])
|
|
263
261
|
end
|
|
264
262
|
|
|
@@ -365,6 +363,24 @@ module Solifyn
|
|
|
365
363
|
self.github_permission = nil
|
|
366
364
|
end
|
|
367
365
|
|
|
366
|
+
if attributes.key?(:'has_discord_access')
|
|
367
|
+
self.has_discord_access = attributes[:'has_discord_access']
|
|
368
|
+
else
|
|
369
|
+
self.has_discord_access = nil
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if attributes.key?(:'discord_guild_id')
|
|
373
|
+
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
374
|
+
else
|
|
375
|
+
self.discord_guild_id = nil
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
if attributes.key?(:'discord_role_id')
|
|
379
|
+
self.discord_role_id = attributes[:'discord_role_id']
|
|
380
|
+
else
|
|
381
|
+
self.discord_role_id = nil
|
|
382
|
+
end
|
|
383
|
+
|
|
368
384
|
if attributes.key?(:'is_tax_inclusive')
|
|
369
385
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
370
386
|
else
|
|
@@ -527,6 +543,10 @@ module Solifyn
|
|
|
527
543
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
528
544
|
end
|
|
529
545
|
|
|
546
|
+
if @image_url.nil?
|
|
547
|
+
invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
|
|
548
|
+
end
|
|
549
|
+
|
|
530
550
|
if @tax_category.nil?
|
|
531
551
|
invalid_properties.push('invalid value for "tax_category", tax_category cannot be nil.')
|
|
532
552
|
end
|
|
@@ -535,6 +555,10 @@ module Solifyn
|
|
|
535
555
|
invalid_properties.push('invalid value for "pricing_type", pricing_type cannot be nil.')
|
|
536
556
|
end
|
|
537
557
|
|
|
558
|
+
if @discount.nil?
|
|
559
|
+
invalid_properties.push('invalid value for "discount", discount cannot be nil.')
|
|
560
|
+
end
|
|
561
|
+
|
|
538
562
|
if @has_license_key.nil?
|
|
539
563
|
invalid_properties.push('invalid value for "has_license_key", has_license_key cannot be nil.')
|
|
540
564
|
end
|
|
@@ -547,14 +571,62 @@ module Solifyn
|
|
|
547
571
|
invalid_properties.push('invalid value for "has_github_access", has_github_access cannot be nil.')
|
|
548
572
|
end
|
|
549
573
|
|
|
574
|
+
if @github_repo.nil?
|
|
575
|
+
invalid_properties.push('invalid value for "github_repo", github_repo cannot be nil.')
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
if @github_permission.nil?
|
|
579
|
+
invalid_properties.push('invalid value for "github_permission", github_permission cannot be nil.')
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
if @has_discord_access.nil?
|
|
583
|
+
invalid_properties.push('invalid value for "has_discord_access", has_discord_access cannot be nil.')
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
if @discord_guild_id.nil?
|
|
587
|
+
invalid_properties.push('invalid value for "discord_guild_id", discord_guild_id cannot be nil.')
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
if @discord_role_id.nil?
|
|
591
|
+
invalid_properties.push('invalid value for "discord_role_id", discord_role_id cannot be nil.')
|
|
592
|
+
end
|
|
593
|
+
|
|
550
594
|
if @is_tax_inclusive.nil?
|
|
551
595
|
invalid_properties.push('invalid value for "is_tax_inclusive", is_tax_inclusive cannot be nil.')
|
|
552
596
|
end
|
|
553
597
|
|
|
598
|
+
if @billing_period.nil?
|
|
599
|
+
invalid_properties.push('invalid value for "billing_period", billing_period cannot be nil.')
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
if @trial_period_days.nil?
|
|
603
|
+
invalid_properties.push('invalid value for "trial_period_days", trial_period_days cannot be nil.')
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
if @expiration_days.nil?
|
|
607
|
+
invalid_properties.push('invalid value for "expiration_days", expiration_days cannot be nil.')
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
if @statement_descriptor.nil?
|
|
611
|
+
invalid_properties.push('invalid value for "statement_descriptor", statement_descriptor cannot be nil.')
|
|
612
|
+
end
|
|
613
|
+
|
|
554
614
|
if @pay_what_you_want.nil?
|
|
555
615
|
invalid_properties.push('invalid value for "pay_what_you_want", pay_what_you_want cannot be nil.')
|
|
556
616
|
end
|
|
557
617
|
|
|
618
|
+
if @metadata.nil?
|
|
619
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
if @custom_fields.nil?
|
|
623
|
+
invalid_properties.push('invalid value for "custom_fields", custom_fields cannot be nil.')
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
if @stock.nil?
|
|
627
|
+
invalid_properties.push('invalid value for "stock", stock cannot be nil.')
|
|
628
|
+
end
|
|
629
|
+
|
|
558
630
|
if @activation_limit.nil?
|
|
559
631
|
invalid_properties.push('invalid value for "activation_limit", activation_limit cannot be nil.')
|
|
560
632
|
end
|
|
@@ -579,6 +651,26 @@ module Solifyn
|
|
|
579
651
|
invalid_properties.push('invalid value for "is_permanently_deleted", is_permanently_deleted cannot be nil.')
|
|
580
652
|
end
|
|
581
653
|
|
|
654
|
+
if @brand_id.nil?
|
|
655
|
+
invalid_properties.push('invalid value for "brand_id", brand_id cannot be nil.')
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
if @digital_link.nil?
|
|
659
|
+
invalid_properties.push('invalid value for "digital_link", digital_link cannot be nil.')
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
if @instructions.nil?
|
|
663
|
+
invalid_properties.push('invalid value for "instructions", instructions cannot be nil.')
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
if @activation_message.nil?
|
|
667
|
+
invalid_properties.push('invalid value for "activation_message", activation_message cannot be nil.')
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
if @expiry_hours.nil?
|
|
671
|
+
invalid_properties.push('invalid value for "expiry_hours", expiry_hours cannot be nil.')
|
|
672
|
+
end
|
|
673
|
+
|
|
582
674
|
if @business_id.nil?
|
|
583
675
|
invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
|
|
584
676
|
end
|
|
@@ -599,25 +691,44 @@ module Solifyn
|
|
|
599
691
|
return false if @price.nil?
|
|
600
692
|
return false if @currency.nil?
|
|
601
693
|
return false if @status.nil?
|
|
694
|
+
return false if @image_url.nil?
|
|
602
695
|
return false if @tax_category.nil?
|
|
603
696
|
tax_category_validator = EnumAttributeValidator.new('String', ["digital_products", "saas", "physical_products", "service"])
|
|
604
697
|
return false unless tax_category_validator.valid?(@tax_category)
|
|
605
698
|
return false if @pricing_type.nil?
|
|
606
699
|
pricing_type_validator = EnumAttributeValidator.new('String', ["usage_based", "one_time", "renewal"])
|
|
607
700
|
return false unless pricing_type_validator.valid?(@pricing_type)
|
|
701
|
+
return false if @discount.nil?
|
|
608
702
|
return false if @has_license_key.nil?
|
|
609
703
|
return false if @has_digital_delivery.nil?
|
|
610
704
|
return false if @has_github_access.nil?
|
|
705
|
+
return false if @github_repo.nil?
|
|
706
|
+
return false if @github_permission.nil?
|
|
611
707
|
github_permission_validator = EnumAttributeValidator.new('String', ["pull", "triage", "push", "maintain", "admin"])
|
|
612
708
|
return false unless github_permission_validator.valid?(@github_permission)
|
|
709
|
+
return false if @has_discord_access.nil?
|
|
710
|
+
return false if @discord_guild_id.nil?
|
|
711
|
+
return false if @discord_role_id.nil?
|
|
613
712
|
return false if @is_tax_inclusive.nil?
|
|
713
|
+
return false if @billing_period.nil?
|
|
714
|
+
return false if @trial_period_days.nil?
|
|
715
|
+
return false if @expiration_days.nil?
|
|
716
|
+
return false if @statement_descriptor.nil?
|
|
614
717
|
return false if @pay_what_you_want.nil?
|
|
718
|
+
return false if @metadata.nil?
|
|
719
|
+
return false if @custom_fields.nil?
|
|
720
|
+
return false if @stock.nil?
|
|
615
721
|
return false if @activation_limit.nil?
|
|
616
722
|
return false if @is_listed.nil?
|
|
617
723
|
return false if @is_free.nil?
|
|
618
724
|
return false if @created_at.nil?
|
|
619
725
|
return false if @updated_at.nil?
|
|
620
726
|
return false if @is_permanently_deleted.nil?
|
|
727
|
+
return false if @brand_id.nil?
|
|
728
|
+
return false if @digital_link.nil?
|
|
729
|
+
return false if @instructions.nil?
|
|
730
|
+
return false if @activation_message.nil?
|
|
731
|
+
return false if @expiry_hours.nil?
|
|
621
732
|
return false if @business_id.nil?
|
|
622
733
|
return false if @quantity.nil?
|
|
623
734
|
true
|
|
@@ -673,6 +784,9 @@ module Solifyn
|
|
|
673
784
|
has_github_access == o.has_github_access &&
|
|
674
785
|
github_repo == o.github_repo &&
|
|
675
786
|
github_permission == o.github_permission &&
|
|
787
|
+
has_discord_access == o.has_discord_access &&
|
|
788
|
+
discord_guild_id == o.discord_guild_id &&
|
|
789
|
+
discord_role_id == o.discord_role_id &&
|
|
676
790
|
is_tax_inclusive == o.is_tax_inclusive &&
|
|
677
791
|
billing_period == o.billing_period &&
|
|
678
792
|
trial_period_days == o.trial_period_days &&
|
|
@@ -706,7 +820,7 @@ module Solifyn
|
|
|
706
820
|
# Calculates hash code according to all attributes.
|
|
707
821
|
# @return [Integer] Hash code
|
|
708
822
|
def hash
|
|
709
|
-
[id, name, price, currency, description, status, image_url, tax_category, pricing_type, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission, is_tax_inclusive, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, activation_limit, is_listed, is_free, created_at, updated_at, is_permanently_deleted, brand_id, digital_link, instructions, activation_message, expiry_hours, business_id, quantity].hash
|
|
823
|
+
[id, name, price, currency, description, status, image_url, tax_category, pricing_type, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission, has_discord_access, discord_guild_id, discord_role_id, is_tax_inclusive, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, activation_limit, is_listed, is_free, created_at, updated_at, is_permanently_deleted, brand_id, digital_link, instructions, activation_message, expiry_hours, business_id, quantity].hash
|
|
710
824
|
end
|
|
711
825
|
|
|
712
826
|
# Builds the object from hash
|