late-sdk 0.0.724 → 0.0.726
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 +5 -0
- data/docs/AdAudiencesApi.md +74 -2
- data/docs/MessagesApi.md +1 -1
- data/docs/ReplaceAdAudienceCompanies200Response.md +20 -0
- data/docs/ReplaceAdAudienceCompaniesRequest.md +18 -0
- data/docs/ReplaceAdAudienceCompaniesRequestCompaniesInner.md +24 -0
- data/docs/SendInboxMessage200ResponseData.md +4 -6
- data/docs/SendInboxMessage200ResponseDataAttachmentsInner.md +20 -0
- data/docs/UploadedOrDerivedAudience.md +1 -1
- data/lib/zernio-sdk/api/ad_audiences_api.rb +78 -4
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/models/replace_ad_audience_companies200_response.rb +157 -0
- data/lib/zernio-sdk/models/replace_ad_audience_companies_request.rb +185 -0
- data/lib/zernio-sdk/models/replace_ad_audience_companies_request_companies_inner.rb +231 -0
- data/lib/zernio-sdk/models/send_inbox_message200_response_data.rb +12 -23
- data/lib/zernio-sdk/models/send_inbox_message200_response_data_attachments_inner.rb +156 -0
- data/lib/zernio-sdk/models/uploaded_or_derived_audience.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +114 -11
- data/spec/api/ad_audiences_api_spec.rb +15 -2
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/models/replace_ad_audience_companies200_response_spec.rb +42 -0
- data/spec/models/replace_ad_audience_companies_request_companies_inner_spec.rb +54 -0
- data/spec/models/replace_ad_audience_companies_request_spec.rb +36 -0
- data/spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb +42 -0
- data/spec/models/send_inbox_message200_response_data_spec.rb +1 -7
- data/zernio-sdk-0.0.726.gem +0 -0
- metadata +18 -2
- data/zernio-sdk-0.0.724.gem +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 ReplaceAdAudienceCompaniesRequest < ApiModelBase
|
|
18
|
+
# The complete company list. Each row needs at least one of name, domain, website or linkedinPageUrl.
|
|
19
|
+
attr_accessor :companies
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'companies' => :'companies'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'companies' => :'Array<ReplaceAdAudienceCompaniesRequestCompaniesInner>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplaceAdAudienceCompaniesRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplaceAdAudienceCompaniesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'companies')
|
|
68
|
+
if (value = attributes[:'companies']).is_a?(Array)
|
|
69
|
+
self.companies = value
|
|
70
|
+
end
|
|
71
|
+
else
|
|
72
|
+
self.companies = nil
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
if @companies.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "companies", companies cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if @companies.length > 300000
|
|
86
|
+
invalid_properties.push('invalid value for "companies", number of items must be less than or equal to 300000.')
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if @companies.length < 1
|
|
90
|
+
invalid_properties.push('invalid value for "companies", number of items must be greater than or equal to 1.')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
return false if @companies.nil?
|
|
101
|
+
return false if @companies.length > 300000
|
|
102
|
+
return false if @companies.length < 1
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Custom attribute writer method with validation
|
|
107
|
+
# @param [Object] companies Value to be assigned
|
|
108
|
+
def companies=(companies)
|
|
109
|
+
if companies.nil?
|
|
110
|
+
fail ArgumentError, 'companies cannot be nil'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if companies.length > 300000
|
|
114
|
+
fail ArgumentError, 'invalid value for "companies", number of items must be less than or equal to 300000.'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if companies.length < 1
|
|
118
|
+
fail ArgumentError, 'invalid value for "companies", number of items must be greater than or equal to 1.'
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
@companies = companies
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Checks equality by comparing each attribute.
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def ==(o)
|
|
127
|
+
return true if self.equal?(o)
|
|
128
|
+
self.class == o.class &&
|
|
129
|
+
companies == o.companies
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @see the `==` method
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def eql?(o)
|
|
135
|
+
self == o
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Calculates hash code according to all attributes.
|
|
139
|
+
# @return [Integer] Hash code
|
|
140
|
+
def hash
|
|
141
|
+
[companies].hash
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Builds the object from hash
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
# @return [Object] Returns the model itself
|
|
147
|
+
def self.build_from_hash(attributes)
|
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
150
|
+
transformed_hash = {}
|
|
151
|
+
openapi_types.each_pair do |key, type|
|
|
152
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
153
|
+
transformed_hash["#{key}"] = nil
|
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
155
|
+
# check to ensure the input is an array given that the attribute
|
|
156
|
+
# is documented as an array but the input is not
|
|
157
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
158
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
159
|
+
end
|
|
160
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
new(transformed_hash)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Returns the object in the form of hash
|
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
|
169
|
+
def to_hash
|
|
170
|
+
hash = {}
|
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
172
|
+
value = self.send(attr)
|
|
173
|
+
if value.nil?
|
|
174
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
175
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
hash[param] = _to_hash(value)
|
|
179
|
+
end
|
|
180
|
+
hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 ReplaceAdAudienceCompaniesRequestCompaniesInner < ApiModelBase
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :domain
|
|
21
|
+
|
|
22
|
+
attr_accessor :website
|
|
23
|
+
|
|
24
|
+
attr_accessor :linkedin_page_url
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'name' => :'name',
|
|
30
|
+
:'domain' => :'domain',
|
|
31
|
+
:'website' => :'website',
|
|
32
|
+
:'linkedin_page_url' => :'linkedinPageUrl'
|
|
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
|
+
:'name' => :'String',
|
|
50
|
+
:'domain' => :'String',
|
|
51
|
+
:'website' => :'String',
|
|
52
|
+
:'linkedin_page_url' => :'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::ReplaceAdAudienceCompaniesRequestCompaniesInner` 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::ReplaceAdAudienceCompaniesRequestCompaniesInner`. 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?(:'name')
|
|
79
|
+
self.name = attributes[:'name']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'domain')
|
|
83
|
+
self.domain = attributes[:'domain']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'website')
|
|
87
|
+
self.website = attributes[:'website']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'linkedin_page_url')
|
|
91
|
+
self.linkedin_page_url = attributes[:'linkedin_page_url']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
101
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if !@domain.nil? && @domain.to_s.length > 100
|
|
105
|
+
invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 100.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if !@website.nil? && @website.to_s.length > 100
|
|
109
|
+
invalid_properties.push('invalid value for "website", the character length must be smaller than or equal to 100.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
invalid_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Check to see if the all the properties in the model are valid
|
|
116
|
+
# @return true if the model is valid
|
|
117
|
+
def valid?
|
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
119
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
120
|
+
return false if !@domain.nil? && @domain.to_s.length > 100
|
|
121
|
+
return false if !@website.nil? && @website.to_s.length > 100
|
|
122
|
+
true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Custom attribute writer method with validation
|
|
126
|
+
# @param [Object] name Value to be assigned
|
|
127
|
+
def name=(name)
|
|
128
|
+
if name.nil?
|
|
129
|
+
fail ArgumentError, 'name cannot be nil'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if name.to_s.length > 255
|
|
133
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@name = name
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] domain Value to be assigned
|
|
141
|
+
def domain=(domain)
|
|
142
|
+
if domain.nil?
|
|
143
|
+
fail ArgumentError, 'domain cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if domain.to_s.length > 100
|
|
147
|
+
fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 100.'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
@domain = domain
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] website Value to be assigned
|
|
155
|
+
def website=(website)
|
|
156
|
+
if website.nil?
|
|
157
|
+
fail ArgumentError, 'website cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if website.to_s.length > 100
|
|
161
|
+
fail ArgumentError, 'invalid value for "website", the character length must be smaller than or equal to 100.'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@website = website
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Checks equality by comparing each attribute.
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def ==(o)
|
|
170
|
+
return true if self.equal?(o)
|
|
171
|
+
self.class == o.class &&
|
|
172
|
+
name == o.name &&
|
|
173
|
+
domain == o.domain &&
|
|
174
|
+
website == o.website &&
|
|
175
|
+
linkedin_page_url == o.linkedin_page_url
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see the `==` method
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def eql?(o)
|
|
181
|
+
self == o
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Calculates hash code according to all attributes.
|
|
185
|
+
# @return [Integer] Hash code
|
|
186
|
+
def hash
|
|
187
|
+
[name, domain, website, linkedin_page_url].hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def self.build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
196
|
+
transformed_hash = {}
|
|
197
|
+
openapi_types.each_pair do |key, type|
|
|
198
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
199
|
+
transformed_hash["#{key}"] = nil
|
|
200
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
201
|
+
# check to ensure the input is an array given that the attribute
|
|
202
|
+
# is documented as an array but the input is not
|
|
203
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
204
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
205
|
+
end
|
|
206
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
207
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
new(transformed_hash)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
|
@@ -15,25 +15,21 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class SendInboxMessage200ResponseData < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply.
|
|
19
19
|
attr_accessor :message_id
|
|
20
20
|
|
|
21
|
-
# Twitter conversation
|
|
21
|
+
# Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record.
|
|
22
22
|
attr_accessor :conversation_id
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
26
|
-
|
|
27
|
-
# Success message (Reddit only)
|
|
28
|
-
attr_accessor :message
|
|
24
|
+
# Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).
|
|
25
|
+
attr_accessor :attachments
|
|
29
26
|
|
|
30
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
28
|
def self.attribute_map
|
|
32
29
|
{
|
|
33
30
|
:'message_id' => :'messageId',
|
|
34
31
|
:'conversation_id' => :'conversationId',
|
|
35
|
-
:'
|
|
36
|
-
:'message' => :'message'
|
|
32
|
+
:'attachments' => :'attachments'
|
|
37
33
|
}
|
|
38
34
|
end
|
|
39
35
|
|
|
@@ -52,17 +48,13 @@ module Zernio
|
|
|
52
48
|
{
|
|
53
49
|
:'message_id' => :'String',
|
|
54
50
|
:'conversation_id' => :'String',
|
|
55
|
-
:'
|
|
56
|
-
:'message' => :'String'
|
|
51
|
+
:'attachments' => :'Array<SendInboxMessage200ResponseDataAttachmentsInner>'
|
|
57
52
|
}
|
|
58
53
|
end
|
|
59
54
|
|
|
60
55
|
# List of attributes with nullable: true
|
|
61
56
|
def self.openapi_nullable
|
|
62
57
|
Set.new([
|
|
63
|
-
:'conversation_id',
|
|
64
|
-
:'sent_at',
|
|
65
|
-
:'message'
|
|
66
58
|
])
|
|
67
59
|
end
|
|
68
60
|
|
|
@@ -90,12 +82,10 @@ module Zernio
|
|
|
90
82
|
self.conversation_id = attributes[:'conversation_id']
|
|
91
83
|
end
|
|
92
84
|
|
|
93
|
-
if attributes.key?(:'
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if attributes.key?(:'message')
|
|
98
|
-
self.message = attributes[:'message']
|
|
85
|
+
if attributes.key?(:'attachments')
|
|
86
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
87
|
+
self.attachments = value
|
|
88
|
+
end
|
|
99
89
|
end
|
|
100
90
|
end
|
|
101
91
|
|
|
@@ -121,8 +111,7 @@ module Zernio
|
|
|
121
111
|
self.class == o.class &&
|
|
122
112
|
message_id == o.message_id &&
|
|
123
113
|
conversation_id == o.conversation_id &&
|
|
124
|
-
|
|
125
|
-
message == o.message
|
|
114
|
+
attachments == o.attachments
|
|
126
115
|
end
|
|
127
116
|
|
|
128
117
|
# @see the `==` method
|
|
@@ -134,7 +123,7 @@ module Zernio
|
|
|
134
123
|
# Calculates hash code according to all attributes.
|
|
135
124
|
# @return [Integer] Hash code
|
|
136
125
|
def hash
|
|
137
|
-
[message_id, conversation_id,
|
|
126
|
+
[message_id, conversation_id, attachments].hash
|
|
138
127
|
end
|
|
139
128
|
|
|
140
129
|
# Builds the object from hash
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 SendInboxMessage200ResponseDataAttachmentsInner < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :url
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'type' => :'type',
|
|
26
|
+
:'url' => :'url'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'type' => :'String',
|
|
44
|
+
:'url' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SendInboxMessage200ResponseDataAttachmentsInner` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SendInboxMessage200ResponseDataAttachmentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'type')
|
|
71
|
+
self.type = attributes[:'type']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'url')
|
|
75
|
+
self.url = attributes[:'url']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
type == o.type &&
|
|
100
|
+
url == o.url
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[type, url].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -42,7 +42,7 @@ module Zernio
|
|
|
42
42
|
# Required for engagement audiences. Campaign URNs for the ad source types, organization URNs for pages and events. LinkedIn creates one rule per source, all sharing the same trigger and lookbackDays.
|
|
43
43
|
attr_accessor :engagement_sources
|
|
44
44
|
|
|
45
|
-
# Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list.
|
|
45
|
+
# Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. Not hashed, LinkedIn matches these against its own company graph. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list. Replace the list later with POST /v1/ads/audiences/{audienceId}/companies.
|
|
46
46
|
attr_accessor :companies
|
|
47
47
|
|
|
48
48
|
# Required for website audiences
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1136,6 +1136,9 @@ require 'zernio-sdk/models/remove_bookmark200_response'
|
|
|
1136
1136
|
require 'zernio-sdk/models/remove_conversion_associations200_response'
|
|
1137
1137
|
require 'zernio-sdk/models/remove_discord_member_role200_response'
|
|
1138
1138
|
require 'zernio-sdk/models/remove_whats_app_group_participants_request'
|
|
1139
|
+
require 'zernio-sdk/models/replace_ad_audience_companies200_response'
|
|
1140
|
+
require 'zernio-sdk/models/replace_ad_audience_companies_request'
|
|
1141
|
+
require 'zernio-sdk/models/replace_ad_audience_companies_request_companies_inner'
|
|
1139
1142
|
require 'zernio-sdk/models/reply_to_google_business_review200_response'
|
|
1140
1143
|
require 'zernio-sdk/models/reply_to_google_business_review_request'
|
|
1141
1144
|
require 'zernio-sdk/models/reply_to_inbox_post200_response'
|
|
@@ -1234,6 +1237,7 @@ require 'zernio-sdk/models/send_discord_direct_message_request'
|
|
|
1234
1237
|
require 'zernio-sdk/models/send_discord_direct_message_request_attachments_inner'
|
|
1235
1238
|
require 'zernio-sdk/models/send_inbox_message200_response'
|
|
1236
1239
|
require 'zernio-sdk/models/send_inbox_message200_response_data'
|
|
1240
|
+
require 'zernio-sdk/models/send_inbox_message200_response_data_attachments_inner'
|
|
1237
1241
|
require 'zernio-sdk/models/send_inbox_message400_response'
|
|
1238
1242
|
require 'zernio-sdk/models/send_inbox_message400_response_platform_error'
|
|
1239
1243
|
require 'zernio-sdk/models/send_inbox_message_request'
|