late-sdk 0.0.539 → 0.0.541

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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -42
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +0 -142
  5. data/docs/AdsApi.md +18 -700
  6. data/docs/InboxApi.md +79 -0
  7. data/docs/InboxWebhookMessageAttachmentsInner.md +1 -1
  8. data/docs/SMSApi.md +1 -276
  9. data/docs/SendSmsRequest.md +1 -1
  10. data/docs/WebhookPayloadMessageMessage.md +1 -1
  11. data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +22 -0
  12. data/docs/WebhookPayloadMessageSentMessage.md +1 -1
  13. data/docs/WebhookPayloadMessageSentMessageAttachmentsInner.md +22 -0
  14. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  15. data/lib/zernio-sdk/api/ad_campaigns_api.rb +0 -142
  16. data/lib/zernio-sdk/api/ads_api.rb +39 -739
  17. data/lib/zernio-sdk/api/inbox_api.rb +92 -0
  18. data/lib/zernio-sdk/api/sms_api.rb +2 -256
  19. data/lib/zernio-sdk/models/inbox_webhook_message_attachments_inner.rb +1 -1
  20. data/lib/zernio-sdk/models/send_sms_request.rb +1 -1
  21. data/lib/zernio-sdk/models/webhook_payload_message_message.rb +1 -1
  22. data/lib/zernio-sdk/models/{create_sms_sender_id_request.rb → webhook_payload_message_message_attachments_inner.rb} +52 -33
  23. data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +1 -1
  24. data/lib/zernio-sdk/models/{update_ad_creative_request.rb → webhook_payload_message_sent_message_attachments_inner.rb} +46 -44
  25. data/lib/zernio-sdk/version.rb +1 -1
  26. data/lib/zernio-sdk.rb +3 -26
  27. data/openapi.yaml +87 -624
  28. data/spec/api/ad_audiences_api_spec.rb +2 -2
  29. data/spec/api/ad_campaigns_api_spec.rb +0 -25
  30. data/spec/api/ads_api_spec.rb +0 -128
  31. data/spec/api/inbox_api_spec.rb +48 -0
  32. data/spec/api/sms_api_spec.rb +1 -47
  33. data/spec/models/{list_ad_images200_response_spec.rb → webhook_payload_message_message_attachments_inner_spec.rb} +9 -9
  34. data/spec/models/{list_ad_creatives200_response_spec.rb → webhook_payload_message_sent_message_attachments_inner_spec.rb} +9 -9
  35. data/zernio-sdk-0.0.541.gem +0 -0
  36. metadata +14 -106
  37. data/docs/CreateAdCampaign201Response.md +0 -24
  38. data/docs/CreateAdCampaignRequest.md +0 -32
  39. data/docs/CreateAdCreative201Response.md +0 -20
  40. data/docs/CreateAdCreativeRequest.md +0 -38
  41. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +0 -26
  42. data/docs/CreateSmsSenderId200Response.md +0 -22
  43. data/docs/CreateSmsSenderIdRequest.md +0 -18
  44. data/docs/DeleteAdCreative200Response.md +0 -20
  45. data/docs/DeleteSmsSenderId200Response.md +0 -18
  46. data/docs/DuplicateAd200Response.md +0 -22
  47. data/docs/DuplicateAdRequest.md +0 -28
  48. data/docs/DuplicateAdSet200Response.md +0 -22
  49. data/docs/DuplicateAdSetRequest.md +0 -36
  50. data/docs/GetAdCreative200Response.md +0 -18
  51. data/docs/ListAdCreatives200Response.md +0 -22
  52. data/docs/ListAdImages200Response.md +0 -22
  53. data/docs/ListAdLabels200Response.md +0 -22
  54. data/docs/ListHighDemandPeriods200Response.md +0 -22
  55. data/docs/ListSmsSenderIds200Response.md +0 -20
  56. data/docs/ListSmsSenderIds200ResponseBudget.md +0 -24
  57. data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +0 -22
  58. data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +0 -24
  59. data/docs/RequestSmsSenderIdLimitIncrease200Response.md +0 -20
  60. data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +0 -20
  61. data/docs/UpdateAdCreative200Response.md +0 -22
  62. data/docs/UpdateAdCreativeRequest.md +0 -20
  63. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +0 -210
  64. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +0 -343
  65. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +0 -157
  66. data/lib/zernio-sdk/models/create_ad_creative_request.rb +0 -390
  67. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +0 -255
  68. data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +0 -166
  69. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +0 -156
  70. data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +0 -147
  71. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +0 -200
  72. data/lib/zernio-sdk/models/duplicate_ad_request.rb +0 -243
  73. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +0 -201
  74. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +0 -302
  75. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +0 -148
  76. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +0 -167
  77. data/lib/zernio-sdk/models/list_ad_images200_response.rb +0 -167
  78. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +0 -167
  79. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +0 -168
  80. data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +0 -158
  81. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +0 -178
  82. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +0 -167
  83. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +0 -175
  84. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +0 -156
  85. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +0 -210
  86. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +0 -165
  87. data/spec/models/create_ad_campaign201_response_spec.rb +0 -58
  88. data/spec/models/create_ad_campaign_request_spec.rb +0 -94
  89. data/spec/models/create_ad_creative201_response_spec.rb +0 -42
  90. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +0 -60
  91. data/spec/models/create_ad_creative_request_spec.rb +0 -96
  92. data/spec/models/create_sms_sender_id200_response_spec.rb +0 -48
  93. data/spec/models/create_sms_sender_id_request_spec.rb +0 -36
  94. data/spec/models/delete_ad_creative200_response_spec.rb +0 -42
  95. data/spec/models/delete_sms_sender_id200_response_spec.rb +0 -36
  96. data/spec/models/duplicate_ad200_response_spec.rb +0 -52
  97. data/spec/models/duplicate_ad_request_spec.rb +0 -74
  98. data/spec/models/duplicate_ad_set200_response_spec.rb +0 -52
  99. data/spec/models/duplicate_ad_set_request_spec.rb +0 -102
  100. data/spec/models/get_ad_creative200_response_spec.rb +0 -36
  101. data/spec/models/list_ad_labels200_response_spec.rb +0 -48
  102. data/spec/models/list_high_demand_periods200_response_spec.rb +0 -48
  103. data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +0 -48
  104. data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +0 -54
  105. data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +0 -54
  106. data/spec/models/list_sms_sender_ids200_response_spec.rb +0 -42
  107. data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +0 -42
  108. data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +0 -42
  109. data/spec/models/update_ad_creative200_response_spec.rb +0 -48
  110. data/spec/models/update_ad_creative_request_spec.rb +0 -42
  111. data/zernio-sdk-0.0.539.gem +0 -0
