seatschart 0.4.0 → 0.5.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -9
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +4 -4
  5. data/lib/seatschart/api/billing_api.rb +93 -12
  6. data/lib/seatschart/api/charts_api.rb +52 -52
  7. data/lib/seatschart/api/events_api.rb +110 -104
  8. data/lib/seatschart/api/seasons_api.rb +88 -88
  9. data/lib/seatschart/api/seats_api.rb +6 -6
  10. data/lib/seatschart/api/usage_api.rb +4 -4
  11. data/lib/seatschart/api/workspace_api.rb +52 -40
  12. data/lib/seatschart/models/{api_error.rb → api_error_body.rb} +7 -7
  13. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_members_by_user_id200_response.rb +221 -0
  14. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response.rb +239 -0
  15. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response_invitations_inner.rb +286 -0
  16. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response.rb +239 -0
  17. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response_members_inner.rb +288 -0
  18. data/lib/seatschart/models/get_api_workspaces_overview200_response.rb +288 -0
  19. data/lib/seatschart/models/get_api_workspaces_overview200_response_account.rb +270 -0
  20. data/lib/seatschart/models/get_api_workspaces_overview200_response_account_charts.rb +233 -0
  21. data/lib/seatschart/models/get_api_workspaces_overview200_response_account_plan.rb +237 -0
  22. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner.rb +439 -0
  23. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_revenue.rb +234 -0
  24. data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_usage.rb +271 -0
  25. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats.rb +431 -0
  26. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_overage.rb +233 -0
  27. data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_projected.rb +237 -0
  28. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals.rb +318 -0
  29. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_revenue.rb +238 -0
  30. data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_seats.rb +253 -0
  31. data/lib/seatschart/models/post_api_billing_actions_change_plan_request.rb +256 -0
  32. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +0 -2
  33. data/lib/seatschart/models/post_api_sandboxes201_response.rb +0 -4
  34. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +0 -2
  35. data/lib/seatschart/models/post_api_workspaces200_response.rb +0 -4
  36. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response.rb +238 -0
  37. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response_invitation.rb +286 -0
  38. data/lib/seatschart/version.rb +1 -1
  39. data/lib/seatschart/workspaces.rb +172 -0
  40. data/lib/seatschart.rb +23 -3
  41. metadata +25 -5
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +0 -103
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +0 -103
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module SeatsChart
17
17
  # Every error response. Match on `error` (stable catalog code, see docs ERROR_CODES.md); `code` is an optional detail code for localized messages; `message` is English text for logs. Kinds: validation (400/413/422), auth (401/403), not_found (404), conflict (409/410/412), payment (402), rate_limit (429), server (500/502/503). Deprecated aliases (no longer returned; normalize old comparisons): `validation` → `validation_error`. The `x-request-id` response header identifies the request for support.
18
- class ApiError
18
+ class ApiErrorBody
19
19
  # Stable machine-readable code (catalog).
20
20
  attr_accessor :error
21
21
 
@@ -84,13 +84,13 @@ module SeatsChart
84
84
  # @param [Hash] attributes Model attributes in the form of hash
85
85
  def initialize(attributes = {})
86
86
  if (!attributes.is_a?(Hash))
87
- fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::ApiError` initialize method"
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::ApiErrorBody` initialize method"
88
88
  end
89
89
 
90
90
  # check to see if the attribute exists and convert string to symbol for hash key
