hermoso 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +53 -0
- data/lib/hermoso/api/account_api.rb +156 -0
- data/lib/hermoso/api/analytics_api.rb +400 -0
- data/lib/hermoso/api/brands_api.rb +82 -0
- data/lib/hermoso/api/campaign_profit_api.rb +103 -0
- data/lib/hermoso/api/campaign_results_api.rb +289 -0
- data/lib/hermoso/api/channels_api.rb +82 -0
- data/lib/hermoso/api/clones_api.rb +93 -0
- data/lib/hermoso/api/connect_links_api.rb +228 -0
- data/lib/hermoso/api/connect_redirects_api.rb +153 -0
- data/lib/hermoso/api/connections_api.rb +151 -0
- data/lib/hermoso/api/credits_api.rb +85 -0
- data/lib/hermoso/api/edits_api.rb +102 -0
- data/lib/hermoso/api/events_api.rb +932 -0
- data/lib/hermoso/api/generations_api.rb +173 -0
- data/lib/hermoso/api/jobs_api.rb +226 -0
- data/lib/hermoso/api/library_api.rb +88 -0
- data/lib/hermoso/api/media_api.rb +158 -0
- data/lib/hermoso/api/models_api.rb +88 -0
- data/lib/hermoso/api/posts_api.rb +377 -0
- data/lib/hermoso/api/recasts_api.rb +102 -0
- data/lib/hermoso/api/signup_api.rb +164 -0
- data/lib/hermoso/api/tag_api.rb +570 -0
- data/lib/hermoso/api/tools_api.rb +252 -0
- data/lib/hermoso/api_client.rb +441 -0
- data/lib/hermoso/api_error.rb +58 -0
- data/lib/hermoso/api_model_base.rb +92 -0
- data/lib/hermoso/configuration.rb +400 -0
- data/lib/hermoso/helpers.rb +116 -0
- data/lib/hermoso/models/asset.rb +241 -0
- data/lib/hermoso/models/asset_list.rb +203 -0
- data/lib/hermoso/models/best_time.rb +250 -0
- data/lib/hermoso/models/best_time_slots_inner.rb +205 -0
- data/lib/hermoso/models/brand.rb +273 -0
- data/lib/hermoso/models/brand_list.rb +203 -0
- data/lib/hermoso/models/campaign_profit.rb +261 -0
- data/lib/hermoso/models/campaign_results.rb +250 -0
- data/lib/hermoso/models/campaign_results_upload.rb +171 -0
- data/lib/hermoso/models/campaign_results_upload_rows_inner.rb +259 -0
- data/lib/hermoso/models/channel.rb +326 -0
- data/lib/hermoso/models/channel_carousel.rb +188 -0
- data/lib/hermoso/models/channel_list.rb +203 -0
- data/lib/hermoso/models/clone_quote.rb +243 -0
- data/lib/hermoso/models/clone_quote_request.rb +227 -0
- data/lib/hermoso/models/clone_quote_step.rb +201 -0
- data/lib/hermoso/models/connect_link.rb +321 -0
- data/lib/hermoso/models/connect_link_account.rb +178 -0
- data/lib/hermoso/models/connect_link_create.rb +236 -0
- data/lib/hermoso/models/connect_link_error.rb +169 -0
- data/lib/hermoso/models/connect_redirects.rb +203 -0
- data/lib/hermoso/models/connect_redirects_set.rb +180 -0
- data/lib/hermoso/models/connection.rb +250 -0
- data/lib/hermoso/models/connection_accounts_inner.rb +178 -0
- data/lib/hermoso/models/connection_deleted.rb +228 -0
- data/lib/hermoso/models/connection_list.rb +203 -0
- data/lib/hermoso/models/contact_email.rb +189 -0
- data/lib/hermoso/models/contact_email_resend.rb +161 -0
- data/lib/hermoso/models/content_decay.rb +223 -0
- data/lib/hermoso/models/content_decay_buckets_inner.rb +187 -0
- data/lib/hermoso/models/conversion_destination_create.rb +317 -0
- data/lib/hermoso/models/conversion_destination_list.rb +223 -0
- data/lib/hermoso/models/conversion_destination_result.rb +221 -0
- data/lib/hermoso/models/conversion_event_list.rb +230 -0
- data/lib/hermoso/models/conversion_event_update.rb +195 -0
- data/lib/hermoso/models/conversion_events_send.rb +236 -0
- data/lib/hermoso/models/conversion_events_send_events_inner.rb +314 -0
- data/lib/hermoso/models/conversion_insights.rb +265 -0
- data/lib/hermoso/models/conversion_send_result.rb +257 -0
- data/lib/hermoso/models/conversion_send_result_destinations_inner.rb +286 -0
- data/lib/hermoso/models/credits.rb +240 -0
- data/lib/hermoso/models/credits_limits.rb +234 -0
- data/lib/hermoso/models/credits_limits_brands_inner.rb +218 -0
- data/lib/hermoso/models/credits_limits_brands_inner_members_inner.rb +196 -0
- data/lib/hermoso/models/deleted.rb +210 -0
- data/lib/hermoso/models/edit.rb +278 -0
- data/lib/hermoso/models/edit_create.rb +317 -0
- data/lib/hermoso/models/edit_preview.rb +199 -0
- data/lib/hermoso/models/edit_quote.rb +231 -0
- data/lib/hermoso/models/error.rb +198 -0
- data/lib/hermoso/models/error_error.rb +335 -0
- data/lib/hermoso/models/error_error_unknown_arguments_inner.rb +171 -0
- data/lib/hermoso/models/follower_history.rb +239 -0
- data/lib/hermoso/models/follower_history_accounts_inner.rb +207 -0
- data/lib/hermoso/models/follower_history_accounts_inner_points_inner.rb +178 -0
- data/lib/hermoso/models/follower_history_date_range.rb +169 -0
- data/lib/hermoso/models/generation_create.rb +435 -0
- data/lib/hermoso/models/generation_quote.rb +263 -0
- data/lib/hermoso/models/hermoso_tag.rb +230 -0
- data/lib/hermoso/models/hermoso_tag_audience_action.rb +325 -0
- data/lib/hermoso/models/hermoso_tag_audiences.rb +241 -0
- data/lib/hermoso/models/hermoso_tag_events.rb +223 -0
- data/lib/hermoso/models/hermoso_tag_events_send.rb +179 -0
- data/lib/hermoso/models/hermoso_tag_events_sent.rb +221 -0
- data/lib/hermoso/models/hermoso_tag_install.rb +246 -0
- data/lib/hermoso/models/hermoso_tag_install_result.rb +255 -0
- data/lib/hermoso/models/hermoso_tag_report.rb +261 -0
- data/lib/hermoso/models/hermoso_tag_tag.rb +211 -0
- data/lib/hermoso/models/hermoso_tag_update.rb +356 -0
- data/lib/hermoso/models/inbox_stats.rb +315 -0
- data/lib/hermoso/models/job.rb +359 -0
- data/lib/hermoso/models/job_cancel.rb +221 -0
- data/lib/hermoso/models/job_list.rb +232 -0
- data/lib/hermoso/models/media.rb +230 -0
- data/lib/hermoso/models/model.rb +327 -0
- data/lib/hermoso/models/model_list.rb +203 -0
- data/lib/hermoso/models/post.rb +382 -0
- data/lib/hermoso/models/post_create.rb +318 -0
- data/lib/hermoso/models/post_create_media_inner.rb +104 -0
- data/lib/hermoso/models/post_create_media_inner_one_of.rb +201 -0
- data/lib/hermoso/models/post_list.rb +221 -0
- data/lib/hermoso/models/post_media_inner.rb +169 -0
- data/lib/hermoso/models/post_results_inner.rb +205 -0
- data/lib/hermoso/models/post_results_inner_first_comment.rb +188 -0
- data/lib/hermoso/models/posting_frequency.rb +241 -0
- data/lib/hermoso/models/posting_frequency_frequency_inner.rb +205 -0
- data/lib/hermoso/models/profit_settings.rb +230 -0
- data/lib/hermoso/models/recast.rb +308 -0
- data/lib/hermoso/models/recast_create.rb +274 -0
- data/lib/hermoso/models/recast_person.rb +182 -0
- data/lib/hermoso/models/recast_quote.rb +232 -0
- data/lib/hermoso/models/recast_step.rb +201 -0
- data/lib/hermoso/models/recast_subject.rb +170 -0
- data/lib/hermoso/models/recast_voice.rb +178 -0
- data/lib/hermoso/models/recast_window.rb +179 -0
- data/lib/hermoso/models/signup.rb +329 -0
- data/lib/hermoso/models/signup_claim.rb +178 -0
- data/lib/hermoso/models/signup_create.rb +247 -0
- data/lib/hermoso/models/tool.rb +360 -0
- data/lib/hermoso/models/tool_invoke.rb +169 -0
- data/lib/hermoso/models/tool_job.rb +262 -0
- data/lib/hermoso/models/tool_list.rb +273 -0
- data/lib/hermoso/models/tool_list_areas_inner.rb +219 -0
- data/lib/hermoso/models/tool_list_search.rb +181 -0
- data/lib/hermoso/models/tool_result.rb +245 -0
- data/lib/hermoso/models/tool_result_images_inner.rb +170 -0
- data/lib/hermoso/models/warning.rb +244 -0
- data/lib/hermoso/spec.rb +8 -0
- data/lib/hermoso/version.rb +15 -0
- data/lib/hermoso.rb +174 -0
- metadata +237 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hermoso API
|
|
3
|
+
|
|
4
|
+
#The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-08-26
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.27.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Hermoso
|
|
17
|
+
# The monthly credit limits on the brand this key acts on (or the brand named by `?brand=`). The account owner can cap what a brand, or one member of a shared brand, spends in a UTC calendar month; when one would be passed, paid calls answer `429` with `error.code` `credit_limit` (and `Retry-After` until the reset). `limit: null` means no limit. Null here (with `limits_error`) means the read failed, never that there are no limits.
|
|
18
|
+
class CreditsLimits < ApiModelBase
|
|
19
|
+
# The UTC calendar month the usage covers, `YYYY-MM`.
|
|
20
|
+
attr_accessor :month
|
|
21
|
+
|
|
22
|
+
# When every limit’s month resets (00:00 UTC on the 1st).
|
|
23
|
+
attr_accessor :reset_at
|
|
24
|
+
|
|
25
|
+
attr_accessor :timezone
|
|
26
|
+
|
|
27
|
+
# True only for the account owner. Set a limit with the `set_credit_limit` tool (`POST /v1/tools/set_credit_limit`).
|
|
28
|
+
attr_accessor :can_edit
|
|
29
|
+
|
|
30
|
+
attr_accessor :brands
|
|
31
|
+
|
|
32
|
+
class EnumAttributeValidator
|
|
33
|
+
attr_reader :datatype
|
|
34
|
+
attr_reader :allowable_values
|
|
35
|
+
|
|
36
|
+
def initialize(datatype, allowable_values)
|
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
|
38
|
+
case datatype.to_s
|
|
39
|
+
when /Integer/i
|
|
40
|
+
value.to_i
|
|
41
|
+
when /Float/i
|
|
42
|
+
value.to_f
|
|
43
|
+
else
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def valid?(value)
|
|
50
|
+
!value || allowable_values.include?(value)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'month' => :'month',
|
|
58
|
+
:'reset_at' => :'reset_at',
|
|
59
|
+
:'timezone' => :'timezone',
|
|
60
|
+
:'can_edit' => :'can_edit',
|
|
61
|
+
:'brands' => :'brands'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns attribute mapping this model knows about
|
|
66
|
+
def self.acceptable_attribute_map
|
|
67
|
+
attribute_map
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns all the JSON keys this model knows about
|
|
71
|
+
def self.acceptable_attributes
|
|
72
|
+
acceptable_attribute_map.values
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Attribute type mapping.
|
|
76
|
+
def self.openapi_types
|
|
77
|
+
{
|
|
78
|
+
:'month' => :'String',
|
|
79
|
+
:'reset_at' => :'String',
|
|
80
|
+
:'timezone' => :'String',
|
|
81
|
+
:'can_edit' => :'Boolean',
|
|
82
|
+
:'brands' => :'Array<CreditsLimitsBrandsInner>'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns attribute type mapping
|
|
93
|
+
def self.acceptable_openapi_types
|
|
94
|
+
openapi_types
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Returns the nullable attributes
|
|
98
|
+
def self.acceptable_openapi_nullable
|
|
99
|
+
openapi_nullable
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Initializes the object
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
def initialize(attributes = {})
|
|
105
|
+
if (!attributes.is_a?(Hash))
|
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::CreditsLimits` initialize method"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
110
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
111
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::CreditsLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
114
|
+
end
|
|
115
|
+
h[k.to_sym] = v
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'month')
|
|
119
|
+
self.month = attributes[:'month']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'reset_at')
|
|
123
|
+
self.reset_at = attributes[:'reset_at']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'timezone')
|
|
127
|
+
self.timezone = attributes[:'timezone']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'can_edit')
|
|
131
|
+
self.can_edit = attributes[:'can_edit']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'brands')
|
|
135
|
+
if (value = attributes[:'brands']).is_a?(Array)
|
|
136
|
+
self.brands = value
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
142
|
+
# @return Array for valid properties with the reasons
|
|
143
|
+
def list_invalid_properties
|
|
144
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
145
|
+
invalid_properties = Array.new
|
|
146
|
+
invalid_properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Check to see if the all the properties in the model are valid
|
|
150
|
+
# @return true if the model is valid
|
|
151
|
+
def valid?
|
|
152
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
153
|
+
timezone_validator = EnumAttributeValidator.new('String', ["UTC", "unknown_default_open_api"])
|
|
154
|
+
return false unless timezone_validator.valid?(@timezone)
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
159
|
+
# @param [Object] timezone Object to be assigned
|
|
160
|
+
def timezone=(timezone)
|
|
161
|
+
validator = EnumAttributeValidator.new('String', ["UTC", "unknown_default_open_api"])
|
|
162
|
+
timezone = 'unknown_default_open_api' unless validator.valid?(timezone)
|
|
163
|
+
@timezone = timezone
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Checks equality by comparing each attribute.
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def ==(o)
|
|
169
|
+
return true if self.equal?(o)
|
|
170
|
+
self.class == o.class &&
|
|
171
|
+
month == o.month &&
|
|
172
|
+
reset_at == o.reset_at &&
|
|
173
|
+
timezone == o.timezone &&
|
|
174
|
+
can_edit == o.can_edit &&
|
|
175
|
+
brands == o.brands
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see the `==` method
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def eql?(o)
|
|
181
|
+
self == o
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Calculates hash code according to all attributes.
|
|
185
|
+
# @return [Integer] Hash code
|
|
186
|
+
def hash
|
|
187
|
+
[month, reset_at, timezone, can_edit, brands].hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def self.build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
196
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
197
|
+
map = acceptable_attribute_map
|
|
198
|
+
transformed_hash = {}
|
|
199
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
200
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
201
|
+
transformed_hash["#{key}"] = nil
|
|
202
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
203
|
+
# check to ensure the input is an array given that the attribute
|
|
204
|
+
# is documented as an array but the input is not
|
|
205
|
+
if attributes[map[key]].is_a?(Array)
|
|
206
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
207
|
+
end
|
|
208
|
+
elsif !attributes[map[key]].nil?
|
|
209
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
new(transformed_hash)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Returns the object in the form of hash
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_hash
|
|
218
|
+
hash = {}
|
|
219
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
220
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
221
|
+
value = self.send(attr)
|
|
222
|
+
if value.nil?
|
|
223
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
hash[param] = _to_hash(value)
|
|
228
|
+
end
|
|
229
|
+
hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hermoso API
|
|
3
|
+
|
|
4
|
+
#The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-08-26
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.27.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Hermoso
|
|
17
|
+
class CreditsLimitsBrandsInner < ApiModelBase
|
|
18
|
+
attr_accessor :brand
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :limit
|
|
23
|
+
|
|
24
|
+
attr_accessor :used
|
|
25
|
+
|
|
26
|
+
# Credits held for work still running, which count against the limit.
|
|
27
|
+
attr_accessor :held
|
|
28
|
+
|
|
29
|
+
attr_accessor :remaining
|
|
30
|
+
|
|
31
|
+
# Present for the owner and a brand admin (a member sees only their own row).
|
|
32
|
+
attr_accessor :members
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'brand' => :'brand',
|
|
38
|
+
:'name' => :'name',
|
|
39
|
+
:'limit' => :'limit',
|
|
40
|
+
:'used' => :'used',
|
|
41
|
+
:'held' => :'held',
|
|
42
|
+
:'remaining' => :'remaining',
|
|
43
|
+
:'members' => :'members'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns attribute mapping this model knows about
|
|
48
|
+
def self.acceptable_attribute_map
|
|
49
|
+
attribute_map
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
acceptable_attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'brand' => :'String',
|
|
61
|
+
:'name' => :'String',
|
|
62
|
+
:'limit' => :'Integer',
|
|
63
|
+
:'used' => :'Float',
|
|
64
|
+
:'held' => :'Float',
|
|
65
|
+
:'remaining' => :'Float',
|
|
66
|
+
:'members' => :'Array<CreditsLimitsBrandsInnerMembersInner>'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns attribute type mapping
|
|
77
|
+
def self.acceptable_openapi_types
|
|
78
|
+
openapi_types
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns the nullable attributes
|
|
82
|
+
def self.acceptable_openapi_nullable
|
|
83
|
+
openapi_nullable
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::CreditsLimitsBrandsInner` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::CreditsLimitsBrandsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'brand')
|
|
103
|
+
self.brand = attributes[:'brand']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'name')
|
|
107
|
+
self.name = attributes[:'name']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'limit')
|
|
111
|
+
self.limit = attributes[:'limit']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'used')
|
|
115
|
+
self.used = attributes[:'used']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'held')
|
|
119
|
+
self.held = attributes[:'held']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'remaining')
|
|
123
|
+
self.remaining = attributes[:'remaining']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'members')
|
|
127
|
+
if (value = attributes[:'members']).is_a?(Array)
|
|
128
|
+
self.members = value
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
134
|
+
# @return Array for valid properties with the reasons
|
|
135
|
+
def list_invalid_properties
|
|
136
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
137
|
+
invalid_properties = Array.new
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
true
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def ==(o)
|
|
151
|
+
return true if self.equal?(o)
|
|
152
|
+
self.class == o.class &&
|
|
153
|
+
brand == o.brand &&
|
|
154
|
+
name == o.name &&
|
|
155
|
+
limit == o.limit &&
|
|
156
|
+
used == o.used &&
|
|
157
|
+
held == o.held &&
|
|
158
|
+
remaining == o.remaining &&
|
|
159
|
+
members == o.members
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @see the `==` method
|
|
163
|
+
# @param [Object] Object to be compared
|
|
164
|
+
def eql?(o)
|
|
165
|
+
self == o
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Calculates hash code according to all attributes.
|
|
169
|
+
# @return [Integer] Hash code
|
|
170
|
+
def hash
|
|
171
|
+
[brand, name, limit, used, held, remaining, members].hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Builds the object from hash
|
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
176
|
+
# @return [Object] Returns the model itself
|
|
177
|
+
def self.build_from_hash(attributes)
|
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
|
179
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
180
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
181
|
+
map = acceptable_attribute_map
|
|
182
|
+
transformed_hash = {}
|
|
183
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
184
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
185
|
+
transformed_hash["#{key}"] = nil
|
|
186
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
187
|
+
# check to ensure the input is an array given that the attribute
|
|
188
|
+
# is documented as an array but the input is not
|
|
189
|
+
if attributes[map[key]].is_a?(Array)
|
|
190
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
191
|
+
end
|
|
192
|
+
elsif !attributes[map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
new(transformed_hash)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
204
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
if value.nil?
|
|
207
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
hash[param] = _to_hash(value)
|
|
212
|
+
end
|
|
213
|
+
hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hermoso API
|
|
3
|
+
|
|
4
|
+
#The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-08-26
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.27.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Hermoso
|
|
17
|
+
class CreditsLimitsBrandsInnerMembersInner < ApiModelBase
|
|
18
|
+
attr_accessor :email
|
|
19
|
+
|
|
20
|
+
attr_accessor :role
|
|
21
|
+
|
|
22
|
+
attr_accessor :limit
|
|
23
|
+
|
|
24
|
+
attr_accessor :used
|
|
25
|
+
|
|
26
|
+
attr_accessor :remaining
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'email' => :'email',
|
|
32
|
+
:'role' => :'role',
|
|
33
|
+
:'limit' => :'limit',
|
|
34
|
+
:'used' => :'used',
|
|
35
|
+
:'remaining' => :'remaining'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'email' => :'String',
|
|
53
|
+
:'role' => :'String',
|
|
54
|
+
:'limit' => :'Integer',
|
|
55
|
+
:'used' => :'Float',
|
|
56
|
+
:'remaining' => :'Float'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns attribute type mapping
|
|
67
|
+
def self.acceptable_openapi_types
|
|
68
|
+
openapi_types
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns the nullable attributes
|
|
72
|
+
def self.acceptable_openapi_nullable
|
|
73
|
+
openapi_nullable
|
|
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 `Hermoso::CreditsLimitsBrandsInnerMembersInner` 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 `Hermoso::CreditsLimitsBrandsInnerMembersInner`. 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?(:'email')
|
|
93
|
+
self.email = attributes[:'email']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'role')
|
|
97
|
+
self.role = attributes[:'role']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'limit')
|
|
101
|
+
self.limit = attributes[:'limit']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'used')
|
|
105
|
+
self.used = attributes[:'used']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'remaining')
|
|
109
|
+
self.remaining = attributes[:'remaining']
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
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
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
email == o.email &&
|
|
134
|
+
role == o.role &&
|
|
135
|
+
limit == o.limit &&
|
|
136
|
+
used == o.used &&
|
|
137
|
+
remaining == o.remaining
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[email, role, limit, used, remaining].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
159
|
+
map = acceptable_attribute_map
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the object in the form of hash
|
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
|
179
|
+
def to_hash
|
|
180
|
+
hash = {}
|
|
181
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
182
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
183
|
+
value = self.send(attr)
|
|
184
|
+
if value.nil?
|
|
185
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
186
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
hash[param] = _to_hash(value)
|
|
190
|
+
end
|
|
191
|
+
hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|