late-sdk 0.0.863 → 0.0.864

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcc2524124af3d41e5a5fa09514b3b5c19e1a4af0dcc05def42007646934bd4b
4
- data.tar.gz: deb9414d41461ec14f7bd167f82fafdf871bdec7894559193bb7ec7e34b16e29
3
+ metadata.gz: 149a3ff8f1fc11b9b6c9f9a17d60c55940bd51b9b84cbd031b462d95bbba2ab8
4
+ data.tar.gz: bb1199ce879e30e7ac41ab066b0ccdbfecb6034b8ae4f7d9aeddaf3b16f87aef
5
5
  SHA512:
6
- metadata.gz: 36e1371ff4a15bc4910171a44f2c8ce382e2026bac275d9fbbb914561026b416056374c13937052778badc8e0ecf39446be4027bb475f9be337da598961c8dd6
7
- data.tar.gz: cfc6aef3f29f0bf10f552464b9b3d5ddb757ab397cf02862c1dceff6c3dd83fcc5685ce9a2be95ac038b4be3bdcc70c3079762af6452b143550fe6d286900ef4
6
+ metadata.gz: a3a475228fd77b6287de6ae28b388fd92bccc66f2e17dd87de7d14aacff02738bca3d04dc1586f96b1b76eda59d976e75a71c6f8f14fd58c2d43be7e7684b9df
7
+ data.tar.gz: c47b283514656e3829f0fe3fbb09781276d335814293d22ff0f514f0c7ffaa4026e2a1721fb519844fafa67470441f32d134d3242eba2ef181ee8730eb055c52
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **type** | **String** | | |
8
+ | **image_aspect_ratio** | **String** | Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400. | [optional] |
8
9
  | **elements** | [**Array<CommentAutomationTemplateElement>**](CommentAutomationTemplateElement.md) | | |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::CommentAutomationTemplate.new(
16
17
  type: null,
18
+ image_aspect_ratio: null,
17
19
  elements: null
18
20
  )
19
21
  ```
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **type** | **String** | Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp. | [optional] |
8
+ | **image_aspect_ratio** | **String** | Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram. | [optional] |
8
9
  | **elements** | [**Array<SendInboxMessageRequestTemplateElementsInner>**](SendInboxMessageRequestTemplateElementsInner.md) | | [optional] |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::SendInboxMessageRequestTemplate.new(
16
17
  type: null,
18
+ image_aspect_ratio: null,
17
19
  elements: null
18
20
  )
19
21
  ```
@@ -18,6 +18,9 @@ module Zernio
18
18
  class CommentAutomationTemplate < ApiModelBase
19
19
  attr_accessor :type
20
20
 
21
+ # Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400.
22
+ attr_accessor :image_aspect_ratio
23
+
21
24
  attr_accessor :elements
22
25
 
23
26
  class EnumAttributeValidator
@@ -46,6 +49,7 @@ module Zernio
46
49
  def self.attribute_map
47
50
  {
48
51
  :'type' => :'type',
52
+ :'image_aspect_ratio' => :'imageAspectRatio',
49
53
  :'elements' => :'elements'
50
54
  }
51
55
  end
@@ -64,6 +68,7 @@ module Zernio
64
68
  def self.openapi_types
65
69
  {
66
70
  :'type' => :'String',
71
+ :'image_aspect_ratio' => :'String',
67
72
  :'elements' => :'Array<CommentAutomationTemplateElement>'
68
73
  }
69
74
  end
@@ -96,6 +101,10 @@ module Zernio
96
101
  self.type = nil
97
102
  end
98
103
 
104
+ if attributes.key?(:'image_aspect_ratio')
105
+ self.image_aspect_ratio = attributes[:'image_aspect_ratio']
106
+ end
107
+
99
108
  if attributes.key?(:'elements')
100
109
  if (value = attributes[:'elements']).is_a?(Array)
101
110
  self.elements = value
@@ -136,6 +145,8 @@ module Zernio
136
145
  return false if @type.nil?
137
146
  type_validator = EnumAttributeValidator.new('String', ["generic"])
138
147
  return false unless type_validator.valid?(@type)
148
+ image_aspect_ratio_validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
149
+ return false unless image_aspect_ratio_validator.valid?(@image_aspect_ratio)
139
150
  return false if @elements.nil?
140
151
  return false if @elements.length > 10
141
152
  return false if @elements.length < 1
@@ -152,6 +163,16 @@ module Zernio
152
163
  @type = type
153
164
  end
154
165
 
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] image_aspect_ratio Object to be assigned
168
+ def image_aspect_ratio=(image_aspect_ratio)
169
+ validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
170
+ unless validator.valid?(image_aspect_ratio)
171
+ fail ArgumentError, "invalid value for \"image_aspect_ratio\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @image_aspect_ratio = image_aspect_ratio
174
+ end
175
+
155
176
  # Custom attribute writer method with validation
