fastcomments 1.2.0 → 1.2.1

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 (136) hide show
  1. checksums.yaml +4 -4
  2. data/client/README.md +27 -0
  3. data/client/docs/APIComment.md +1 -1
  4. data/client/docs/APICommentBase.md +1 -1
  5. data/client/docs/APICommentBaseMeta.md +20 -0
  6. data/client/docs/APITicket.md +34 -0
  7. data/client/docs/APITicketDetail.md +42 -0
  8. data/client/docs/APITicketFile.md +36 -0
  9. data/client/docs/APIUserSubscription.md +2 -0
  10. data/client/docs/ChangeTicketState200Response.md +34 -0
  11. data/client/docs/ChangeTicketStateBody.md +18 -0
  12. data/client/docs/ChangeTicketStateResponse.md +20 -0
  13. data/client/docs/CommentData.md +3 -1
  14. data/client/docs/CreateAPIUserSubscriptionData.md +2 -0
  15. data/client/docs/CreateCommentParams.md +2 -0
  16. data/client/docs/CreateTenantPackageBody.md +2 -0
  17. data/client/docs/CreateTicket200Response.md +34 -0
  18. data/client/docs/CreateTicketBody.md +18 -0
  19. data/client/docs/CreateTicketResponse.md +20 -0
  20. data/client/docs/CustomConfigParameters.md +21 -1
  21. data/client/docs/DefaultApi.md +384 -0
  22. data/client/docs/FComment.md +3 -1
  23. data/client/docs/FCommentMeta.md +2 -0
  24. data/client/docs/GetTicket200Response.md +36 -0
  25. data/client/docs/GetTicketResponse.md +22 -0
  26. data/client/docs/GetTickets200Response.md +34 -0
  27. data/client/docs/GetTicketsResponse.md +20 -0
  28. data/client/docs/HeaderAccountNotification.md +34 -0
  29. data/client/docs/HeaderState.md +3 -1
  30. data/client/docs/MentionAutoCompleteMode.md +15 -0
  31. data/client/docs/Moderator.md +3 -1
  32. data/client/docs/PublicApi.md +3 -1
  33. data/client/docs/ReplaceTenantPackageBody.md +2 -0
  34. data/client/docs/SearchUsers200Response.md +2 -0
  35. data/client/docs/SearchUsersSectionedResponse.md +20 -0
  36. data/client/docs/TOSConfig.md +22 -0
  37. data/client/docs/TenantPackage.md +4 -0
  38. data/client/docs/UpdatableCommentParams.md +1 -1
  39. data/client/docs/UpdateAPIUserSubscriptionData.md +18 -0
  40. data/client/docs/UpdateSubscriptionAPIResponse.md +24 -0
  41. data/client/docs/UpdateTenantPackageBody.md +2 -0
  42. data/client/docs/User.md +17 -1
  43. data/client/docs/UserBadge.md +3 -1
  44. data/client/docs/UserBadgeProgress.md +3 -1
  45. data/client/docs/UserSearchSection.md +15 -0
  46. data/client/docs/UserSearchSectionResult.md +20 -0
  47. data/client/docs/UserSessionInfo.md +2 -0
  48. data/client/lib/fastcomments-client/api/default_api.rb +383 -0
  49. data/client/lib/fastcomments-client/api/public_api.rb +7 -0
  50. data/client/lib/fastcomments-client/models/api_comment.rb +1 -1
  51. data/client/lib/fastcomments-client/models/api_comment_base.rb +1 -1
  52. data/client/lib/fastcomments-client/models/api_comment_base_meta.rb +156 -0
  53. data/client/lib/fastcomments-client/models/api_ticket.rb +374 -0
  54. data/client/lib/fastcomments-client/models/api_ticket_detail.rb +432 -0
  55. data/client/lib/fastcomments-client/models/api_ticket_file.rb +381 -0
  56. data/client/lib/fastcomments-client/models/api_user_subscription.rb +10 -1
  57. data/client/lib/fastcomments-client/models/change_ticket_state200_response.rb +103 -0
  58. data/client/lib/fastcomments-client/models/change_ticket_state_body.rb +164 -0
  59. data/client/lib/fastcomments-client/models/change_ticket_state_response.rb +212 -0
  60. data/client/lib/fastcomments-client/models/comment_data.rb +13 -4
  61. data/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb +10 -1
  62. data/client/lib/fastcomments-client/models/create_comment_params.rb +10 -1
  63. data/client/lib/fastcomments-client/models/create_tenant_package_body.rb +10 -1
  64. data/client/lib/fastcomments-client/models/create_ticket200_response.rb +103 -0
  65. data/client/lib/fastcomments-client/models/create_ticket_body.rb +164 -0
  66. data/client/lib/fastcomments-client/models/create_ticket_response.rb +212 -0
  67. data/client/lib/fastcomments-client/models/custom_config_parameters.rb +97 -4
  68. data/client/lib/fastcomments-client/models/f_comment.rb +13 -4
  69. data/client/lib/fastcomments-client/models/f_comment_meta.rb +10 -1
  70. data/client/lib/fastcomments-client/models/get_ticket200_response.rb +103 -0
  71. data/client/lib/fastcomments-client/models/get_ticket_response.rb +240 -0
  72. data/client/lib/fastcomments-client/models/get_tickets200_response.rb +103 -0
  73. data/client/lib/fastcomments-client/models/get_tickets_response.rb +214 -0
  74. data/client/lib/fastcomments-client/models/header_account_notification.rb +322 -0
  75. data/client/lib/fastcomments-client/models/header_state.rb +32 -4
  76. data/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb +41 -0
  77. data/client/lib/fastcomments-client/models/moderator.rb +14 -5
  78. data/client/lib/fastcomments-client/models/replace_tenant_package_body.rb +10 -1
  79. data/client/lib/fastcomments-client/models/search_users200_response.rb +2 -1
  80. data/client/lib/fastcomments-client/models/search_users_sectioned_response.rb +214 -0
  81. data/client/lib/fastcomments-client/models/tenant_package.rb +36 -1
  82. data/client/lib/fastcomments-client/models/tos_config.rb +168 -0
  83. data/client/lib/fastcomments-client/models/updatable_comment_params.rb +1 -1
  84. data/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb +147 -0
  85. data/client/lib/fastcomments-client/models/update_subscription_api_response.rb +191 -0
  86. data/client/lib/fastcomments-client/models/update_tenant_package_body.rb +10 -1
  87. data/client/lib/fastcomments-client/models/user.rb +76 -4
  88. data/client/lib/fastcomments-client/models/user_badge.rb +14 -4
  89. data/client/lib/fastcomments-client/models/user_badge_progress.rb +13 -4
  90. data/client/lib/fastcomments-client/models/user_search_section.rb +41 -0
  91. data/client/lib/fastcomments-client/models/user_search_section_result.rb +214 -0
  92. data/client/lib/fastcomments-client/models/user_session_info.rb +10 -1
  93. data/client/lib/fastcomments-client.rb +22 -0
  94. data/client/spec/api/default_api_spec.rb +64 -0
  95. data/client/spec/api/public_api_spec.rb +1 -0
  96. data/client/spec/models/api_comment_base_meta_spec.rb +42 -0
  97. data/client/spec/models/api_ticket_detail_spec.rb +108 -0
  98. data/client/spec/models/api_ticket_file_spec.rb +90 -0
  99. data/client/spec/models/api_ticket_spec.rb +84 -0
  100. data/client/spec/models/api_user_subscription_spec.rb +6 -0
  101. data/client/spec/models/change_ticket_state200_response_spec.rb +21 -0
  102. data/client/spec/models/change_ticket_state_body_spec.rb +36 -0
  103. data/client/spec/models/change_ticket_state_response_spec.rb +42 -0
  104. data/client/spec/models/comment_data_spec.rb +6 -0
  105. data/client/spec/models/create_api_user_subscription_data_spec.rb +6 -0
  106. data/client/spec/models/create_comment_params_spec.rb +6 -0
  107. data/client/spec/models/create_tenant_package_body_spec.rb +6 -0
  108. data/client/spec/models/create_ticket200_response_spec.rb +21 -0
  109. data/client/spec/models/create_ticket_body_spec.rb +36 -0
  110. data/client/spec/models/create_ticket_response_spec.rb +42 -0
  111. data/client/spec/models/custom_config_parameters_spec.rb +60 -0
  112. data/client/spec/models/f_comment_meta_spec.rb +6 -0
  113. data/client/spec/models/f_comment_spec.rb +6 -0
  114. data/client/spec/models/get_ticket200_response_spec.rb +21 -0
  115. data/client/spec/models/get_ticket_response_spec.rb +48 -0
  116. data/client/spec/models/get_tickets200_response_spec.rb +21 -0
  117. data/client/spec/models/get_tickets_response_spec.rb +42 -0
  118. data/client/spec/models/header_account_notification_spec.rb +84 -0
  119. data/client/spec/models/header_state_spec.rb +6 -0
  120. data/client/spec/models/mention_auto_complete_mode_spec.rb +30 -0
  121. data/client/spec/models/moderator_spec.rb +6 -0
  122. data/client/spec/models/replace_tenant_package_body_spec.rb +6 -0
  123. data/client/spec/models/search_users_sectioned_response_spec.rb +42 -0
  124. data/client/spec/models/tenant_package_spec.rb +12 -0
  125. data/client/spec/models/tos_config_spec.rb +48 -0
  126. data/client/spec/models/update_api_user_subscription_data_spec.rb +36 -0
  127. data/client/spec/models/update_subscription_api_response_spec.rb +54 -0
  128. data/client/spec/models/update_tenant_package_body_spec.rb +6 -0
  129. data/client/spec/models/user_badge_progress_spec.rb +6 -0
  130. data/client/spec/models/user_badge_spec.rb +6 -0
  131. data/client/spec/models/user_search_section_result_spec.rb +42 -0
  132. data/client/spec/models/user_search_section_spec.rb +30 -0
  133. data/client/spec/models/user_session_info_spec.rb +6 -0
  134. data/client/spec/models/user_spec.rb +48 -0
  135. data/lib/fastcomments.rb +1 -1
  136. metadata +68 -2
