seatschart 0.2.0 → 0.4.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.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +199 -19
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +81 -4
  5. data/lib/seatschart/api/billing_api.rb +4 -0
  6. data/lib/seatschart/api/charts_api.rb +810 -77
  7. data/lib/seatschart/api/embed_api.rb +5 -5
  8. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  9. data/lib/seatschart/api/event_log_api.rb +2 -2
  10. data/lib/seatschart/api/events_api.rb +1491 -175
  11. data/lib/seatschart/api/health_api.rb +244 -0
  12. data/lib/seatschart/api/map_designer_api.rb +11 -9
  13. data/lib/seatschart/api/public_api.rb +356 -6
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +344 -36
  16. data/lib/seatschart/api/seats_api.rb +10 -10
  17. data/lib/seatschart/api/usage_api.rb +18 -15
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +1815 -363
  20. data/lib/seatschart/models/api_error.rb +4 -4
  21. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  22. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  25. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  26. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  27. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  29. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  30. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  31. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  32. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  33. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  34. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  35. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  36. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  37. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  39. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
  40. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  41. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  44. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
  45. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
  46. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  47. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  48. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  49. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
  50. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  51. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  52. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  53. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  54. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  58. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  59. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  60. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  61. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  62. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  63. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  64. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  65. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  66. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  67. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  68. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  69. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  70. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  71. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  72. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  73. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  74. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  75. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  76. data/lib/seatschart/models/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
  77. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  78. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  79. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  80. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  81. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  82. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  83. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  84. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  85. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  86. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  87. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  88. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  89. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  90. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  91. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  92. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  93. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  94. data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
  95. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
  96. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
  97. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
  98. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  99. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  100. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  101. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  102. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  103. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  104. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  105. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  106. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  107. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  108. data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
  109. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  110. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  111. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  112. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  113. data/lib/seatschart/retry.rb +106 -7
  114. data/lib/seatschart/version.rb +1 -1
  115. data/lib/seatschart.rb +73 -3
  116. metadata +75 -5
  117. data/lib/seatschart/api/default_api.rb +0 -763
@@ -139,10 +139,10 @@ module SeatsChart
139
139
  def valid?
140
140
  warn '[DEPRECATED] the `valid?` method is obsolete'
141
141
  return false if @error.nil?