156
177
  # @param [Object] elements Value to be assigned
157
178
  def elements=(elements)
@@ -176,6 +197,7 @@ module Zernio
176
197
  return true if self.equal?(o)
177
198
  self.class == o.class &&
178
199
  type == o.type &&
200
+ image_aspect_ratio == o.image_aspect_ratio &&
179
201
  elements == o.elements
180
202
  end
181
203
 
@@ -188,7 +210,7 @@ module Zernio
188
210
  # Calculates hash code according to all attributes.
189
211
  # @return [Integer] Hash code
190
212
  def hash
191
- [type, elements].hash
213
+ [type, image_aspect_ratio, elements].hash
192
214
  end
193
215
 
194
216
  # Builds the object from hash
@@ -14,11 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Platform-dependent template payload. Ignored on Telegram. Instagram / Facebook: a generic template (carousel). Set `type: generic` and provide up to 10 `elements`, each with a `title` (required) and optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with the top-level `buttons` field (sending both is a 400); put the card's buttons on its `elements` instead. WhatsApp: sends an approved WhatsApp template message, the only message type WhatsApp accepts when the 24-hour customer-service window is closed. Provide exactly one element carrying the template reference: `{ \"elements\": [{ \"name\": \"order_update\", \"language\": \"en_US\", \"components\": [...] }] }` (`type` is ignored on WhatsApp). `components` is optional and is forwarded unchanged as the `template.components` array of Meta's Cloud API send payload; use it to fill body/header variables and button parameters, e.g. `[{ \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"John\" }] }]`. Templates with media headers (image, video, document) must include the header component with its media link here at send time. To send a template to a phone number with no existing conversation, or to have media headers filled in automatically from the template definition, use the create-conversation endpoint (POST /v1/inbox/conversations) instead.
17
+ # Platform-dependent template payload. Ignored on Telegram. Instagram / Facebook: a generic template (carousel). Set `type: generic` and provide up to 10 `elements`, each with a `title` (required) and optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with the top-level `buttons` field (sending both is a 400); put the card's buttons on its `elements` instead. On Facebook, `imageAspectRatio` (`horizontal`, the default, or `square`) sets how Messenger renders the element images; Instagram has no such setting and rejects it. WhatsApp: sends an approved WhatsApp template message, the only message type WhatsApp accepts when the 24-hour customer-service window is closed. Provide exactly one element carrying the template reference: `{ \"elements\": [{ \"name\": \"order_update\", \"language\": \"en_US\", \"components\": [...] }] }` (`type` is ignored on WhatsApp). `components` is optional and is forwarded unchanged as the `template.components` array of Meta's Cloud API send payload; use it to fill body/header variables and button parameters, e.g. `[{ \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"John\" }] }]`. Templates with media headers (image, video, document) must include the header component with its media link here at send time. To send a template to a phone number with no existing conversation, or to have media headers filled in automatically from the template definition, use the create-conversation endpoint (POST /v1/inbox/conversations) instead.
18
18
  class SendInboxMessageRequestTemplate < ApiModelBase
19
19
  # Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp.
20
20
  attr_accessor :type
21
21
 
22
+ # Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram.
23
+ attr_accessor :image_aspect_ratio
24
+
22
25
  attr_accessor :elements
23
26
 
24
27
  class EnumAttributeValidator
@@ -47,6 +50,7 @@ module Zernio
47
50
  def self.attribute_map
48
51
  {
49
52
  :'type' => :'type',
53
+ :'image_aspect_ratio' => :'imageAspectRatio',
50
54
  :'elements' => :'elements'
51
55
  }
52
56
  end
@@ -65,6 +69,7 @@ module Zernio
65
69
  def self.openapi_types
66
70
  {
67
71
  :'type' => :'String',
72
+ :'image_aspect_ratio' => :'String',
68
73
  :'elements' => :'Array<SendInboxMessageRequestTemplateElementsInner>'
69
74
  }
70
75
  end
@@ -95,6 +100,10 @@ module Zernio
95
100
  self.type = attributes[:'type']
96
101
  end
97
102
 
103
+ if attributes.key?(:'image_aspect_ratio')
104
+ self.image_aspect_ratio = attributes[:'image_aspect_ratio']
105
+ end
106
+
98
107
  if attributes.key?(:'elements')
99
108
  if (value = attributes[:'elements']).is_a?(Array)
100
109
  self.elements = value
@@ -120,6 +129,8 @@ module Zernio
120
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
121
130
  type_validator = EnumAttributeValidator.new('String', ["generic"])
122
131
  return false unless type_validator.valid?(@type)
