late-sdk 0.0.770 → 0.0.772

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/docs/AdCampaignsApi.md +72 -0
  4. data/docs/AnalyticsApi.md +2 -2
  5. data/docs/AttachCampaignAssets201Response.md +24 -0
  6. data/docs/AttachCampaignAssetsRequest.md +24 -0
  7. data/docs/AttachCampaignAssetsRequestSitelinksInner.md +24 -0
  8. data/docs/AttachCampaignAssetsRequestStructuredSnippetsInner.md +20 -0
  9. data/docs/CreateInboxConversationRequest.md +3 -1
  10. data/docs/CreateInboxConversationRequestTemplateButtonParamsInner.md +22 -0
  11. data/docs/CreateStandaloneAdRequest.md +4 -0
  12. data/docs/CreateStandaloneAdRequestStructuredSnippetsInner.md +20 -0
  13. data/docs/MessagesApi.md +1 -1
  14. data/docs/PostAnalytics.md +4 -0
  15. data/docs/TargetingSpec.md +2 -2
  16. data/lib/zernio-sdk/api/ad_campaigns_api.rb +74 -0
  17. data/lib/zernio-sdk/api/analytics_api.rb +3 -3
  18. data/lib/zernio-sdk/api/messages_api.rb +2 -2
  19. data/lib/zernio-sdk/models/ad_tree_campaign_optimization_goal.rb +1 -0
  20. data/lib/zernio-sdk/models/attach_campaign_assets201_response.rb +180 -0
  21. data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +283 -0
  22. data/lib/zernio-sdk/models/attach_campaign_assets_request_sitelinks_inner.rb +282 -0
  23. data/lib/zernio-sdk/models/attach_campaign_assets_request_structured_snippets_inner.rb +234 -0
  24. data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +33 -2
  25. data/lib/zernio-sdk/models/create_inbox_conversation_request_template_button_params_inner.rb +270 -0
  26. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +81 -1
  27. data/lib/zernio-sdk/models/create_standalone_ad_request_structured_snippets_inner.rb +235 -0
  28. data/lib/zernio-sdk/models/post_analytics.rb +21 -1
  29. data/lib/zernio-sdk/models/targeting_spec.rb +2 -0
  30. data/lib/zernio-sdk/version.rb +1 -1
  31. data/lib/zernio-sdk.rb +6 -0
  32. data/openapi.yaml +167 -10
  33. data/spec/api/ad_campaigns_api_spec.rb +13 -0
  34. data/spec/api/analytics_api_spec.rb +1 -1
  35. data/spec/api/messages_api_spec.rb +1 -1
  36. data/spec/models/attach_campaign_assets201_response_spec.rb +54 -0
  37. data/spec/models/attach_campaign_assets_request_sitelinks_inner_spec.rb +54 -0
  38. data/spec/models/attach_campaign_assets_request_spec.rb +54 -0
  39. data/spec/models/attach_campaign_assets_request_structured_snippets_inner_spec.rb +46 -0
  40. data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
  41. data/spec/models/create_inbox_conversation_request_template_button_params_inner_spec.rb +52 -0
  42. data/spec/models/create_standalone_ad_request_spec.rb +12 -0
  43. data/spec/models/create_standalone_ad_request_structured_snippets_inner_spec.rb +46 -0
  44. data/spec/models/post_analytics_spec.rb +12 -0
  45. data/zernio-sdk-0.0.772.gem +0 -0
  46. metadata +26 -2
  47. data/zernio-sdk-0.0.770.gem +0 -0
