zernio-sdk 0.0.557 → 0.0.559
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f04d1a650a370e286ba99304225113f158f7b2754c66e05a17424c2438d1dd22
|
|
4
|
+
data.tar.gz: fa4c5696657a4e9405f77dc613b7866edd47938bc31121090161b02ab52da7d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f393e990eaf6d4907dc46c6ad1f2acedf50c654297474f03f626882cf16a2fb02893642ad51884ab364d7f3ccb4a4bbb73df028fad6781537c4f493a1b65dca
|
|
7
|
+
data.tar.gz: 003222512326ed741e82a2d618dfa06c9fe05602322a4ff12da40d17a020afbcb18f5896bee27881a3e653de8365f300c88f78fba32c9b15f393f4635fb9ae5a
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **validate_only** | **Boolean** |
|
|
7
|
+
| **validate_only** | **Boolean** | Always true in a validate-only response. | [optional] |
|
|
8
8
|
| **results** | [**Array<CreateStandaloneAd200ResponseResultsInner>**](CreateStandaloneAd200ResponseResultsInner.md) | | [optional] |
|
|
9
9
|
| **message** | **String** | | [optional] |
|
|
10
10
|
|
|
@@ -15,34 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class CreateStandaloneAd200Response < ApiModelBase
|
|
18
|
+
# Always true in a validate-only response.
|
|
18
19
|
attr_accessor :validate_only
|
|
19
20
|
|
|
20
21
|
attr_accessor :results
|
|
21
22
|
|
|
22
23
|
attr_accessor :message
|
|
23
24
|
|
|
24
|
-
class EnumAttributeValidator
|
|
25
|
-
attr_reader :datatype
|
|
26
|
-
attr_reader :allowable_values
|
|
27
|
-
|
|
28
|
-
def initialize(datatype, allowable_values)
|
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
|
30
|
-
case datatype.to_s
|
|
31
|
-
when /Integer/i
|
|
32
|
-
value.to_i
|
|
33
|
-
when /Float/i
|
|
34
|
-
value.to_f
|
|
35
|
-
else
|
|
36
|
-
value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def valid?(value)
|
|
42
|
-
!value || allowable_values.include?(value)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
26
|
def self.attribute_map
|
|
48
27
|
{
|
|
@@ -120,21 +99,9 @@ module Zernio
|
|
|
120
99
|
# @return true if the model is valid
|
|
121
100
|
def valid?
|
|
122
101
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
|
-
validate_only_validator = EnumAttributeValidator.new('Boolean', ["true"])
|
|
124
|
-
return false unless validate_only_validator.valid?(@validate_only)
|
|
125
102
|
true
|
|
126
103
|
end
|
|
127
104
|
|
|
128
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
129
|
-
# @param [Object] validate_only Object to be assigned
|
|
130
|
-
def validate_only=(validate_only)
|
|
131
|
-
validator = EnumAttributeValidator.new('Boolean', ["true"])
|
|
132
|
-
unless validator.valid?(validate_only)
|
|
133
|
-
fail ArgumentError, "invalid value for \"validate_only\", must be one of #{validator.allowable_values}."
|
|
134
|
-
end
|
|
135
|
-
@validate_only = validate_only
|
|
136
|
-
end
|
|
137
|
-
|
|
138
105
|
# Checks equality by comparing each attribute.
|
|
139
106
|
# @param [Object] Object to be compared
|
|
140
107
|
def ==(o)
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -33536,6 +33536,7 @@ paths:
|
|
|
33536
33536
|
type: array
|
|
33537
33537
|
items: { $ref: '#/components/schemas/AdCampaign' }
|
|
33538
33538
|
pagination: { $ref: '#/components/schemas/Pagination' }
|
|
33539
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
33539
33540
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
33540
33541
|
'403':
|
|
33541
33542
|
description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
|
|
@@ -36831,7 +36832,7 @@ paths:
|
|
|
36831
36832
|
schema:
|
|
36832
36833
|
type: object
|
|
36833
36834
|
properties:
|
|
36834
|
-
validateOnly: { type: boolean,
|
|
36835
|
+
validateOnly: { type: boolean, description: 'Always true in a validate-only response.' }
|
|
36835
36836
|
results:
|
|
36836
36837
|
type: array
|
|
36837
36838
|
items:
|
|
@@ -30,10 +30,6 @@ describe Zernio::CreateStandaloneAd200Response do
|
|
|
30
30
|
describe 'test attribute "validate_only"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true"])
|
|
34
|
-
# validator.allowable_values.each do |value|
|
|
35
|
-
# expect { instance.validate_only = value }.not_to raise_error
|
|
36
|
-
# end
|
|
37
33
|
end
|
|
38
34
|
end
|
|
39
35
|
|