142
- error_validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "booking_limit_exceeded", "buyer_limit_exceeded", "category_exists", "category_in_use", "channel_forbidden", "chart_archived", "chart_invalid", "chart_key_taken", "chart_not_published", "chart_switch_conflict", "checkout_failed", "checkout_not_complete", "confirm_failed", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "extraction_failed", "forbidden", "ga_places_to_channels_disabled", "ga_table_whole", "geometry_not_published", "hold_token_conflict", "idempotency_conflict", "idempotency_key_required", "illegal_previous_status", "insufficient_free_places", "insufficient_inventory", "insufficient_scope", "internal_error", "invalid_body", "invalid_code", "invalid_order_id", "invalid_parameters", "invalid_signature", "inventory_conflict", "last_active_workspace", "limit_exceeded", "listing_closed", "listing_has_holds", "listing_incomplete", "listing_key_taken", "listing_object_conflict", "listing_type_exists", "listing_type_in_use", "lot_sold_out", "no_customer", "no_subscription", "not_found", "not_published", "not_season_member", "objects_not_found", "own_workspace", "partial_season_key_taken", "payload_too_large", "pending_sign_in_expired", "plan_limit_exceeded", "portal_failed", "price_mismatch", "price_table_missing", "quantity_required", "quota_exceeded", "quote_conflict", "quote_mismatch", "quote_required", "rate_limit_exceeded", "redis_unavailable", "scan_route_retired", "season_booked", "season_chart_mismatch", "season_has_no_chart", "season_key_taken", "season_source_event", "season_source_required", "season_status_conflict", "season_status_overridden", "service_draining", "service_unavailable", "setup_expired", "stripe_not_configured", "structural_mismatch", "test_workspace_not_billable", "ticket_buyer_id_required", "ticket_buyer_mismatch", "ticket_buyer_not_registered", "ticket_buyer_required", "ticket_type_required", "too_many_attempts", "too_many_events", "two_factor_already_enabled", "two_factor_enrollment_required", "two_factor_not_enabled", "two_factor_required_by_workspace", "unauthorized", "validation_error", "validation_failed", "webhook_handler_failed", "workspace_deactivated"])
142
+ error_validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "booking_limit_exceeded", "buyer_limit_exceeded", "category_exists", "category_in_use", "channel_forbidden", "chart_archived", "chart_invalid", "chart_key_taken", "chart_not_published", "chart_switch_conflict", "checkout_failed", "checkout_not_complete", "confirm_failed", "confirmation_mismatch", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "extra_data_not_published", "extraction_failed", "for_sale_edit_conflict", "forbidden", "ga_area_occupancy_locked", "ga_area_whole", "ga_places_to_channels_disabled", "ga_table_whole", "geometry_not_published", "hold_token_conflict", "idempotency_conflict", "idempotency_key_required", "illegal_previous_status", "insufficient_free_places", "insufficient_inventory", "insufficient_scope", "internal_error", "invalid_body", "invalid_code", "invalid_order_id", "invalid_parameters", "invalid_signature", "inventory_conflict", "last_active_workspace", "last_workspace", "limit_exceeded", "listing_closed", "listing_has_holds", "listing_incomplete", "listing_key_taken", "listing_object_conflict", "listing_objects_removed", "listing_type_exists", "listing_type_in_use", "lot_sold_out", "no_customer", "no_subscription", "not_found", "not_published", "not_season_member", "objects_not_found", "own_workspace", "partial_season_key_taken", "payload_too_large", "pending_sign_in_expired", "plan_limit_exceeded", "plan_managed_by_sales", "plan_requires_sales", "portal_failed", "price_mismatch", "price_table_missing", "quantity_required", "quota_exceeded", "quote_conflict", "quote_mismatch", "quote_required", "rate_limit_exceeded", "redis_unavailable", "sandbox_limit_reached", "sandbox_workspace", "scan_route_retired", "season_booked", "season_bookings_not_propagated", "season_chart_mismatch", "season_has_no_chart", "season_key_taken", "season_source_event", "season_source_required", "season_status_conflict", "season_status_overridden", "service_draining", "service_unavailable", "setup_expired", "stripe_not_configured", "structural_mismatch", "subscription_active", "test_workspace_not_billable", "ticket_buyer_id_required", "ticket_buyer_mismatch", "ticket_buyer_not_registered", "ticket_buyer_required", "ticket_type_required", "too_many_attempts", "too_many_events", "two_factor_already_enabled", "two_factor_enrollment_required", "two_factor_not_enabled", "two_factor_required_by_workspace", "unauthorized", "validation_error", "validation_failed", "webhook_handler_failed", "workspace_deactivated"])
143
143
  return false unless error_validator.valid?(@error)
144
144
  return false if @message.nil?
