late-sdk 0.0.753 → 0.0.755
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 +6 -0
- data/docs/Ad.md +1 -1
- data/docs/ConnectApi.md +210 -3
- data/docs/ConnectDiscordChannelRequest.md +22 -0
- data/docs/ConnectSlackChannelRequest.md +24 -0
- data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +28 -0
- data/docs/CreateStandaloneAdRequest.md +1 -1
- data/lib/zernio-sdk/api/connect_api.rb +213 -4
- data/lib/zernio-sdk/models/ad.rb +3 -3
- data/lib/zernio-sdk/models/connect_discord_channel_request.rb +219 -0
- data/lib/zernio-sdk/models/connect_slack_channel_request.rb +211 -0
- data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +230 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +2 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +3 -3
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +99 -7
- data/spec/api/connect_api_spec.rb +38 -2
- data/spec/models/ad_spec.rb +1 -1
- data/spec/models/connect_discord_channel_request_spec.rb +48 -0
- data/spec/models/connect_slack_channel_request_spec.rb +54 -0
- data/spec/models/connect_whats_app_embedded_signup_request_spec.rb +66 -0
- data/spec/models/create_ad_campaign_request_spec.rb +1 -1
- data/spec/models/create_standalone_ad_request_spec.rb +1 -1
- data/zernio-sdk-0.0.755.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.753.gem +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
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 ConnectSlackChannelRequest < ApiModelBase
|
|
18
|
+
attr_accessor :profile_id
|
|
19
|
+
|
|
20
|
+
# Slack channel id, C... or G...
|
|
21
|
+
attr_accessor :channel_id
|
|
22
|
+
|
|
23
|
+
# Nonce from the OAuth redirect. Required unless accountId is sent.
|
|
24
|
+
attr_accessor :pending_data_token
|
|
25
|
+
|
|
26
|
+
# Existing Slack account whose workspace token is reused. Required unless pendingDataToken is sent.
|
|
27
|
+
attr_accessor :account_id
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'profile_id' => :'profileId',
|
|
33
|
+
:'channel_id' => :'channelId',
|
|
34
|
+
:'pending_data_token' => :'pendingDataToken',
|
|
35
|
+
:'account_id' => :'accountId'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'profile_id' => :'String',
|
|
53
|
+
:'channel_id' => :'String',
|
|
54
|
+
:'pending_data_token' => :'String',
|
|
55
|
+
:'account_id' => :'String'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConnectSlackChannelRequest` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConnectSlackChannelRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'profile_id')
|
|
82
|
+
self.profile_id = attributes[:'profile_id']
|
|
83
|
+
else
|
|
84
|
+
self.profile_id = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'channel_id')
|
|
88
|
+
self.channel_id = attributes[:'channel_id']
|
|
89
|
+
else
|
|
90
|
+
self.channel_id = nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'pending_data_token')
|
|
94
|
+
self.pending_data_token = attributes[:'pending_data_token']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'account_id')
|
|
98
|
+
self.account_id = attributes[:'account_id']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
if @profile_id.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @channel_id.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "channel_id", channel_id cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
return false if @profile_id.nil?
|
|
123
|
+
return false if @channel_id.nil?
|
|
124
|
+
true
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] profile_id Value to be assigned
|
|
129
|
+
def profile_id=(profile_id)
|
|
130
|
+
if profile_id.nil?
|
|
131
|
+
fail ArgumentError, 'profile_id cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
@profile_id = profile_id
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] channel_id Value to be assigned
|
|
139
|
+
def channel_id=(channel_id)
|
|
140
|
+
if channel_id.nil?
|
|
141
|
+
fail ArgumentError, 'channel_id cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@channel_id = channel_id
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Checks equality by comparing each attribute.
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def ==(o)
|
|
150
|
+
return true if self.equal?(o)
|
|
151
|
+
self.class == o.class &&
|
|
152
|
+
profile_id == o.profile_id &&
|
|
153
|
+
channel_id == o.channel_id &&
|
|
154
|
+
pending_data_token == o.pending_data_token &&
|
|
155
|
+
account_id == o.account_id
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# @see the `==` method
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def eql?(o)
|
|
161
|
+
self == o
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Calculates hash code according to all attributes.
|
|
165
|
+
# @return [Integer] Hash code
|
|
166
|
+
def hash
|
|
167
|
+
[profile_id, channel_id, pending_data_token, account_id].hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Builds the object from hash
|
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
172
|
+
# @return [Object] Returns the model itself
|
|
173
|
+
def self.build_from_hash(attributes)
|
|
174
|
+
return nil unless attributes.is_a?(Hash)
|
|
175
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
176
|
+
transformed_hash = {}
|
|
177
|
+
openapi_types.each_pair do |key, type|
|
|
178
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = nil
|
|
180
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
181
|
+
# check to ensure the input is an array given that the attribute
|
|
182
|
+
# is documented as an array but the input is not
|
|
183
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
184
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
185
|
+
end
|
|
186
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
new(transformed_hash)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the object in the form of hash
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_hash
|
|
196
|
+
hash = {}
|
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
198
|
+
value = self.send(attr)
|
|
199
|
+
if value.nil?
|
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
hash[param] = _to_hash(value)
|
|
205
|
+
end
|
|
206
|
+
hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
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 ConnectWhatsAppEmbeddedSignupRequest < ApiModelBase
|
|
18
|
+
# Authorization code from the WA_EMBEDDED_SIGNUP postMessage
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
attr_accessor :profile_id
|
|
22
|
+
|
|
23
|
+
# WhatsApp Business Account id, when the SDK reported one
|
|
24
|
+
attr_accessor :waba_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :phone_number_id
|
|
27
|
+
|
|
28
|
+
# Number is also live in the WhatsApp Business app
|
|
29
|
+
attr_accessor :is_coexistence
|
|
30
|
+
|
|
31
|
+
# Rejects the connect when Meta returns a different number
|
|
32
|
+
attr_accessor :expected_phone_number
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'code' => :'code',
|
|
38
|
+
:'profile_id' => :'profileId',
|
|
39
|
+
:'waba_id' => :'wabaId',
|
|
40
|
+
:'phone_number_id' => :'phoneNumberId',
|
|
41
|
+
:'is_coexistence' => :'isCoexistence',
|
|
42
|
+
:'expected_phone_number' => :'expectedPhoneNumber'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'code' => :'String',
|
|
60
|
+
:'profile_id' => :'String',
|
|
61
|
+
:'waba_id' => :'String',
|
|
62
|
+
:'phone_number_id' => :'String',
|
|
63
|
+
:'is_coexistence' => :'Boolean',
|
|
64
|
+
:'expected_phone_number' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConnectWhatsAppEmbeddedSignupRequest` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConnectWhatsAppEmbeddedSignupRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'code')
|
|
91
|
+
self.code = attributes[:'code']
|
|
92
|
+
else
|
|
93
|
+
self.code = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'profile_id')
|
|
97
|
+
self.profile_id = attributes[:'profile_id']
|
|
98
|
+
else
|
|
99
|
+
self.profile_id = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'waba_id')
|
|
103
|
+
self.waba_id = attributes[:'waba_id']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'phone_number_id')
|
|
107
|
+
self.phone_number_id = attributes[:'phone_number_id']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'is_coexistence')
|
|
111
|
+
self.is_coexistence = attributes[:'is_coexistence']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'expected_phone_number')
|
|
115
|
+
self.expected_phone_number = attributes[:'expected_phone_number']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
if @code.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @profile_id.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @code.nil?
|
|
140
|
+
return false if @profile_id.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] code Value to be assigned
|
|
146
|
+
def code=(code)
|
|
147
|
+
if code.nil?
|
|
148
|
+
fail ArgumentError, 'code cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@code = code
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] profile_id Value to be assigned
|
|
156
|
+
def profile_id=(profile_id)
|
|
157
|
+
if profile_id.nil?
|
|
158
|
+
fail ArgumentError, 'profile_id cannot be nil'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@profile_id = profile_id
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Checks equality by comparing each attribute.
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def ==(o)
|
|
167
|
+
return true if self.equal?(o)
|
|
168
|
+
self.class == o.class &&
|
|
169
|
+
code == o.code &&
|
|
170
|
+
profile_id == o.profile_id &&
|
|
171
|
+
waba_id == o.waba_id &&
|
|
172
|
+
phone_number_id == o.phone_number_id &&
|
|
173
|
+
is_coexistence == o.is_coexistence &&
|
|
174
|
+
expected_phone_number == o.expected_phone_number
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @see the `==` method
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def eql?(o)
|
|
180
|
+
self == o
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Calculates hash code according to all attributes.
|
|
184
|
+
# @return [Integer] Hash code
|
|
185
|
+
def hash
|
|
186
|
+
[code, profile_id, waba_id, phone_number_id, is_coexistence, expected_phone_number].hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Builds the object from hash
|
|
190
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
191
|
+
# @return [Object] Returns the model itself
|
|
192
|
+
def self.build_from_hash(attributes)
|
|
193
|
+
return nil unless attributes.is_a?(Hash)
|
|
194
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
195
|
+
transformed_hash = {}
|
|
196
|
+
openapi_types.each_pair do |key, type|
|
|
197
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = nil
|
|
199
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
200
|
+
# check to ensure the input is an array given that the attribute
|
|
201
|
+
# is documented as an array but the input is not
|
|
202
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
203
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
204
|
+
end
|
|
205
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
new(transformed_hash)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
217
|
+
value = self.send(attr)
|
|
218
|
+
if value.nil?
|
|
219
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
220
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
hash[param] = _to_hash(value)
|
|
224
|
+
end
|
|
225
|
+
hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
@@ -226,7 +226,7 @@ module Zernio
|
|
|
226
226
|
return false if @name.nil?
|
|
227
227
|
return false if @name.to_s.length > 255
|
|
228
228
|
return false if @goal.nil?
|
|
229
|
-
goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "job_applicants", "conversions", "app_promotion", "catalog_sales"])
|
|
229
|
+
goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "job_applicants", "conversions", "app_promotion", "catalog_sales", "page_likes"])
|
|
230
230
|
return false unless goal_validator.valid?(@goal)
|
|
231
231
|
budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
|
|
232
232
|
return false unless budget_type_validator.valid?(@budget_type)
|
|
@@ -274,7 +274,7 @@ module Zernio
|
|
|
274
274
|
# Custom attribute writer method checking allowed values (enum).
|
|
275
275
|
# @param [Object] goal Object to be assigned
|
|
276
276
|
def goal=(goal)
|
|
277
|
-
validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "job_applicants", "conversions", "app_promotion", "catalog_sales"])
|
|
277
|
+
validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "job_applicants", "conversions", "app_promotion", "catalog_sales", "page_likes"])
|
|
278
278
|
unless validator.valid?(goal)
|
|
279
279
|
fail ArgumentError, "invalid value for \"goal\", must be one of #{validator.allowable_values}."
|
|
280
280
|
end
|
|
@@ -32,7 +32,7 @@ module Zernio
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :tracking
|
|
34
34
|
|
|
35
|
-
# Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. **OpenAI Ads** - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
35
|
+
# Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. - `page_likes`: Page Likes conversion location under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). `promotedObject.pageId` is optional and auto-filled from the connected Page. The creative CTA is fixed to LIKE_PAGE targeting that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives the link and the Like button from the Page). **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. **OpenAI Ads** - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
36
36
|
attr_accessor :goal
|
|
37
37
|
|
|
38
38
|
# Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations.
|
|
@@ -1011,7 +1011,7 @@ module Zernio
|
|
|
1011
1011
|
return false if !@campaign_name.nil? && @campaign_name.to_s.length > 255
|
|
1012
1012
|
return false if !@ad_set_name.nil? && @ad_set_name.to_s.length > 255
|
|
1013
1013
|
return false if !@ad_name.nil? && @ad_name.to_s.length > 255
|
|
1014
|
-
goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "job_applicants"])
|
|
1014
|
+
goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "page_likes", "job_applicants"])
|
|
1015
1015
|
return false unless goal_validator.valid?(@goal)
|
|
1016
1016
|
buying_type_validator = EnumAttributeValidator.new('String', ["AUCTION", "RESERVED"])
|
|
1017
1017
|
return false unless buying_type_validator.valid?(@buying_type)
|
|
@@ -1138,7 +1138,7 @@ module Zernio
|
|
|
1138
1138
|
# Custom attribute writer method checking allowed values (enum).
|
|
1139
1139
|
# @param [Object] goal Object to be assigned
|
|
1140
1140
|
def goal=(goal)
|
|
1141
|
-
validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "job_applicants"])
|
|
1141
|
+
validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "page_likes", "job_applicants"])
|
|
1142
1142
|
unless validator.valid?(goal)
|
|
1143
1143
|
fail ArgumentError, "invalid value for \"goal\", must be one of #{validator.allowable_values}."
|
|
1144
1144
|
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -167,14 +167,17 @@ require 'zernio-sdk/models/connect_ads200_response_one_of'
|
|
|
167
167
|
require 'zernio-sdk/models/connect_ads200_response_one_of1'
|
|
168
168
|
require 'zernio-sdk/models/connect_bluesky_credentials200_response'
|
|
169
169
|
require 'zernio-sdk/models/connect_bluesky_credentials_request'
|
|
170
|
+
require 'zernio-sdk/models/connect_discord_channel_request'
|
|
170
171
|
require 'zernio-sdk/models/connect_open_ai_ads_credentials200_response'
|
|
171
172
|
require 'zernio-sdk/models/connect_open_ai_ads_credentials_request'
|
|
172
173
|
require 'zernio-sdk/models/connect_shopify_with_token200_response'
|
|
173
174
|
require 'zernio-sdk/models/connect_shopify_with_token200_response_account'
|
|
174
175
|
require 'zernio-sdk/models/connect_shopify_with_token_request'
|
|
176
|
+
require 'zernio-sdk/models/connect_slack_channel_request'
|
|
175
177
|
require 'zernio-sdk/models/connect_whats_app_credentials200_response'
|
|
176
178
|
require 'zernio-sdk/models/connect_whats_app_credentials200_response_account'
|
|
177
179
|
require 'zernio-sdk/models/connect_whats_app_credentials_request'
|
|
180
|
+
require 'zernio-sdk/models/connect_whats_app_embedded_signup_request'
|
|
178
181
|
require 'zernio-sdk/models/connected'
|
|
179
182
|
require 'zernio-sdk/models/connected_account'
|
|
180
183
|
require 'zernio-sdk/models/connected_app'
|