late-sdk 0.0.544 → 0.0.545

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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -3
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +142 -0
  5. data/docs/AdsApi.md +795 -37
  6. data/docs/CreateAdCampaign201Response.md +24 -0
  7. data/docs/CreateAdCampaignRequest.md +32 -0
  8. data/docs/CreateAdCreative201Response.md +20 -0
  9. data/docs/CreateAdCreativeRequest.md +40 -0
  10. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
  11. data/docs/CreateSmsSenderId200Response.md +22 -0
  12. data/docs/CreateSmsSenderIdRequest.md +18 -0
  13. data/docs/CreateStandaloneAd200Response.md +22 -0
  14. data/docs/CreateStandaloneAd200ResponseResultsInner.md +22 -0
  15. data/docs/CreateStandaloneAdRequest.md +4 -0
  16. data/docs/DeleteAdCreative200Response.md +20 -0
  17. data/docs/DeleteSmsSenderId200Response.md +18 -0
  18. data/docs/DiscordApi.md +153 -1
  19. data/docs/{ListDiscordGuildMembers200ResponseDataInner.md → DiscordGuildMember.md} +3 -3
  20. data/docs/{ListDiscordGuildMembers200ResponseDataInnerUser.md → DiscordGuildMemberUser.md} +2 -2
  21. data/docs/DuplicateAd200Response.md +22 -0
  22. data/docs/DuplicateAdRequest.md +28 -0
  23. data/docs/DuplicateAdSet200Response.md +22 -0
  24. data/docs/DuplicateAdSetRequest.md +36 -0
  25. data/docs/GetAdCreative200Response.md +18 -0
  26. data/docs/GetDiscordGuildMember200Response.md +18 -0
  27. data/docs/ListAdCreatives200Response.md +22 -0
  28. data/docs/ListAdImages200Response.md +22 -0
  29. data/docs/ListAdLabels200Response.md +22 -0
  30. data/docs/ListDiscordGuildMembers200Response.md +1 -1
  31. data/docs/ListHighDemandPeriods200Response.md +22 -0
  32. data/docs/ListMetaBusinesses200Response.md +20 -0
  33. data/docs/ListSmsSenderIds200Response.md +20 -0
  34. data/docs/ListSmsSenderIds200ResponseBudget.md +24 -0
  35. data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +22 -0
  36. data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +24 -0
  37. data/docs/RequestSmsSenderIdLimitIncrease200Response.md +20 -0
  38. data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +20 -0
  39. data/docs/SMSApi.md +275 -0
  40. data/docs/SearchDiscordGuildMembers200Response.md +18 -0
  41. data/docs/UpdateAdCreative200Response.md +22 -0
  42. data/docs/UpdateAdCreativeRequest.md +20 -0
  43. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  44. data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
  45. data/lib/zernio-sdk/api/ads_api.rb +829 -51
  46. data/lib/zernio-sdk/api/discord_api.rb +174 -2
  47. data/lib/zernio-sdk/api/sms_api.rb +254 -0
  48. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
  49. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
  50. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
  51. data/lib/zernio-sdk/models/create_ad_creative_request.rb +424 -0
  52. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
  53. data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +166 -0
  54. data/lib/zernio-sdk/models/create_sms_sender_id_request.rb +183 -0
  55. data/lib/zernio-sdk/models/create_standalone_ad200_response.rb +201 -0
  56. data/lib/zernio-sdk/models/create_standalone_ad200_response_results_inner.rb +212 -0
  57. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +23 -1
  58. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
  59. data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +147 -0
  60. data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner.rb → discord_guild_member.rb} +5 -4
  61. data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner_user.rb → discord_guild_member_user.rb} +3 -3
  62. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
  63. data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
  64. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
  65. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
  66. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
  67. data/lib/zernio-sdk/models/get_discord_guild_member200_response.rb +147 -0
  68. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
  69. data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
  70. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
  71. data/lib/zernio-sdk/models/list_discord_guild_members200_response.rb +1 -1
  72. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
  73. data/lib/zernio-sdk/models/list_meta_businesses200_response.rb +158 -0
  74. data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +158 -0
  75. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +178 -0
  76. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +167 -0
  77. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +175 -0
  78. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +156 -0
  79. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +210 -0
  80. data/lib/zernio-sdk/models/search_discord_guild_members200_response.rb +149 -0
  81. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
  82. data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
  83. data/lib/zernio-sdk/version.rb +1 -1
  84. data/lib/zernio-sdk.rb +33 -2
  85. data/openapi.yaml +740 -27
  86. data/spec/api/ad_audiences_api_spec.rb +2 -2
  87. data/spec/api/ad_campaigns_api_spec.rb +25 -0
  88. data/spec/api/ads_api_spec.rb +143 -1
  89. data/spec/api/discord_api_spec.rb +30 -1
  90. data/spec/api/sms_api_spec.rb +46 -0
  91. data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
  92. data/spec/models/create_ad_campaign_request_spec.rb +94 -0
  93. data/spec/models/create_ad_creative201_response_spec.rb +42 -0
  94. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
  95. data/spec/models/create_ad_creative_request_spec.rb +106 -0
  96. data/spec/models/create_sms_sender_id200_response_spec.rb +48 -0
  97. data/spec/models/create_sms_sender_id_request_spec.rb +36 -0
  98. data/spec/models/create_standalone_ad200_response_results_inner_spec.rb +56 -0
  99. data/spec/models/create_standalone_ad200_response_spec.rb +52 -0
  100. data/spec/models/create_standalone_ad_request_spec.rb +16 -0
  101. data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
  102. data/spec/models/delete_sms_sender_id200_response_spec.rb +36 -0
  103. data/spec/models/{list_discord_guild_members200_response_data_inner_spec.rb → discord_guild_member_spec.rb} +6 -6
  104. data/spec/models/{list_discord_guild_members200_response_data_inner_user_spec.rb → discord_guild_member_user_spec.rb} +6 -6
  105. data/spec/models/duplicate_ad200_response_spec.rb +52 -0
  106. data/spec/models/duplicate_ad_request_spec.rb +74 -0
  107. data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
  108. data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
  109. data/spec/models/get_ad_creative200_response_spec.rb +36 -0
  110. data/spec/models/get_discord_guild_member200_response_spec.rb +36 -0
  111. data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
  112. data/spec/models/list_ad_images200_response_spec.rb +48 -0
  113. data/spec/models/list_ad_labels200_response_spec.rb +48 -0
  114. data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
  115. data/spec/models/list_meta_businesses200_response_spec.rb +42 -0
  116. data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +48 -0
  117. data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +54 -0
  118. data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +54 -0
  119. data/spec/models/list_sms_sender_ids200_response_spec.rb +42 -0
  120. data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +42 -0
  121. data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +42 -0
  122. data/spec/models/search_discord_guild_members200_response_spec.rb +36 -0
  123. data/spec/models/update_ad_creative200_response_spec.rb +48 -0
  124. data/spec/models/update_ad_creative_request_spec.rb +42 -0
  125. data/zernio-sdk-0.0.545.gem +0 -0
  126. metadata +134 -10
  127. data/zernio-sdk-0.0.544.gem +0 -0
