late-sdk 0.0.736 → 0.0.738
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/CreateCallAdRequest.md +5 -1
- data/docs/CreateMessagingAdRequest.md +5 -1
- data/docs/CtwaAdRequestBody.md +5 -1
- data/docs/CtwaAdRequestBodyCreativesInnerVideo.md +4 -2
- data/docs/CtwaAdRequestBodyVideo.md +4 -2
- data/docs/ListBroadcastRecipients200Response.md +3 -1
- data/docs/ListBroadcastRecipients200ResponseSummary.md +28 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +46 -2
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +46 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +46 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner_video.rb +13 -36
- data/lib/zernio-sdk/models/ctwa_ad_request_body_video.rb +13 -36
- data/lib/zernio-sdk/models/list_broadcast_recipients200_response.rb +13 -4
- data/lib/zernio-sdk/models/list_broadcast_recipients200_response_summary.rb +193 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +42 -11
- data/spec/models/create_call_ad_request_spec.rb +20 -0
- data/spec/models/create_messaging_ad_request_spec.rb +20 -0
- data/spec/models/ctwa_ad_request_body_creatives_inner_video_spec.rb +6 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +20 -0
- data/spec/models/ctwa_ad_request_body_video_spec.rb +6 -0
- data/spec/models/list_broadcast_recipients200_response_spec.rb +6 -0
- data/spec/models/list_broadcast_recipients200_response_summary_spec.rb +66 -0
- data/zernio-sdk-0.0.738.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.736.gem +0 -0
|
@@ -16,15 +16,20 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Video creative. Mutually exclusive with this entry's `imageUrl`. Required if `imageUrl` is not supplied.
|
|
18
18
|
class CtwaAdRequestBodyCreativesInnerVideo < ApiModelBase
|
|
19
|
+
# Public URL of the video to upload. Provide either `url` or `id`.
|
|
19
20
|
attr_accessor :url
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
# Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable).
|
|
22
26
|
attr_accessor :thumbnail_url
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
29
|
def self.attribute_map
|
|
26
30
|
{
|
|
27
31
|
:'url' => :'url',
|
|
32
|
+
:'id' => :'id',
|
|
28
33
|
:'thumbnail_url' => :'thumbnailUrl'
|
|
29
34
|
}
|
|
30
35
|
end
|
|
@@ -43,6 +48,7 @@ module Zernio
|
|
|
43
48
|
def self.openapi_types
|
|
44
49
|
{
|
|
45
50
|
:'url' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
46
52
|
:'thumbnail_url' => :'String'
|
|
47
53
|
}
|
|
48
54
|
end
|
|
@@ -71,14 +77,14 @@ module Zernio
|
|
|
71
77
|
|
|
72
78
|
if attributes.key?(:'url')
|
|
73
79
|
self.url = attributes[:'url']
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
76
84
|
end
|
|
77
85
|
|
|
78
86
|
if attributes.key?(:'thumbnail_url')
|
|
79
87
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
80
|
-
else
|
|
81
|
-
self.thumbnail_url = nil
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
|
|
@@ -87,14 +93,6 @@ module Zernio
|
|
|
87
93
|
def list_invalid_properties
|
|
88
94
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
95
|
invalid_properties = Array.new
|
|
90
|
-
if @url.nil?
|
|
91
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if @thumbnail_url.nil?
|
|
95
|
-
invalid_properties.push('invalid value for "thumbnail_url", thumbnail_url cannot be nil.')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
96
|
invalid_properties
|
|
99
97
|
end
|
|
100
98
|
|
|
@@ -102,37 +100,16 @@ module Zernio
|
|
|
102
100
|
# @return true if the model is valid
|
|
103
101
|
def valid?
|
|
104
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @url.nil?
|
|
106
|
-
return false if @thumbnail_url.nil?
|
|
107
103
|
true
|
|
108
104
|
end
|
|
109
105
|
|
|
110
|
-
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object] url Value to be assigned
|
|
112
|
-
def url=(url)
|
|
113
|
-
if url.nil?
|
|
114
|
-
fail ArgumentError, 'url cannot be nil'
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@url = url
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Custom attribute writer method with validation
|
|
121
|
-
# @param [Object] thumbnail_url Value to be assigned
|
|
122
|
-
def thumbnail_url=(thumbnail_url)
|
|
123
|
-
if thumbnail_url.nil?
|
|
124
|
-
fail ArgumentError, 'thumbnail_url cannot be nil'
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
@thumbnail_url = thumbnail_url
|
|
128
|
-
end
|
|
129
|
-
|
|
130
106
|
# Checks equality by comparing each attribute.
|
|
131
107
|
# @param [Object] Object to be compared
|
|
132
108
|
def ==(o)
|
|
133
109
|
return true if self.equal?(o)
|
|
134
110
|
self.class == o.class &&
|
|
135
111
|
url == o.url &&
|
|
112
|
+
id == o.id &&
|
|
136
113
|
thumbnail_url == o.thumbnail_url
|
|
137
114
|
end
|
|
138
115
|
|
|
@@ -145,7 +122,7 @@ module Zernio
|
|
|
145
122
|
# Calculates hash code according to all attributes.
|
|
146
123
|
# @return [Integer] Hash code
|
|
147
124
|
def hash
|
|
148
|
-
[url, thumbnail_url].hash
|
|
125
|
+
[url, id, thumbnail_url].hash
|
|
149
126
|
end
|
|
150
127
|
|
|
151
128
|
# Builds the object from hash
|
|
@@ -16,15 +16,20 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Video creative for single-creative shape. Mutually exclusive with `imageUrl` and with `creatives[]`. Required on the single-creative shape if `imageUrl` is not supplied.
|
|
18
18
|
class CtwaAdRequestBodyVideo < ApiModelBase
|
|
19
|
+
# Public URL of the video to upload. Provide either `url` or `id`.
|
|
19
20
|
attr_accessor :url
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
# Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable) — retry, or supply this field to control the poster frame exactly.
|
|
22
26
|
attr_accessor :thumbnail_url
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
29
|
def self.attribute_map
|
|
26
30
|
{
|
|
27
31
|
:'url' => :'url',
|
|
32
|
+
:'id' => :'id',
|
|
28
33
|
:'thumbnail_url' => :'thumbnailUrl'
|
|
29
34
|
}
|
|
30
35
|
end
|
|
@@ -43,6 +48,7 @@ module Zernio
|
|
|
43
48
|
def self.openapi_types
|
|
44
49
|
{
|
|
45
50
|
:'url' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
46
52
|
:'thumbnail_url' => :'String'
|
|
47
53
|
}
|
|
48
54
|
end
|
|
@@ -71,14 +77,14 @@ module Zernio
|
|
|
71
77
|
|
|
72
78
|
if attributes.key?(:'url')
|
|
73
79
|
self.url = attributes[:'url']
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
76
84
|
end
|
|
77
85
|
|
|
78
86
|
if attributes.key?(:'thumbnail_url')
|
|
79
87
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
80
|
-
else
|
|
81
|
-
self.thumbnail_url = nil
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
|
|
@@ -87,14 +93,6 @@ module Zernio
|
|
|
87
93
|
def list_invalid_properties
|
|
88
94
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
95
|
invalid_properties = Array.new
|
|
90
|
-
if @url.nil?
|
|
91
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if @thumbnail_url.nil?
|
|
95
|
-
invalid_properties.push('invalid value for "thumbnail_url", thumbnail_url cannot be nil.')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
96
|
invalid_properties
|
|
99
97
|
end
|
|
100
98
|
|
|
@@ -102,37 +100,16 @@ module Zernio
|
|
|
102
100
|
# @return true if the model is valid
|
|
103
101
|
def valid?
|
|
104
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @url.nil?
|
|
106
|
-
return false if @thumbnail_url.nil?
|
|
107
103
|
true
|
|
108
104
|
end
|
|
109
105
|
|
|
110
|
-
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object] url Value to be assigned
|
|
112
|
-
def url=(url)
|
|
113
|
-
if url.nil?
|
|
114
|
-
fail ArgumentError, 'url cannot be nil'
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@url = url
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Custom attribute writer method with validation
|
|
121
|
-
# @param [Object] thumbnail_url Value to be assigned
|
|
122
|
-
def thumbnail_url=(thumbnail_url)
|
|
123
|
-
if thumbnail_url.nil?
|
|
124
|
-
fail ArgumentError, 'thumbnail_url cannot be nil'
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
@thumbnail_url = thumbnail_url
|
|
128
|
-
end
|
|
129
|
-
|
|
130
106
|
# Checks equality by comparing each attribute.
|
|
131
107
|
# @param [Object] Object to be compared
|
|
132
108
|
def ==(o)
|
|
133
109
|
return true if self.equal?(o)
|
|
134
110
|
self.class == o.class &&
|
|
135
111
|
url == o.url &&
|
|
112
|
+
id == o.id &&
|
|
136
113
|
thumbnail_url == o.thumbnail_url
|
|
137
114
|
end
|
|
138
115
|
|
|
@@ -145,7 +122,7 @@ module Zernio
|
|
|
145
122
|
# Calculates hash code according to all attributes.
|
|
146
123
|
# @return [Integer] Hash code
|
|
147
124
|
def hash
|
|
148
|
-
[url, thumbnail_url].hash
|
|
125
|
+
[url, id, thumbnail_url].hash
|
|
149
126
|
end
|
|
150
127
|
|
|
151
128
|
# Builds the object from hash
|
|
@@ -21,12 +21,15 @@ module Zernio
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :pagination
|
|
23
23
|
|
|
24
|
+
attr_accessor :summary
|
|
25
|
+
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
27
|
def self.attribute_map
|
|
26
28
|
{
|
|
27
29
|
:'success' => :'success',
|
|
28
30
|
:'recipients' => :'recipients',
|
|
29
|
-
:'pagination' => :'pagination'
|
|
31
|
+
:'pagination' => :'pagination',
|
|
32
|
+
:'summary' => :'summary'
|
|
30
33
|
}
|
|
31
34
|
end
|
|
32
35
|
|
|
@@ -45,7 +48,8 @@ module Zernio
|
|
|
45
48
|
{
|
|
46
49
|
:'success' => :'Boolean',
|
|
47
50
|
:'recipients' => :'Array<ListBroadcastRecipients200ResponseRecipientsInner>',
|
|
48
|
-
:'pagination' => :'ListContacts200ResponsePagination'
|
|
51
|
+
:'pagination' => :'ListContacts200ResponsePagination',
|
|
52
|
+
:'summary' => :'ListBroadcastRecipients200ResponseSummary'
|
|
49
53
|
}
|
|
50
54
|
end
|
|
51
55
|
|
|
@@ -84,6 +88,10 @@ module Zernio
|
|
|
84
88
|
if attributes.key?(:'pagination')
|
|
85
89
|
self.pagination = attributes[:'pagination']
|
|
86
90
|
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'summary')
|
|
93
|
+
self.summary = attributes[:'summary']
|
|
94
|
+
end
|
|
87
95
|
end
|
|
88
96
|
|
|
89
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -108,7 +116,8 @@ module Zernio
|
|
|
108
116
|
self.class == o.class &&
|
|
109
117
|
success == o.success &&
|
|
110
118
|
recipients == o.recipients &&
|
|
111
|
-
pagination == o.pagination
|
|
119
|
+
pagination == o.pagination &&
|
|
120
|
+
summary == o.summary
|
|
112
121
|
end
|
|
113
122
|
|
|
114
123
|
# @see the `==` method
|
|
@@ -120,7 +129,7 @@ module Zernio
|
|
|
120
129
|
# Calculates hash code according to all attributes.
|
|
121
130
|
# @return [Integer] Hash code
|
|
122
131
|
def hash
|
|
123
|
-
[success, recipients, pagination].hash
|
|
132
|
+
[success, recipients, pagination, summary].hash
|
|
124
133
|
end
|
|
125
134
|
|
|
126
135
|
# Builds the object from hash
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
# Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
|
|
18
|
+
class ListBroadcastRecipients200ResponseSummary < ApiModelBase
|
|
19
|
+
attr_accessor :total
|
|
20
|
+
|
|
21
|
+
attr_accessor :pending
|
|
22
|
+
|
|
23
|
+
attr_accessor :sent
|
|
24
|
+
|
|
25
|
+
attr_accessor :delivered
|
|
26
|
+
|
|
27
|
+
attr_accessor :read
|
|
28
|
+
|
|
29
|
+
attr_accessor :failed
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'total' => :'total',
|
|
35
|
+
:'pending' => :'pending',
|
|
36
|
+
:'sent' => :'sent',
|
|
37
|
+
:'delivered' => :'delivered',
|
|
38
|
+
:'read' => :'read',
|
|
39
|
+
:'failed' => :'failed'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
acceptable_attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'total' => :'Integer',
|
|
57
|
+
:'pending' => :'Integer',
|
|
58
|
+
:'sent' => :'Integer',
|
|
59
|
+
:'delivered' => :'Integer',
|
|
60
|
+
:'read' => :'Integer',
|
|
61
|
+
:'failed' => :'Integer'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListBroadcastRecipients200ResponseSummary` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListBroadcastRecipients200ResponseSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'total')
|
|
88
|
+
self.total = attributes[:'total']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'pending')
|
|
92
|
+
self.pending = attributes[:'pending']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'sent')
|
|
96
|
+
self.sent = attributes[:'sent']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'delivered')
|
|
100
|
+
self.delivered = attributes[:'delivered']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'read')
|
|
104
|
+
self.read = attributes[:'read']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'failed')
|
|
108
|
+
self.failed = attributes[:'failed']
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
invalid_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check to see if the all the properties in the model are valid
|
|
121
|
+
# @return true if the model is valid
|
|
122
|
+
def valid?
|
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
124
|
+
true
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Checks equality by comparing each attribute.
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def ==(o)
|
|
130
|
+
return true if self.equal?(o)
|
|
131
|
+
self.class == o.class &&
|
|
132
|
+
total == o.total &&
|
|
133
|
+
pending == o.pending &&
|
|
134
|
+
sent == o.sent &&
|
|
135
|
+
delivered == o.delivered &&
|
|
136
|
+
read == o.read &&
|
|
137
|
+
failed == o.failed
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[total, pending, sent, delivered, read, failed].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
if value.nil?
|
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash[param] = _to_hash(value)
|
|
187
|
+
end
|
|
188
|
+
hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -895,6 +895,7 @@ require 'zernio-sdk/models/list_blog_articles200_response'
|
|
|
895
895
|
require 'zernio-sdk/models/list_blogs200_response'
|
|
896
896
|
require 'zernio-sdk/models/list_broadcast_recipients200_response'
|
|
897
897
|
require 'zernio-sdk/models/list_broadcast_recipients200_response_recipients_inner'
|
|
898
|
+
require 'zernio-sdk/models/list_broadcast_recipients200_response_summary'
|
|
898
899
|
require 'zernio-sdk/models/list_broadcasts200_response'
|
|
899
900
|
require 'zernio-sdk/models/list_broadcasts200_response_broadcasts_inner'
|
|
900
901
|
require 'zernio-sdk/models/list_calls200_response'
|
data/openapi.yaml
CHANGED
|
@@ -825,15 +825,18 @@ components:
|
|
|
825
825
|
single-creative shape if `video` is not supplied.
|
|
826
826
|
video:
|
|
827
827
|
type: object
|
|
828
|
-
required: [url, thumbnailUrl]
|
|
829
828
|
properties:
|
|
830
|
-
url: { type: string, format: uri }
|
|
829
|
+
url: { type: string, format: uri, description: "Public URL of the video to upload. Provide either `url` or `id`." }
|
|
830
|
+
id: { type: string, description: "Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`." }
|
|
831
831
|
thumbnailUrl:
|
|
832
832
|
type: string
|
|
833
833
|
format: uri
|
|
834
834
|
description: |
|
|
835
|
-
|
|
836
|
-
|
|
835
|
+
OPTIONAL: when omitted, the poster is auto-generated from
|
|
836
|
+
Meta's own preferred video thumbnail. When Meta produces no
|
|
837
|
+
candidate the request fails with a 502 platform_error
|
|
838
|
+
(reason: video_thumbnail_unavailable) — retry, or supply
|
|
839
|
+
this field to control the poster frame exactly.
|
|
837
840
|
description: |
|
|
838
841
|
Video creative for single-creative shape. Mutually
|
|
839
842
|
exclusive with `imageUrl` and with `creatives[]`. Required
|
|
@@ -871,15 +874,17 @@ components:
|
|
|
871
874
|
`video`. Required if `video` is not supplied.
|
|
872
875
|
video:
|
|
873
876
|
type: object
|
|
874
|
-
required: [url, thumbnailUrl]
|
|
875
877
|
properties:
|
|
876
|
-
url: { type: string, format: uri }
|
|
878
|
+
url: { type: string, format: uri, description: "Public URL of the video to upload. Provide either `url` or `id`." }
|
|
879
|
+
id: { type: string, description: "Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`." }
|
|
877
880
|
thumbnailUrl:
|
|
878
881
|
type: string
|
|
879
882
|
format: uri
|
|
880
883
|
description: |
|
|
881
|
-
|
|
882
|
-
|
|
884
|
+
OPTIONAL: when omitted, the poster is auto-generated
|
|
885
|
+
from Meta's own preferred video thumbnail. When Meta
|
|
886
|
+
produces no candidate the request fails with a 502
|
|
887
|
+
platform_error (reason: video_thumbnail_unavailable).
|
|
883
888
|
description: |
|
|
884
889
|
Video creative. Mutually exclusive with this entry's
|
|
885
890
|
`imageUrl`. Required if `imageUrl` is not supplied.
|
|
@@ -889,9 +894,9 @@ components:
|
|
|
889
894
|
Attach the creatives to this EXISTING messaging ad set instead of
|
|
890
895
|
building a campaign, so the ad set keeps its learning phase. It then
|
|
891
896
|
owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
|
|
892
|
-
`endDate`, `objective`, `countries`, `interests
|
|
893
|
-
rejected with a 400 alongside it. Its
|
|
894
|
-
the ad's destination.
|
|
897
|
+
`endDate`, `objective`, `countries`, `interests`, `audienceId` and
|
|
898
|
+
`campaignStatus` are rejected with a 400 alongside it. Its
|
|
899
|
+
`destination_type` must match the ad's destination.
|
|
895
900
|
budgetAmount:
|
|
896
901
|
type: number
|
|
897
902
|
exclusiveMinimum: 0
|
|
@@ -1057,6 +1062,22 @@ components:
|
|
|
1057
1062
|
Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
|
|
1058
1063
|
additional account configuration (Dataset linked to the WABA
|
|
1059
1064
|
for sales) and may be rejected by Meta if missing.
|
|
1065
|
+
status:
|
|
1066
|
+
type: string
|
|
1067
|
+
enum: [ACTIVE, PAUSED]
|
|
1068
|
+
description: |
|
|
1069
|
+
Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the
|
|
1070
|
+
newly created ad(s) after Meta accepts them.
|
|
1071
|
+
campaignStatus:
|
|
1072
|
+
type: string
|
|
1073
|
+
enum: [ACTIVE, PAUSED]
|
|
1074
|
+
description: |
|
|
1075
|
+
Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
1076
|
+
to `ACTIVE`. `PAUSED` holds activation at the campaign so it never
|
|
1077
|
+
spends before the advertiser reviews it, while the ad set and ad still
|
|
1078
|
+
switch on (one resume call brings the whole hierarchy live). Only
|
|
1079
|
+
meaningful when a new campaign is being created; rejected with a 400
|
|
1080
|
+
alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
1060
1081
|
bidStrategy:
|
|
1061
1082
|
type: string
|
|
1062
1083
|
enum:
|
|
@@ -37131,6 +37152,16 @@ paths:
|
|
|
37131
37152
|
limit: { type: integer }
|
|
37132
37153
|
skip: { type: integer }
|
|
37133
37154
|
hasMore: { type: boolean }
|
|
37155
|
+
summary:
|
|
37156
|
+
type: object
|
|
37157
|
+
description: Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
|
|
37158
|
+
properties:
|
|
37159
|
+
total: { type: integer }
|
|
37160
|
+
pending: { type: integer }
|
|
37161
|
+
sent: { type: integer }
|
|
37162
|
+
delivered: { type: integer }
|
|
37163
|
+
read: { type: integer }
|
|
37164
|
+
failed: { type: integer }
|
|
37134
37165
|
'400': { description: Invalid request }
|
|
37135
37166
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
37136
37167
|
'404': { $ref: '#/components/responses/NotFound' }
|
|
@@ -195,6 +195,26 @@ describe Zernio::CreateCallAdRequest do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -195,6 +195,26 @@ describe Zernio::CreateMessagingAdRequest do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -33,6 +33,12 @@ describe Zernio::CtwaAdRequestBodyCreativesInnerVideo do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "id"' 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
|
+
|
|
36
42
|
describe 'test attribute "thumbnail_url"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -195,6 +195,26 @@ describe Zernio::CtwaAdRequestBody do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|