fastcomments 0.3.0 → 1.0.0
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 +2 -4
- data/client/README.md +185 -4
- data/client/docs/APIDomainConfiguration.md +46 -0
- data/client/docs/APITenant.md +72 -0
- data/client/docs/APITenantDailyUsage.md +54 -0
- data/client/docs/AddHashTag200Response.md +34 -0
- data/client/docs/AddHashTagsBulk200Response.md +34 -0
- data/client/docs/BillingInfo.md +32 -0
- data/client/docs/BulkCreateHashTagsBody.md +20 -0
- data/client/docs/BulkCreateHashTagsBodyTagsInner.md +20 -0
- data/client/docs/BulkCreateHashTagsResponse.md +20 -0
- data/client/docs/CommentLogData.md +7 -1
- data/client/docs/CreateEmailTemplate200Response.md +34 -0
- data/client/docs/CreateEmailTemplateBody.md +28 -0
- data/client/docs/CreateEmailTemplateResponse.md +20 -0
- data/client/docs/CreateHashTagBody.md +22 -0
- data/client/docs/CreateHashTagResponse.md +20 -0
- data/client/docs/CreateModerator200Response.md +34 -0
- data/client/docs/CreateModeratorBody.md +24 -0
- data/client/docs/CreateModeratorResponse.md +20 -0
- data/client/docs/CreateQuestionConfig200Response.md +34 -0
- data/client/docs/CreateQuestionConfigBody.md +44 -0
- data/client/docs/CreateQuestionConfigResponse.md +20 -0
- data/client/docs/CreateQuestionResult200Response.md +34 -0
- data/client/docs/CreateQuestionResultBody.md +30 -0
- data/client/docs/CreateQuestionResultResponse.md +20 -0
- data/client/docs/CreateTenant200Response.md +34 -0
- data/client/docs/CreateTenantBody.md +62 -0
- data/client/docs/CreateTenantPackage200Response.md +34 -0
- data/client/docs/CreateTenantPackageBody.md +112 -0
- data/client/docs/CreateTenantPackageResponse.md +20 -0
- data/client/docs/CreateTenantResponse.md +20 -0
- data/client/docs/CreateTenantUser200Response.md +34 -0
- data/client/docs/CreateTenantUserBody.md +64 -0
- data/client/docs/CreateTenantUserResponse.md +20 -0
- data/client/docs/CreateVote200Response.md +32 -0
- data/client/docs/CreateVoteResponse.md +18 -0
- data/client/docs/CustomEmailTemplate.md +38 -0
- data/client/docs/DefaultApi.md +5229 -591
- data/client/docs/DeleteHashTagRequest.md +18 -0
- data/client/docs/DeleteVote200Response.md +32 -0
- data/client/docs/DeleteVoteResponse.md +18 -0
- data/client/docs/DigestEmailFrequency.md +15 -0
- data/client/docs/EmailTemplateDefinition.md +24 -0
- data/client/docs/EmailTemplateRenderErrorResponse.md +30 -0
- data/client/docs/GetCachedNotificationCount200Response.md +34 -0
- data/client/docs/GetCachedNotificationCountResponse.md +20 -0
- data/client/docs/GetEmailTemplate200Response.md +34 -0
- data/client/docs/GetEmailTemplateDefinitions200Response.md +34 -0
- data/client/docs/GetEmailTemplateDefinitionsResponse.md +20 -0
- data/client/docs/GetEmailTemplateRenderErrors200Response.md +34 -0
- data/client/docs/GetEmailTemplateRenderErrorsResponse.md +20 -0
- data/client/docs/GetEmailTemplateResponse.md +20 -0
- data/client/docs/GetEmailTemplates200Response.md +34 -0
- data/client/docs/GetEmailTemplatesResponse.md +20 -0
- data/client/docs/GetHashTags200Response.md +34 -0
- data/client/docs/GetHashTagsResponse.md +20 -0
- data/client/docs/GetModerator200Response.md +34 -0
- data/client/docs/GetModeratorResponse.md +20 -0
- data/client/docs/GetModerators200Response.md +34 -0
- data/client/docs/GetModeratorsResponse.md +20 -0
- data/client/docs/GetNotificationCount200Response.md +34 -0
- data/client/docs/GetNotificationCountResponse.md +20 -0
- data/client/docs/GetNotifications200Response.md +34 -0
- data/client/docs/GetNotificationsResponse.md +20 -0
- data/client/docs/GetPendingWebhookEventCount200Response.md +34 -0
- data/client/docs/GetPendingWebhookEventCountResponse.md +20 -0
- data/client/docs/GetPendingWebhookEvents200Response.md +34 -0
- data/client/docs/GetPendingWebhookEventsResponse.md +20 -0
- data/client/docs/GetQuestionConfig200Response.md +34 -0
- data/client/docs/GetQuestionConfigResponse.md +20 -0
- data/client/docs/GetQuestionConfigs200Response.md +34 -0
- data/client/docs/GetQuestionConfigsResponse.md +20 -0
- data/client/docs/GetQuestionResult200Response.md +34 -0
- data/client/docs/GetQuestionResultResponse.md +20 -0
- data/client/docs/GetQuestionResults200Response.md +34 -0
- data/client/docs/GetQuestionResultsResponse.md +20 -0
- data/client/docs/GetTenant200Response.md +34 -0
- data/client/docs/GetTenantDailyUsages200Response.md +34 -0
- data/client/docs/GetTenantDailyUsagesResponse.md +20 -0
- data/client/docs/GetTenantPackage200Response.md +34 -0
- data/client/docs/GetTenantPackageResponse.md +20 -0
- data/client/docs/GetTenantPackages200Response.md +34 -0
- data/client/docs/GetTenantPackagesResponse.md +20 -0
- data/client/docs/GetTenantResponse.md +20 -0
- data/client/docs/GetTenantUser200Response.md +34 -0
- data/client/docs/GetTenantUserResponse.md +20 -0
- data/client/docs/GetTenantUsers200Response.md +34 -0
- data/client/docs/GetTenantUsersResponse.md +20 -0
- data/client/docs/GetTenants200Response.md +34 -0
- data/client/docs/GetTenantsResponse.md +20 -0
- data/client/docs/GetUser200Response.md +34 -0
- data/client/docs/GetUserResponse.md +20 -0
- data/client/docs/GetVotes200Response.md +38 -0
- data/client/docs/GetVotesForUser200Response.md +38 -0
- data/client/docs/GetVotesForUserResponse.md +24 -0
- data/client/docs/GetVotesResponse.md +24 -0
- data/client/docs/ImportedSiteType.md +15 -0
- data/client/docs/Moderator.md +52 -0
- data/client/docs/PatchHashTag200Response.md +34 -0
- data/client/docs/PendingCommentToSyncOutbound.md +42 -0
- data/client/docs/PublicApi.md +6 -6
- data/client/docs/PublicVote.md +28 -0
- data/client/docs/QuestionConfig.md +58 -0
- data/client/docs/QuestionConfigCustomOptionsInner.md +20 -0
- data/client/docs/RenderEmailTemplate200Response.md +34 -0
- data/client/docs/RenderEmailTemplateBody.md +24 -0
- data/client/docs/RenderEmailTemplateResponse.md +20 -0
- data/client/docs/ReplaceTenantPackageBody.md +76 -0
- data/client/docs/ReplaceTenantUserBody.md +72 -0
- data/client/docs/TenantHashTag.md +26 -0
- data/client/docs/TenantPackage.md +120 -0
- data/client/docs/UpdateEmailTemplateBody.md +28 -0
- data/client/docs/UpdateHashTagBody.md +22 -0
- data/client/docs/UpdateHashTagResponse.md +20 -0
- data/client/docs/UpdateModeratorBody.md +24 -0
- data/client/docs/UpdateNotificationBody.md +20 -0
- data/client/docs/UpdateQuestionConfigBody.md +44 -0
- data/client/docs/UpdateQuestionResultBody.md +30 -0
- data/client/docs/UpdateTenantBody.md +64 -0
- data/client/docs/UpdateTenantPackageBody.md +78 -0
- data/client/docs/UpdateTenantUserBody.md +64 -0
- data/client/docs/User.md +118 -0
- data/client/docs/UserNotificationCount.md +24 -0
- data/client/lib/fastcomments-client/api/default_api.rb +5133 -776
- data/client/lib/fastcomments-client/api/public_api.rb +6 -10
- data/client/lib/fastcomments-client/models/add_hash_tag200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/add_hash_tags_bulk200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/api_domain_configuration.rb +355 -0
- data/client/lib/fastcomments-client/models/api_tenant.rb +583 -0
- data/client/lib/fastcomments-client/models/api_tenant_daily_usage.rb +632 -0
- data/client/lib/fastcomments-client/models/billing_info.rb +315 -0
- data/client/lib/fastcomments-client/models/bulk_create_hash_tags_body.rb +175 -0
- data/client/lib/fastcomments-client/models/bulk_create_hash_tags_body_tags_inner.rb +173 -0
- data/client/lib/fastcomments-client/models/bulk_create_hash_tags_response.rb +214 -0
- data/client/lib/fastcomments-client/models/comment_log_data.rb +31 -4
- data/client/lib/fastcomments-client/models/comment_log_type.rb +2 -1
- data/client/lib/fastcomments-client/models/create_email_template200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_email_template_body.rb +249 -0
- data/client/lib/fastcomments-client/models/create_email_template_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_hash_tag_body.rb +182 -0
- data/client/lib/fastcomments-client/models/create_hash_tag_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_moderator200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_moderator_body.rb +210 -0
- data/client/lib/fastcomments-client/models/create_moderator_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_question_config200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_question_config_body.rb +336 -0
- data/client/lib/fastcomments-client/models/create_question_config_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_question_result200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_question_result_body.rb +255 -0
- data/client/lib/fastcomments-client/models/create_question_result_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_tenant200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_tenant_body.rb +384 -0
- data/client/lib/fastcomments-client/models/create_tenant_package200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_tenant_package_body.rb +797 -0
- data/client/lib/fastcomments-client/models/create_tenant_package_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_tenant_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_tenant_user200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_tenant_user_body.rb +390 -0
- data/client/lib/fastcomments-client/models/create_tenant_user_response.rb +212 -0
- data/client/lib/fastcomments-client/models/create_vote200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/create_vote_response.rb +186 -0
- data/client/lib/fastcomments-client/models/custom_email_template.rb +369 -0
- data/client/lib/fastcomments-client/models/delete_hash_tag_request.rb +147 -0
- data/client/lib/fastcomments-client/models/delete_vote200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/delete_vote_response.rb +186 -0
- data/client/lib/fastcomments-client/models/digest_email_frequency.rb +42 -0
- data/client/lib/fastcomments-client/models/email_template_definition.rb +248 -0
- data/client/lib/fastcomments-client/models/email_template_render_error_response.rb +320 -0
- data/client/lib/fastcomments-client/models/get_cached_notification_count200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_cached_notification_count_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_email_template200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_email_template_definitions200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_email_template_definitions_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_email_template_render_errors200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_email_template_render_errors_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_email_template_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_email_templates200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_email_templates_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_hash_tags200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_hash_tags_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_moderator200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_moderator_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_moderators200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_moderators_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_notification_count200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_notification_count_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_notifications200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_notifications_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_pending_webhook_event_count200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_pending_webhook_event_count_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_pending_webhook_events200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_pending_webhook_events_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_question_config200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_question_config_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_question_configs200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_question_configs_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_question_result200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_question_result_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_question_results200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_question_results_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_tenant200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_daily_usages200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_daily_usages_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_tenant_package200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_package_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_tenant_packages200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_packages_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_tenant_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_tenant_user200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_user_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_tenant_users200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenant_users_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_tenants200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_tenants_response.rb +214 -0
- data/client/lib/fastcomments-client/models/get_user200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_user_response.rb +212 -0
- data/client/lib/fastcomments-client/models/get_votes200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_votes_for_user200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/get_votes_for_user_response.rb +270 -0
- data/client/lib/fastcomments-client/models/get_votes_response.rb +270 -0
- data/client/lib/fastcomments-client/models/imported_site_type.rb +40 -0
- data/client/lib/fastcomments-client/models/moderator.rb +538 -0
- data/client/lib/fastcomments-client/models/patch_hash_tag200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/pending_comment_to_sync_outbound.rb +428 -0
- data/client/lib/fastcomments-client/models/public_vote.rb +294 -0
- data/client/lib/fastcomments-client/models/question_config.rb +671 -0
- data/client/lib/fastcomments-client/models/question_config_custom_options_inner.rb +190 -0
- data/client/lib/fastcomments-client/models/render_email_template200_response.rb +103 -0
- data/client/lib/fastcomments-client/models/render_email_template_body.rb +214 -0
- data/client/lib/fastcomments-client/models/render_email_template_response.rb +212 -0
- data/client/lib/fastcomments-client/models/replace_tenant_package_body.rb +665 -0
- data/client/lib/fastcomments-client/models/replace_tenant_user_body.rb +426 -0
- data/client/lib/fastcomments-client/models/tenant_hash_tag.rb +251 -0
- data/client/lib/fastcomments-client/models/tenant_package.rb +994 -0
- data/client/lib/fastcomments-client/models/update_email_template_body.rb +198 -0
- data/client/lib/fastcomments-client/models/update_hash_tag_body.rb +165 -0
- data/client/lib/fastcomments-client/models/update_hash_tag_response.rb +212 -0
- data/client/lib/fastcomments-client/models/update_moderator_body.rb +176 -0
- data/client/lib/fastcomments-client/models/update_notification_body.rb +156 -0
- data/client/lib/fastcomments-client/models/update_question_config_body.rb +268 -0
- data/client/lib/fastcomments-client/models/update_question_result_body.rb +204 -0
- data/client/lib/fastcomments-client/models/update_tenant_body.rb +359 -0
- data/client/lib/fastcomments-client/models/update_tenant_package_body.rb +419 -0
- data/client/lib/fastcomments-client/models/update_tenant_user_body.rb +356 -0
- data/client/lib/fastcomments-client/models/user.rb +753 -0
- data/client/lib/fastcomments-client/models/user_notification_count.rb +242 -0
- data/client/lib/fastcomments-client/version.rb +1 -1
- data/client/lib/fastcomments-client.rb +119 -0
- data/client/spec/api/default_api_spec.rb +740 -0
- data/client/spec/api/public_api_spec.rb +1 -1
- data/client/spec/models/add_hash_tag200_response_spec.rb +21 -0
- data/client/spec/models/add_hash_tags_bulk200_response_spec.rb +21 -0
- data/client/spec/models/api_domain_configuration_spec.rb +120 -0
- data/client/spec/models/api_tenant_daily_usage_spec.rb +144 -0
- data/client/spec/models/api_tenant_spec.rb +198 -0
- data/client/spec/models/billing_info_spec.rb +78 -0
- data/client/spec/models/bulk_create_hash_tags_body_spec.rb +42 -0
- data/client/spec/models/bulk_create_hash_tags_body_tags_inner_spec.rb +42 -0
- data/client/spec/models/bulk_create_hash_tags_response_spec.rb +42 -0
- data/client/spec/models/comment_log_data_spec.rb +18 -0
- data/client/spec/models/create_email_template200_response_spec.rb +21 -0
- data/client/spec/models/create_email_template_body_spec.rb +66 -0
- data/client/spec/models/create_email_template_response_spec.rb +42 -0
- data/client/spec/models/create_hash_tag_body_spec.rb +48 -0
- data/client/spec/models/create_hash_tag_response_spec.rb +42 -0
- data/client/spec/models/create_moderator200_response_spec.rb +21 -0
- data/client/spec/models/create_moderator_body_spec.rb +54 -0
- data/client/spec/models/create_moderator_response_spec.rb +42 -0
- data/client/spec/models/create_question_config200_response_spec.rb +21 -0
- data/client/spec/models/create_question_config_body_spec.rb +114 -0
- data/client/spec/models/create_question_config_response_spec.rb +42 -0
- data/client/spec/models/create_question_result200_response_spec.rb +21 -0
- data/client/spec/models/create_question_result_body_spec.rb +72 -0
- data/client/spec/models/create_question_result_response_spec.rb +42 -0
- data/client/spec/models/create_tenant200_response_spec.rb +21 -0
- data/client/spec/models/create_tenant_body_spec.rb +168 -0
- data/client/spec/models/create_tenant_package200_response_spec.rb +21 -0
- data/client/spec/models/create_tenant_package_body_spec.rb +318 -0
- data/client/spec/models/create_tenant_package_response_spec.rb +42 -0
- data/client/spec/models/create_tenant_response_spec.rb +42 -0
- data/client/spec/models/create_tenant_user200_response_spec.rb +21 -0
- data/client/spec/models/create_tenant_user_body_spec.rb +174 -0
- data/client/spec/models/create_tenant_user_response_spec.rb +42 -0
- data/client/spec/models/create_vote200_response_spec.rb +21 -0
- data/client/spec/models/create_vote_response_spec.rb +36 -0
- data/client/spec/models/custom_email_template_spec.rb +96 -0
- data/client/spec/models/delete_hash_tag_request_spec.rb +36 -0
- data/client/spec/models/delete_vote200_response_spec.rb +21 -0
- data/client/spec/models/delete_vote_response_spec.rb +36 -0
- data/client/spec/models/digest_email_frequency_spec.rb +30 -0
- data/client/spec/models/email_template_definition_spec.rb +54 -0
- data/client/spec/models/email_template_render_error_response_spec.rb +72 -0
- data/client/spec/models/get_cached_notification_count200_response_spec.rb +21 -0
- data/client/spec/models/get_cached_notification_count_response_spec.rb +42 -0
- data/client/spec/models/get_email_template200_response_spec.rb +21 -0
- data/client/spec/models/get_email_template_definitions200_response_spec.rb +21 -0
- data/client/spec/models/get_email_template_definitions_response_spec.rb +42 -0
- data/client/spec/models/get_email_template_render_errors200_response_spec.rb +21 -0
- data/client/spec/models/get_email_template_render_errors_response_spec.rb +42 -0
- data/client/spec/models/get_email_template_response_spec.rb +42 -0
- data/client/spec/models/get_email_templates200_response_spec.rb +21 -0
- data/client/spec/models/get_email_templates_response_spec.rb +42 -0
- data/client/spec/models/get_hash_tags200_response_spec.rb +21 -0
- data/client/spec/models/get_hash_tags_response_spec.rb +42 -0
- data/client/spec/models/get_moderator200_response_spec.rb +21 -0
- data/client/spec/models/get_moderator_response_spec.rb +42 -0
- data/client/spec/models/get_moderators200_response_spec.rb +21 -0
- data/client/spec/models/get_moderators_response_spec.rb +42 -0
- data/client/spec/models/get_notification_count200_response_spec.rb +21 -0
- data/client/spec/models/get_notification_count_response_spec.rb +42 -0
- data/client/spec/models/get_notifications200_response_spec.rb +21 -0
- data/client/spec/models/get_notifications_response_spec.rb +42 -0
- data/client/spec/models/get_pending_webhook_event_count200_response_spec.rb +21 -0
- data/client/spec/models/get_pending_webhook_event_count_response_spec.rb +42 -0
- data/client/spec/models/get_pending_webhook_events200_response_spec.rb +21 -0
- data/client/spec/models/get_pending_webhook_events_response_spec.rb +42 -0
- data/client/spec/models/get_question_config200_response_spec.rb +21 -0
- data/client/spec/models/get_question_config_response_spec.rb +42 -0
- data/client/spec/models/get_question_configs200_response_spec.rb +21 -0
- data/client/spec/models/get_question_configs_response_spec.rb +42 -0
- data/client/spec/models/get_question_result200_response_spec.rb +21 -0
- data/client/spec/models/get_question_result_response_spec.rb +42 -0
- data/client/spec/models/get_question_results200_response_spec.rb +21 -0
- data/client/spec/models/get_question_results_response_spec.rb +42 -0
- data/client/spec/models/get_tenant200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_daily_usages200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_daily_usages_response_spec.rb +42 -0
- data/client/spec/models/get_tenant_package200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_package_response_spec.rb +42 -0
- data/client/spec/models/get_tenant_packages200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_packages_response_spec.rb +42 -0
- data/client/spec/models/get_tenant_response_spec.rb +42 -0
- data/client/spec/models/get_tenant_user200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_user_response_spec.rb +42 -0
- data/client/spec/models/get_tenant_users200_response_spec.rb +21 -0
- data/client/spec/models/get_tenant_users_response_spec.rb +42 -0
- data/client/spec/models/get_tenants200_response_spec.rb +21 -0
- data/client/spec/models/get_tenants_response_spec.rb +42 -0
- data/client/spec/models/get_user200_response_spec.rb +21 -0
- data/client/spec/models/get_user_response_spec.rb +42 -0
- data/client/spec/models/get_votes200_response_spec.rb +21 -0
- data/client/spec/models/get_votes_for_user200_response_spec.rb +21 -0
- data/client/spec/models/get_votes_for_user_response_spec.rb +54 -0
- data/client/spec/models/get_votes_response_spec.rb +54 -0
- data/client/spec/models/imported_site_type_spec.rb +30 -0
- data/client/spec/models/moderator_spec.rb +138 -0
- data/client/spec/models/patch_hash_tag200_response_spec.rb +21 -0
- data/client/spec/models/pending_comment_to_sync_outbound_spec.rb +108 -0
- data/client/spec/models/public_vote_spec.rb +66 -0
- data/client/spec/models/question_config_custom_options_inner_spec.rb +42 -0
- data/client/spec/models/question_config_spec.rb +156 -0
- data/client/spec/models/render_email_template200_response_spec.rb +21 -0
- data/client/spec/models/render_email_template_body_spec.rb +54 -0
- data/client/spec/models/render_email_template_response_spec.rb +42 -0
- data/client/spec/models/replace_tenant_package_body_spec.rb +210 -0
- data/client/spec/models/replace_tenant_user_body_spec.rb +198 -0
- data/client/spec/models/tenant_hash_tag_spec.rb +60 -0
- data/client/spec/models/tenant_package_spec.rb +342 -0
- data/client/spec/models/update_email_template_body_spec.rb +66 -0
- data/client/spec/models/update_hash_tag_body_spec.rb +48 -0
- data/client/spec/models/update_hash_tag_response_spec.rb +42 -0
- data/client/spec/models/update_moderator_body_spec.rb +54 -0
- data/client/spec/models/update_notification_body_spec.rb +42 -0
- data/client/spec/models/update_question_config_body_spec.rb +114 -0
- data/client/spec/models/update_question_result_body_spec.rb +72 -0
- data/client/spec/models/update_tenant_body_spec.rb +174 -0
- data/client/spec/models/update_tenant_package_body_spec.rb +216 -0
- data/client/spec/models/update_tenant_user_body_spec.rb +174 -0
- data/client/spec/models/user_notification_count_spec.rb +54 -0
- data/client/spec/models/user_spec.rb +336 -0
- data/lib/fastcomments.rb +2 -1
- metadata +359 -2
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#fastcomments
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FastCommentsClient
|
|
17
|
+
class Moderator < ApiModelBase
|
|
18
|
+
attr_accessor :_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :tenant_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
attr_accessor :user_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :accepted_invite
|
|
27
|
+
|
|
28
|
+
attr_accessor :email
|
|
29
|
+
|
|
30
|
+
attr_accessor :mark_reviewed_count
|
|
31
|
+
|
|
32
|
+
attr_accessor :deleted_count
|
|
33
|
+
|
|
34
|
+
attr_accessor :marked_spam_count
|
|
35
|
+
|
|
36
|
+
attr_accessor :marked_not_spam_count
|
|
37
|
+
|
|
38
|
+
attr_accessor :approved_count
|
|
39
|
+
|
|
40
|
+
attr_accessor :un_approved_count
|
|
41
|
+
|
|
42
|
+
attr_accessor :edited_count
|
|
43
|
+
|
|
44
|
+
attr_accessor :banned_count
|
|
45
|
+
|
|
46
|
+
attr_accessor :un_flagged_count
|
|
47
|
+
|
|
48
|
+
attr_accessor :verification_id
|
|
49
|
+
|
|
50
|
+
attr_accessor :created_at
|
|
51
|
+
|
|
52
|
+
attr_accessor :moderation_group_ids
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'_id' => :'_id',
|
|
58
|
+
:'tenant_id' => :'tenantId',
|
|
59
|
+
:'name' => :'name',
|
|
60
|
+
:'user_id' => :'userId',
|
|
61
|
+
:'accepted_invite' => :'acceptedInvite',
|
|
62
|
+
:'email' => :'email',
|
|
63
|
+
:'mark_reviewed_count' => :'markReviewedCount',
|
|
64
|
+
:'deleted_count' => :'deletedCount',
|
|
65
|
+
:'marked_spam_count' => :'markedSpamCount',
|
|
66
|
+
:'marked_not_spam_count' => :'markedNotSpamCount',
|
|
67
|
+
:'approved_count' => :'approvedCount',
|
|
68
|
+
:'un_approved_count' => :'unApprovedCount',
|
|
69
|
+
:'edited_count' => :'editedCount',
|
|
70
|
+
:'banned_count' => :'bannedCount',
|
|
71
|
+
:'un_flagged_count' => :'unFlaggedCount',
|
|
72
|
+
:'verification_id' => :'verificationId',
|
|
73
|
+
:'created_at' => :'createdAt',
|
|
74
|
+
:'moderation_group_ids' => :'moderationGroupIds'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns attribute mapping this model knows about
|
|
79
|
+
def self.acceptable_attribute_map
|
|
80
|
+
attribute_map
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns all the JSON keys this model knows about
|
|
84
|
+
def self.acceptable_attributes
|
|
85
|
+
acceptable_attribute_map.values
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Attribute type mapping.
|
|
89
|
+
def self.openapi_types
|
|
90
|
+
{
|
|
91
|
+
:'_id' => :'String',
|
|
92
|
+
:'tenant_id' => :'String',
|
|
93
|
+
:'name' => :'String',
|
|
94
|
+
:'user_id' => :'String',
|
|
95
|
+
:'accepted_invite' => :'Boolean',
|
|
96
|
+
:'email' => :'String',
|
|
97
|
+
:'mark_reviewed_count' => :'Float',
|
|
98
|
+
:'deleted_count' => :'Float',
|
|
99
|
+
:'marked_spam_count' => :'Float',
|
|
100
|
+
:'marked_not_spam_count' => :'Float',
|
|
101
|
+
:'approved_count' => :'Float',
|
|
102
|
+
:'un_approved_count' => :'Float',
|
|
103
|
+
:'edited_count' => :'Float',
|
|
104
|
+
:'banned_count' => :'Float',
|
|
105
|
+
:'un_flagged_count' => :'Float',
|
|
106
|
+
:'verification_id' => :'String',
|
|
107
|
+
:'created_at' => :'Time',
|
|
108
|
+
:'moderation_group_ids' => :'Array<String>'
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# List of attributes with nullable: true
|
|
113
|
+
def self.openapi_nullable
|
|
114
|
+
Set.new([
|
|
115
|
+
:'name',
|
|
116
|
+
:'user_id',
|
|
117
|
+
:'email',
|
|
118
|
+
:'verification_id',
|
|
119
|
+
:'moderation_group_ids'
|
|
120
|
+
])
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Initializes the object
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
def initialize(attributes = {})
|
|
126
|
+
if (!attributes.is_a?(Hash))
|
|
127
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::Moderator` initialize method"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
131
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
134
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::Moderator`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
135
|
+
end
|
|
136
|
+
h[k.to_sym] = v
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'_id')
|
|
140
|
+
self._id = attributes[:'_id']
|
|
141
|
+
else
|
|
142
|
+
self._id = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'tenant_id')
|
|
146
|
+
self.tenant_id = attributes[:'tenant_id']
|
|
147
|
+
else
|
|
148
|
+
self.tenant_id = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'name')
|
|
152
|
+
self.name = attributes[:'name']
|
|
153
|
+
else
|
|
154
|
+
self.name = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'user_id')
|
|
158
|
+
self.user_id = attributes[:'user_id']
|
|
159
|
+
else
|
|
160
|
+
self.user_id = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'accepted_invite')
|
|
164
|
+
self.accepted_invite = attributes[:'accepted_invite']
|
|
165
|
+
else
|
|
166
|
+
self.accepted_invite = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'email')
|
|
170
|
+
self.email = attributes[:'email']
|
|
171
|
+
else
|
|
172
|
+
self.email = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'mark_reviewed_count')
|
|
176
|
+
self.mark_reviewed_count = attributes[:'mark_reviewed_count']
|
|
177
|
+
else
|
|
178
|
+
self.mark_reviewed_count = nil
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'deleted_count')
|
|
182
|
+
self.deleted_count = attributes[:'deleted_count']
|
|
183
|
+
else
|
|
184
|
+
self.deleted_count = nil
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'marked_spam_count')
|
|
188
|
+
self.marked_spam_count = attributes[:'marked_spam_count']
|
|
189
|
+
else
|
|
190
|
+
self.marked_spam_count = nil
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'marked_not_spam_count')
|
|
194
|
+
self.marked_not_spam_count = attributes[:'marked_not_spam_count']
|
|
195
|
+
else
|
|
196
|
+
self.marked_not_spam_count = nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'approved_count')
|
|
200
|
+
self.approved_count = attributes[:'approved_count']
|
|
201
|
+
else
|
|
202
|
+
self.approved_count = nil
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'un_approved_count')
|
|
206
|
+
self.un_approved_count = attributes[:'un_approved_count']
|
|
207
|
+
else
|
|
208
|
+
self.un_approved_count = nil
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'edited_count')
|
|
212
|
+
self.edited_count = attributes[:'edited_count']
|
|
213
|
+
else
|
|
214
|
+
self.edited_count = nil
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'banned_count')
|
|
218
|
+
self.banned_count = attributes[:'banned_count']
|
|
219
|
+
else
|
|
220
|
+
self.banned_count = nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'un_flagged_count')
|
|
224
|
+
self.un_flagged_count = attributes[:'un_flagged_count']
|
|
225
|
+
else
|
|
226
|
+
self.un_flagged_count = nil
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.key?(:'verification_id')
|
|
230
|
+
self.verification_id = attributes[:'verification_id']
|
|
231
|
+
else
|
|
232
|
+
self.verification_id = nil
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'created_at')
|
|
236
|
+
self.created_at = attributes[:'created_at']
|
|
237
|
+
else
|
|
238
|
+
self.created_at = nil
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if attributes.key?(:'moderation_group_ids')
|
|
242
|
+
if (value = attributes[:'moderation_group_ids']).is_a?(Array)
|
|
243
|
+
self.moderation_group_ids = value
|
|
244
|
+
end
|
|
245
|
+
else
|
|
246
|
+
self.moderation_group_ids = nil
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
251
|
+
# @return Array for valid properties with the reasons
|
|
252
|
+
def list_invalid_properties
|
|
253
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
254
|
+
invalid_properties = Array.new
|
|
255
|
+
if @_id.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "_id", _id cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @tenant_id.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if @accepted_invite.nil?
|
|
264
|
+
invalid_properties.push('invalid value for "accepted_invite", accepted_invite cannot be nil.')
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if @mark_reviewed_count.nil?
|
|
268
|
+
invalid_properties.push('invalid value for "mark_reviewed_count", mark_reviewed_count cannot be nil.')
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if @deleted_count.nil?
|
|
272
|
+
invalid_properties.push('invalid value for "deleted_count", deleted_count cannot be nil.')
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @marked_spam_count.nil?
|
|
276
|
+
invalid_properties.push('invalid value for "marked_spam_count", marked_spam_count cannot be nil.')
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if @marked_not_spam_count.nil?
|
|
280
|
+
invalid_properties.push('invalid value for "marked_not_spam_count", marked_not_spam_count cannot be nil.')
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if @approved_count.nil?
|
|
284
|
+
invalid_properties.push('invalid value for "approved_count", approved_count cannot be nil.')
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
if @un_approved_count.nil?
|
|
288
|
+
invalid_properties.push('invalid value for "un_approved_count", un_approved_count cannot be nil.')
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if @edited_count.nil?
|
|
292
|
+
invalid_properties.push('invalid value for "edited_count", edited_count cannot be nil.')
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if @banned_count.nil?
|
|
296
|
+
invalid_properties.push('invalid value for "banned_count", banned_count cannot be nil.')
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if @un_flagged_count.nil?
|
|
300
|
+
invalid_properties.push('invalid value for "un_flagged_count", un_flagged_count cannot be nil.')
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if @created_at.nil?
|
|
304
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
invalid_properties
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Check to see if the all the properties in the model are valid
|
|
311
|
+
# @return true if the model is valid
|
|
312
|
+
def valid?
|
|
313
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
314
|
+
return false if @_id.nil?
|
|
315
|
+
return false if @tenant_id.nil?
|
|
316
|
+
return false if @accepted_invite.nil?
|
|
317
|
+
return false if @mark_reviewed_count.nil?
|
|
318
|
+
return false if @deleted_count.nil?
|
|
319
|
+
return false if @marked_spam_count.nil?
|
|
320
|
+
return false if @marked_not_spam_count.nil?
|
|
321
|
+
return false if @approved_count.nil?
|
|
322
|
+
return false if @un_approved_count.nil?
|
|
323
|
+
return false if @edited_count.nil?
|
|
324
|
+
return false if @banned_count.nil?
|
|
325
|
+
return false if @un_flagged_count.nil?
|
|
326
|
+
return false if @created_at.nil?
|
|
327
|
+
true
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] _id Value to be assigned
|
|
332
|
+
def _id=(_id)
|
|
333
|
+
if _id.nil?
|
|
334
|
+
fail ArgumentError, '_id cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
@_id = _id
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Custom attribute writer method with validation
|
|
341
|
+
# @param [Object] tenant_id Value to be assigned
|
|
342
|
+
def tenant_id=(tenant_id)
|
|
343
|
+
if tenant_id.nil?
|
|
344
|
+
fail ArgumentError, 'tenant_id cannot be nil'
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
@tenant_id = tenant_id
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Custom attribute writer method with validation
|
|
351
|
+
# @param [Object] accepted_invite Value to be assigned
|
|
352
|
+
def accepted_invite=(accepted_invite)
|
|
353
|
+
if accepted_invite.nil?
|
|
354
|
+
fail ArgumentError, 'accepted_invite cannot be nil'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
@accepted_invite = accepted_invite
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Custom attribute writer method with validation
|
|
361
|
+
# @param [Object] mark_reviewed_count Value to be assigned
|
|
362
|
+
def mark_reviewed_count=(mark_reviewed_count)
|
|
363
|
+
if mark_reviewed_count.nil?
|
|
364
|
+
fail ArgumentError, 'mark_reviewed_count cannot be nil'
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
@mark_reviewed_count = mark_reviewed_count
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Custom attribute writer method with validation
|
|
371
|
+
# @param [Object] deleted_count Value to be assigned
|
|
372
|
+
def deleted_count=(deleted_count)
|
|
373
|
+
if deleted_count.nil?
|
|
374
|
+
fail ArgumentError, 'deleted_count cannot be nil'
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
@deleted_count = deleted_count
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Custom attribute writer method with validation
|
|
381
|
+
# @param [Object] marked_spam_count Value to be assigned
|
|
382
|
+
def marked_spam_count=(marked_spam_count)
|
|
383
|
+
if marked_spam_count.nil?
|
|
384
|
+
fail ArgumentError, 'marked_spam_count cannot be nil'
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
@marked_spam_count = marked_spam_count
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Custom attribute writer method with validation
|
|
391
|
+
# @param [Object] marked_not_spam_count Value to be assigned
|
|
392
|
+
def marked_not_spam_count=(marked_not_spam_count)
|
|
393
|
+
if marked_not_spam_count.nil?
|
|
394
|
+
fail ArgumentError, 'marked_not_spam_count cannot be nil'
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
@marked_not_spam_count = marked_not_spam_count
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Custom attribute writer method with validation
|
|
401
|
+
# @param [Object] approved_count Value to be assigned
|
|
402
|
+
def approved_count=(approved_count)
|
|
403
|
+
if approved_count.nil?
|
|
404
|
+
fail ArgumentError, 'approved_count cannot be nil'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
@approved_count = approved_count
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# Custom attribute writer method with validation
|
|
411
|
+
# @param [Object] un_approved_count Value to be assigned
|
|
412
|
+
def un_approved_count=(un_approved_count)
|
|
413
|
+
if un_approved_count.nil?
|
|
414
|
+
fail ArgumentError, 'un_approved_count cannot be nil'
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
@un_approved_count = un_approved_count
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# Custom attribute writer method with validation
|
|
421
|
+
# @param [Object] edited_count Value to be assigned
|
|
422
|
+
def edited_count=(edited_count)
|
|
423
|
+
if edited_count.nil?
|
|
424
|
+
fail ArgumentError, 'edited_count cannot be nil'
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
@edited_count = edited_count
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Custom attribute writer method with validation
|
|
431
|
+
# @param [Object] banned_count Value to be assigned
|
|
432
|
+
def banned_count=(banned_count)
|
|
433
|
+
if banned_count.nil?
|
|
434
|
+
fail ArgumentError, 'banned_count cannot be nil'
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
@banned_count = banned_count
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Custom attribute writer method with validation
|
|
441
|
+
# @param [Object] un_flagged_count Value to be assigned
|
|
442
|
+
def un_flagged_count=(un_flagged_count)
|
|
443
|
+
if un_flagged_count.nil?
|
|
444
|
+
fail ArgumentError, 'un_flagged_count cannot be nil'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
@un_flagged_count = un_flagged_count
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Custom attribute writer method with validation
|
|
451
|
+
# @param [Object] created_at Value to be assigned
|
|
452
|
+
def created_at=(created_at)
|
|
453
|
+
if created_at.nil?
|
|
454
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
@created_at = created_at
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Checks equality by comparing each attribute.
|
|
461
|
+
# @param [Object] Object to be compared
|
|
462
|
+
def ==(o)
|
|
463
|
+
return true if self.equal?(o)
|
|
464
|
+
self.class == o.class &&
|
|
465
|
+
_id == o._id &&
|
|
466
|
+
tenant_id == o.tenant_id &&
|
|
467
|
+
name == o.name &&
|
|
468
|
+
user_id == o.user_id &&
|
|
469
|
+
accepted_invite == o.accepted_invite &&
|
|
470
|
+
email == o.email &&
|
|
471
|
+
mark_reviewed_count == o.mark_reviewed_count &&
|
|
472
|
+
deleted_count == o.deleted_count &&
|
|
473
|
+
marked_spam_count == o.marked_spam_count &&
|
|
474
|
+
marked_not_spam_count == o.marked_not_spam_count &&
|
|
475
|
+
approved_count == o.approved_count &&
|
|
476
|
+
un_approved_count == o.un_approved_count &&
|
|
477
|
+
edited_count == o.edited_count &&
|
|
478
|
+
banned_count == o.banned_count &&
|
|
479
|
+
un_flagged_count == o.un_flagged_count &&
|
|
480
|
+
verification_id == o.verification_id &&
|
|
481
|
+
created_at == o.created_at &&
|
|
482
|
+
moderation_group_ids == o.moderation_group_ids
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# @see the `==` method
|
|
486
|
+
# @param [Object] Object to be compared
|
|
487
|
+
def eql?(o)
|
|
488
|
+
self == o
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# Calculates hash code according to all attributes.
|
|
492
|
+
# @return [Integer] Hash code
|
|
493
|
+
def hash
|
|
494
|
+
[_id, tenant_id, name, user_id, accepted_invite, email, mark_reviewed_count, deleted_count, marked_spam_count, marked_not_spam_count, approved_count, un_approved_count, edited_count, banned_count, un_flagged_count, verification_id, created_at, moderation_group_ids].hash
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# Builds the object from hash
|
|
498
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
499
|
+
# @return [Object] Returns the model itself
|
|
500
|
+
def self.build_from_hash(attributes)
|
|
501
|
+
return nil unless attributes.is_a?(Hash)
|
|
502
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
503
|
+
transformed_hash = {}
|
|
504
|
+
openapi_types.each_pair do |key, type|
|
|
505
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
506
|
+
transformed_hash["#{key}"] = nil
|
|
507
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
508
|
+
# check to ensure the input is an array given that the attribute
|
|
509
|
+
# is documented as an array but the input is not
|
|
510
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
511
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
512
|
+
end
|
|
513
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
514
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
515
|
+
end
|
|
516
|
+
end
|
|
517
|
+
new(transformed_hash)
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Returns the object in the form of hash
|
|
521
|
+
# @return [Hash] Returns the object in the form of hash
|
|
522
|
+
def to_hash
|
|
523
|
+
hash = {}
|
|
524
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
525
|
+
value = self.send(attr)
|
|
526
|
+
if value.nil?
|
|
527
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
528
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
hash[param] = _to_hash(value)
|
|
532
|
+
end
|
|
533
|
+
hash
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#fastcomments
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FastCommentsClient
|
|
17
|
+
module PatchHashTag200Response
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'APIError',
|
|
23
|
+
:'UpdateHashTagResponse'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
+
# - TODO: logging when debugging is set.
|
|
37
|
+
openapi_any_of.each do |klass|
|
|
38
|
+
begin
|
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
|
40
|
+
return find_and_cast_into_type(klass, data)
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.iso8601(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = FastCommentsClient.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|