132
+ image_aspect_ratio_validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
133
+ return false unless image_aspect_ratio_validator.valid?(@image_aspect_ratio)
123
134
  return false if !@elements.nil? && @elements.length > 10
124
135
  true
125
136
  end
@@ -134,6 +145,16 @@ module Zernio
134
145
  @type = type
135
146
  end
136
147
 
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] image_aspect_ratio Object to be assigned
150
+ def image_aspect_ratio=(image_aspect_ratio)
151
+ validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
152
+ unless validator.valid?(image_aspect_ratio)
153
+ fail ArgumentError, "invalid value for \"image_aspect_ratio\", must be one of #{validator.allowable_values}."
154
+ end
155
+ @image_aspect_ratio = image_aspect_ratio
156
+ end
157
+
137
158
  # Custom attribute writer method with validation
138
159
  # @param [Object] elements Value to be assigned
139
160
  def elements=(elements)
@@ -154,6 +175,7 @@ module Zernio
154
175
  return true if self.equal?(o)
155
176
  self.class == o.class &&
156
177
  type == o.type &&
178
+ image_aspect_ratio == o.image_aspect_ratio &&
157
179
  elements == o.elements
158
180
  end
159
181
 
@@ -166,7 +188,7 @@ module Zernio
166
188
  # Calculates hash code according to all attributes.
167
189
  # @return [Integer] Hash code
168
190
  def hash
169
- [type, elements].hash
191
+ [type, image_aspect_ratio, elements].hash
170
192
  end
171
193
 
172
194
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.863'
14
+ VERSION = '0.0.864'
15
15
  end
data/openapi.yaml CHANGED
@@ -1625,6 +1625,10 @@ components:
1625
1625
  required: [type, elements]
1626
1626
  properties:
1627
1627
  type: { type: string, enum: [generic] }
1628
+ imageAspectRatio:
1629
+ type: string
1630
+ enum: [horizontal, square]
1631
+ description: 'Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400.'
1628
1632
  elements:
1629
1633
  type: array
1630
1634
  minItems: 1
@@ -28067,7 +28071,9 @@ paths:
28067
28071
  and provide up to 10 `elements`, each with a `title` (required) and
28068
28072
  optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with
28069
28073
  the top-level `buttons` field (sending both is a 400); put the card's
28070
- buttons on its `elements` instead.
28074
+ buttons on its `elements` instead. On Facebook, `imageAspectRatio`
28075
+ (`horizontal`, the default, or `square`) sets how Messenger renders the
28076
+ element images; Instagram has no such setting and rejects it.
28071
28077
 
28072
28078
  WhatsApp: sends an approved WhatsApp template message, the only message
28073
28079
  type WhatsApp accepts when the 24-hour customer-service window is closed.
@@ -28084,6 +28090,7 @@ paths:
28084
28090
  create-conversation endpoint (POST /v1/inbox/conversations) instead.
28085
28091
  properties:
28086
28092
  type: { type: string, enum: [generic], description: Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp. }
28093
+ imageAspectRatio: { type: string, enum: [horizontal, square], description: 'Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram.' }
28087
28094
  elements:
28088
28095
  type: array
28089
28096
  maxItems: 10
@@ -37,6 +37,16 @@ describe Zernio::CommentAutomationTemplate do
37
37
  end
38
38
  end
39
39
 
40
+ describe 'test attribute "image_aspect_ratio"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["horizontal", "square"])
44
+ # validator.allowable_values.each do |value|
45
+ # expect { instance.image_aspect_ratio = value }.not_to raise_error
46
+ # end
47
+ end
48
+ end
49
+
40
50
  describe 'test attribute "elements"' do
41
51
  it 'should work' do
42
52
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -37,6 +37,16 @@ describe Zernio::SendInboxMessageRequestTemplate do
37
37
  end
38
38
  end
39
39
 
40
+ describe 'test attribute "image_aspect_ratio"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["horizontal", "square"])
44
+ # validator.allowable_values.each do |value|
45
+ # expect { instance.image_aspect_ratio = value }.not_to raise_error
46
+ # end
47
+ end
48
+ end
49
+
40
50
  describe 'test attribute "elements"' do
41
51
  it 'should work' do
42
52
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: late-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.863
4
+ version: 0.0.864
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -5800,7 +5800,7 @@ files:
5800
5800
  - spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
5801
5801
  - spec/models/you_tube_video_retention_response_spec.rb
5802
5802
  - spec/spec_helper.rb
5803
- - zernio-sdk-0.0.863.gem
5803
+ - zernio-sdk-0.0.864.gem
5804
5804
  - zernio-sdk.gemspec
5805
5805
  homepage: https://openapi-generator.tech
5806
5806
  licenses:
Binary file