@@ -0,0 +1,212 @@
1
+ =begin
2
+ #fastcomments
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FastCommentsClient
17
+ class ChangeTicketStateResponse < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :ticket
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'status' => :'status',
48
+ :'ticket' => :'ticket'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'status' => :'APIStatus',
66
+ :'ticket' => :'APITicket'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::ChangeTicketStateResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::ChangeTicketStateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'status')
93
+ self.status = attributes[:'status']
94
+ else
95
+ self.status = nil
96
+ end
97
+
98
+ if attributes.key?(:'ticket')
99
+ self.ticket = attributes[:'ticket']
100
+ else
101
+ self.ticket = nil
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @status.nil?
111
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
112
+ end
113
+
114
+ if @ticket.nil?
115
+ invalid_properties.push('invalid value for "ticket", ticket cannot be nil.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ return false if @status.nil?
126
+ return false if @ticket.nil?
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] status Value to be assigned
132
+ def status=(status)
133
+ if status.nil?
134
+ fail ArgumentError, 'status cannot be nil'
135
+ end
136
+
137
+ @status = status
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] ticket Value to be assigned
142
+ def ticket=(ticket)
143
+ if ticket.nil?
144
+ fail ArgumentError, 'ticket cannot be nil'
145
+ end
146
+
147
+ @ticket = ticket
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ status == o.status &&
156
+ ticket == o.ticket
157
+ end
158
+
159
+ # @see the `==` method
160
+ # @param [Object] Object to be compared
161
+ def eql?(o)
162
+ self == o
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Integer] Hash code
167
+ def hash
168
+ [status, ticket].hash
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def self.build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ attributes = attributes.transform_keys(&:to_sym)
177
+ transformed_hash = {}
178
+ openapi_types.each_pair do |key, type|
179
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = nil
181
+ elsif type =~ /\AArray<(.*)>/i
182
+ # check to ensure the input is an array given that the attribute
183
+ # is documented as an array but the input is not
184
+ if attributes[attribute_map[key]].is_a?(Array)
185
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
+ end
187
+ elsif !attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
+ end
190
+ end
191
+ new(transformed_hash)
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ end
211
+
212
+ end
@@ -64,6 +64,8 @@ module FastCommentsClient
64
64
  # Construct a type with a set of properties K of type T
