late-sdk 0.0.930 → 0.0.931

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/docs/AdCampaignsApi.md +6 -10
  4. data/docs/AdCreative.md +0 -4
  5. data/docs/AdCreativesApi.md +1 -1
  6. data/docs/BoostPostRequest.md +1 -1
  7. data/docs/CreateAdCreative201Response.md +1 -5
  8. data/docs/CreateAdCreativeRequest.md +2 -2
  9. data/docs/CreateStandaloneAdRequest.md +2 -2
  10. data/docs/CreateStandaloneAdRequestCreativesInner.md +0 -2
  11. data/docs/UpdateAdRequestCreative.md +2 -2
  12. data/lib/zernio-sdk/api/ad_campaigns_api.rb +4 -7
  13. data/lib/zernio-sdk/api/ad_creatives_api.rb +2 -2
  14. data/lib/zernio-sdk/models/ad_creative.rb +1 -42
  15. data/lib/zernio-sdk/models/boost_post_request.rb +1 -1
  16. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +4 -44
  17. data/lib/zernio-sdk/models/create_ad_creative_request.rb +3 -2
  18. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +3 -2
  19. data/lib/zernio-sdk/models/create_standalone_ad_request_creatives_inner.rb +1 -11
  20. data/lib/zernio-sdk/models/update_ad_request_creative.rb +4 -3
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +0 -2
  23. data/openapi.yaml +27 -71
  24. data/spec/api/ad_campaigns_api_spec.rb +2 -3
  25. data/spec/api/ad_creatives_api_spec.rb +1 -1
  26. data/spec/models/ad_creative_spec.rb +0 -12
  27. data/spec/models/create_ad_creative201_response_spec.rb +0 -12
  28. data/spec/models/create_standalone_ad_request_creatives_inner_spec.rb +0 -6
  29. data/zernio-sdk-0.0.931.gem +0 -0
  30. metadata +2 -10
  31. data/docs/MetaPromotion.md +0 -26
  32. data/docs/MetaPromotionStatus.md +0 -15
  33. data/lib/zernio-sdk/models/meta_promotion.rb +0 -275
  34. data/lib/zernio-sdk/models/meta_promotion_status.rb +0 -41
  35. data/spec/models/meta_promotion_spec.rb +0 -64
  36. data/spec/models/meta_promotion_status_spec.rb +0 -30
  37. data/zernio-sdk-0.0.930.gem +0 -0