@@ -0,0 +1,302 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class DuplicateAdSetRequest < ApiModelBase
18
+ attr_accessor :platform
19
+
20
+ # Destination platform campaign id (defaults to the source's campaign)
21
+ attr_accessor :campaign_id
22
+
23
+ # Copy child ads + creatives
24
+ attr_accessor :deep_copy
25
+
26
+ attr_accessor :status_option
27
+
28
+ # Reschedule the copy's start time
29
+ attr_accessor :start_time
30
+
31
+ attr_accessor :end_time
32
+
33
+ attr_accessor :rename_strategy
34
+
35
+ attr_accessor :rename_prefix
36
+
37
+ attr_accessor :rename_suffix
38
+
39
+ attr_accessor :sync_after
40
+
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'platform' => :'platform',
67
+ :'campaign_id' => :'campaignId',
68
+ :'deep_copy' => :'deepCopy',
69
+ :'status_option' => :'statusOption',
70
+ :'start_time' => :'startTime',
71
+ :'end_time' => :'endTime',
72
+ :'rename_strategy' => :'renameStrategy',
73
+ :'rename_prefix' => :'renamePrefix',
74
+ :'rename_suffix' => :'renameSuffix',
75
+ :'sync_after' => :'syncAfter'
76
+ }
77
+ end
78
+
79
+ # Returns attribute mapping this model knows about
80
+ def self.acceptable_attribute_map
81
+ attribute_map
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ acceptable_attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'platform' => :'String',
93
+ :'campaign_id' => :'String',
94
+ :'deep_copy' => :'Boolean',
95
+ :'status_option' => :'String',
96
+ :'start_time' => :'Time',
97
+ :'end_time' => :'Time',
98
+ :'rename_strategy' => :'String',
99
+ :'rename_prefix' => :'String',
100
+ :'rename_suffix' => :'String',
101
+ :'sync_after' => :'Boolean'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAdSetRequest` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ acceptable_attribute_map = self.class.acceptable_attribute_map
120
+ attributes = attributes.each_with_object({}) { |(k, v), h|
121
+ if (!acceptable_attribute_map.key?(k.to_sym))
122
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAdSetRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
123
+ end
124
+ h[k.to_sym] = v
125
+ }
126
+
127
+ if attributes.key?(:'platform')
128
+ self.platform = attributes[:'platform']
129
+ else
130
+ self.platform = nil
131
+ end
132
+
133
+ if attributes.key?(:'campaign_id')
134
+ self.campaign_id = attributes[:'campaign_id']
135
+ end
136
+
137
+ if attributes.key?(:'deep_copy')
138
+ self.deep_copy = attributes[:'deep_copy']
139
+ else
140
+ self.deep_copy = true
141
+ end
142
+
143
+ if attributes.key?(:'status_option')
144
+ self.status_option = attributes[:'status_option']
145
+ else
146
+ self.status_option = 'PAUSED'
147
+ end
148
+
149
+ if attributes.key?(:'start_time')
150
+ self.start_time = attributes[:'start_time']
151
+ end
152
+
153
+ if attributes.key?(:'end_time')
154
+ self.end_time = attributes[:'end_time']
155
+ end
156
+
157
+ if attributes.key?(:'rename_strategy')
158
+ self.rename_strategy = attributes[:'rename_strategy']
159
+ end
160
+
161
+ if attributes.key?(:'rename_prefix')
162
+ self.rename_prefix = attributes[:'rename_prefix']
163
+ end
164
+
165
+ if attributes.key?(:'rename_suffix')
166
+ self.rename_suffix = attributes[:'rename_suffix']
167
+ end
168
+
169
+ if attributes.key?(:'sync_after')
170
+ self.sync_after = attributes[:'sync_after']
171
+ else
172
+ self.sync_after = true
173
+ end
174
+ end
175
+
176
+ # Show invalid properties with the reasons. Usually used together with valid?
177
+ # @return Array for valid properties with the reasons
178
+ def list_invalid_properties
179
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
180
+ invalid_properties = Array.new
181
+ if @platform.nil?
182
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
183
+ end
184
+
185
+ invalid_properties
186
+ end
187
+
188
+ # Check to see if the all the properties in the model are valid
189
+ # @return true if the model is valid
190
+ def valid?
191
+ warn '[DEPRECATED] the `valid?` method is obsolete'
192
+ return false if @platform.nil?
193
+ platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
194
+ return false unless platform_validator.valid?(@platform)
195
+ status_option_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
196
+ return false unless status_option_validator.valid?(@status_option)
197
+ rename_strategy_validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
198
+ return false unless rename_strategy_validator.valid?(@rename_strategy)
199
+ true
200
+ end
201
+
202
+ # Custom attribute writer method checking allowed values (enum).
203
+ # @param [Object] platform Object to be assigned
204
+ def platform=(platform)
205
+ validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
206
+ unless validator.valid?(platform)
207
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
208
+ end
209
+ @platform = platform
210
+ end
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] status_option Object to be assigned
214
+ def status_option=(status_option)
215
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
216
+ unless validator.valid?(status_option)
217
+ fail ArgumentError, "invalid value for \"status_option\", must be one of #{validator.allowable_values}."
218
+ end
219
+ @status_option = status_option
220
+ end
221
+
222
+ # Custom attribute writer method checking allowed values (enum).
223
+ # @param [Object] rename_strategy Object to be assigned
224
+ def rename_strategy=(rename_strategy)
225
+ validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
226
+ unless validator.valid?(rename_strategy)
227
+ fail ArgumentError, "invalid value for \"rename_strategy\", must be one of #{validator.allowable_values}."
228
+ end
229
+ @rename_strategy = rename_strategy
230
+ end
231
+
232
+ # Checks equality by comparing each attribute.
233
+ # @param [Object] Object to be compared
234
+ def ==(o)
235
+ return true if self.equal?(o)
236
+ self.class == o.class &&
237
+ platform == o.platform &&
238
+ campaign_id == o.campaign_id &&
239
+ deep_copy == o.deep_copy &&
240
+ status_option == o.status_option &&
241
+ start_time == o.start_time &&
242
+ end_time == o.end_time &&
243
+ rename_strategy == o.rename_strategy &&
244
+ rename_prefix == o.rename_prefix &&
245
+ rename_suffix == o.rename_suffix &&
246
+ sync_after == o.sync_after
247
+ end
248
+
249
+ # @see the `==` method
250
+ # @param [Object] Object to be compared
251
+ def eql?(o)
252
+ self == o
253
+ end
254
+
255
+ # Calculates hash code according to all attributes.
256
+ # @return [Integer] Hash code
257
+ def hash
258
+ [platform, campaign_id, deep_copy, status_option, start_time, end_time, rename_strategy, rename_prefix, rename_suffix, sync_after].hash
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def self.build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ attributes = attributes.transform_keys(&:to_sym)
267
+ transformed_hash = {}
268
+ openapi_types.each_pair do |key, type|
269
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = nil
271
+ elsif type =~ /\AArray<(.*)>/i
272
+ # check to ensure the input is an array given that the attribute
273
+ # is documented as an array but the input is not
274
+ if attributes[attribute_map[key]].is_a?(Array)
275
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
276
+ end
277
+ elsif !attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
279
+ end
280
+ end
281
+ new(transformed_hash)
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -0,0 +1,148 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetAdCreative200Response < ApiModelBase
18
+ # Raw Meta creative node
19
+ attr_accessor :creative
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'creative' => :'creative'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'creative' => :'Object'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdCreative200Response` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdCreative200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'creative')
68
+ self.creative = attributes[:'creative']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ creative == o.creative
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [creative].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetDiscordGuildMember200Response < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
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
+ :'data' => :'DiscordGuildMember'
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 `Zernio::GetDiscordGuildMember200Response` 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 `Zernio::GetDiscordGuildMember200Response`. 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?(:'data')
67
+ self.data = attributes[:'data']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ data == o.data
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [data].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end