65
65
  attr_accessor :question_values
66
66
 
67
+ attr_accessor :tos
68
+
67
69
  # Attribute mapping from ruby-style variable name to JSON key.
68
70
  def self.attribute_map
69
71
  {
@@ -90,7 +92,8 @@ module FastCommentsClient
90
92
  :'from_offline_restore' => :'fromOfflineRestore',
91
93
  :'autoplay_delay_ms' => :'autoplayDelayMS',
92
94
  :'feedback_ids' => :'feedbackIds',
93
- :'question_values' => :'questionValues'
95
+ :'question_values' => :'questionValues',
96
+ :'tos' => :'tos'
94
97
  }
95
98
  end
96
99
 
@@ -130,7 +133,8 @@ module FastCommentsClient
130
133
  :'from_offline_restore' => :'Boolean',
131
134
  :'autoplay_delay_ms' => :'Integer',
132
135
  :'feedback_ids' => :'Array<String>',
133
- :'question_values' => :'Hash<String, RecordStringStringOrNumberValue>'
136
+ :'question_values' => :'Hash<String, RecordStringStringOrNumberValue>',
137
+ :'tos' => :'Boolean'
134
138
  }
135
139
  end
136
140
 
@@ -274,6 +278,10 @@ module FastCommentsClient
274
278
  self.question_values = value
