seatschart 0.3.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -6
  3. data/lib/seatschart/api/auth_api.rb +81 -4
  4. data/lib/seatschart/api/billing_api.rb +4 -0
  5. data/lib/seatschart/api/charts_api.rb +11 -11
  6. data/lib/seatschart/api/events_api.rb +20 -20
  7. data/lib/seatschart/api/public_api.rb +6 -6
  8. data/lib/seatschart/api/workspace_api.rb +1213 -47
  9. data/lib/seatschart/models/api_error.rb +4 -4
  10. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  11. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +50 -4
  12. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  13. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  14. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  15. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  16. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +15 -15
  17. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  18. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  19. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  20. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  21. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  22. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  23. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  24. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  25. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  26. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  27. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  28. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  29. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  30. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  31. data/lib/seatschart/models/post_api_workspaces_request.rb +100 -4
  32. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  33. data/lib/seatschart/version.rb +1 -1
  34. data/lib/seatschart.rb +20 -1
  35. metadata +22 -3
  36. data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +0 -349
@@ -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", "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", "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", "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", "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", "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", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE"])
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", "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", "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", "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", "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", "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", "ERR_SANDBOX_SCOPE", "ERR_EMBED_SCOPE", "ERR_DESIGNER_READ_ONLY", "ERR_DESIGNER_SAFE_MODE"])
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,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
@@ -44,6 +44,14 @@ module SeatsChart
44
44
  # `sandbox` exactly when `isTest` (see `/sandboxes`).
45
45
  attr_accessor :kind
46
46
 
47
+ # Your organizer id for this workspace (one workspace per organizer); usable in `X-Workspace-Key`.
48
+ attr_accessor :external_id
49
+
50
+ # Provisioned by a workspace admin key: billed to the platform account that created it.
51
+ attr_accessor :created_by_api
52
+
53
+ attr_accessor :created_at
54
+
47
55
  class EnumAttributeValidator
48
56
  attr_reader :datatype
49
57
  attr_reader :allowable_values
@@ -80,7 +88,10 @@ module SeatsChart
80
88
  :'is_default' => :'isDefault',
81
89
  :'is_test' => :'isTest',
82
90
  :'parent_workspace_id' => :'parentWorkspaceId',
83
- :'kind' => :'kind'
91
+ :'kind' => :'kind',
92
+ :'external_id' => :'externalId',
93
+ :'created_by_api' => :'createdByApi',
94
+ :'created_at' => :'createdAt'
84
95
  }
85
96
  end
86
97
 
@@ -103,7 +114,10 @@ module SeatsChart
103
114
  :'is_default' => :'Boolean',
104
115
  :'is_test' => :'Boolean',
105
116
  :'parent_workspace_id' => :'String',
106
- :'kind' => :'String'
117
+ :'kind' => :'String',
118
+ :'external_id' => :'String',
119
+ :'created_by_api' => :'Boolean',
120
+ :'created_at' => :'Time'
107
121
  }
108
122
  end
109
123
 
@@ -112,6 +126,7 @@ module SeatsChart
112
126
  Set.new([
113
127
  :'deactivated_at',
114
128
  :'parent_workspace_id',
129
+ :'external_id',
115
130
  ])
116
131
  end
117
132
 
@@ -201,6 +216,24 @@ module SeatsChart
201
216
  else
202
217
  self.kind = nil
203
218
  end
219
+
220
+ if attributes.key?(:'external_id')
221
+ self.external_id = attributes[:'external_id']
222
+ else
223
+ self.external_id = nil
224
+ end
225
+
226
+ if attributes.key?(:'created_by_api')
227
+ self.created_by_api = attributes[:'created_by_api']
228
+ else
229
+ self.created_by_api = nil
230
+ end
231
+
232
+ if attributes.key?(:'created_at')
233
+ self.created_at = attributes[:'created_at']
234
+ else
235
+ self.created_at = nil
236
+ end
204
237
  end
205
238
 
206
239
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -248,6 +281,14 @@ module SeatsChart
248
281
  invalid_properties.push('invalid value for "kind", kind cannot be nil.')
249
282
  end
250
283
 
284
+ if @created_by_api.nil?
285
+ invalid_properties.push('invalid value for "created_by_api", created_by_api cannot be nil.')
286
+ end
287
+
288
+ if @created_at.nil?
289
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
290
+ end
291
+
251
292
  invalid_properties
252
293
  end
253
294
 
@@ -271,6 +312,8 @@ module SeatsChart
271
312
  return false if @kind.nil?
272
313
  kind_validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
273
314
  return false unless kind_validator.valid?(@kind)
315
+ return false if @created_by_api.nil?
316
+ return false if @created_at.nil?
274
317
  true
275
318
  end
276
319
 
@@ -320,7 +363,10 @@ module SeatsChart
320
363
  is_default == o.is_default &&
321
364
  is_test == o.is_test &&
322
365
  parent_workspace_id == o.parent_workspace_id &&
323
- kind == o.kind
366
+ kind == o.kind &&
367
+ external_id == o.external_id &&
368
+ created_by_api == o.created_by_api &&
369
+ created_at == o.created_at
324
370
  end
325
371
 
326
372
  # @see the `==` method
@@ -332,7 +378,7 @@ module SeatsChart
332
378
  # Calculates hash code according to all attributes.
333
379
  # @return [Integer] Hash code
334
380
  def hash
335
- [workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id, kind].hash
381
+ [workspace_id, display_name, role, plan_id, subscription_status, status, deactivated_at, is_current, is_default, is_test, parent_workspace_id, kind, external_id, created_by_api, created_at].hash
336
382
  end
337
383
 
338
384
  # Builds the object from hash
@@ -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 GetApiWorkspacesByWorkspaceIdKeys200Response
18
+ attr_accessor :workspace_id
19
+
20
+ attr_accessor :api_keys
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'workspace_id' => :'workspaceId',
26
+ :'api_keys' => :'apiKeys'
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
+ :'api_keys' => :'Array<GetApiWorkspacesByWorkspaceIdKeys200ResponseApiKeysInner>'
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::GetApiWorkspacesByWorkspaceIdKeys200Response` 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::GetApiWorkspacesByWorkspaceIdKeys200Response`. 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?(:'api_keys')
71
+ if (value = attributes[:'api_keys']).is_a?(Array)
72
+ self.api_keys = value
73
+ end
74
+ else
75
+ self.api_keys = 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 @api_keys.nil?
89
+ invalid_properties.push('invalid value for "api_keys", api_keys 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 @api_keys.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
+ api_keys == o.api_keys
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, api_keys].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