@@ -1,275 +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 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
- # Meta explicit Promotion offer. Maps to creative_sourcing_spec.promotion_metadata_spec with promotion_source ADVERTISER_INPUT. Dates become Unix seconds. Send null to omit an explicit offer on a new creative or remove it when rebuilding. Creation success alone does not confirm application: inspect promotionStatus in the response.
18
- class MetaPromotion < ApiModelBase
19
- # Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
20
- attr_accessor :type
21
-
22
- # Nonnegative promotion value passed to Meta unchanged. AMOUNT_OFF units are not confirmed, including major versus minor currency units. For PERCENTAGE_OFF this is the percentage discount, at most 100.
23
- attr_accessor :value
24
-
25
- # Optional promotion code.
26
- attr_accessor :code
27
-
28
- # Optional ISO 8601 start timestamp with a timezone offset or Z.
29
- attr_accessor :start_date
30
-
31
- # Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set.
32
- attr_accessor :end_date
33
-
34
- class EnumAttributeValidator
35
- attr_reader :datatype
36
- attr_reader :allowable_values
37
-
38
- def initialize(datatype, allowable_values)
39
- @allowable_values = allowable_values.map do |value|
40
- case datatype.to_s
41
- when /Integer/i
42
- value.to_i
43
- when /Float/i
44
- value.to_f
45
- else
46
- value
47
- end
48
- end
49
- end
50
-
51
- def valid?(value)
52
- !value || allowable_values.include?(value)
53
- end
54
- end
55
-
56
- # Attribute mapping from ruby-style variable name to JSON key.
57
- def self.attribute_map
58
- {
59
- :'type' => :'type',
60
- :'value' => :'value',
61
- :'code' => :'code',
62
- :'start_date' => :'startDate',
63
- :'end_date' => :'endDate'
64
- }
65
- end
66
-
67
- # Returns attribute mapping this model knows about
68
- def self.acceptable_attribute_map
69
- attribute_map
70
- end
71
-
72
- # Returns all the JSON keys this model knows about
73
- def self.acceptable_attributes
74
- acceptable_attribute_map.values
75
- end
76
-
77
- # Attribute type mapping.
78
- def self.openapi_types
79
- {
80
- :'type' => :'String',
81
- :'value' => :'Float',
82
- :'code' => :'String',
83
- :'start_date' => :'Time',
84
- :'end_date' => :'Time'
85
- }
86
- end
87
-
88
- # List of attributes with nullable: true
89
- def self.openapi_nullable
90
- Set.new([
91
- ])
92
- end
93
-
94
- # Initializes the object
95
- # @param [Hash] attributes Model attributes in the form of hash
96
- def initialize(attributes = {})
97
- if (!attributes.is_a?(Hash))
98
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::MetaPromotion` initialize method"
99
- end
100
-
101
- # check to see if the attribute exists and convert string to symbol for hash key
102
- acceptable_attribute_map = self.class.acceptable_attribute_map
103
- attributes = attributes.each_with_object({}) { |(k, v), h|
104
- if (!acceptable_attribute_map.key?(k.to_sym))
105
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::MetaPromotion`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
- end
107
- h[k.to_sym] = v
108
- }
109
-
110
- if attributes.key?(:'type')
111
- self.type = attributes[:'type']
112
- else
113
- self.type = nil
114
- end
115
-
116
- if attributes.key?(:'value')
117
- self.value = attributes[:'value']
118
- else
119
- self.value = nil
120
- end
121
-
122
- if attributes.key?(:'code')
123
- self.code = attributes[:'code']
124
- end
125
-
126
- if attributes.key?(:'start_date')
127
- self.start_date = attributes[:'start_date']
128
- end
129
-
130
- if attributes.key?(:'end_date')
131
- self.end_date = attributes[:'end_date']
132
- end
133
- end
134
-
135
- # Show invalid properties with the reasons. Usually used together with valid?
136
- # @return Array for valid properties with the reasons
137
- def list_invalid_properties
138
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
139
- invalid_properties = Array.new
140
- if @type.nil?
141
- invalid_properties.push('invalid value for "type", type cannot be nil.')
142
- end
143
-
144
- if @value.nil?
145
- invalid_properties.push('invalid value for "value", value cannot be nil.')
146
- end
147
-
148
- if @value < 0
149
- invalid_properties.push('invalid value for "value", must be greater than or equal to 0.')
150
- end
151
-
152
- if !@code.nil? && @code.to_s.length < 1
153
- invalid_properties.push('invalid value for "code", the character length must be greater than or equal to 1.')
154
- end
155
-
156
- invalid_properties
157
- end
158
-
159
- # Check to see if the all the properties in the model are valid
160
- # @return true if the model is valid
161
- def valid?
162
- warn '[DEPRECATED] the `valid?` method is obsolete'
163
- return false if @type.nil?
164
- type_validator = EnumAttributeValidator.new('String', ["AMOUNT_OFF", "FREE_RETURN", "FREE_SHIPPING", "PERCENTAGE_OFF", "PROMO_CODE"])
165
- return false unless type_validator.valid?(@type)
166
- return false if @value.nil?
167
- return false if @value < 0
168
- return false if !@code.nil? && @code.to_s.length < 1
169
- true
170
- end
171
-
172
- # Custom attribute writer method checking allowed values (enum).
173
- # @param [Object] type Object to be assigned
174
- def type=(type)
175
- validator = EnumAttributeValidator.new('String', ["AMOUNT_OFF", "FREE_RETURN", "FREE_SHIPPING", "PERCENTAGE_OFF", "PROMO_CODE"])
176
- unless validator.valid?(type)
177
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
178
- end
179
- @type = type
180
- end
181
-
182
- # Custom attribute writer method with validation
183
- # @param [Object] value Value to be assigned
184
- def value=(value)
185
- if value.nil?
186
- fail ArgumentError, 'value cannot be nil'
187
- end
188
-
189
- if value < 0
190
- fail ArgumentError, 'invalid value for "value", must be greater than or equal to 0.'
191
- end
192
-
193
- @value = value
194
- end
195
-
196
- # Custom attribute writer method with validation
197
- # @param [Object] code Value to be assigned
198
- def code=(code)
199
- if code.nil?
200
- fail ArgumentError, 'code cannot be nil'
201
- end
202
-
203
- if code.to_s.length < 1
204
- fail ArgumentError, 'invalid value for "code", the character length must be greater than or equal to 1.'
205
- end
206
-
207
- @code = code
208
- end
209
-
210
- # Checks equality by comparing each attribute.
211
- # @param [Object] Object to be compared
212
- def ==(o)
213
- return true if self.equal?(o)
214
- self.class == o.class &&
215
- type == o.type &&
216
- value == o.value &&
217
- code == o.code &&
218
- start_date == o.start_date &&
219
- end_date == o.end_date
220
- end
221
-
222
- # @see the `==` method
223
- # @param [Object] Object to be compared
224
- def eql?(o)
225
- self == o
226
- end
227
-
228
- # Calculates hash code according to all attributes.
229
- # @return [Integer] Hash code
230
- def hash
231
- [type, value, code, start_date, end_date].hash
232
- end
233
-
234
- # Builds the object from hash
235
- # @param [Hash] attributes Model attributes in the form of hash
236
- # @return [Object] Returns the model itself
237
- def self.build_from_hash(attributes)
238
- return nil unless attributes.is_a?(Hash)
239
- attributes = attributes.transform_keys(&:to_sym)
240
- transformed_hash = {}
241
- openapi_types.each_pair do |key, type|
242
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
243
- transformed_hash["#{key}"] = nil
244
- elsif type =~ /\AArray<(.*)>/i
245
- # check to ensure the input is an array given that the attribute
246
- # is documented as an array but the input is not
247
- if attributes[attribute_map[key]].is_a?(Array)
248
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
249
- end
250
- elsif !attributes[attribute_map[key]].nil?
251
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
252
- end
253
- end
254
- new(transformed_hash)
255
- end
256
-
257
- # Returns the object in the form of hash
258
- # @return [Hash] Returns the object in the form of hash
259
- def to_hash
260
- hash = {}
261
- self.class.attribute_map.each_pair do |attr, param|
262
- value = self.send(attr)
263
- if value.nil?
264
- is_nullable = self.class.openapi_nullable.include?(attr)
265
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
266
- end
267
-
268
- hash[param] = _to_hash(value)
269
- end
270
- hash
271
- end
272
-
273
- end
274
-
275
- end
@@ -1,41 +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 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 MetaPromotionStatus
18
- APPLIED = "applied".freeze
19
- NOT_RETURNED = "not_returned".freeze
20
- UNAVAILABLE = "unavailable".freeze
21
-
22
- def self.all_vars
23
- @all_vars ||= [APPLIED, NOT_RETURNED, UNAVAILABLE].freeze
24
- end
25
-
26
- # Builds the enum from string
27
- # @param [String] The enum value in the form of the string
28
- # @return [String] The enum value
29
- def self.build_from_hash(value)
30
- new.build_from_hash(value)
31
- end
32
-
33
- # Builds the enum from string
34
- # @param [String] The enum value in the form of the string
35
- # @return [String] The enum value
36
- def build_from_hash(value)
37
- return value if MetaPromotionStatus.all_vars.include?(value)
38
- raise "Invalid ENUM value #{value} for class #MetaPromotionStatus"
39
- end
40
- end
41
- end
@@ -1,64 +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 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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Zernio::MetaPromotion
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe Zernio::MetaPromotion do
21
- #let(:instance) { Zernio::MetaPromotion.new }
22
-
23
- describe 'test an instance of MetaPromotion' do
24
- it 'should create an instance of MetaPromotion' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::MetaPromotion)
27
- end
28
- end
29
-
30
- describe 'test attribute "type"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AMOUNT_OFF", "FREE_RETURN", "FREE_SHIPPING", "PERCENTAGE_OFF", "PROMO_CODE"])
34
- # validator.allowable_values.each do |value|
35
- # expect { instance.type = value }.not_to raise_error
36
- # end
37
- end
38
- end
39
-
40
- describe 'test attribute "value"' do
41
- it 'should work' do
42
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
- end
44
- end
45
-
46
- describe 'test attribute "code"' do
47
- it 'should work' do
48
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
- end
50
- end
51
-
52
- describe 'test attribute "start_date"' do
53
- it 'should work' do
54
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
- end
56
- end
57
-
58
- describe 'test attribute "end_date"' do
59
- it 'should work' do
60
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
- end
62
- end
63
-
64
- end
@@ -1,30 +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 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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Zernio::MetaPromotionStatus
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe Zernio::MetaPromotionStatus do
21
- #let(:instance) { Zernio::MetaPromotionStatus.new }
22
-
23
- describe 'test an instance of MetaPromotionStatus' do
24
- it 'should create an instance of MetaPromotionStatus' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::MetaPromotionStatus)
27
- end
28
- end
29
-
30
- end
Binary file