275
279
  end
276
280
  end
281
+
282
+ if attributes.key?(:'tos')
283
+ self.tos = attributes[:'tos']
284
+ end
277
285
  end
278
286
 
279
287
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -379,7 +387,8 @@ module FastCommentsClient
379
387
  from_offline_restore == o.from_offline_restore &&
380
388
  autoplay_delay_ms == o.autoplay_delay_ms &&
381
389
  feedback_ids == o.feedback_ids &&
382
- question_values == o.question_values
390
+ question_values == o.question_values &&
391
+ tos == o.tos
383
392
  end
384
393
 
385
394
  # @see the `==` method
@@ -391,7 +400,7 @@ module FastCommentsClient
391
400
  # Calculates hash code according to all attributes.
392
401
  # @return [Integer] Hash code
393
402
  def hash
394
- [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values].hash
403
+ [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos].hash
395
404
  end
396
405
 
397
406
  # Builds the object from hash
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module FastCommentsClient
17
17
  class CreateAPIUserSubscriptionData < ApiModelBase
18
+ attr_accessor :notification_frequency
19
+
18
20
  attr_accessor :page_title
19
21
 
20
22
  attr_accessor :url
@@ -28,6 +30,7 @@ module FastCommentsClient
28
30
  # Attribute mapping from ruby-style variable name to JSON key.
29
31
  def self.attribute_map
