zernio-sdk 0.0.1007 → 0.0.1008
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 +1 -0
- data/docs/CtwaAdRequestBodyWelcomeMessage.md +4 -2
- data/docs/CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.md +20 -0
- data/lib/zernio-sdk/models/ctwa_ad_request_body_welcome_message.rb +46 -13
- data/lib/zernio-sdk/models/ctwa_ad_request_body_welcome_message_quick_replies_inner.rb +228 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +19 -2
- data/spec/models/ctwa_ad_request_body_welcome_message_quick_replies_inner_spec.rb +42 -0
- data/spec/models/ctwa_ad_request_body_welcome_message_spec.rb +6 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3537f3e4645c94782e0b13f4403bedbb1fda3a9924037af30f2a002a38fa3e72
|
|
4
|
+
data.tar.gz: f33a91064151e77c05c293605a40d45439fa850561d222ff262ff8c0706b32d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f2013a0c59dc42bf7710ffe12b91f3a8c3f7537cbe897b8f7ac8ec676a4504958601a72d4bda74f8ab6a4f8032ead5dcea37bca54938e9d3cec3712bbc4d3ee
|
|
7
|
+
data.tar.gz: bdafedfaa018bad483fa7e6e8ce1cafaf02eb0ee487f6c34640f6dbdf44e6c7c5df6aa43e4b2d0ecdbb29ce340f0d5fe2acd0c9363861202a43337fcd278a909
|
data/README.md
CHANGED
|
@@ -1304,6 +1304,7 @@ Class | Method | HTTP request | Description
|
|
|
1304
1304
|
- [Zernio::CtwaAdRequestBodyRegionsInner](docs/CtwaAdRequestBodyRegionsInner.md)
|
|
1305
1305
|
- [Zernio::CtwaAdRequestBodyVideo](docs/CtwaAdRequestBodyVideo.md)
|
|
1306
1306
|
- [Zernio::CtwaAdRequestBodyWelcomeMessage](docs/CtwaAdRequestBodyWelcomeMessage.md)
|
|
1307
|
+
- [Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner](docs/CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.md)
|
|
1307
1308
|
- [Zernio::CtwaAdRequestBodyZipsInner](docs/CtwaAdRequestBodyZipsInner.md)
|
|
1308
1309
|
- [Zernio::CtwaMultiResponse](docs/CtwaMultiResponse.md)
|
|
1309
1310
|
- [Zernio::CtwaSingleResponse](docs/CtwaSingleResponse.md)
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **text** | **String** | Greeting shown when the chat opens. Replaces Meta's default (\"Hi! Can we help you?\"). | |
|
|
8
|
-
| **prefill_text** | **String** | Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product). |
|
|
8
|
+
| **prefill_text** | **String** | Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product). Exactly one of prefillText or quickReplies. | [optional] |
|
|
9
|
+
| **quick_replies** | [**Array<CtwaAdRequestBodyWelcomeMessageQuickRepliesInner>**](CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.md) | Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies. Put your own campaign or ad key in each payload: the tap arrives on the messages webhook with that payload even where Meta delivers no ad referral (Pages owned by an EU business under the Europe/Japan Messenger restrictions). | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::CtwaAdRequestBodyWelcomeMessage.new(
|
|
16
17
|
text: null,
|
|
17
|
-
prefill_text: null
|
|
18
|
+
prefill_text: null,
|
|
19
|
+
quick_replies: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **title** | **String** | Chip label the person taps. | |
|
|
8
|
+
| **payload** | **String** | Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.new(
|
|
16
|
+
title: null,
|
|
17
|
+
payload: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -19,14 +19,18 @@ module Zernio
|
|
|
19
19
|
# Greeting shown when the chat opens. Replaces Meta's default (\"Hi! Can we help you?\").
|
|
20
20
|
attr_accessor :text
|
|
21
21
|
|
|
22
|
-
# Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product).
|
|
22
|
+
# Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product). Exactly one of prefillText or quickReplies.
|
|
23
23
|
attr_accessor :prefill_text
|
|
24
24
|
|
|
25
|
+
# Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies. Put your own campaign or ad key in each payload: the tap arrives on the messages webhook with that payload even where Meta delivers no ad referral (Pages owned by an EU business under the Europe/Japan Messenger restrictions).
|
|
26
|
+
attr_accessor :quick_replies
|
|
27
|
+
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'text' => :'text',
|
|
29
|
-
:'prefill_text' => :'prefillText'
|
|
32
|
+
:'prefill_text' => :'prefillText',
|
|
33
|
+
:'quick_replies' => :'quickReplies'
|
|
30
34
|
}
|
|
31
35
|
end
|
|
32
36
|
|
|
@@ -44,7 +48,8 @@ module Zernio
|
|
|
44
48
|
def self.openapi_types
|
|
45
49
|
{
|
|
46
50
|
:'text' => :'String',
|
|
47
|
-
:'prefill_text' => :'String'
|
|
51
|
+
:'prefill_text' => :'String',
|
|
52
|
+
:'quick_replies' => :'Array<CtwaAdRequestBodyWelcomeMessageQuickRepliesInner>'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
50
55
|
|
|
@@ -78,8 +83,12 @@ module Zernio
|
|
|
78
83
|
|
|
79
84
|
if attributes.key?(:'prefill_text')
|
|
80
85
|
self.prefill_text = attributes[:'prefill_text']
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'quick_replies')
|
|
89
|
+
if (value = attributes[:'quick_replies']).is_a?(Array)
|
|
90
|
+
self.quick_replies = value
|
|
91
|
+
end
|
|
83
92
|
end
|
|
84
93
|
end
|
|
85
94
|
|
|
@@ -96,12 +105,16 @@ module Zernio
|
|
|
96
105
|
invalid_properties.push('invalid value for "text", the character length must be greater than or equal to 1.')
|
|
97
106
|
end
|
|
98
107
|
|
|
99
|
-
if
|
|
100
|
-
invalid_properties.push('invalid value for "prefill_text",
|
|
108
|
+
if !@prefill_text.nil? && @prefill_text.to_s.length < 1
|
|
109
|
+
invalid_properties.push('invalid value for "prefill_text", the character length must be greater than or equal to 1.')
|
|
101
110
|
end
|
|
102
111
|
|
|
103
|
-
if @
|
|
104
|
-
invalid_properties.push('invalid value for "
|
|
112
|
+
if !@quick_replies.nil? && @quick_replies.length > 13
|
|
113
|
+
invalid_properties.push('invalid value for "quick_replies", number of items must be less than or equal to 13.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if !@quick_replies.nil? && @quick_replies.length < 1
|
|
117
|
+
invalid_properties.push('invalid value for "quick_replies", number of items must be greater than or equal to 1.')
|
|
105
118
|
end
|
|
106
119
|
|
|
107
120
|
invalid_properties
|
|
@@ -113,8 +126,9 @@ module Zernio
|
|
|
113
126
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
127
|
return false if @text.nil?
|
|
115
128
|
return false if @text.to_s.length < 1
|
|
116
|
-
return false if
|
|
117
|
-
return false if @
|
|
129
|
+
return false if !@prefill_text.nil? && @prefill_text.to_s.length < 1
|
|
130
|
+
return false if !@quick_replies.nil? && @quick_replies.length > 13
|
|
131
|
+
return false if !@quick_replies.nil? && @quick_replies.length < 1
|
|
118
132
|
true
|
|
119
133
|
end
|
|
120
134
|
|
|
@@ -146,13 +160,32 @@ module Zernio
|
|
|
146
160
|
@prefill_text = prefill_text
|
|
147
161
|
end
|
|
148
162
|
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] quick_replies Value to be assigned
|
|
165
|
+
def quick_replies=(quick_replies)
|
|
166
|
+
if quick_replies.nil?
|
|
167
|
+
fail ArgumentError, 'quick_replies cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if quick_replies.length > 13
|
|
171
|
+
fail ArgumentError, 'invalid value for "quick_replies", number of items must be less than or equal to 13.'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if quick_replies.length < 1
|
|
175
|
+
fail ArgumentError, 'invalid value for "quick_replies", number of items must be greater than or equal to 1.'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@quick_replies = quick_replies
|
|
179
|
+
end
|
|
180
|
+
|
|
149
181
|
# Checks equality by comparing each attribute.
|
|
150
182
|
# @param [Object] Object to be compared
|
|
151
183
|
def ==(o)
|
|
152
184
|
return true if self.equal?(o)
|
|
153
185
|
self.class == o.class &&
|
|
154
186
|
text == o.text &&
|
|
155
|
-
prefill_text == o.prefill_text
|
|
187
|
+
prefill_text == o.prefill_text &&
|
|
188
|
+
quick_replies == o.quick_replies
|
|
156
189
|
end
|
|
157
190
|
|
|
158
191
|
# @see the `==` method
|
|
@@ -164,7 +197,7 @@ module Zernio
|
|
|
164
197
|
# Calculates hash code according to all attributes.
|
|
165
198
|
# @return [Integer] Hash code
|
|
166
199
|
def hash
|
|
167
|
-
[text, prefill_text].hash
|
|
200
|
+
[text, prefill_text, quick_replies].hash
|
|
168
201
|
end
|
|
169
202
|
|
|
170
203
|
# Builds the object from hash
|
|
@@ -0,0 +1,228 @@
|
|
|
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.22.0
|
|
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 CtwaAdRequestBodyWelcomeMessageQuickRepliesInner < ApiModelBase
|
|
18
|
+
# Chip label the person taps.
|
|
19
|
+
attr_accessor :title
|
|
20
|
+
|
|
21
|
+
# Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped.
|
|
22
|
+
attr_accessor :payload
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'title' => :'title',
|
|
28
|
+
:'payload' => :'payload'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'title' => :'String',
|
|
46
|
+
:'payload' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'title')
|
|
73
|
+
self.title = attributes[:'title']
|
|
74
|
+
else
|
|
75
|
+
self.title = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'payload')
|
|
79
|
+
self.payload = attributes[:'payload']
|
|
80
|
+
else
|
|
81
|
+
self.payload = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @title.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @title.to_s.length > 20
|
|
95
|
+
invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 20.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if @title.to_s.length < 1
|
|
99
|
+
invalid_properties.push('invalid value for "title", the character length must be greater than or equal to 1.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @payload.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @payload.to_s.length > 1000
|
|
107
|
+
invalid_properties.push('invalid value for "payload", the character length must be smaller than or equal to 1000.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @payload.to_s.length < 1
|
|
111
|
+
invalid_properties.push('invalid value for "payload", the character length must be greater than or equal to 1.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
invalid_properties
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Check to see if the all the properties in the model are valid
|
|
118
|
+
# @return true if the model is valid
|
|
119
|
+
def valid?
|
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
|
+
return false if @title.nil?
|
|
122
|
+
return false if @title.to_s.length > 20
|
|
123
|
+
return false if @title.to_s.length < 1
|
|
124
|
+
return false if @payload.nil?
|
|
125
|
+
return false if @payload.to_s.length > 1000
|
|
126
|
+
return false if @payload.to_s.length < 1
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] title Value to be assigned
|
|
132
|
+
def title=(title)
|
|
133
|
+
if title.nil?
|
|
134
|
+
fail ArgumentError, 'title cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if title.to_s.length > 20
|
|
138
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 20.'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if title.to_s.length < 1
|
|
142
|
+
fail ArgumentError, 'invalid value for "title", the character length must be greater than or equal to 1.'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@title = title
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] payload Value to be assigned
|
|
150
|
+
def payload=(payload)
|
|
151
|
+
if payload.nil?
|
|
152
|
+
fail ArgumentError, 'payload cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if payload.to_s.length > 1000
|
|
156
|
+
fail ArgumentError, 'invalid value for "payload", the character length must be smaller than or equal to 1000.'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if payload.to_s.length < 1
|
|
160
|
+
fail ArgumentError, 'invalid value for "payload", the character length must be greater than or equal to 1.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@payload = payload
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Checks equality by comparing each attribute.
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def ==(o)
|
|
169
|
+
return true if self.equal?(o)
|
|
170
|
+
self.class == o.class &&
|
|
171
|
+
title == o.title &&
|
|
172
|
+
payload == o.payload
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @see the `==` method
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def eql?(o)
|
|
178
|
+
self == o
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Calculates hash code according to all attributes.
|
|
182
|
+
# @return [Integer] Hash code
|
|
183
|
+
def hash
|
|
184
|
+
[title, payload].hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Builds the object from hash
|
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
|
+
# @return [Object] Returns the model itself
|
|
190
|
+
def self.build_from_hash(attributes)
|
|
191
|
+
return nil unless attributes.is_a?(Hash)
|
|
192
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
193
|
+
transformed_hash = {}
|
|
194
|
+
openapi_types.each_pair do |key, type|
|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = nil
|
|
197
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
198
|
+
# check to ensure the input is an array given that the attribute
|
|
199
|
+
# is documented as an array but the input is not
|
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
202
|
+
end
|
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
new(transformed_hash)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the object in the form of hash
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_hash
|
|
213
|
+
hash = {}
|
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
215
|
+
value = self.send(attr)
|
|
216
|
+
if value.nil?
|
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
hash[param] = _to_hash(value)
|
|
222
|
+
end
|
|
223
|
+
hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -487,6 +487,7 @@ require 'zernio-sdk/models/ctwa_ad_request_body_placements'
|
|
|
487
487
|
require 'zernio-sdk/models/ctwa_ad_request_body_regions_inner'
|
|
488
488
|
require 'zernio-sdk/models/ctwa_ad_request_body_video'
|
|
489
489
|
require 'zernio-sdk/models/ctwa_ad_request_body_welcome_message'
|
|
490
|
+
require 'zernio-sdk/models/ctwa_ad_request_body_welcome_message_quick_replies_inner'
|
|
490
491
|
require 'zernio-sdk/models/ctwa_ad_request_body_zips_inner'
|
|
491
492
|
require 'zernio-sdk/models/ctwa_multi_response'
|
|
492
493
|
require 'zernio-sdk/models/ctwa_single_response'
|
data/openapi.yaml
CHANGED
|
@@ -1305,10 +1305,27 @@ components:
|
|
|
1305
1305
|
on the single-creative shape if neither `imageUrl` nor an existing post reference is supplied.
|
|
1306
1306
|
welcomeMessage:
|
|
1307
1307
|
type: object
|
|
1308
|
-
required: [text
|
|
1308
|
+
required: [text]
|
|
1309
1309
|
properties:
|
|
1310
1310
|
text: { type: string, minLength: 1, description: "Greeting shown when the chat opens. Replaces Meta's default (\"Hi! Can we help you?\")." }
|
|
1311
|
-
prefillText: { type: string, minLength: 1, description: "Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product)." }
|
|
1311
|
+
prefillText: { type: string, minLength: 1, description: "Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product). Exactly one of prefillText or quickReplies." }
|
|
1312
|
+
quickReplies:
|
|
1313
|
+
type: array
|
|
1314
|
+
minItems: 1
|
|
1315
|
+
maxItems: 13
|
|
1316
|
+
items:
|
|
1317
|
+
type: object
|
|
1318
|
+
required: [title, payload]
|
|
1319
|
+
properties:
|
|
1320
|
+
title: { type: string, minLength: 1, maxLength: 20, description: 'Chip label the person taps.' }
|
|
1321
|
+
payload: { type: string, minLength: 1, maxLength: 1000, description: 'Opaque string you choose; delivered on the message.received webhook as interactiveMetadata.quickReplyPayload when the chip is tapped.' }
|
|
1322
|
+
description: |
|
|
1323
|
+
Tappable chips under the greeting instead of a prefilled
|
|
1324
|
+
message. Exactly one of prefillText or quickReplies. Put
|
|
1325
|
+
your own campaign or ad key in each payload: the tap arrives
|
|
1326
|
+
on the messages webhook with that payload even where Meta
|
|
1327
|
+
delivers no ad referral (Pages owned by an EU business under
|
|
1328
|
+
the Europe/Japan Messenger restrictions).
|
|
1312
1329
|
description: |
|
|
1313
1330
|
Custom chat welcome message (Meta's `page_welcome_message`,
|
|
1314
1331
|
"Mensaje de bienvenida" / "Mensaje predefinido" in Ads Manager).
|
|
@@ -0,0 +1,42 @@
|
|
|
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.22.0
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner do
|
|
21
|
+
#let(:instance) { Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CtwaAdRequestBodyWelcomeMessageQuickRepliesInner' do
|
|
24
|
+
it 'should create an instance of CtwaAdRequestBodyWelcomeMessageQuickRepliesInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "title"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "payload"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -39,4 +39,10 @@ describe Zernio::CtwaAdRequestBodyWelcomeMessage do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "quick_replies"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.1008
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -559,6 +559,7 @@ files:
|
|
|
559
559
|
- docs/CtwaAdRequestBodyRegionsInner.md
|
|
560
560
|
- docs/CtwaAdRequestBodyVideo.md
|
|
561
561
|
- docs/CtwaAdRequestBodyWelcomeMessage.md
|
|
562
|
+
- docs/CtwaAdRequestBodyWelcomeMessageQuickRepliesInner.md
|
|
562
563
|
- docs/CtwaAdRequestBodyZipsInner.md
|
|
563
564
|
- docs/CtwaMultiResponse.md
|
|
564
565
|
- docs/CtwaSingleResponse.md
|
|
@@ -2818,6 +2819,7 @@ files:
|
|
|
2818
2819
|
- lib/zernio-sdk/models/ctwa_ad_request_body_regions_inner.rb
|
|
2819
2820
|
- lib/zernio-sdk/models/ctwa_ad_request_body_video.rb
|
|
2820
2821
|
- lib/zernio-sdk/models/ctwa_ad_request_body_welcome_message.rb
|
|
2822
|
+
- lib/zernio-sdk/models/ctwa_ad_request_body_welcome_message_quick_replies_inner.rb
|
|
2821
2823
|
- lib/zernio-sdk/models/ctwa_ad_request_body_zips_inner.rb
|
|
2822
2824
|
- lib/zernio-sdk/models/ctwa_multi_response.rb
|
|
2823
2825
|
- lib/zernio-sdk/models/ctwa_single_response.rb
|
|
@@ -5022,6 +5024,7 @@ files:
|
|
|
5022
5024
|
- spec/models/ctwa_ad_request_body_regions_inner_spec.rb
|
|
5023
5025
|
- spec/models/ctwa_ad_request_body_spec.rb
|
|
5024
5026
|
- spec/models/ctwa_ad_request_body_video_spec.rb
|
|
5027
|
+
- spec/models/ctwa_ad_request_body_welcome_message_quick_replies_inner_spec.rb
|
|
5025
5028
|
- spec/models/ctwa_ad_request_body_welcome_message_spec.rb
|
|
5026
5029
|
- spec/models/ctwa_ad_request_body_zips_inner_spec.rb
|
|
5027
5030
|
- spec/models/ctwa_multi_response_spec.rb
|
|
@@ -7219,6 +7222,7 @@ test_files:
|
|
|
7219
7222
|
- spec/models/get_whats_app_flow_json200_response_assets_inner_spec.rb
|
|
7220
7223
|
- spec/models/campaign_bidding_spec.rb
|
|
7221
7224
|
- spec/models/create_conversion_action_request_spec.rb
|
|
7225
|
+
- spec/models/ctwa_ad_request_body_welcome_message_quick_replies_inner_spec.rb
|
|
7222
7226
|
- spec/models/list_whats_app_number_countries200_response_countries_inner_spec.rb
|
|
7223
7227
|
- spec/models/attach_campaign_assets_request_spec.rb
|
|
7224
7228
|
- spec/models/whats_app_body_component_example_spec.rb
|