91
91
  attributes = attributes.each_with_object({}) { |(k, v), h|
92
92
  if (!self.class.attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::ApiError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::ApiErrorBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
94
  end
95
95
  h[k.to_sym] = v
96
96
  }
@@ -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", "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"])
142
+ error_validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "billing_account_missing", "billing_managed_by_owner", "billing_managed_by_platform", "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", "checkout_required", "confirm_failed", "confirmation_mismatch", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "external_id_ambiguous", "external_id_taken", "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", "holds_paused", "idempotency_conflict", "idempotency_key_required", "idempotency_key_reused", "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", "template_not_found", "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", "workspace_not_found"])
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", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE", "ERR_PASSWORD_REJECTED", "ERR_NO_WORKSPACE", "ERR_SUBSCRIPTION_EXISTS"])
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", "ERR_WORKSPACE_HEADER_NOT_ALLOWED", "ERR_ADMIN_KEY_REVOKED", "ERR_ADMIN_KEY_DASHBOARD_ONLY", "ERR_EXTERNAL_ID_TAKEN", "ERR_IDEMPOTENCY_IN_PROGRESS", "ERR_IDEMPOTENCY_KEY_REUSED", "ERR_HOLDS_PAUSED"])
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", "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"])
153
+ validator = EnumAttributeValidator.new('String', ["ambiguous_label", "ambiguous_season_key", "bad_request", "billing_account_missing", "billing_managed_by_owner", "billing_managed_by_platform", "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", "checkout_required", "confirm_failed", "confirmation_mismatch", "conflict", "currency_mismatch", "draft_conflict", "draft_not_found", "empty_chart", "event_key_taken", "event_not_found", "event_sale", "external_id_ambiguous", "external_id_taken", "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", "holds_paused", "idempotency_conflict", "idempotency_key_required", "idempotency_key_reused", "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", "template_not_found", "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", "workspace_not_found"])
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", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE", "ERR_PASSWORD_REJECTED", "ERR_NO_WORKSPACE", "ERR_SUBSCRIPTION_EXISTS"])
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", "ERR_WORKSPACE_HEADER_NOT_ALLOWED", "ERR_ADMIN_KEY_REVOKED", "ERR_ADMIN_KEY_DASHBOARD_ONLY", "ERR_EXTERNAL_ID_TAKEN", "ERR_IDEMPOTENCY_IN_PROGRESS", "ERR_IDEMPOTENCY_KEY_REUSED", "ERR_HOLDS_PAUSED"])
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,221 @@
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 DeleteApiWorkspacesByWorkspaceIdMembersByUserId200Response
18
+ attr_accessor :ok
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'ok' => :'ok'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'ok' => :'Boolean'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::DeleteApiWorkspacesByWorkspaceIdMembersByUserId200Response` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::DeleteApiWorkspacesByWorkspaceIdMembersByUserId200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'ok')
61
+ self.ok = attributes[:'ok']
62
+ else
63
+ self.ok = nil
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
+ invalid_properties = Array.new
72
+ if @ok.nil?
73
+ invalid_properties.push('invalid value for "ok", ok cannot be nil.')
74
+ end
75
+
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ return false if @ok.nil?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ ok == o.ok
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [ok].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = SeatsChart.const_get(type)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -0,0 +1,239 @@
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 GetApiWorkspacesByWorkspaceIdInvitations200Response
18
+ attr_accessor :workspace_id
19
+
20
+ attr_accessor :invitations
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'workspace_id' => :'workspaceId',
26
+ :'invitations' => :'invitations'
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
+ :'workspace_id' => :'String',
39
+ :'invitations' => :'Array<GetApiWorkspacesByWorkspaceIdInvitations200ResponseInvitationsInner>'
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::GetApiWorkspacesByWorkspaceIdInvitations200Response` 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::GetApiWorkspacesByWorkspaceIdInvitations200Response`. 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?(:'workspace_id')
65
+ self.workspace_id = attributes[:'workspace_id']
66
+ else
67
+ self.workspace_id = nil
68
+ end
69
+
70
+ if attributes.key?(:'invitations')
71
+ if (value = attributes[:'invitations']).is_a?(Array)
72
+ self.invitations = value
73
+ end
74
+ else
75
+ self.invitations = nil
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ if @workspace_id.nil?
85
+ invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
86
+ end
87
+
88
+ if @invitations.nil?
89
+ invalid_properties.push('invalid value for "invitations", invitations cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @workspace_id.nil?
100
+ return false if @invitations.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ workspace_id == o.workspace_id &&
110
+ invitations == o.invitations
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [workspace_id, invitations].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = SeatsChart.const_get(type)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end