@@ -1,302 +0,0 @@
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
@@ -1,148 +0,0 @@
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
@@ -1,167 +0,0 @@
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 ListAdCreatives200Response < ApiModelBase
18
- attr_accessor :ad_account_id
19
-
20
- attr_accessor :data
21
-
22
- attr_accessor :paging
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'ad_account_id' => :'adAccountId',
28
- :'data' => :'data',
29
- :'paging' => :'paging'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'ad_account_id' => :'String',
47
- :'data' => :'Array<Object>',
48
- :'paging' => :'QueryAdInsights200ResponsePaging'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListAdCreatives200Response` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListAdCreatives200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'ad_account_id')
75
- self.ad_account_id = attributes[:'ad_account_id']
76
- end
77
-
78
- if attributes.key?(:'data')
79
- if (value = attributes[:'data']).is_a?(Array)
80
- self.data = value
81
- end
82
- end
83
-
84
- if attributes.key?(:'paging')
85
- self.paging = attributes[:'paging']
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
- invalid_properties = Array.new
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- warn '[DEPRECATED] the `valid?` method is obsolete'
101
- true
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- ad_account_id == o.ad_account_id &&
110
- data == o.data &&
111
- paging == o.paging
112
- end
113
-
114
- # @see the `==` method
115
- # @param [Object] Object to be compared
116
- def eql?(o)
117
- self == o
118
- end
119
-
120
- # Calculates hash code according to all attributes.
121
- # @return [Integer] Hash code
122
- def hash
123
- [ad_account_id, data, paging].hash
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def self.build_from_hash(attributes)
130
- return nil unless attributes.is_a?(Hash)
131
- attributes = attributes.transform_keys(&:to_sym)
132
- transformed_hash = {}
133
- openapi_types.each_pair do |key, type|
134
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = nil
136
- elsif type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[attribute_map[key]].is_a?(Array)
140
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
- end
142
- elsif !attributes[attribute_map[key]].nil?
143
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
- end
145
- end
146
- new(transformed_hash)
147
- end
148
-
149
- # Returns the object in the form of hash
150
- # @return [Hash] Returns the object in the form of hash
151
- def to_hash
152
- hash = {}
153
- self.class.attribute_map.each_pair do |attr, param|
154
- value = self.send(attr)
155
- if value.nil?
156
- is_nullable = self.class.openapi_nullable.include?(attr)
157
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
- end
159
-
160
- hash[param] = _to_hash(value)
161
- end
162
- hash
163
- end
164
-
165
- end
166
-
167
- end