late-sdk 0.0.885 → 0.0.887
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/AdCampaignsApi.md +1 -1
- data/docs/CreateCommentAutomationRequest.md +1 -1
- data/docs/RegisterWhatsAppNumberRequest.md +1 -1
- data/docs/RequestWhatsAppVerificationCode200Response.md +26 -0
- data/docs/RequestWhatsAppVerificationCodeRequest.md +20 -0
- data/docs/SendInboxMessage400Response.md +5 -1
- data/docs/VerifyWhatsAppNumber200Response.md +22 -0
- data/docs/VerifyWhatsAppNumberRequest.md +18 -0
- data/docs/WhatsAppApi.md +146 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/api/whats_app_api.rb +144 -0
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +1 -1
- data/lib/zernio-sdk/models/register_whats_app_number_request.rb +1 -1
- data/lib/zernio-sdk/models/request_whats_app_verification_code200_response.rb +183 -0
- data/lib/zernio-sdk/models/request_whats_app_verification_code_request.rb +195 -0
- data/lib/zernio-sdk/models/send_inbox_message400_response.rb +36 -4
- data/lib/zernio-sdk/models/update_ad_request_targeting.rb +1 -1
- data/lib/zernio-sdk/models/verify_whats_app_number200_response.rb +165 -0
- data/lib/zernio-sdk/models/verify_whats_app_number_request.rb +165 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +144 -12
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +26 -0
- data/spec/models/request_whats_app_verification_code200_response_spec.rb +60 -0
- data/spec/models/request_whats_app_verification_code_request_spec.rb +46 -0
- data/spec/models/send_inbox_message400_response_spec.rb +17 -1
- data/spec/models/verify_whats_app_number200_response_spec.rb +48 -0
- data/spec/models/verify_whats_app_number_request_spec.rb +36 -0
- data/zernio-sdk-0.0.887.gem +0 -0
- metadata +18 -2
- data/zernio-sdk-0.0.885.gem +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
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 RequestWhatsAppVerificationCode200Response < ApiModelBase
|
|
18
|
+
attr_accessor :requested
|
|
19
|
+
|
|
20
|
+
attr_accessor :already_active
|
|
21
|
+
|
|
22
|
+
attr_accessor :method
|
|
23
|
+
|
|
24
|
+
attr_accessor :account_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :phone_number_id
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'requested' => :'requested',
|
|
32
|
+
:'already_active' => :'alreadyActive',
|
|
33
|
+
:'method' => :'method',
|
|
34
|
+
:'account_id' => :'accountId',
|
|
35
|
+
:'phone_number_id' => :'phoneNumberId'
|
|
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
|
+
:'requested' => :'Boolean',
|
|
53
|
+
:'already_active' => :'Boolean',
|
|
54
|
+
:'method' => :'String',
|
|
55
|
+
:'account_id' => :'String',
|
|
56
|
+
:'phone_number_id' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::RequestWhatsAppVerificationCode200Response` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::RequestWhatsAppVerificationCode200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'requested')
|
|
83
|
+
self.requested = attributes[:'requested']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'already_active')
|
|
87
|
+
self.already_active = attributes[:'already_active']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'method')
|
|
91
|
+
self.method = attributes[:'method']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'account_id')
|
|
95
|
+
self.account_id = attributes[:'account_id']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'phone_number_id')
|
|
99
|
+
self.phone_number_id = attributes[:'phone_number_id']
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Checks equality by comparing each attribute.
|
|
119
|
+
# @param [Object] Object to be compared
|
|
120
|
+
def ==(o)
|
|
121
|
+
return true if self.equal?(o)
|
|
122
|
+
self.class == o.class &&
|
|
123
|
+
requested == o.requested &&
|
|
124
|
+
already_active == o.already_active &&
|
|
125
|
+
method == o.method &&
|
|
126
|
+
account_id == o.account_id &&
|
|
127
|
+
phone_number_id == o.phone_number_id
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @see the `==` method
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def eql?(o)
|
|
133
|
+
self == o
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Calculates hash code according to all attributes.
|
|
137
|
+
# @return [Integer] Hash code
|
|
138
|
+
def hash
|
|
139
|
+
[requested, already_active, method, account_id, phone_number_id].hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Builds the object from hash
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
# @return [Object] Returns the model itself
|
|
145
|
+
def self.build_from_hash(attributes)
|
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
148
|
+
transformed_hash = {}
|
|
149
|
+
openapi_types.each_pair do |key, type|
|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = nil
|
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
153
|
+
# check to ensure the input is an array given that the attribute
|
|
154
|
+
# is documented as an array but the input is not
|
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
new(transformed_hash)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Returns the object in the form of hash
|
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
|
167
|
+
def to_hash
|
|
168
|
+
hash = {}
|
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
170
|
+
value = self.send(attr)
|
|
171
|
+
if value.nil?
|
|
172
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
173
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
hash[param] = _to_hash(value)
|
|
177
|
+
end
|
|
178
|
+
hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
end
|
|
@@ -0,0 +1,195 @@
|
|
|
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 RequestWhatsAppVerificationCodeRequest < ApiModelBase
|
|
18
|
+
attr_accessor :method
|
|
19
|
+
|
|
20
|
+
# Meta locale code for the verification message, e.g. en_US.
|
|
21
|
+
attr_accessor :language
|
|
22
|
+
|
|
23
|
+
class EnumAttributeValidator
|
|
24
|
+
attr_reader :datatype
|
|
25
|
+
attr_reader :allowable_values
|
|
26
|
+
|
|
27
|
+
def initialize(datatype, allowable_values)
|
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
|
29
|
+
case datatype.to_s
|
|
30
|
+
when /Integer/i
|
|
31
|
+
value.to_i
|
|
32
|
+
when /Float/i
|
|
33
|
+
value.to_f
|
|
34
|
+
else
|
|
35
|
+
value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def valid?(value)
|
|
41
|
+
!value || allowable_values.include?(value)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'method' => :'method',
|
|
49
|
+
:'language' => :'language'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'method' => :'String',
|
|
67
|
+
:'language' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::RequestWhatsAppVerificationCodeRequest` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::RequestWhatsAppVerificationCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'method')
|
|
94
|
+
self.method = attributes[:'method']
|
|
95
|
+
else
|
|
96
|
+
self.method = 'SMS'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'language')
|
|
100
|
+
self.language = attributes[:'language']
|
|
101
|
+
else
|
|
102
|
+
self.language = 'en_US'
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
invalid_properties
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Check to see if the all the properties in the model are valid
|
|
115
|
+
# @return true if the model is valid
|
|
116
|
+
def valid?
|
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
118
|
+
method_validator = EnumAttributeValidator.new('String', ["SMS", "VOICE"])
|
|
119
|
+
return false unless method_validator.valid?(@method)
|
|
120
|
+
true
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
124
|
+
# @param [Object] method Object to be assigned
|
|
125
|
+
def method=(method)
|
|
126
|
+
validator = EnumAttributeValidator.new('String', ["SMS", "VOICE"])
|
|
127
|
+
unless validator.valid?(method)
|
|
128
|
+
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
129
|
+
end
|
|
130
|
+
@method = method
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Checks equality by comparing each attribute.
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def ==(o)
|
|
136
|
+
return true if self.equal?(o)
|
|
137
|
+
self.class == o.class &&
|
|
138
|
+
method == o.method &&
|
|
139
|
+
language == o.language
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @see the `==` method
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def eql?(o)
|
|
145
|
+
self == o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Calculates hash code according to all attributes.
|
|
149
|
+
# @return [Integer] Hash code
|
|
150
|
+
def hash
|
|
151
|
+
[method, language].hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Builds the object from hash
|
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
156
|
+
# @return [Object] Returns the model itself
|
|
157
|
+
def self.build_from_hash(attributes)
|
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the object in the form of hash
|
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
|
179
|
+
def to_hash
|
|
180
|
+
hash = {}
|
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
182
|
+
value = self.send(attr)
|
|
183
|
+
if value.nil?
|
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
hash[param] = _to_hash(value)
|
|
189
|
+
end
|
|
190
|
+
hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
end
|
|
@@ -17,9 +17,15 @@ module Zernio
|
|
|
17
17
|
class SendInboxMessage400Response < ApiModelBase
|
|
18
18
|
attr_accessor :error
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# Present on Meta pass-through rejections: platform_error when Meta rejected the send (see platform/platformError below), invalid_request_error for validation failures.
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
# Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to; DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED mean the WhatsApp Business Account needs Meta to grant or restore Direct Send access; DIRECT_SEND_LIMITED is temporary, Meta lifts it on its own; platform_api_error means Meta itself rejected the send (see platformError).
|
|
21
24
|
attr_accessor :code
|
|
22
25
|
|
|
26
|
+
# Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook).
|
|
27
|
+
attr_accessor :platform
|
|
28
|
+
|
|
23
29
|
attr_accessor :platform_error
|
|
24
30
|
|
|
25
31
|
class EnumAttributeValidator
|
|
@@ -48,7 +54,9 @@ module Zernio
|
|
|
48
54
|
def self.attribute_map
|
|
49
55
|
{
|
|
50
56
|
:'error' => :'error',
|
|
57
|
+
:'type' => :'type',
|
|
51
58
|
:'code' => :'code',
|
|
59
|
+
:'platform' => :'platform',
|
|
52
60
|
:'platform_error' => :'platformError'
|
|
53
61
|
}
|
|
54
62
|
end
|
|
@@ -67,7 +75,9 @@ module Zernio
|
|
|
67
75
|
def self.openapi_types
|
|
68
76
|
{
|
|
69
77
|
:'error' => :'String',
|
|
78
|
+
:'type' => :'String',
|
|
70
79
|
:'code' => :'String',
|
|
80
|
+
:'platform' => :'String',
|
|
71
81
|
:'platform_error' => :'SendInboxMessage400ResponsePlatformError'
|
|
72
82
|
}
|
|
73
83
|
end
|
|
@@ -98,10 +108,18 @@ module Zernio
|
|
|
98
108
|
self.error = attributes[:'error']
|
|
99
109
|
end
|
|
100
110
|
|
|
111
|
+
if attributes.key?(:'type')
|
|
112
|
+
self.type = attributes[:'type']
|
|
113
|
+
end
|
|
114
|
+
|
|
101
115
|
if attributes.key?(:'code')
|
|
102
116
|
self.code = attributes[:'code']
|
|
103
117
|
end
|
|
104
118
|
|
|
119
|
+
if attributes.key?(:'platform')
|
|
120
|
+
self.platform = attributes[:'platform']
|
|
121
|
+
end
|
|
122
|
+
|
|
105
123
|
if attributes.key?(:'platform_error')
|
|
106
124
|
self.platform_error = attributes[:'platform_error']
|
|
107
125
|
end
|
|
@@ -119,15 +137,27 @@ module Zernio
|
|
|
119
137
|
# @return true if the model is valid
|
|
120
138
|
def valid?
|
|
121
139
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
-
|
|
140
|
+
type_validator = EnumAttributeValidator.new('String', ["platform_error", "invalid_request_error"])
|
|
141
|
+
return false unless type_validator.valid?(@type)
|
|
142
|
+
code_validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED", "platform_api_error"])
|
|
123
143
|
return false unless code_validator.valid?(@code)
|
|
124
144
|
true
|
|
125
145
|
end
|
|
126
146
|
|
|
147
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
148
|
+
# @param [Object] type Object to be assigned
|
|
149
|
+
def type=(type)
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["platform_error", "invalid_request_error"])
|
|
151
|
+
unless validator.valid?(type)
|
|
152
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
153
|
+
end
|
|
154
|
+
@type = type
|
|
155
|
+
end
|
|
156
|
+
|
|
127
157
|
# Custom attribute writer method checking allowed values (enum).
|
|
128
158
|
# @param [Object] code Object to be assigned
|
|
129
159
|
def code=(code)
|
|
130
|
-
validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED"])
|
|
160
|
+
validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED", "platform_api_error"])
|
|
131
161
|
unless validator.valid?(code)
|
|
132
162
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
133
163
|
end
|
|
@@ -140,7 +170,9 @@ module Zernio
|
|
|
140
170
|
return true if self.equal?(o)
|
|
141
171
|
self.class == o.class &&
|
|
142
172
|
error == o.error &&
|
|
173
|
+
type == o.type &&
|
|
143
174
|
code == o.code &&
|
|
175
|
+
platform == o.platform &&
|
|
144
176
|
platform_error == o.platform_error
|
|
145
177
|
end
|
|
146
178
|
|
|
@@ -153,7 +185,7 @@ module Zernio
|
|
|
153
185
|
# Calculates hash code according to all attributes.
|
|
154
186
|
# @return [Integer] Hash code
|
|
155
187
|
def hash
|
|
156
|
-
[error, code, platform_error].hash
|
|
188
|
+
[error, type, code, platform, platform_error].hash
|
|
157
189
|
end
|
|
158
190
|
|
|
159
191
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Meta + TikTok (demographics/interests), Google (keyword and device bid adjustment edits only), and LinkedIn (
|
|
17
|
+
# Meta + TikTok (demographics/interests), Google (keyword and device bid adjustment edits only), and LinkedIn (countries or regions required). Pinterest / X return 501.
|
|
18
18
|
class UpdateAdRequestTargeting < ApiModelBase
|
|
19
19
|
# Google only. The FULL desired set of positive keywords for the entire ad group. Omit to leave positives unchanged; [] removes all positives. Negatives are independent. Entries are strings (BROAD) or { text, matchType } with matchType exact | phrase | broad; an omitted matchType also defaults to BROAD. Matching case-insensitive text AND match type retains the existing criterion ID, status, bid overrides, labels and history without a mutation. A changed text or match type uses remove/create, without transferring the old criterion's attributes or history. See Google keyword replacement above for an EXACT-to-BROAD example. Mirrored to GET /v1/ads/keywords immediately.
|
|
20
20
|
attr_accessor :keywords
|
|
@@ -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 VerifyWhatsAppNumber200Response < ApiModelBase
|
|
18
|
+
attr_accessor :verified
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :phone_number_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'verified' => :'verified',
|
|
28
|
+
:'account_id' => :'accountId',
|
|
29
|
+
:'phone_number_id' => :'phoneNumberId'
|
|
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
|
+
:'verified' => :'Boolean',
|
|
47
|
+
:'account_id' => :'String',
|
|
48
|
+
:'phone_number_id' => :'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::VerifyWhatsAppNumber200Response` 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::VerifyWhatsAppNumber200Response`. 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?(:'verified')
|
|
75
|
+
self.verified = attributes[:'verified']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'account_id')
|
|
79
|
+
self.account_id = attributes[:'account_id']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'phone_number_id')
|
|
83
|
+
self.phone_number_id = attributes[:'phone_number_id']
|
|
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
|
+
verified == o.verified &&
|
|
108
|
+
account_id == o.account_id &&
|
|
109
|
+
phone_number_id == o.phone_number_id
|
|
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
|
+
[verified, account_id, phone_number_id].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
|