solifyn 1.0.0 → 1.0.5
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 +20 -7
- data/docs/BalanceApi.md +1 -1
- data/docs/CheckoutApi.md +1 -1
- data/docs/CheckoutLinksApi.md +1 -1
- data/docs/CheckoutSessionDetailsDto.md +3 -1
- data/docs/CollectionProductDto.md +12 -0
- data/docs/CollectionsApi.md +1 -1
- data/docs/CustomersApi.md +1 -1
- data/docs/DefaultApi.md +285 -1
- data/docs/DeveloperApi.md +1 -1
- data/docs/DigitalFileApi.md +1 -1
- data/docs/DiscordIntegrationApi.md +135 -0
- data/docs/DiscordRolesResponseDto.md +24 -0
- data/docs/DiscountsApi.md +1 -1
- data/docs/DisputesApi.md +1 -1
- data/docs/EntitlementGrantResponseDto.md +54 -0
- data/docs/EntitlementGrantsApi.md +289 -0
- data/docs/GitHubIntegrationApi.md +145 -0
- data/docs/GithubReposResponseDto.md +22 -0
- data/docs/LicenseApi.md +1 -1
- data/docs/LicenseKeysApi.md +1 -1
- data/docs/LicenseKeysClientApi.md +1 -1
- data/docs/MetersApi.md +1 -1
- data/docs/OrdersApi.md +1 -1
- data/docs/Product.md +12 -0
- data/docs/ProductAddOnsApi.md +1 -1
- data/docs/ProductCreate.md +12 -0
- data/docs/ProductUpdate.md +12 -0
- data/docs/ProductsApi.md +1 -1
- data/docs/RefundRequestsApi.md +1 -1
- data/docs/RefundsChargebacksApi.md +1 -1
- data/docs/SubscriptionsApi.md +1 -1
- data/docs/SyncLoginDto.md +18 -0
- data/docs/WebhookApi.md +1 -1
- data/docs/WebhookEndpointApi.md +55 -10
- data/docs/WebhookEntitlementGrantPayload.md +44 -0
- data/git_push.sh +2 -2
- data/lib/solifyn/api/default_api.rb +248 -0
- data/lib/solifyn/api/{partner_api.rb → discord_integration_api.rb} +32 -19
- data/lib/solifyn/api/entitlement_grants_api.rb +271 -0
- data/lib/solifyn/api/git_hub_integration_api.rb +137 -0
- data/lib/solifyn/api/webhook_endpoint_api.rb +9 -9
- data/lib/solifyn/configuration.rb +4 -4
- data/lib/solifyn/models/checkout_session_details_dto.rb +16 -4
- data/lib/solifyn/models/collection_product_dto.rb +115 -1
- data/lib/solifyn/models/{payout_method.rb → discord_roles_response_dto.rb} +41 -34
- data/lib/solifyn/models/{withdrawal.rb → entitlement_grant_response_dto.rb} +149 -109
- data/lib/solifyn/models/{payout_account.rb → github_repos_response_dto.rb} +31 -24
- data/lib/solifyn/models/product.rb +115 -1
- data/lib/solifyn/models/product_create.rb +77 -1
- data/lib/solifyn/models/product_update.rb +77 -1
- data/lib/solifyn/models/{payout_method_list.rb → sync_login_dto.rb} +15 -17
- data/lib/solifyn/models/{payout_verification.rb → webhook_entitlement_grant_payload.rb} +118 -41
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +8 -0
- data/spec/api/checkout_api_spec.rb +12 -0
- data/spec/api/default_api_spec.rb +59 -11
- data/spec/api/developer_api_spec.rb +52 -29
- data/spec/api/{partner_api_spec.rb → discord_integration_api_spec.rb} +16 -11
- data/spec/api/entitlement_grants_api_spec.rb +83 -0
- data/spec/api/git_hub_integration_api_spec.rb +58 -0
- data/spec/models/checkout_session_details_dto_spec.rb +6 -0
- data/spec/models/collection_product_dto_spec.rb +28 -0
- data/spec/models/{payout_method_spec.rb → discord_roles_response_dto_spec.rb} +9 -9
- data/spec/models/{withdrawal_spec.rb → entitlement_grant_response_dto_spec.rb} +18 -18
- data/spec/models/{payout_account_spec.rb → github_repos_response_dto_spec.rb} +8 -8
- data/spec/models/order_spec.rb +6 -0
- data/spec/models/product_create_spec.rb +28 -0
- data/spec/models/product_spec.rb +28 -0
- data/spec/models/product_update_spec.rb +28 -0
- data/spec/models/{business_create_spec.rb → sync_login_dto_spec.rb} +7 -7
- data/spec/models/{business_spec.rb → webhook_entitlement_grant_payload_spec.rb} +17 -53
- metadata +162 -254
- data/docs/AffiliateApi.md +0 -845
- data/docs/BillingApi.md +0 -68
- data/docs/BrandsApi.md +0 -286
- data/docs/Business.md +0 -56
- data/docs/BusinessCreate.md +0 -18
- data/docs/BusinessFullCreate.md +0 -26
- data/docs/BusinessFullCreateResponse.md +0 -20
- data/docs/BusinessesApi.md +0 -350
- data/docs/ChatApi.md +0 -246
- data/docs/CommunityApi.md +0 -497
- data/docs/PartnerApi.md +0 -125
- data/docs/PayoutAccessToken.md +0 -20
- data/docs/PayoutAccount.md +0 -22
- data/docs/PayoutAccountLink.md +0 -20
- data/docs/PayoutMethod.md +0 -24
- data/docs/PayoutMethodList.md +0 -18
- data/docs/PayoutVerification.md +0 -24
- data/docs/PayoutVerificationList.md +0 -18
- data/docs/PayoutsApi.md +0 -579
- data/docs/TicketApi.md +0 -318
- data/docs/UserPage.md +0 -26
- data/docs/UserProfileThemesApi.md +0 -345
- data/docs/UserSettings.md +0 -34
- data/docs/UserSettingsUpdate.md +0 -76
- data/docs/UserStats.md +0 -20
- data/docs/UserTheme.md +0 -26
- data/docs/UserThemeUpdate.md +0 -22
- data/docs/WhopApiKeysRotation.md +0 -18
- data/docs/Withdrawal.md +0 -46
- data/docs/WithdrawalCreate.md +0 -22
- data/docs/WithdrawalList.md +0 -20
- data/lib/solifyn/api/affiliate_api.rb +0 -760
- data/lib/solifyn/api/billing_api.rb +0 -77
- data/lib/solifyn/api/brands_api.rb +0 -284
- data/lib/solifyn/api/businesses_api.rb +0 -338
- data/lib/solifyn/api/chat_api.rb +0 -232
- data/lib/solifyn/api/community_api.rb +0 -466
- data/lib/solifyn/api/payouts_api.rb +0 -520
- data/lib/solifyn/api/ticket_api.rb +0 -328
- data/lib/solifyn/api/user_profile_themes_api.rb +0 -313
- data/lib/solifyn/models/business.rb +0 -482
- data/lib/solifyn/models/business_create.rb +0 -241
- data/lib/solifyn/models/business_full_create.rb +0 -288
- data/lib/solifyn/models/business_full_create_response.rb +0 -239
- data/lib/solifyn/models/payout_access_token.rb +0 -239
- data/lib/solifyn/models/payout_account_link.rb +0 -239
- data/lib/solifyn/models/payout_verification_list.rb +0 -224
- data/lib/solifyn/models/user_page.rb +0 -290
- data/lib/solifyn/models/user_settings.rb +0 -337
- data/lib/solifyn/models/user_settings_update.rb +0 -505
- data/lib/solifyn/models/user_stats.rb +0 -241
- data/lib/solifyn/models/user_theme.rb +0 -276
- data/lib/solifyn/models/user_theme_update.rb +0 -235
- data/lib/solifyn/models/whop_api_keys_rotation.rb +0 -222
- data/lib/solifyn/models/withdrawal_create.rb +0 -249
- data/lib/solifyn/models/withdrawal_list.rb +0 -241
- data/spec/api/affiliate_api_spec.rb +0 -165
- data/spec/api/billing_api_spec.rb +0 -46
- data/spec/api/brands_api_spec.rb +0 -83
- data/spec/api/businesses_api_spec.rb +0 -93
- data/spec/api/chat_api_spec.rb +0 -72
- data/spec/api/community_api_spec.rb +0 -113
- data/spec/api/payouts_api_spec.rb +0 -133
- data/spec/api/ticket_api_spec.rb +0 -86
- data/spec/api/user_profile_themes_api_spec.rb +0 -91
- data/spec/models/business_full_create_response_spec.rb +0 -42
- data/spec/models/business_full_create_spec.rb +0 -60
- data/spec/models/payout_access_token_spec.rb +0 -42
- data/spec/models/payout_account_link_spec.rb +0 -42
- data/spec/models/payout_method_list_spec.rb +0 -36
- data/spec/models/payout_verification_list_spec.rb +0 -36
- data/spec/models/payout_verification_spec.rb +0 -54
- data/spec/models/user_page_spec.rb +0 -60
- data/spec/models/user_settings_spec.rb +0 -84
- data/spec/models/user_settings_update_spec.rb +0 -210
- data/spec/models/user_stats_spec.rb +0 -42
- data/spec/models/user_theme_spec.rb +0 -60
- data/spec/models/user_theme_update_spec.rb +0 -48
- data/spec/models/whop_api_keys_rotation_spec.rb +0 -36
- data/spec/models/withdrawal_create_spec.rb +0 -48
- data/spec/models/withdrawal_list_spec.rb +0 -42
|
@@ -51,6 +51,24 @@ module Solifyn
|
|
|
51
51
|
# Whether the product includes digital file downloads upon purchase.
|
|
52
52
|
attr_accessor :has_digital_delivery
|
|
53
53
|
|
|
54
|
+
# Whether the product includes GitHub repository access.
|
|
55
|
+
attr_accessor :has_github_access
|
|
56
|
+
|
|
57
|
+
# GitHub repository to grant access to (format: owner/repo).
|
|
58
|
+
attr_accessor :github_repo
|
|
59
|
+
|
|
60
|
+
# GitHub collaborator permission level.
|
|
61
|
+
attr_accessor :github_permission
|
|
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
|
+
|
|
54
72
|
# Whether the product price already includes applicable sales taxes.
|
|
55
73
|
attr_accessor :is_tax_inclusive
|
|
56
74
|
|
|
@@ -154,6 +172,12 @@ module Solifyn
|
|
|
154
172
|
:'discount' => :'discount',
|
|
155
173
|
:'has_license_key' => :'hasLicenseKey',
|
|
156
174
|
:'has_digital_delivery' => :'hasDigitalDelivery',
|
|
175
|
+
:'has_github_access' => :'hasGithubAccess',
|
|
176
|
+
:'github_repo' => :'githubRepo',
|
|
177
|
+
:'github_permission' => :'githubPermission',
|
|
178
|
+
:'has_discord_access' => :'hasDiscordAccess',
|
|
179
|
+
:'discord_guild_id' => :'discordGuildId',
|
|
180
|
+
:'discord_role_id' => :'discordRoleId',
|
|
157
181
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
158
182
|
:'billing_period' => :'billingPeriod',
|
|
159
183
|
:'trial_period_days' => :'trialPeriodDays',
|
|
@@ -199,6 +223,12 @@ module Solifyn
|
|
|
199
223
|
:'discount' => :'Float',
|
|
200
224
|
:'has_license_key' => :'Boolean',
|
|
201
225
|
:'has_digital_delivery' => :'Boolean',
|
|
226
|
+
:'has_github_access' => :'Boolean',
|
|
227
|
+
:'github_repo' => :'String',
|
|
228
|
+
:'github_permission' => :'String',
|
|
229
|
+
:'has_discord_access' => :'Boolean',
|
|
230
|
+
:'discord_guild_id' => :'String',
|
|
231
|
+
:'discord_role_id' => :'String',
|
|
202
232
|
:'is_tax_inclusive' => :'Boolean',
|
|
203
233
|
:'billing_period' => :'Integer',
|
|
204
234
|
:'trial_period_days' => :'Integer',
|
|
@@ -315,6 +345,42 @@ module Solifyn
|
|
|
315
345
|
self.has_digital_delivery = nil
|
|
316
346
|
end
|
|
317
347
|
|
|
348
|
+
if attributes.key?(:'has_github_access')
|
|
349
|
+
self.has_github_access = attributes[:'has_github_access']
|
|
350
|
+
else
|
|
351
|
+
self.has_github_access = nil
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if attributes.key?(:'github_repo')
|
|
355
|
+
self.github_repo = attributes[:'github_repo']
|
|
356
|
+
else
|
|
357
|
+
self.github_repo = nil
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
if attributes.key?(:'github_permission')
|
|
361
|
+
self.github_permission = attributes[:'github_permission']
|
|
362
|
+
else
|
|
363
|
+
self.github_permission = nil
|
|
364
|
+
end
|
|
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
|
+
|
|
318
384
|
if attributes.key?(:'is_tax_inclusive')
|
|
319
385
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
320
386
|
else
|
|
@@ -501,6 +567,30 @@ module Solifyn
|
|
|
501
567
|
invalid_properties.push('invalid value for "has_digital_delivery", has_digital_delivery cannot be nil.')
|
|
502
568
|
end
|
|
503
569
|
|
|
570
|
+
if @has_github_access.nil?
|
|
571
|
+
invalid_properties.push('invalid value for "has_github_access", has_github_access cannot be nil.')
|
|
572
|
+
end
|
|
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
|
+
|
|
504
594
|
if @is_tax_inclusive.nil?
|
|
505
595
|
invalid_properties.push('invalid value for "is_tax_inclusive", is_tax_inclusive cannot be nil.')
|
|
506
596
|
end
|
|
@@ -611,6 +701,14 @@ module Solifyn
|
|
|
611
701
|
return false if @discount.nil?
|
|
612
702
|
return false if @has_license_key.nil?
|
|
613
703
|
return false if @has_digital_delivery.nil?
|
|
704
|
+
return false if @has_github_access.nil?
|
|
705
|
+
return false if @github_repo.nil?
|
|
706
|
+
return false if @github_permission.nil?
|
|
707
|
+
github_permission_validator = EnumAttributeValidator.new('String', ["pull", "triage", "push", "maintain", "admin"])
|
|
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?
|
|
614
712
|
return false if @is_tax_inclusive.nil?
|
|
615
713
|
return false if @billing_period.nil?
|
|
616
714
|
return false if @trial_period_days.nil?
|
|
@@ -656,6 +754,16 @@ module Solifyn
|
|
|
656
754
|
@pricing_type = pricing_type
|
|
657
755
|
end
|
|
658
756
|
|
|
757
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
758
|
+
# @param [Object] github_permission Object to be assigned
|
|
759
|
+
def github_permission=(github_permission)
|
|
760
|
+
validator = EnumAttributeValidator.new('String', ["pull", "triage", "push", "maintain", "admin"])
|
|
761
|
+
unless validator.valid?(github_permission)
|
|
762
|
+
fail ArgumentError, "invalid value for \"github_permission\", must be one of #{validator.allowable_values}."
|
|
763
|
+
end
|
|
764
|
+
@github_permission = github_permission
|
|
765
|
+
end
|
|
766
|
+
|
|
659
767
|
# Checks equality by comparing each attribute.
|
|
660
768
|
# @param [Object] Object to be compared
|
|
661
769
|
def ==(o)
|
|
@@ -673,6 +781,12 @@ module Solifyn
|
|
|
673
781
|
discount == o.discount &&
|
|
674
782
|
has_license_key == o.has_license_key &&
|
|
675
783
|
has_digital_delivery == o.has_digital_delivery &&
|
|
784
|
+
has_github_access == o.has_github_access &&
|
|
785
|
+
github_repo == o.github_repo &&
|
|
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, 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
|
|
@@ -14,26 +14,26 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Solifyn
|
|
17
|
-
class
|
|
18
|
-
# The
|
|
17
|
+
class DiscordRolesResponseDto
|
|
18
|
+
# The Discord Role ID
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
attr_accessor :
|
|
21
|
+
# The Discord Role Name
|
|
22
|
+
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
24
|
+
# The position of the role in the server hierarchy
|
|
25
|
+
attr_accessor :position
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
attr_accessor :
|
|
27
|
+
# The color of the role (hex integer code)
|
|
28
|
+
attr_accessor :color
|
|
29
29
|
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
31
|
def self.attribute_map
|
|
32
32
|
{
|
|
33
33
|
:'id' => :'id',
|
|
34
|
-
:'
|
|
35
|
-
:'
|
|
36
|
-
:'
|
|
34
|
+
:'name' => :'name',
|
|
35
|
+
:'position' => :'position',
|
|
36
|
+
:'color' => :'color'
|
|
37
37
|
}
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -46,9 +46,9 @@ module Solifyn
|
|
|
46
46
|
def self.openapi_types
|
|
47
47
|
{
|
|
48
48
|
:'id' => :'String',
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'
|
|
49
|
+
:'name' => :'String',
|
|
50
|
+
:'position' => :'Float',
|
|
51
|
+
:'color' => :'Float'
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -62,13 +62,13 @@ module Solifyn
|
|
|
62
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
63
|
def initialize(attributes = {})
|
|
64
64
|
if (!attributes.is_a?(Hash))
|
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::DiscordRolesResponseDto` initialize method"
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::
|
|
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
72
|
end
|
|
73
73
|
h[k.to_sym] = v
|
|
74
74
|
}
|
|
@@ -79,20 +79,22 @@ module Solifyn
|
|
|
79
79
|
self.id = nil
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
if attributes.key?(:'
|
|
83
|
-
self.
|
|
82
|
+
if attributes.key?(:'name')
|
|
83
|
+
self.name = attributes[:'name']
|
|
84
84
|
else
|
|
85
|
-
self.
|
|
85
|
+
self.name = nil
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
if attributes.key?(:'
|
|
89
|
-
self.
|
|
88
|
+
if attributes.key?(:'position')
|
|
89
|
+
self.position = attributes[:'position']
|
|
90
90
|
else
|
|
91
|
-
self.
|
|
91
|
+
self.position = nil
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
if attributes.key?(:'
|
|
95
|
-
self.
|
|
94
|
+
if attributes.key?(:'color')
|
|
95
|
+
self.color = attributes[:'color']
|
|
96
|
+
else
|
|
97
|
+
self.color = nil
|
|
96
98
|
end
|
|
97
99
|
end
|
|
98
100
|
|
|
@@ -105,12 +107,16 @@ module Solifyn
|
|
|
105
107
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
106
108
|
end
|
|
107
109
|
|
|
108
|
-
if @
|
|
109
|
-
invalid_properties.push('invalid value for "
|
|
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.')
|
|
110
116
|
end
|
|
111
117
|
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
118
|
+
if @color.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "color", color cannot be nil.')
|
|
114
120
|
end
|
|
115
121
|
|
|
116
122
|
invalid_properties
|
|
@@ -121,8 +127,9 @@ module Solifyn
|
|
|
121
127
|
def valid?
|
|
122
128
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
129
|
return false if @id.nil?
|
|
124
|
-
return false if @
|
|
125
|
-
return false if @
|
|
130
|
+
return false if @name.nil?
|
|
131
|
+
return false if @position.nil?
|
|
132
|
+
return false if @color.nil?
|
|
126
133
|
true
|
|
127
134
|
end
|
|
128
135
|
|
|
@@ -132,9 +139,9 @@ module Solifyn
|
|
|
132
139
|
return true if self.equal?(o)
|
|
133
140
|
self.class == o.class &&
|
|
134
141
|
id == o.id &&
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
name == o.name &&
|
|
143
|
+
position == o.position &&
|
|
144
|
+
color == o.color
|
|
138
145
|
end
|
|
139
146
|
|
|
140
147
|
# @see the `==` method
|
|
@@ -146,7 +153,7 @@ module Solifyn
|
|
|
146
153
|
# Calculates hash code according to all attributes.
|
|
147
154
|
# @return [Integer] Hash code
|
|
148
155
|
def hash
|
|
149
|
-
[id,
|
|
156
|
+
[id, name, position, color].hash
|
|
150
157
|
end
|
|
151
158
|
|
|
152
159
|
# Builds the object from hash
|