late-sdk 0.0.860 → 0.0.862
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 +4 -4
- data/README.md +2 -0
- data/docs/AdAccountsApi.md +1 -1
- data/docs/AdCampaignsApi.md +5 -5
- data/docs/AdInsightsApi.md +1 -1
- data/docs/AdLibraryApi.md +9 -7
- data/docs/CampaignBidding.md +5 -1
- data/docs/ConversionsApi.md +2 -2
- data/docs/GetAdsSearchTerms200Response.md +5 -1
- data/docs/GetCampaignBidding200Response.md +4 -0
- data/docs/GetCampaignTargeting200Response.md +5 -1
- data/docs/ListAccountCallouts200Response.md +5 -1
- data/docs/ListAdAccounts200Response.md +5 -1
- data/docs/ListBidStrategies200Response.md +5 -1
- data/docs/ListCampaignNegativeKeywords200Response.md +5 -1
- data/docs/ListConversionActions200Response.md +5 -1
- data/docs/UpdateCampaignTargeting200Response.md +7 -1
- data/docs/UpdateCampaignTargeting200ResponseDevicesInner.md +22 -0
- data/docs/UpdateCampaignTargeting200ResponseLanguagesInner.md +22 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +2 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
- data/lib/zernio-sdk/api/ad_insights_api.rb +2 -2
- data/lib/zernio-sdk/api/ad_library_api.rb +14 -11
- data/lib/zernio-sdk/api/conversions_api.rb +4 -4
- data/lib/zernio-sdk/models/campaign_bidding.rb +25 -4
- data/lib/zernio-sdk/models/get_ads_search_terms200_response.rb +25 -4
- data/lib/zernio-sdk/models/get_campaign_bidding200_response.rb +21 -1
- data/lib/zernio-sdk/models/get_campaign_targeting200_response.rb +25 -4
- data/lib/zernio-sdk/models/list_account_callouts200_response.rb +25 -4
- data/lib/zernio-sdk/models/list_ad_accounts200_response.rb +25 -4
- data/lib/zernio-sdk/models/list_bid_strategies200_response.rb +25 -4
- data/lib/zernio-sdk/models/list_campaign_negative_keywords200_response.rb +25 -4
- data/lib/zernio-sdk/models/list_conversion_actions200_response.rb +25 -4
- data/lib/zernio-sdk/models/update_campaign_targeting200_response.rb +37 -4
- data/lib/zernio-sdk/models/update_campaign_targeting200_response_devices_inner.rb +201 -0
- data/lib/zernio-sdk/models/update_campaign_targeting200_response_languages_inner.rb +165 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -0
- data/openapi.yaml +93 -28
- data/spec/api/ad_accounts_api_spec.rb +1 -1
- data/spec/api/ad_campaigns_api_spec.rb +5 -5
- data/spec/api/ad_insights_api_spec.rb +1 -1
- data/spec/api/ad_library_api_spec.rb +3 -2
- data/spec/api/conversions_api_spec.rb +2 -2
- data/spec/models/campaign_bidding_spec.rb +12 -0
- data/spec/models/get_ads_search_terms200_response_spec.rb +12 -0
- data/spec/models/get_campaign_bidding200_response_spec.rb +12 -0
- data/spec/models/get_campaign_targeting200_response_spec.rb +12 -0
- data/spec/models/list_account_callouts200_response_spec.rb +12 -0
- data/spec/models/list_ad_accounts200_response_spec.rb +12 -0
- data/spec/models/list_bid_strategies200_response_spec.rb +12 -0
- data/spec/models/list_campaign_negative_keywords200_response_spec.rb +12 -0
- data/spec/models/list_conversion_actions200_response_spec.rb +12 -0
- data/spec/models/update_campaign_targeting200_response_devices_inner_spec.rb +52 -0
- data/spec/models/update_campaign_targeting200_response_languages_inner_spec.rb +48 -0
- data/spec/models/update_campaign_targeting200_response_spec.rb +18 -0
- data/zernio-sdk-0.0.862.gem +0 -0
- metadata +11 -3
- data/zernio-sdk-0.0.860.gem +0 -0
|
@@ -17,10 +17,18 @@ module Zernio
|
|
|
17
17
|
class ListCampaignNegativeKeywords200Response < ApiModelBase
|
|
18
18
|
attr_accessor :keywords
|
|
19
19
|
|
|
20
|
+
# When this list was fetched from Google. Null when it was never served from cache.
|
|
21
|
+
attr_accessor :cached_at
|
|
22
|
+
|
|
23
|
+
# True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
24
|
+
attr_accessor :stale
|
|
25
|
+
|
|
20
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
27
|
def self.attribute_map
|
|
22
28
|
{
|
|
23
|
-
:'keywords' => :'keywords'
|
|
29
|
+
:'keywords' => :'keywords',
|
|
30
|
+
:'cached_at' => :'cachedAt',
|
|
31
|
+
:'stale' => :'stale'
|
|
24
32
|
}
|
|
25
33
|
end
|
|
26
34
|
|
|
@@ -37,13 +45,16 @@ module Zernio
|
|
|
37
45
|
# Attribute type mapping.
|
|
38
46
|
def self.openapi_types
|
|
39
47
|
{
|
|
40
|
-
:'keywords' => :'Array<ListCampaignNegativeKeywords200ResponseKeywordsInner>'
|
|
48
|
+
:'keywords' => :'Array<ListCampaignNegativeKeywords200ResponseKeywordsInner>',
|
|
49
|
+
:'cached_at' => :'Time',
|
|
50
|
+
:'stale' => :'Boolean'
|
|
41
51
|
}
|
|
42
52
|
end
|
|
43
53
|
|
|
44
54
|
# List of attributes with nullable: true
|
|
45
55
|
def self.openapi_nullable
|
|
46
56
|
Set.new([
|
|
57
|
+
:'cached_at',
|
|
47
58
|
])
|
|
48
59
|
end
|
|
49
60
|
|
|
@@ -68,6 +79,14 @@ module Zernio
|
|
|
68
79
|
self.keywords = value
|
|
69
80
|
end
|
|
70
81
|
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'cached_at')
|
|
84
|
+
self.cached_at = attributes[:'cached_at']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'stale')
|
|
88
|
+
self.stale = attributes[:'stale']
|
|
89
|
+
end
|
|
71
90
|
end
|
|
72
91
|
|
|
73
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -90,7 +109,9 @@ module Zernio
|
|
|
90
109
|
def ==(o)
|
|
91
110
|
return true if self.equal?(o)
|
|
92
111
|
self.class == o.class &&
|
|
93
|
-
keywords == o.keywords
|
|
112
|
+
keywords == o.keywords &&
|
|
113
|
+
cached_at == o.cached_at &&
|
|
114
|
+
stale == o.stale
|
|
94
115
|
end
|
|
95
116
|
|
|
96
117
|
# @see the `==` method
|
|
@@ -102,7 +123,7 @@ module Zernio
|
|
|
102
123
|
# Calculates hash code according to all attributes.
|
|
103
124
|
# @return [Integer] Hash code
|
|
104
125
|
def hash
|
|
105
|
-
[keywords].hash
|
|
126
|
+
[keywords, cached_at, stale].hash
|
|
106
127
|
end
|
|
107
128
|
|
|
108
129
|
# Builds the object from hash
|
|
@@ -20,11 +20,19 @@ module Zernio
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :actions
|
|
22
22
|
|
|
23
|
+
# When this list was fetched from Google. Null when it was never served from cache.
|
|
24
|
+
attr_accessor :cached_at
|
|
25
|
+
|
|
26
|
+
# True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
|
|
27
|
+
attr_accessor :stale
|
|
28
|
+
|
|
23
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
30
|
def self.attribute_map
|
|
25
31
|
{
|
|
26
32
|
:'customer_id' => :'customerId',
|
|
27
|
-
:'actions' => :'actions'
|
|
33
|
+
:'actions' => :'actions',
|
|
34
|
+
:'cached_at' => :'cachedAt',
|
|
35
|
+
:'stale' => :'stale'
|
|
28
36
|
}
|
|
29
37
|
end
|
|
30
38
|
|
|
@@ -42,13 +50,16 @@ module Zernio
|
|
|
42
50
|
def self.openapi_types
|
|
43
51
|
{
|
|
44
52
|
:'customer_id' => :'String',
|
|
45
|
-
:'actions' => :'Array<ConversionAction>'
|
|
53
|
+
:'actions' => :'Array<ConversionAction>',
|
|
54
|
+
:'cached_at' => :'Time',
|
|
55
|
+
:'stale' => :'Boolean'
|
|
46
56
|
}
|
|
47
57
|
end
|
|
48
58
|
|
|
49
59
|
# List of attributes with nullable: true
|
|
50
60
|
def self.openapi_nullable
|
|
51
61
|
Set.new([
|
|
62
|
+
:'cached_at',
|
|
52
63
|
])
|
|
53
64
|
end
|
|
54
65
|
|
|
@@ -77,6 +88,14 @@ module Zernio
|
|
|
77
88
|
self.actions = value
|
|
78
89
|
end
|
|
79
90
|
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'cached_at')
|
|
93
|
+
self.cached_at = attributes[:'cached_at']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'stale')
|
|
97
|
+
self.stale = attributes[:'stale']
|
|
98
|
+
end
|
|
80
99
|
end
|
|
81
100
|
|
|
82
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -100,7 +119,9 @@ module Zernio
|
|
|
100
119
|
return true if self.equal?(o)
|
|
101
120
|
self.class == o.class &&
|
|
102
121
|
customer_id == o.customer_id &&
|
|
103
|
-
actions == o.actions
|
|
122
|
+
actions == o.actions &&
|
|
123
|
+
cached_at == o.cached_at &&
|
|
124
|
+
stale == o.stale
|
|
104
125
|
end
|
|
105
126
|
|
|
106
127
|
# @see the `==` method
|
|
@@ -112,7 +133,7 @@ module Zernio
|
|
|
112
133
|
# Calculates hash code according to all attributes.
|
|
113
134
|
# @return [Integer] Hash code
|
|
114
135
|
def hash
|
|
115
|
-
[customer_id, actions].hash
|
|
136
|
+
[customer_id, actions, cached_at, stale].hash
|
|
116
137
|
end
|
|
117
138
|
|
|
118
139
|
# Builds the object from hash
|
|
@@ -20,6 +20,12 @@ module Zernio
|
|
|
20
20
|
# Which targeting fields were applied.
|
|
21
21
|
attr_accessor :updated
|
|
22
22
|
|
|
23
|
+
attr_accessor :devices
|
|
24
|
+
|
|
25
|
+
attr_accessor :locations
|
|
26
|
+
|
|
27
|
+
attr_accessor :languages
|
|
28
|
+
|
|
23
29
|
class EnumAttributeValidator
|
|
24
30
|
attr_reader :datatype
|
|
25
31
|
attr_reader :allowable_values
|
|
@@ -46,7 +52,10 @@ module Zernio
|
|
|
46
52
|
def self.attribute_map
|
|
47
53
|
{
|
|
48
54
|
:'campaign_id' => :'campaignId',
|
|
49
|
-
:'updated' => :'updated'
|
|
55
|
+
:'updated' => :'updated',
|
|
56
|
+
:'devices' => :'devices',
|
|
57
|
+
:'locations' => :'locations',
|
|
58
|
+
:'languages' => :'languages'
|
|
50
59
|
}
|
|
51
60
|
end
|
|
52
61
|
|
|
@@ -64,7 +73,10 @@ module Zernio
|
|
|
64
73
|
def self.openapi_types
|
|
65
74
|
{
|
|
66
75
|
:'campaign_id' => :'String',
|
|
67
|
-
:'updated' => :'Array<String>'
|
|
76
|
+
:'updated' => :'Array<String>',
|
|
77
|
+
:'devices' => :'Array<UpdateCampaignTargeting200ResponseDevicesInner>',
|
|
78
|
+
:'locations' => :'Array<GetCampaignTargeting200ResponseLocationsInner>',
|
|
79
|
+
:'languages' => :'Array<UpdateCampaignTargeting200ResponseLanguagesInner>'
|
|
68
80
|
}
|
|
69
81
|
end
|
|
70
82
|
|
|
@@ -99,6 +111,24 @@ module Zernio
|
|
|
99
111
|
self.updated = value
|
|
100
112
|
end
|
|
101
113
|
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'devices')
|
|
116
|
+
if (value = attributes[:'devices']).is_a?(Array)
|
|
117
|
+
self.devices = value
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'locations')
|
|
122
|
+
if (value = attributes[:'locations']).is_a?(Array)
|
|
123
|
+
self.locations = value
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'languages')
|
|
128
|
+
if (value = attributes[:'languages']).is_a?(Array)
|
|
129
|
+
self.languages = value
|
|
130
|
+
end
|
|
131
|
+
end
|
|
102
132
|
end
|
|
103
133
|
|
|
104
134
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -122,7 +152,10 @@ module Zernio
|
|
|
122
152
|
return true if self.equal?(o)
|
|
123
153
|
self.class == o.class &&
|
|
124
154
|
campaign_id == o.campaign_id &&
|
|
125
|
-
updated == o.updated
|
|
155
|
+
updated == o.updated &&
|
|
156
|
+
devices == o.devices &&
|
|
157
|
+
locations == o.locations &&
|
|
158
|
+
languages == o.languages
|
|
126
159
|
end
|
|
127
160
|
|
|
128
161
|
# @see the `==` method
|
|
@@ -134,7 +167,7 @@ module Zernio
|
|
|
134
167
|
# Calculates hash code according to all attributes.
|
|
135
168
|
# @return [Integer] Hash code
|
|
136
169
|
def hash
|
|
137
|
-
[campaign_id, updated].hash
|
|
170
|
+
[campaign_id, updated, devices, locations, languages].hash
|
|
138
171
|
end
|
|
139
172
|
|
|
140
173
|
# Builds the object from hash
|
|
@@ -0,0 +1,201 @@
|
|
|
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 UpdateCampaignTargeting200ResponseDevicesInner < ApiModelBase
|
|
18
|
+
attr_accessor :device
|
|
19
|
+
|
|
20
|
+
attr_accessor :included
|
|
21
|
+
|
|
22
|
+
# Always null on this read; see GET's description.
|
|
23
|
+
attr_accessor :bid_modifier
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'device' => :'device',
|
|
51
|
+
:'included' => :'included',
|
|
52
|
+
:'bid_modifier' => :'bidModifier'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'device' => :'String',
|
|
70
|
+
:'included' => :'Boolean',
|
|
71
|
+
:'bid_modifier' => :'Float'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
:'bid_modifier'
|
|
79
|
+
])
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignTargeting200ResponseDevicesInner` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignTargeting200ResponseDevicesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'device')
|
|
99
|
+
self.device = attributes[:'device']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'included')
|
|
103
|
+
self.included = attributes[:'included']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'bid_modifier')
|
|
107
|
+
self.bid_modifier = attributes[:'bid_modifier']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
invalid_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
def valid?
|
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
|
+
device_validator = EnumAttributeValidator.new('String', ["MOBILE", "DESKTOP", "TABLET", "CONNECTED_TV"])
|
|
124
|
+
return false unless device_validator.valid?(@device)
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
129
|
+
# @param [Object] device Object to be assigned
|
|
130
|
+
def device=(device)
|
|
131
|
+
validator = EnumAttributeValidator.new('String', ["MOBILE", "DESKTOP", "TABLET", "CONNECTED_TV"])
|
|
132
|
+
unless validator.valid?(device)
|
|
133
|
+
fail ArgumentError, "invalid value for \"device\", must be one of #{validator.allowable_values}."
|
|
134
|
+
end
|
|
135
|
+
@device = device
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
device == o.device &&
|
|
144
|
+
included == o.included &&
|
|
145
|
+
bid_modifier == o.bid_modifier
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[device, included, bid_modifier].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
transformed_hash = {}
|
|
167
|
+
openapi_types.each_pair do |key, type|
|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = nil
|
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
new(transformed_hash)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = self.send(attr)
|
|
189
|
+
if value.nil?
|
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
hash[param] = _to_hash(value)
|
|
195
|
+
end
|
|
196
|
+
hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
@@ -0,0 +1,165 @@
|
|
|
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 UpdateCampaignTargeting200ResponseLanguagesInner < ApiModelBase
|
|
18
|
+
attr_accessor :code
|
|
19
|
+
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'code' => :'code',
|
|
28
|
+
:'id' => :'id',
|
|
29
|
+
:'name' => :'name'
|
|
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
|
+
:'code' => :'String',
|
|
47
|
+
:'id' => :'String',
|
|
48
|
+
:'name' => :'String'
|
|
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::UpdateCampaignTargeting200ResponseLanguagesInner` 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::UpdateCampaignTargeting200ResponseLanguagesInner`. 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?(:'code')
|
|
75
|
+
self.code = attributes[:'code']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'id')
|
|
79
|
+
self.id = attributes[:'id']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'name')
|
|
83
|
+
self.name = attributes[:'name']
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Checks equality by comparing each attribute.
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def ==(o)
|
|
105
|
+
return true if self.equal?(o)
|
|
106
|
+
self.class == o.class &&
|
|
107
|
+
code == o.code &&
|
|
108
|
+
id == o.id &&
|
|
109
|
+
name == o.name
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[code, id, name].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1532,6 +1532,8 @@ require 'zernio-sdk/models/update_broadcast_request_message'
|
|
|
1532
1532
|
require 'zernio-sdk/models/update_broadcast_request_template'
|
|
1533
1533
|
require 'zernio-sdk/models/update_broadcast_request_template_variable_mapping_value'
|
|
1534
1534
|
require 'zernio-sdk/models/update_campaign_targeting200_response'
|
|
1535
|
+
require 'zernio-sdk/models/update_campaign_targeting200_response_devices_inner'
|
|
1536
|
+
require 'zernio-sdk/models/update_campaign_targeting200_response_languages_inner'
|
|
1535
1537
|
require 'zernio-sdk/models/update_campaign_targeting_request'
|
|
1536
1538
|
require 'zernio-sdk/models/update_campaign_targeting_request_targeting'
|
|
1537
1539
|
require 'zernio-sdk/models/update_campaign_targeting_request_targeting_devices_inner'
|