145
- code_validator = EnumAttributeValidator.new('String', ["ERR_BAD_REQUEST", "ERR_NOT_FOUND", "ERR_UNAUTHORIZED", "ERR_FORBIDDEN", "ERR_CONFLICT", "ERR_VALIDATION", "ERR_SERVICE_UNAVAILABLE", "ERR_INTERNAL", "ERR_RATE_LIMIT", "ERR_PLAN_LIMIT", "ERR_IDEMPOTENCY_CONFLICT", "ERR_SEAT_LOCKED", "ERR_SEAT_UNAVAILABLE", "ERR_SEAT_SOLD", "ERR_SEAT_HOLD_REQUIRED", "SEAT_NOT_FOR_SALE", "SEAT_CHANNEL_FORBIDDEN", "BA_NO_HOLDABLE_WINDOW", "ERR_SEATS_NOT_FOUND", "ERR_EVENT_NOT_FOUND", "ERR_CHART_NOT_FOUND", "ERR_CHART_NOT_ARCHIVED", "ERR_CHART_HAS_EVENTS", "ERR_AUTO_PUBLISH_CHART_HAS_EVENTS", "ERR_CHART_TAG_INVALID", "ERR_CHART_TAG_LIMIT", "ERR_CHART_VERSION_NOT_FOUND", "ERR_MAP_VERSION_NOT_FOUND", "ERR_MAP_NEVER_PUBLISHED", "ERR_DRAFT_NOTHING_TO_DISCARD", "ERR_THUMBNAIL_EXISTS", "ERR_THUMBNAIL_INVALID", "ERR_NAME_EMPTY", "ERR_GA_HOLD_INVALID", "ERR_GA_HOLD_MISSING", "ERR_GA_CAPACITY", "ERR_GA_AREA_NOT_FOUND", "GA_NOT_FOR_SALE", "GA_CHANNEL_FORBIDDEN", "ERR_HOLD_SERVICE_UNAVAILABLE", "ERR_PUBSUB_FAILED", "ERR_CHANNEL_LIMIT", "SEASON_SOURCE_REQUIRED", "SEASON_CHART_MISMATCH", "SEASON_EVENT_ALREADY_MEMBER", "SEASON_MEMBER_CAP", "ERR_SEASON_NOT_FOUND", "ERR_PARTNER_SCOPE", "ERR_FORBIDDEN_ROLE"])
145
+ code_validator = EnumAttributeValidator.new('String', ["ERR_BAD_REQUEST", "ERR_NOT_FOUND", "ERR_UNAUTHORIZED", "ERR_FORBIDDEN", "ERR_CONFLICT", "ERR_VALIDATION", "ERR_SERVICE_UNAVAILABLE", "ERR_INTERNAL", "ERR_RATE_LIMIT", "ERR_PLAN_LIMIT", "ERR_IDEMPOTENCY_CONFLICT", "ERR_SEAT_LOCKED", "ERR_SEAT_UNAVAILABLE", "ERR_SEAT_SOLD", "ERR_SEAT_HOLD_REQUIRED", "SEAT_NOT_FOR_SALE", "SEAT_CHANNEL_FORBIDDEN", "BA_NO_HOLDABLE_WINDOW", "ERR_SEATS_NOT_FOUND", "ERR_EVENT_NOT_FOUND", "ERR_CHART_NOT_FOUND", "ERR_CHART_NOT_ARCHIVED", "ERR_CHART_HAS_EVENTS", "ERR_AUTO_PUBLISH_CHART_HAS_EVENTS", "ERR_CHART_TAG_INVALID", "ERR_CHART_TAG_LIMIT", "ERR_CHART_VERSION_NOT_FOUND", "ERR_MAP_VERSION_NOT_FOUND", "ERR_MAP_NEVER_PUBLISHED", "ERR_DRAFT_NOTHING_TO_DISCARD", "ERR_THUMBNAIL_EXISTS", "ERR_THUMBNAIL_INVALID", "ERR_NAME_EMPTY", "ERR_GA_HOLD_INVALID", "ERR_GA_HOLD_MISSING", "ERR_GA_CAPACITY", "ERR_GA_AREA_NOT_FOUND", "GA_NOT_FOR_SALE", "GA_CHANNEL_FORBIDDEN", "ERR_HOLD_SERVICE_UNAVAILABLE", "ERR_PUBSUB_FAILED", "ERR_CHANNEL_LIMIT", "SEASON_SOURCE_REQUIRED", "SEASON_CHART_MISMATCH", "SEASON_EVENT_ALREADY_MEMBER", "SEASON_MEMBER_CAP", "ERR_SEASON_NOT_FOUND", "ERR_PARTNER_SCOPE", "ERR_FORBIDDEN_ROLE", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE", "ERR_PASSWORD_REJECTED", "ERR_NO_WORKSPACE", "ERR_SUBSCRIPTION_EXISTS"])
146
146
  return false unless code_validator.valid?(@code)
147
147
  true
148
148
  end
@@ -150,7 +150,7 @@ module SeatsChart
150
150
  # Custom attribute writer method checking allowed values (enum).
151
151
  # @param [Object] error Object to be assigned
152
152
  def error=(error)
153
- validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "booking_limit_exceeded", "buyer_limit_exceeded", "category_exists", "category_in_use", "channel_forbidden", "chart_archived", "chart_invalid", "chart_key_taken", "chart_not_published", "chart_switch_conflict", "checkout_failed", "checkout_not_complete", "confirm_failed", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "extraction_failed", "forbidden", "ga_places_to_channels_disabled", "ga_table_whole", "geometry_not_published", "hold_token_conflict", "idempotency_conflict", "idempotency_key_required", "illegal_previous_status", "insufficient_free_places", "insufficient_inventory", "insufficient_scope", "internal_error", "invalid_body", "invalid_code", "invalid_order_id", "invalid_parameters", "invalid_signature", "inventory_conflict", "last_active_workspace", "limit_exceeded", "listing_closed", "listing_has_holds", "listing_incomplete", "listing_key_taken", "listing_object_conflict", "listing_type_exists", "listing_type_in_use", "lot_sold_out", "no_customer", "no_subscription", "not_found", "not_published", "not_season_member", "objects_not_found", "own_workspace", "partial_season_key_taken", "payload_too_large", "pending_sign_in_expired", "plan_limit_exceeded", "portal_failed", "price_mismatch", "price_table_missing", "quantity_required", "quota_exceeded", "quote_conflict", "quote_mismatch", "quote_required", "rate_limit_exceeded", "redis_unavailable", "scan_route_retired", "season_booked", "season_chart_mismatch", "season_has_no_chart", "season_key_taken", "season_source_event", "season_source_required", "season_status_conflict", "season_status_overridden", "service_draining", "service_unavailable", "setup_expired", "stripe_not_configured", "structural_mismatch", "test_workspace_not_billable", "ticket_buyer_id_required", "ticket_buyer_mismatch", "ticket_buyer_not_registered", "ticket_buyer_required", "ticket_type_required", "too_many_attempts", "too_many_events", "two_factor_already_enabled", "two_factor_enrollment_required", "two_factor_not_enabled", "two_factor_required_by_workspace", "unauthorized", "validation_error", "validation_failed", "webhook_handler_failed", "workspace_deactivated"])
153
+ validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "booking_limit_exceeded", "buyer_limit_exceeded", "category_exists", "category_in_use", "channel_forbidden", "chart_archived", "chart_invalid", "chart_key_taken", "chart_not_published", "chart_switch_conflict", "checkout_failed", "checkout_not_complete", "confirm_failed", "confirmation_mismatch", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "extra_data_not_published", "extraction_failed", "for_sale_edit_conflict", "forbidden", "ga_area_occupancy_locked", "ga_area_whole", "ga_places_to_channels_disabled", "ga_table_whole", "geometry_not_published", "hold_token_conflict", "idempotency_conflict", "idempotency_key_required", "illegal_previous_status", "insufficient_free_places", "insufficient_inventory", "insufficient_scope", "internal_error", "invalid_body", "invalid_code", "invalid_order_id", "invalid_parameters", "invalid_signature", "inventory_conflict", "last_active_workspace", "last_workspace", "limit_exceeded", "listing_closed", "listing_has_holds", "listing_incomplete", "listing_key_taken", "listing_object_conflict", "listing_objects_removed", "listing_type_exists", "listing_type_in_use", "lot_sold_out", "no_customer", "no_subscription", "not_found", "not_published", "not_season_member", "objects_not_found", "own_workspace", "partial_season_key_taken", "payload_too_large", "pending_sign_in_expired", "plan_limit_exceeded", "plan_managed_by_sales", "plan_requires_sales", "portal_failed", "price_mismatch", "price_table_missing", "quantity_required", "quota_exceeded", "quote_conflict", "quote_mismatch", "quote_required", "rate_limit_exceeded", "redis_unavailable", "sandbox_limit_reached", "sandbox_workspace", "scan_route_retired", "season_booked", "season_bookings_not_propagated", "season_chart_mismatch", "season_has_no_chart", "season_key_taken", "season_source_event", "season_source_required", "season_status_conflict", "season_status_overridden", "service_draining", "service_unavailable", "setup_expired", "stripe_not_configured", "structural_mismatch", "subscription_active", "test_workspace_not_billable", "ticket_buyer_id_required", "ticket_buyer_mismatch", "ticket_buyer_not_registered", "ticket_buyer_required", "ticket_type_required", "too_many_attempts", "too_many_events", "two_factor_already_enabled", "two_factor_enrollment_required", "two_factor_not_enabled", "two_factor_required_by_workspace", "unauthorized", "validation_error", "validation_failed", "webhook_handler_failed", "workspace_deactivated"])
154
154
  unless validator.valid?(error)
