solifyn 1.0.5 → 1.0.7
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/LICENSE +202 -0
- data/README.md +6 -10
- data/docs/AffiliateApi.md +845 -0
- data/docs/BillingApi.md +68 -0
- data/docs/BrandsApi.md +286 -0
- data/docs/Business.md +56 -0
- data/docs/BusinessCreate.md +18 -0
- data/docs/BusinessFullCreate.md +26 -0
- data/docs/BusinessFullCreateResponse.md +20 -0
- data/docs/BusinessesApi.md +350 -0
- data/docs/ChatApi.md +246 -0
- data/docs/CollectionProductDto.md +0 -6
- data/docs/CommunityApi.md +497 -0
- data/docs/DefaultApi.md +0 -284
- data/docs/EntitlementGrantResponseDto.md +0 -8
- data/docs/PartnerApi.md +125 -0
- data/docs/PayoutAccessToken.md +20 -0
- data/docs/PayoutAccount.md +22 -0
- data/docs/PayoutAccountLink.md +20 -0
- data/docs/PayoutMethod.md +24 -0
- data/docs/PayoutMethodList.md +18 -0
- data/docs/PayoutVerification.md +24 -0
- data/docs/PayoutVerificationList.md +18 -0
- data/docs/PayoutsApi.md +579 -0
- data/docs/Product.md +0 -6
- data/docs/ProductCreate.md +0 -6
- data/docs/ProductUpdate.md +0 -6
- data/docs/TicketApi.md +318 -0
- data/docs/UserPage.md +26 -0
- data/docs/UserProfileThemesApi.md +345 -0
- data/docs/UserSettings.md +34 -0
- data/docs/UserSettingsUpdate.md +76 -0
- data/docs/UserStats.md +20 -0
- data/docs/UserTheme.md +26 -0
- data/docs/UserThemeUpdate.md +22 -0
- data/docs/WhopApiKeysRotation.md +18 -0
- data/docs/Withdrawal.md +46 -0
- data/docs/WithdrawalCreate.md +22 -0
- data/docs/WithdrawalList.md +20 -0
- data/git_push.sh +2 -2
- data/lib/solifyn/api/affiliate_api.rb +760 -0
- data/lib/solifyn/api/billing_api.rb +77 -0
- data/lib/solifyn/api/brands_api.rb +284 -0
- data/lib/solifyn/api/businesses_api.rb +338 -0
- data/lib/solifyn/api/chat_api.rb +232 -0
- data/lib/solifyn/api/community_api.rb +466 -0
- data/lib/solifyn/api/default_api.rb +0 -248
- data/lib/solifyn/api/{discord_integration_api.rb → partner_api.rb} +19 -32
- data/lib/solifyn/api/payouts_api.rb +520 -0
- data/lib/solifyn/api/ticket_api.rb +328 -0
- data/lib/solifyn/api/user_profile_themes_api.rb +313 -0
- data/lib/solifyn/models/business.rb +482 -0
- data/lib/solifyn/models/business_create.rb +241 -0
- data/lib/solifyn/models/business_full_create.rb +288 -0
- data/lib/solifyn/models/business_full_create_response.rb +239 -0
- data/lib/solifyn/models/collection_product_dto.rb +1 -52
- data/lib/solifyn/models/entitlement_grant_response_dto.rb +1 -41
- data/lib/solifyn/models/payout_access_token.rb +239 -0
- data/lib/solifyn/models/payout_account.rb +249 -0
- data/lib/solifyn/models/payout_account_link.rb +239 -0
- data/lib/solifyn/models/{discord_roles_response_dto.rb → payout_method.rb} +34 -41
- data/lib/solifyn/models/payout_method_list.rb +224 -0
- data/lib/solifyn/models/{webhook_entitlement_grant_payload.rb → payout_verification.rb} +41 -118
- data/lib/solifyn/models/payout_verification_list.rb +224 -0
- data/lib/solifyn/models/product.rb +1 -52
- data/lib/solifyn/models/product_create.rb +1 -33
- data/lib/solifyn/models/product_update.rb +1 -33
- data/lib/solifyn/models/user_page.rb +290 -0
- data/lib/solifyn/models/user_settings.rb +337 -0
- data/lib/solifyn/models/user_settings_update.rb +505 -0
- data/lib/solifyn/models/user_stats.rb +241 -0
- data/lib/solifyn/models/user_theme.rb +276 -0
- data/lib/solifyn/models/user_theme_update.rb +235 -0
- data/lib/solifyn/models/whop_api_keys_rotation.rb +222 -0
- data/lib/solifyn/models/withdrawal.rb +411 -0
- data/lib/solifyn/models/withdrawal_create.rb +249 -0
- data/lib/solifyn/models/withdrawal_list.rb +241 -0
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +0 -3
- data/spec/api/affiliate_api_spec.rb +165 -0
- data/spec/api/billing_api_spec.rb +46 -0
- data/spec/api/brands_api_spec.rb +83 -0
- data/spec/api/businesses_api_spec.rb +93 -0
- data/spec/api/chat_api_spec.rb +72 -0
- data/spec/api/checkout_api_spec.rb +0 -12
- data/spec/api/community_api_spec.rb +113 -0
- data/spec/api/default_api_spec.rb +11 -59
- data/spec/api/developer_api_spec.rb +29 -52
- data/spec/api/{discord_integration_api_spec.rb → partner_api_spec.rb} +11 -16
- data/spec/api/payouts_api_spec.rb +133 -0
- data/spec/api/ticket_api_spec.rb +86 -0
- data/spec/api/user_profile_themes_api_spec.rb +91 -0
- data/spec/models/business_create_spec.rb +36 -0
- data/spec/models/business_full_create_response_spec.rb +42 -0
- data/spec/models/business_full_create_spec.rb +60 -0
- data/spec/models/business_spec.rb +150 -0
- data/spec/models/checkout_session_details_dto_spec.rb +0 -6
- data/spec/models/collection_product_dto_spec.rb +0 -28
- data/spec/models/order_spec.rb +0 -6
- data/spec/models/payout_access_token_spec.rb +42 -0
- data/spec/models/payout_account_link_spec.rb +42 -0
- data/spec/models/payout_account_spec.rb +48 -0
- data/spec/models/payout_method_list_spec.rb +36 -0
- data/spec/models/{discord_roles_response_dto_spec.rb → payout_method_spec.rb} +9 -9
- data/spec/models/payout_verification_list_spec.rb +36 -0
- data/spec/models/payout_verification_spec.rb +54 -0
- data/spec/models/product_create_spec.rb +0 -28
- data/spec/models/product_spec.rb +0 -28
- data/spec/models/product_update_spec.rb +0 -28
- data/spec/models/user_page_spec.rb +60 -0
- data/spec/models/user_settings_spec.rb +84 -0
- data/spec/models/user_settings_update_spec.rb +210 -0
- data/spec/models/user_stats_spec.rb +42 -0
- data/spec/models/user_theme_spec.rb +60 -0
- data/spec/models/user_theme_update_spec.rb +48 -0
- data/spec/models/whop_api_keys_rotation_spec.rb +36 -0
- data/spec/models/withdrawal_create_spec.rb +48 -0
- data/spec/models/withdrawal_list_spec.rb +42 -0
- data/spec/models/{webhook_entitlement_grant_payload_spec.rb → withdrawal_spec.rb} +23 -17
- metadata +258 -145
- data/docs/DiscordIntegrationApi.md +0 -135
- data/docs/DiscordRolesResponseDto.md +0 -24
- data/docs/WebhookEntitlementGrantPayload.md +0 -44
|
@@ -61,15 +61,6 @@ module Solifyn
|
|
|
61
61
|
# GitHub collaborator permission level.
|
|
62
62
|
attr_accessor :github_permission
|
|
63
63
|
|
|
64
|
-
# Whether the product includes Discord role access.
|
|
65
|
-
attr_accessor :has_discord_access
|
|
66
|
-
|
|
67
|
-
# Discord Guild (Server) ID to grant access to.
|
|
68
|
-
attr_accessor :discord_guild_id
|
|
69
|
-
|
|
70
|
-
# Discord Role ID to assign to the user.
|
|
71
|
-
attr_accessor :discord_role_id
|
|
72
|
-
|
|
73
64
|
# Whether the product price already includes applicable sales taxes.
|
|
74
65
|
attr_accessor :is_tax_inclusive
|
|
75
66
|
|
|
@@ -173,9 +164,6 @@ module Solifyn
|
|
|
173
164
|
:'has_github_access' => :'hasGithubAccess',
|
|
174
165
|
:'github_repo' => :'githubRepo',
|
|
175
166
|
:'github_permission' => :'githubPermission',
|
|
176
|
-
:'has_discord_access' => :'hasDiscordAccess',
|
|
177
|
-
:'discord_guild_id' => :'discordGuildId',
|
|
178
|
-
:'discord_role_id' => :'discordRoleId',
|
|
179
167
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
180
168
|
:'billing_period' => :'billingPeriod',
|
|
181
169
|
:'trial_period_days' => :'trialPeriodDays',
|
|
@@ -223,9 +211,6 @@ module Solifyn
|
|
|
223
211
|
:'has_github_access' => :'Boolean',
|
|
224
212
|
:'github_repo' => :'String',
|
|
225
213
|
:'github_permission' => :'String',
|
|
226
|
-
:'has_discord_access' => :'Boolean',
|
|
227
|
-
:'discord_guild_id' => :'String',
|
|
228
|
-
:'discord_role_id' => :'String',
|
|
229
214
|
:'is_tax_inclusive' => :'Boolean',
|
|
230
215
|
:'billing_period' => :'Integer',
|
|
231
216
|
:'trial_period_days' => :'Integer',
|
|
@@ -359,24 +344,6 @@ module Solifyn
|
|
|
359
344
|
self.github_permission = nil
|
|
360
345
|
end
|
|
361
346
|
|
|
362
|
-
if attributes.key?(:'has_discord_access')
|
|
363
|
-
self.has_discord_access = attributes[:'has_discord_access']
|
|
364
|
-
else
|
|
365
|
-
self.has_discord_access = nil
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
if attributes.key?(:'discord_guild_id')
|
|
369
|
-
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
370
|
-
else
|
|
371
|
-
self.discord_guild_id = nil
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
if attributes.key?(:'discord_role_id')
|
|
375
|
-
self.discord_role_id = attributes[:'discord_role_id']
|
|
376
|
-
else
|
|
377
|
-
self.discord_role_id = nil
|
|
378
|
-
end
|
|
379
|
-
|
|
380
347
|
if attributes.key?(:'is_tax_inclusive')
|
|
381
348
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
382
349
|
else
|
|
@@ -569,18 +536,6 @@ module Solifyn
|
|
|
569
536
|
invalid_properties.push('invalid value for "github_permission", github_permission cannot be nil.')
|
|
570
537
|
end
|
|
571
538
|
|
|
572
|
-
if @has_discord_access.nil?
|
|
573
|
-
invalid_properties.push('invalid value for "has_discord_access", has_discord_access cannot be nil.')
|
|
574
|
-
end
|
|
575
|
-
|
|
576
|
-
if @discord_guild_id.nil?
|
|
577
|
-
invalid_properties.push('invalid value for "discord_guild_id", discord_guild_id cannot be nil.')
|
|
578
|
-
end
|
|
579
|
-
|
|
580
|
-
if @discord_role_id.nil?
|
|
581
|
-
invalid_properties.push('invalid value for "discord_role_id", discord_role_id cannot be nil.')
|
|
582
|
-
end
|
|
583
|
-
|
|
584
539
|
if @is_tax_inclusive.nil?
|
|
585
540
|
invalid_properties.push('invalid value for "is_tax_inclusive", is_tax_inclusive cannot be nil.')
|
|
586
541
|
end
|
|
@@ -692,9 +647,6 @@ module Solifyn
|
|
|
692
647
|
return false if @github_permission.nil?
|
|
693
648
|
github_permission_validator = EnumAttributeValidator.new('String', ["pull", "triage", "push", "maintain", "admin"])
|
|
694
649
|
return false unless github_permission_validator.valid?(@github_permission)
|
|
695
|
-
return false if @has_discord_access.nil?
|
|
696
|
-
return false if @discord_guild_id.nil?
|
|
697
|
-
return false if @discord_role_id.nil?
|
|
698
650
|
return false if @is_tax_inclusive.nil?
|
|
699
651
|
return false if @billing_period.nil?
|
|
700
652
|
return false if @trial_period_days.nil?
|
|
@@ -769,9 +721,6 @@ module Solifyn
|
|
|
769
721
|
has_github_access == o.has_github_access &&
|
|
770
722
|
github_repo == o.github_repo &&
|
|
771
723
|
github_permission == o.github_permission &&
|
|
772
|
-
has_discord_access == o.has_discord_access &&
|
|
773
|
-
discord_guild_id == o.discord_guild_id &&
|
|
774
|
-
discord_role_id == o.discord_role_id &&
|
|
775
724
|
is_tax_inclusive == o.is_tax_inclusive &&
|
|
776
725
|
billing_period == o.billing_period &&
|
|
777
726
|
trial_period_days == o.trial_period_days &&
|
|
@@ -804,7 +753,7 @@ module Solifyn
|
|
|
804
753
|
# Calculates hash code according to all attributes.
|
|
805
754
|
# @return [Integer] Hash code
|
|
806
755
|
def hash
|
|
807
|
-
[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,
|
|
756
|
+
[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].hash
|
|
808
757
|
end
|
|
809
758
|
|
|
810
759
|
# Builds the object from hash
|
|
@@ -51,15 +51,6 @@ module Solifyn
|
|
|
51
51
|
# GitHub collaborator permission level.
|
|
52
52
|
attr_accessor :github_permission
|
|
53
53
|
|
|
54
|
-
# Whether the purchase includes Discord server role access.
|
|
55
|
-
attr_accessor :has_discord_access
|
|
56
|
-
|
|
57
|
-
# Discord Guild (Server) ID to grant access to.
|
|
58
|
-
attr_accessor :discord_guild_id
|
|
59
|
-
|
|
60
|
-
# Discord Role ID to assign to the user.
|
|
61
|
-
attr_accessor :discord_role_id
|
|
62
|
-
|
|
63
54
|
# Whether tax is included in the base price.
|
|
64
55
|
attr_accessor :is_tax_inclusive
|
|
65
56
|
|
|
@@ -139,9 +130,6 @@ module Solifyn
|
|
|
139
130
|
:'has_github_access' => :'hasGithubAccess',
|
|
140
131
|
:'github_repo' => :'githubRepo',
|
|
141
132
|
:'github_permission' => :'githubPermission',
|
|
142
|
-
:'has_discord_access' => :'hasDiscordAccess',
|
|
143
|
-
:'discord_guild_id' => :'discordGuildId',
|
|
144
|
-
:'discord_role_id' => :'discordRoleId',
|
|
145
133
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
146
134
|
:'activation_limit' => :'activationLimit',
|
|
147
135
|
:'brand_id' => :'brandId',
|
|
@@ -179,9 +167,6 @@ module Solifyn
|
|
|
179
167
|
:'has_github_access' => :'Boolean',
|
|
180
168
|
:'github_repo' => :'String',
|
|
181
169
|
:'github_permission' => :'String',
|
|
182
|
-
:'has_discord_access' => :'Boolean',
|
|
183
|
-
:'discord_guild_id' => :'String',
|
|
184
|
-
:'discord_role_id' => :'String',
|
|
185
170
|
:'is_tax_inclusive' => :'Boolean',
|
|
186
171
|
:'activation_limit' => :'Integer',
|
|
187
172
|
:'brand_id' => :'String',
|
|
@@ -282,20 +267,6 @@ module Solifyn
|
|
|
282
267
|
self.github_permission = attributes[:'github_permission']
|
|
283
268
|
end
|
|
284
269
|
|
|
285
|
-
if attributes.key?(:'has_discord_access')
|
|
286
|
-
self.has_discord_access = attributes[:'has_discord_access']
|
|
287
|
-
else
|
|
288
|
-
self.has_discord_access = false
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
if attributes.key?(:'discord_guild_id')
|
|
292
|
-
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
293
|
-
end
|
|
294
|
-
|
|
295
|
-
if attributes.key?(:'discord_role_id')
|
|
296
|
-
self.discord_role_id = attributes[:'discord_role_id']
|
|
297
|
-
end
|
|
298
|
-
|
|
299
270
|
if attributes.key?(:'is_tax_inclusive')
|
|
300
271
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
301
272
|
else
|
|
@@ -455,9 +426,6 @@ module Solifyn
|
|
|
455
426
|
has_github_access == o.has_github_access &&
|
|
456
427
|
github_repo == o.github_repo &&
|
|
457
428
|
github_permission == o.github_permission &&
|
|
458
|
-
has_discord_access == o.has_discord_access &&
|
|
459
|
-
discord_guild_id == o.discord_guild_id &&
|
|
460
|
-
discord_role_id == o.discord_role_id &&
|
|
461
429
|
is_tax_inclusive == o.is_tax_inclusive &&
|
|
462
430
|
activation_limit == o.activation_limit &&
|
|
463
431
|
brand_id == o.brand_id &&
|
|
@@ -483,7 +451,7 @@ module Solifyn
|
|
|
483
451
|
# Calculates hash code according to all attributes.
|
|
484
452
|
# @return [Integer] Hash code
|
|
485
453
|
def hash
|
|
486
|
-
[name, description, price, currency, image_url, tax_category, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission,
|
|
454
|
+
[name, description, price, currency, image_url, tax_category, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission, is_tax_inclusive, activation_limit, brand_id, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, is_listed, is_free, addons].hash
|
|
487
455
|
end
|
|
488
456
|
|
|
489
457
|
# Builds the object from hash
|
|
@@ -51,15 +51,6 @@ module Solifyn
|
|
|
51
51
|
# GitHub collaborator permission level.
|
|
52
52
|
attr_accessor :github_permission
|
|
53
53
|
|
|
54
|
-
# Whether the purchase includes Discord server role access.
|
|
55
|
-
attr_accessor :has_discord_access
|
|
56
|
-
|
|
57
|
-
# Discord Guild (Server) ID to grant access to.
|
|
58
|
-
attr_accessor :discord_guild_id
|
|
59
|
-
|
|
60
|
-
# Discord Role ID to assign to the user.
|
|
61
|
-
attr_accessor :discord_role_id
|
|
62
|
-
|
|
63
54
|
# Whether tax is included in the base price.
|
|
64
55
|
attr_accessor :is_tax_inclusive
|
|
65
56
|
|
|
@@ -139,9 +130,6 @@ module Solifyn
|
|
|
139
130
|
:'has_github_access' => :'hasGithubAccess',
|
|
140
131
|
:'github_repo' => :'githubRepo',
|
|
141
132
|
:'github_permission' => :'githubPermission',
|
|
142
|
-
:'has_discord_access' => :'hasDiscordAccess',
|
|
143
|
-
:'discord_guild_id' => :'discordGuildId',
|
|
144
|
-
:'discord_role_id' => :'discordRoleId',
|
|
145
133
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
146
134
|
:'activation_limit' => :'activationLimit',
|
|
147
135
|
:'brand_id' => :'brandId',
|
|
@@ -179,9 +167,6 @@ module Solifyn
|
|
|
179
167
|
:'has_github_access' => :'Boolean',
|
|
180
168
|
:'github_repo' => :'String',
|
|
181
169
|
:'github_permission' => :'String',
|
|
182
|
-
:'has_discord_access' => :'Boolean',
|
|
183
|
-
:'discord_guild_id' => :'String',
|
|
184
|
-
:'discord_role_id' => :'String',
|
|
185
170
|
:'is_tax_inclusive' => :'Boolean',
|
|
186
171
|
:'activation_limit' => :'Integer',
|
|
187
172
|
:'brand_id' => :'String',
|
|
@@ -276,20 +261,6 @@ module Solifyn
|
|
|
276
261
|
self.github_permission = attributes[:'github_permission']
|
|
277
262
|
end
|
|
278
263
|
|
|
279
|
-
if attributes.key?(:'has_discord_access')
|
|
280
|
-
self.has_discord_access = attributes[:'has_discord_access']
|
|
281
|
-
else
|
|
282
|
-
self.has_discord_access = false
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
if attributes.key?(:'discord_guild_id')
|
|
286
|
-
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
if attributes.key?(:'discord_role_id')
|
|
290
|
-
self.discord_role_id = attributes[:'discord_role_id']
|
|
291
|
-
end
|
|
292
|
-
|
|
293
264
|
if attributes.key?(:'is_tax_inclusive')
|
|
294
265
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
295
266
|
else
|
|
@@ -429,9 +400,6 @@ module Solifyn
|
|
|
429
400
|
has_github_access == o.has_github_access &&
|
|
430
401
|
github_repo == o.github_repo &&
|
|
431
402
|
github_permission == o.github_permission &&
|
|
432
|
-
has_discord_access == o.has_discord_access &&
|
|
433
|
-
discord_guild_id == o.discord_guild_id &&
|
|
434
|
-
discord_role_id == o.discord_role_id &&
|
|
435
403
|
is_tax_inclusive == o.is_tax_inclusive &&
|
|
436
404
|
activation_limit == o.activation_limit &&
|
|
437
405
|
brand_id == o.brand_id &&
|
|
@@ -457,7 +425,7 @@ module Solifyn
|
|
|
457
425
|
# Calculates hash code according to all attributes.
|
|
458
426
|
# @return [Integer] Hash code
|
|
459
427
|
def hash
|
|
460
|
-
[name, description, price, currency, image_url, tax_category, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission,
|
|
428
|
+
[name, description, price, currency, image_url, tax_category, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission, is_tax_inclusive, activation_limit, brand_id, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, is_listed, is_free, addons].hash
|
|
461
429
|
end
|
|
462
430
|
|
|
463
431
|
# Builds the object from hash
|
|
@@ -0,0 +1,290 @@
|
|
|
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 UserPage
|
|
18
|
+
# Store page record ID
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Unique subdomain
|
|
22
|
+
attr_accessor :subdomain
|
|
23
|
+
|
|
24
|
+
# Friendly store name
|
|
25
|
+
attr_accessor :store_name
|
|
26
|
+
|
|
27
|
+
# Styling config JSON
|
|
28
|
+
attr_accessor :config
|
|
29
|
+
|
|
30
|
+
# Linked business ID
|
|
31
|
+
attr_accessor :business_id
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'id' => :'id',
|
|
37
|
+
:'subdomain' => :'subdomain',
|
|
38
|
+
:'store_name' => :'storeName',
|
|
39
|
+
:'config' => :'config',
|
|
40
|
+
:'business_id' => :'businessId'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'id' => :'String',
|
|
53
|
+
:'subdomain' => :'String',
|
|
54
|
+
:'store_name' => :'String',
|
|
55
|
+
:'config' => :'Object',
|
|
56
|
+
:'business_id' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::UserPage` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::UserPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'id')
|
|
82
|
+
self.id = attributes[:'id']
|
|
83
|
+
else
|
|
84
|
+
self.id = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'subdomain')
|
|
88
|
+
self.subdomain = attributes[:'subdomain']
|
|
89
|
+
else
|
|
90
|
+
self.subdomain = nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'store_name')
|
|
94
|
+
self.store_name = attributes[:'store_name']
|
|
95
|
+
else
|
|
96
|
+
self.store_name = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'config')
|
|
100
|
+
self.config = attributes[:'config']
|
|
101
|
+
else
|
|
102
|
+
self.config = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'business_id')
|
|
106
|
+
self.business_id = attributes[:'business_id']
|
|
107
|
+
else
|
|
108
|
+
self.business_id = nil
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
if @id.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @subdomain.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "subdomain", subdomain cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @store_name.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "store_name", store_name cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @config.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "config", config cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @business_id.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
invalid_properties
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Check to see if the all the properties in the model are valid
|
|
141
|
+
# @return true if the model is valid
|
|
142
|
+
def valid?
|
|
143
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
144
|
+
return false if @id.nil?
|
|
145
|
+
return false if @subdomain.nil?
|
|
146
|
+
return false if @store_name.nil?
|
|
147
|
+
return false if @config.nil?
|
|
148
|
+
return false if @business_id.nil?
|
|
149
|
+
true
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Checks equality by comparing each attribute.
|
|
153
|
+
# @param [Object] Object to be compared
|
|
154
|
+
def ==(o)
|
|
155
|
+
return true if self.equal?(o)
|
|
156
|
+
self.class == o.class &&
|
|
157
|
+
id == o.id &&
|
|
158
|
+
subdomain == o.subdomain &&
|
|
159
|
+
store_name == o.store_name &&
|
|
160
|
+
config == o.config &&
|
|
161
|
+
business_id == o.business_id
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# @see the `==` method
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def eql?(o)
|
|
167
|
+
self == o
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Calculates hash code according to all attributes.
|
|
171
|
+
# @return [Integer] Hash code
|
|
172
|
+
def hash
|
|
173
|
+
[id, subdomain, store_name, config, business_id].hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Builds the object from hash
|
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
178
|
+
# @return [Object] Returns the model itself
|
|
179
|
+
def self.build_from_hash(attributes)
|
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
|
181
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
182
|
+
transformed_hash = {}
|
|
183
|
+
openapi_types.each_pair do |key, type|
|
|
184
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
185
|
+
transformed_hash["#{key}"] = nil
|
|
186
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
187
|
+
# check to ensure the input is an array given that the attribute
|
|
188
|
+
# is documented as an array but the input is not
|
|
189
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
190
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
191
|
+
end
|
|
192
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
new(transformed_hash)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Deserializes the data based on type
|
|
200
|
+
# @param string type Data type
|
|
201
|
+
# @param string value Value to be deserialized
|
|
202
|
+
# @return [Object] Deserialized data
|
|
203
|
+
def self._deserialize(type, value)
|
|
204
|
+
case type.to_sym
|
|
205
|
+
when :Time
|
|
206
|
+
Time.parse(value)
|
|
207
|
+
when :Date
|
|
208
|
+
Date.parse(value)
|
|
209
|
+
when :String
|
|
210
|
+
value.to_s
|
|
211
|
+
when :Integer
|
|
212
|
+
value.to_i
|
|
213
|
+
when :Float
|
|
214
|
+
value.to_f
|
|
215
|
+
when :Boolean
|
|
216
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
217
|
+
true
|
|
218
|
+
else
|
|
219
|
+
false
|
|
220
|
+
end
|
|
221
|
+
when :Object
|
|
222
|
+
# generic object (usually a Hash), return directly
|
|
223
|
+
value
|
|
224
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
225
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
226
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
227
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
228
|
+
k_type = Regexp.last_match[:k_type]
|
|
229
|
+
v_type = Regexp.last_match[:v_type]
|
|
230
|
+
{}.tap do |hash|
|
|
231
|
+
value.each do |k, v|
|
|
232
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
else # model
|
|
236
|
+
# models (e.g. Pet) or oneOf
|
|
237
|
+
klass = Solifyn.const_get(type)
|
|
238
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Returns the string representation of the object
|
|
243
|
+
# @return [String] String presentation of the object
|
|
244
|
+
def to_s
|
|
245
|
+
to_hash.to_s
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_body
|
|
251
|
+
to_hash
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Returns the object in the form of hash
|
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
|
256
|
+
def to_hash
|
|
257
|
+
hash = {}
|
|
258
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
259
|
+
value = self.send(attr)
|
|
260
|
+
if value.nil?
|
|
261
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
262
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
hash[param] = _to_hash(value)
|
|
266
|
+
end
|
|
267
|
+
hash
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Outputs non-array value in the form of hash
|
|
271
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
272
|
+
# @param [Object] value Any valid value
|
|
273
|
+
# @return [Hash] Returns the value in the form of hash
|
|
274
|
+
def _to_hash(value)
|
|
275
|
+
if value.is_a?(Array)
|
|
276
|
+
value.compact.map { |v| _to_hash(v) }
|
|
277
|
+
elsif value.is_a?(Hash)
|
|
278
|
+
{}.tap do |hash|
|
|
279
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
280
|
+
end
|
|
281
|
+
elsif value.respond_to? :to_hash
|
|
282
|
+
value.to_hash
|
|
283
|
+
else
|
|
284
|
+
value
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|