30
32
  {
33
+ :'notification_frequency' => :'notificationFrequency',
31
34
  :'page_title' => :'pageTitle',
32
35
  :'url' => :'url',
33
36
  :'url_id' => :'urlId',
@@ -49,6 +52,7 @@ module FastCommentsClient
49
52
  # Attribute type mapping.
50
53
  def self.openapi_types
51
54
  {
55
+ :'notification_frequency' => :'Float',
52
56
  :'page_title' => :'String',
53
57
  :'url' => :'String',
54
58
  :'url_id' => :'String',
@@ -79,6 +83,10 @@ module FastCommentsClient
79
83
  h[k.to_sym] = v
80
84
  }
81
85
 
86
+ if attributes.key?(:'notification_frequency')
87
+ self.notification_frequency = attributes[:'notification_frequency']
88
+ end
89
+
82
90
  if attributes.key?(:'page_title')
83
91
  self.page_title = attributes[:'page_title']
84
92
  end
@@ -137,6 +145,7 @@ module FastCommentsClient
137
145
  def ==(o)
138
146
  return true if self.equal?(o)
139
147
  self.class == o.class &&
148
+ notification_frequency == o.notification_frequency &&
140
149
  page_title == o.page_title &&
141
150
  url == o.url &&
142
151
  url_id == o.url_id &&
@@ -153,7 +162,7 @@ module FastCommentsClient
153
162
  # Calculates hash code according to all attributes.
154
163
  # @return [Integer] Hash code
155
164
  def hash
156
- [page_title, url, url_id, anon_user_id, user_id].hash
165
+ [notification_frequency, page_title, url, url_id, anon_user_id, user_id].hash
157
166
  end
158
167
 
159
168
  # Builds the object from hash
@@ -64,6 +64,8 @@ module FastCommentsClient
64
64
  # Construct a type with a set of properties K of type T
65
65
  attr_accessor :question_values
66
66
 
67
+ attr_accessor :tos
68
+
67
69
  attr_accessor :approved
68
70
 
69
71
  attr_accessor :domain
@@ -112,6 +114,7 @@ module FastCommentsClient
112
114
  :'autoplay_delay_ms' => :'autoplayDelayMS',
113
115
  :'feedback_ids' => :'feedbackIds',
114
116
  :'question_values' => :'questionValues',
117
+ :'tos' => :'tos',
115
118
  :'approved' => :'approved',
116
119
  :'domain' => :'domain',
117
120
  :'ip' => :'ip',
@@ -162,6 +165,7 @@ module FastCommentsClient
162
165
  :'autoplay_delay_ms' => :'Integer',
163
166
  :'feedback_ids' => :'Array<String>',
164
167
  :'question_values' => :'Hash<String, RecordStringStringOrNumberValue>',
168
+ :'tos' => :'Boolean',
165
169
  :'approved' => :'Boolean',
166
170
  :'domain' => :'String',
167
171
  :'ip' => :'String',
@@ -316,6 +320,10 @@ module FastCommentsClient
316
320
  end
317
321
  end
318
322
 
323
+ if attributes.key?(:'tos')
324
+ self.tos = attributes[:'tos']
325
+ end
326
+
319
327
  if attributes.key?(:'approved')
320
328
  self.approved = attributes[:'approved']
321
329
  end
@@ -478,6 +486,7 @@ module FastCommentsClient
478
486
  autoplay_delay_ms == o.autoplay_delay_ms &&
479
487
  feedback_ids == o.feedback_ids &&
480
488
  question_values == o.question_values &&
489
+ tos == o.tos &&
481
490
  approved == o.approved &&
482
491
  domain == o.domain &&
483
492
  ip == o.ip &&
@@ -499,7 +508,7 @@ module FastCommentsClient
499
508
  # Calculates hash code according to all attributes.
500
509
  # @return [Integer] Hash code
501
510
  def hash
502
- [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, approved, domain, ip, is_pinned, locale, reviewed, verified, votes, votes_down, votes_up].hash
511
+ [date, local_date_string, local_date_hours, commenter_name, commenter_email, commenter_link, comment, product_id, user_id, avatar_src, parent_id, mentions, hash_tags, page_title, is_from_my_account_page, url, url_id, meta, moderation_group_ids, rating, from_offline_restore, autoplay_delay_ms, feedback_ids, question_values, tos, approved, domain, ip, is_pinned, locale, reviewed, verified, votes, votes_down, votes_up].hash
503
512
  end
504
513
 
505
514
  # Builds the object from hash
@@ -47,6 +47,8 @@ module FastCommentsClient
47
47
 
48
48
  attr_accessor :max_monthly_event_log_requests
49
49
 
50
+ attr_accessor :max_custom_collection_size
51
+
50
52
  attr_accessor :has_white_labeling
51
53
 
52
54
  attr_accessor :has_debranding
@@ -130,6 +132,7 @@ module FastCommentsClient
130
132
  :'max_domains' => :'maxDomains',
131
133
  :'max_white_labeled_tenants' => :'maxWhiteLabeledTenants',
132
134
  :'max_monthly_event_log_requests' => :'maxMonthlyEventLogRequests',
135
+ :'max_custom_collection_size' => :'maxCustomCollectionSize',
133
136
  :'has_white_labeling' => :'hasWhiteLabeling',
134
137
  :'has_debranding' => :'hasDebranding',
135
138
  :'has_llm_spam_detection' => :'hasLLMSpamDetection',
@@ -194,6 +197,7 @@ module FastCommentsClient
194
197
  :'max_domains' => :'Float',
195
198
  :'max_white_labeled_tenants' => :'Float',
196
199
  :'max_monthly_event_log_requests' => :'Float',
200
+ :'max_custom_collection_size' => :'Float',
197
201
  :'has_white_labeling' => :'Boolean',
198
202
  :'has_debranding' => :'Boolean',
199
203
  :'has_llm_spam_detection' => :'Boolean',
@@ -337,6 +341,10 @@ module FastCommentsClient
337
341
  self.max_monthly_event_log_requests = attributes[:'max_monthly_event_log_requests']
338
342
  end
339
343
 
344
+ if attributes.key?(:'max_custom_collection_size')
345
+ self.max_custom_collection_size = attributes[:'max_custom_collection_size']
346
+ end
347
+
340
348
  if attributes.key?(:'has_white_labeling')
341
349
  self.has_white_labeling = attributes[:'has_white_labeling']
342
350
  end
@@ -707,6 +715,7 @@ module FastCommentsClient
707
715
  max_domains == o.max_domains &&
708
716
  max_white_labeled_tenants == o.max_white_labeled_tenants &&
709
717
  max_monthly_event_log_requests == o.max_monthly_event_log_requests &&
718
+ max_custom_collection_size == o.max_custom_collection_size &&
710
719
  has_white_labeling == o.has_white_labeling &&
711
720
  has_debranding == o.has_debranding &&
712
721
  has_llm_spam_detection == o.has_llm_spam_detection &&
@@ -750,7 +759,7 @@ module FastCommentsClient
750
759
  # Calculates hash code according to all attributes.
751
760
  # @return [Integer] Hash code
752
761
  def hash
753
- [name, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_chat_gpt_cost_cents, flex_chat_gpt_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit].hash
762
+ [name, monthly_cost_usd, yearly_cost_usd, monthly_stripe_plan_id, yearly_stripe_plan_id, max_monthly_page_loads, max_monthly_api_credits, max_monthly_small_widgets_credits, max_monthly_comments, max_concurrent_users, max_tenant_users, max_sso_users, max_moderators, max_domains, max_white_labeled_tenants, max_monthly_event_log_requests, max_custom_collection_size, has_white_labeling, has_debranding, has_llm_spam_detection, for_who_text, feature_taglines, has_auditing, has_flex_pricing, enable_saml, flex_page_load_cost_cents, flex_page_load_unit, flex_comment_cost_cents, flex_comment_unit, flex_sso_user_cost_cents, flex_sso_user_unit, flex_api_credit_cost_cents, flex_api_credit_unit, flex_small_widgets_credit_cost_cents, flex_small_widgets_credit_unit, flex_moderator_cost_cents, flex_moderator_unit, flex_admin_cost_cents, flex_admin_unit, flex_domain_cost_cents, flex_domain_unit, flex_chat_gpt_cost_cents, flex_chat_gpt_unit, flex_minimum_cost_cents, flex_managed_tenant_cost_cents, flex_sso_admin_cost_cents, flex_sso_admin_unit, flex_sso_moderator_cost_cents, flex_sso_moderator_unit].hash
754
763
  end
755
764
 
756
765
  # Builds the object from hash
@@ -0,0 +1,103 @@
1
+ =begin
2
+ #fastcomments
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FastCommentsClient
17
+ module CreateTicket200Response
18
+ class << self
19
+ # List of class defined in anyOf (OpenAPI v3)
20
+ def openapi_any_of
21
+ [
22
+ :'APIError',
23
+ :'CreateTicketResponse'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of anyOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_any_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ return find_and_cast_into_type(klass, data)
41
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
42
+ end
43
+ end
44
+
45
+ openapi_any_of.include?(:AnyType) ? data : nil
46
+ end
47
+
48
+ private
49
+
50
+ SchemaMismatchError = Class.new(StandardError)
51
+
52
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
53
+ def find_and_cast_into_type(klass, data)
54
+ return if data.nil?
55
+
56
+ case klass.to_s
57
+ when 'Boolean'
58
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
59
+ when 'Float'
60
+ return data if data.instance_of?(Float)
61
+ when 'Integer'
62
+ return data if data.instance_of?(Integer)
63
+ when 'Time'
64
+ return Time.parse(data)
65
+ when 'Date'
66
+ return Date.iso8601(data)
67
+ when 'String'
68
+ return data if data.instance_of?(String)
69
+ when 'Object' # "type: object"
70
+ return data if data.instance_of?(Hash)
71
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
72
+ if data.instance_of?(Array)
73
+ sub_type = Regexp.last_match[:sub_type]
74
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
75
+ end
76
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
77
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
78
+ sub_type = Regexp.last_match[:sub_type]
79
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
80
+ end
81
+ else # model
82
+ const = FastCommentsClient.const_get(klass)
83
+ if const
84
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
85
+ model = const.build(data)
86
+ return model if model
87
+ else
88
+ # raise if data contains keys that are not known to the model
89
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
90
+ model = const.build_from_hash(data)
91
+ return model if model
92
+ end
93
+ end
94
+ end
95
+
96
+ raise # if no match by now, raise
97
+ rescue
98
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
99
+ end
100
+ end
101
+ end
102
+
103
+ end
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #fastcomments
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FastCommentsClient
17
+ class CreateTicketBody < ApiModelBase
18
+ attr_accessor :subject
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'subject' => :'subject'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'subject' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::CreateTicketBody` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::CreateTicketBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'subject')
67
+ self.subject = attributes[:'subject']
68
+ else
69
+ self.subject = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @subject.nil?
79
+ invalid_properties.push('invalid value for "subject", subject cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @subject.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] subject Value to be assigned
95
+ def subject=(subject)
96
+ if subject.nil?
97
+ fail ArgumentError, 'subject cannot be nil'
98
+ end
99
+
100
+ @subject = subject
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ subject == o.subject
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
+ [subject].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
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end