155
155
  fail ArgumentError, "invalid value for \"error\", must be one of #{validator.allowable_values}."
156
156
  end
@@ -160,7 +160,7 @@ module SeatsChart
160
160
  # Custom attribute writer method checking allowed values (enum).
161
161
  # @param [Object] code Object to be assigned
162
162
  def code=(code)
163
- validator = EnumAttributeValidator.new('String', ["ERR_BAD_REQUEST", "ERR_NOT_FOUND", "ERR_UNAUTHORIZED", "ERR_FORBIDDEN", "ERR_CONFLICT", "ERR_VALIDATION", "ERR_SERVICE_UNAVAILABLE", "ERR_INTERNAL", "ERR_RATE_LIMIT", "ERR_PLAN_LIMIT", "ERR_IDEMPOTENCY_CONFLICT", "ERR_SEAT_LOCKED", "ERR_SEAT_UNAVAILABLE", "ERR_SEAT_SOLD", "ERR_SEAT_HOLD_REQUIRED", "SEAT_NOT_FOR_SALE", "SEAT_CHANNEL_FORBIDDEN", "BA_NO_HOLDABLE_WINDOW", "ERR_SEATS_NOT_FOUND", "ERR_EVENT_NOT_FOUND", "ERR_CHART_NOT_FOUND", "ERR_CHART_NOT_ARCHIVED", "ERR_CHART_HAS_EVENTS", "ERR_AUTO_PUBLISH_CHART_HAS_EVENTS", "ERR_CHART_TAG_INVALID", "ERR_CHART_TAG_LIMIT", "ERR_CHART_VERSION_NOT_FOUND", "ERR_MAP_VERSION_NOT_FOUND", "ERR_MAP_NEVER_PUBLISHED", "ERR_DRAFT_NOTHING_TO_DISCARD", "ERR_THUMBNAIL_EXISTS", "ERR_THUMBNAIL_INVALID", "ERR_NAME_EMPTY", "ERR_GA_HOLD_INVALID", "ERR_GA_HOLD_MISSING", "ERR_GA_CAPACITY", "ERR_GA_AREA_NOT_FOUND", "GA_NOT_FOR_SALE", "GA_CHANNEL_FORBIDDEN", "ERR_HOLD_SERVICE_UNAVAILABLE", "ERR_PUBSUB_FAILED", "ERR_CHANNEL_LIMIT", "SEASON_SOURCE_REQUIRED", "SEASON_CHART_MISMATCH", "SEASON_EVENT_ALREADY_MEMBER", "SEASON_MEMBER_CAP", "ERR_SEASON_NOT_FOUND", "ERR_PARTNER_SCOPE", "ERR_FORBIDDEN_ROLE"])
163
+ validator = EnumAttributeValidator.new('String', ["ERR_BAD_REQUEST", "ERR_NOT_FOUND", "ERR_UNAUTHORIZED", "ERR_FORBIDDEN", "ERR_CONFLICT", "ERR_VALIDATION", "ERR_SERVICE_UNAVAILABLE", "ERR_INTERNAL", "ERR_RATE_LIMIT", "ERR_PLAN_LIMIT", "ERR_IDEMPOTENCY_CONFLICT", "ERR_SEAT_LOCKED", "ERR_SEAT_UNAVAILABLE", "ERR_SEAT_SOLD", "ERR_SEAT_HOLD_REQUIRED", "SEAT_NOT_FOR_SALE", "SEAT_CHANNEL_FORBIDDEN", "BA_NO_HOLDABLE_WINDOW", "ERR_SEATS_NOT_FOUND", "ERR_EVENT_NOT_FOUND", "ERR_CHART_NOT_FOUND", "ERR_CHART_NOT_ARCHIVED", "ERR_CHART_HAS_EVENTS", "ERR_AUTO_PUBLISH_CHART_HAS_EVENTS", "ERR_CHART_TAG_INVALID", "ERR_CHART_TAG_LIMIT", "ERR_CHART_VERSION_NOT_FOUND", "ERR_MAP_VERSION_NOT_FOUND", "ERR_MAP_NEVER_PUBLISHED", "ERR_DRAFT_NOTHING_TO_DISCARD", "ERR_THUMBNAIL_EXISTS", "ERR_THUMBNAIL_INVALID", "ERR_NAME_EMPTY", "ERR_GA_HOLD_INVALID", "ERR_GA_HOLD_MISSING", "ERR_GA_CAPACITY", "ERR_GA_AREA_NOT_FOUND", "GA_NOT_FOR_SALE", "GA_CHANNEL_FORBIDDEN", "ERR_HOLD_SERVICE_UNAVAILABLE", "ERR_PUBSUB_FAILED", "ERR_CHANNEL_LIMIT", "SEASON_SOURCE_REQUIRED", "SEASON_CHART_MISMATCH", "SEASON_EVENT_ALREADY_MEMBER", "SEASON_MEMBER_CAP", "ERR_SEASON_NOT_FOUND", "ERR_PARTNER_SCOPE", "ERR_FORBIDDEN_ROLE", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE", "ERR_PASSWORD_REJECTED", "ERR_NO_WORKSPACE", "ERR_SUBSCRIPTION_EXISTS"])
164
164
  unless validator.valid?(code)
165
165
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
166
166
  end
@@ -0,0 +1,255 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SeatsChart
17
+ class DeleteApiSandboxesBySandboxId200Response
18
+ attr_accessor :sandbox_id
19
+
20
+ attr_accessor :deleted
21
+
22
+ attr_accessor :removed
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'sandbox_id' => :'sandboxId',
28
+ :'deleted' => :'deleted',
29
+ :'removed' => :'removed'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'sandbox_id' => :'String',
42
+ :'deleted' => :'Boolean',
43
+ :'removed' => :'Hash<String, Integer>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::DeleteApiSandboxesBySandboxId200Response` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::DeleteApiSandboxesBySandboxId200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'sandbox_id')
69
+ self.sandbox_id = attributes[:'sandbox_id']
70
+ else
71
+ self.sandbox_id = nil
72
+ end
73
+
74
+ if attributes.key?(:'deleted')
75
+ self.deleted = attributes[:'deleted']
76
+ else
77
+ self.deleted = nil
78
+ end
79
+
80
+ if attributes.key?(:'removed')
81
+ if (value = attributes[:'removed']).is_a?(Hash)
82
+ self.removed = value
83
+ end
84
+ else
85
+ self.removed = nil
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @sandbox_id.nil?
95
+ invalid_properties.push('invalid value for "sandbox_id", sandbox_id cannot be nil.')
96
+ end
97
+
98
+ if @deleted.nil?
99
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
100
+ end
101
+
102
+ if @removed.nil?
103
+ invalid_properties.push('invalid value for "removed", removed cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @sandbox_id.nil?
114
+ return false if @deleted.nil?
115
+ return false if @removed.nil?
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ sandbox_id == o.sandbox_id &&
125
+ deleted == o.deleted &&
126
+ removed == o.removed
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [sandbox_id, deleted, removed].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def self._deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = SeatsChart.const_get(type)
203
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end
@@ -0,0 +1,237 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SeatsChart
17
+ class DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response
18
+ attr_accessor :ok
19
+
20
+ attr_accessor :already_revoked
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'ok' => :'ok',
26
+ :'already_revoked' => :'alreadyRevoked'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'ok' => :'Boolean',
39
+ :'already_revoked' => :'Boolean'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'ok')
65
+ self.ok = attributes[:'ok']
66
+ else
67
+ self.ok = nil
68
+ end
69
+
70
+ if attributes.key?(:'already_revoked')
71
+ self.already_revoked = attributes[:'already_revoked']
72
+ else
73
+ self.already_revoked = nil
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
+ invalid_properties = Array.new
82
+ if @ok.nil?
83
+ invalid_properties.push('invalid value for "ok", ok cannot be nil.')
84
+ end
85
+
86
+ if @already_revoked.nil?
87
+ invalid_properties.push('invalid value for "already_revoked", already_revoked cannot be nil.')
88
+ end
89
+
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ return false if @ok.nil?
98
+ return false if @already_revoked.nil?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ ok == o.ok &&
108
+ already_revoked == o.already_revoked
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [ok, already_revoked].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def self._deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = SeatsChart.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end