@@ -0,0 +1,180 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 AttachCampaignAssets201Response < ApiModelBase
18
+ attr_accessor :campaign_id
19
+
20
+ attr_accessor :sitelink_asset_resource_names
21
+
22
+ attr_accessor :callout_asset_resource_names
23
+
24
+ attr_accessor :structured_snippet_asset_resource_names
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'campaign_id' => :'campaignId',
30
+ :'sitelink_asset_resource_names' => :'sitelinkAssetResourceNames',
31
+ :'callout_asset_resource_names' => :'calloutAssetResourceNames',
32
+ :'structured_snippet_asset_resource_names' => :'structuredSnippetAssetResourceNames'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'campaign_id' => :'String',
50
+ :'sitelink_asset_resource_names' => :'Array<String>',
51
+ :'callout_asset_resource_names' => :'Array<String>',
52
+ :'structured_snippet_asset_resource_names' => :'Array<String>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AttachCampaignAssets201Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AttachCampaignAssets201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'campaign_id')
79
+ self.campaign_id = attributes[:'campaign_id']
80
+ end
81
+
82
+ if attributes.key?(:'sitelink_asset_resource_names')
83
+ if (value = attributes[:'sitelink_asset_resource_names']).is_a?(Array)
84
+ self.sitelink_asset_resource_names = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'callout_asset_resource_names')
89
+ if (value = attributes[:'callout_asset_resource_names']).is_a?(Array)
90
+ self.callout_asset_resource_names = value
91
+ end
92
+ end
93
+
94
+ if attributes.key?(:'structured_snippet_asset_resource_names')
95
+ if (value = attributes[:'structured_snippet_asset_resource_names']).is_a?(Array)
96
+ self.structured_snippet_asset_resource_names = value
97
+ end
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ true
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ campaign_id == o.campaign_id &&
122
+ sitelink_asset_resource_names == o.sitelink_asset_resource_names &&
123
+ callout_asset_resource_names == o.callout_asset_resource_names &&
124
+ structured_snippet_asset_resource_names == o.structured_snippet_asset_resource_names
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [campaign_id, sitelink_asset_resource_names, callout_asset_resource_names, structured_snippet_asset_resource_names].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
+ end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ if value.nil?
169
+ is_nullable = self.class.openapi_nullable.include?(attr)
170
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
171
+ end
172
+
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ end
179
+
180
+ end
@@ -0,0 +1,283 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 AttachCampaignAssetsRequest < ApiModelBase
18
+ # Zernio Google Ads SocialAccount id — resolves the customer id + refresh token.
19
+ attr_accessor :account_id
20
+
21
+ # See POST /v1/ads/create sitelinks — same shape.
22
+ attr_accessor :sitelinks
23
+
24
+ attr_accessor :callouts
25
+
26
+ attr_accessor :structured_snippets
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'account_id' => :'accountId',
32
+ :'sitelinks' => :'sitelinks',
33
+ :'callouts' => :'callouts',
34
+ :'structured_snippets' => :'structuredSnippets'
35
+ }
36
+ end
37
+
38
+ # Returns attribute mapping this model knows about
39
+ def self.acceptable_attribute_map
40
+ attribute_map
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ acceptable_attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'account_id' => :'String',
52
+ :'sitelinks' => :'Array<AttachCampaignAssetsRequestSitelinksInner>',
53
+ :'callouts' => :'Array<String>',
54
+ :'structured_snippets' => :'Array<AttachCampaignAssetsRequestStructuredSnippetsInner>'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AttachCampaignAssetsRequest` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AttachCampaignAssetsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'account_id')
81
+ self.account_id = attributes[:'account_id']
82
+ else
83
+ self.account_id = nil
84
+ end
85
+
86
+ if attributes.key?(:'sitelinks')
87
+ if (value = attributes[:'sitelinks']).is_a?(Array)
88
+ self.sitelinks = value
89
+ end
90
+ end
91
+
92
+ if attributes.key?(:'callouts')
93
+ if (value = attributes[:'callouts']).is_a?(Array)
94
+ self.callouts = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'structured_snippets')
99
+ if (value = attributes[:'structured_snippets']).is_a?(Array)
100
+ self.structured_snippets = value
101
+ end
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 @account_id.nil?
111
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
112
+ end
113
+
114
+ if !@sitelinks.nil? && @sitelinks.length > 20
115
+ invalid_properties.push('invalid value for "sitelinks", number of items must be less than or equal to 20.')
116
+ end
117
+
118
+ if !@sitelinks.nil? && @sitelinks.length < 2
119
+ invalid_properties.push('invalid value for "sitelinks", number of items must be greater than or equal to 2.')
120
+ end
121
+
122
+ if !@callouts.nil? && @callouts.length > 20
123
+ invalid_properties.push('invalid value for "callouts", number of items must be less than or equal to 20.')
124
+ end
125
+
126
+ if !@callouts.nil? && @callouts.length < 1
127
+ invalid_properties.push('invalid value for "callouts", number of items must be greater than or equal to 1.')
128
+ end
129
+
130
+ if !@structured_snippets.nil? && @structured_snippets.length > 20
131
+ invalid_properties.push('invalid value for "structured_snippets", number of items must be less than or equal to 20.')
132
+ end
133
+
134
+ if !@structured_snippets.nil? && @structured_snippets.length < 1
135
+ invalid_properties.push('invalid value for "structured_snippets", number of items must be greater than or equal to 1.')
136
+ end
137
+
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
+ return false if @account_id.nil?
146
+ return false if !@sitelinks.nil? && @sitelinks.length > 20
147
+ return false if !@sitelinks.nil? && @sitelinks.length < 2
148
+ return false if !@callouts.nil? && @callouts.length > 20
149
+ return false if !@callouts.nil? && @callouts.length < 1
150
+ return false if !@structured_snippets.nil? && @structured_snippets.length > 20
151
+ return false if !@structured_snippets.nil? && @structured_snippets.length < 1
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] account_id Value to be assigned
157
+ def account_id=(account_id)
158
+ if account_id.nil?
159
+ fail ArgumentError, 'account_id cannot be nil'
160
+ end
161
+
162
+ @account_id = account_id
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] sitelinks Value to be assigned
167
+ def sitelinks=(sitelinks)
168
+ if sitelinks.nil?
169
+ fail ArgumentError, 'sitelinks cannot be nil'
170
+ end
171
+
172
+ if sitelinks.length > 20
173
+ fail ArgumentError, 'invalid value for "sitelinks", number of items must be less than or equal to 20.'
174
+ end
175
+
176
+ if sitelinks.length < 2
177
+ fail ArgumentError, 'invalid value for "sitelinks", number of items must be greater than or equal to 2.'
178
+ end
179
+
180
+ @sitelinks = sitelinks
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] callouts Value to be assigned
185
+ def callouts=(callouts)
186
+ if callouts.nil?
187
+ fail ArgumentError, 'callouts cannot be nil'
188
+ end
189
+
190
+ if callouts.length > 20
191
+ fail ArgumentError, 'invalid value for "callouts", number of items must be less than or equal to 20.'
192
+ end
193
+
194
+ if callouts.length < 1
195
+ fail ArgumentError, 'invalid value for "callouts", number of items must be greater than or equal to 1.'
196
+ end
197
+
198
+ @callouts = callouts
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] structured_snippets Value to be assigned
203
+ def structured_snippets=(structured_snippets)
204
+ if structured_snippets.nil?
205
+ fail ArgumentError, 'structured_snippets cannot be nil'
206
+ end
207
+
208
+ if structured_snippets.length > 20
209
+ fail ArgumentError, 'invalid value for "structured_snippets", number of items must be less than or equal to 20.'
210
+ end
211
+
212
+ if structured_snippets.length < 1
213
+ fail ArgumentError, 'invalid value for "structured_snippets", number of items must be greater than or equal to 1.'
214
+ end
215
+
216
+ @structured_snippets = structured_snippets
217
+ end
218
+
219
+ # Checks equality by comparing each attribute.
220
+ # @param [Object] Object to be compared
221
+ def ==(o)
222
+ return true if self.equal?(o)
223
+ self.class == o.class &&
224
+ account_id == o.account_id &&
225
+ sitelinks == o.sitelinks &&
226
+ callouts == o.callouts &&
227
+ structured_snippets == o.structured_snippets
228
+ end
229
+
230
+ # @see the `==` method
231
+ # @param [Object] Object to be compared
232
+ def eql?(o)
233
+ self == o
234
+ end
235
+
236
+ # Calculates hash code according to all attributes.
237
+ # @return [Integer] Hash code
238
+ def hash
239
+ [account_id, sitelinks, callouts, structured_snippets].hash
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def self.build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ attributes = attributes.transform_keys(&:to_sym)
248
+ transformed_hash = {}
249
+ openapi_types.each_pair do |key, type|
250
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
251
+ transformed_hash["#{key}"] = nil
252
+ elsif type =~ /\AArray<(.*)>/i
253
+ # check to ensure the input is an array given that the attribute
254
+ # is documented as an array but the input is not
255
+ if attributes[attribute_map[key]].is_a?(Array)
256
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
257
+ end
258
+ elsif !attributes[attribute_map[key]].nil?
259
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
260
+ end
261
+ end
262
+ new(transformed_hash)
263
+ end
264
+
265
+ # Returns the object in the form of hash
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_hash
268
+ hash = {}
269
+ self.class.attribute_map.each_pair do |attr, param|
270
+ value = self.send(attr)
271
+ if value.nil?
272
+ is_nullable = self.class.openapi_nullable.include?(attr)
273
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
274
+ end
275
+
276
+ hash[param] = _to_hash(value)
277
+ end
278
+ hash
279
+ end
280
+
281
+ end
282
+
283
+ end