zernio-sdk 0.0.788 → 0.0.790

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: 5359f699200cd2cc41061273e8beffe4d0a215595e6edba75438c39d01057538
4
- data.tar.gz: 50a828f49846cf8ec7e238e9cc5e8aaefdc9cfe4a07f77c0fdb1111cc851dc50
3
+ metadata.gz: 7c2eac93bf8e3098b7f787b382abc1066993290b685e5ef6656bfb25f3e5eae8
4
+ data.tar.gz: 0d4e458ea45d7ecd04f8c175298579e144ec2a0a0842be7af14a9145afb29dd7
5
5
  SHA512:
6
- metadata.gz: 816ea9415279c89359074649ad6c5b213ccdc201bd9e2e04833352fdce656712e610c9046802d4d0cdd2cfb52ccf905ae6f6163a531139934333c600bd9e2483
7
- data.tar.gz: ee1ecf0c473453854e64bb468a60b2e7b39c80b7a9837f03662cb48e9ff01b60b2417d224c42162610aedc052b4044acf5750ffb065055561e923b250db9bc87
6
+ metadata.gz: 22be7fa57e6dc1ed6a6b58816935bc5acc46396edd432e7dace832872fb3b22d10c9a9f50910f0d93ba36234daaa6c83c2cf3514b51bed30ee297f78bb84f23c
7
+ data.tar.gz: 65d94a54d7abd997186ec4b01eaa80744fb1c6141b6966f4d49897e9ffb4fc35511b404e5533f6440266de744773bbb246a546c36a0dd624808e9b276a05b547
data/README.md CHANGED
@@ -1935,6 +1935,8 @@ Class | Method | HTTP request | Description
1935
1935
  - [Zernio::SendInboxMessage200Response](docs/SendInboxMessage200Response.md)
1936
1936
  - [Zernio::SendInboxMessage200ResponseData](docs/SendInboxMessage200ResponseData.md)
1937
1937
  - [Zernio::SendInboxMessage200ResponseDataAttachmentsInner](docs/SendInboxMessage200ResponseDataAttachmentsInner.md)
1938
+ - [Zernio::SendInboxMessage200ResponseDataPartialFailure](docs/SendInboxMessage200ResponseDataPartialFailure.md)
1939
+ - [Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError](docs/SendInboxMessage200ResponseDataPartialFailurePlatformError.md)
1938
1940
  - [Zernio::SendInboxMessage400Response](docs/SendInboxMessage400Response.md)
1939
1941
  - [Zernio::SendInboxMessage400ResponsePlatformError](docs/SendInboxMessage400ResponsePlatformError.md)
1940
1942
  - [Zernio::SendInboxMessageRequest](docs/SendInboxMessageRequest.md)
@@ -7,6 +7,8 @@
7
7
  | **message_id** | **String** | Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply. | [optional] |
8
8
  | **conversation_id** | **String** | Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record. | [optional] |
9
9
  | **attachments** | [**Array<SendInboxMessage200ResponseDataAttachmentsInner>**](SendInboxMessage200ResponseDataAttachmentsInner.md) | Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp). | [optional] |
10
+ | **message_ids** | **Array<String>** | Facebook/Instagram only. Present when an attachment and text were both requested: Meta has no single body shape for both, so the send is two Meta messages under the hood. First element === messageId (the attachment); second is the follow-up text. | [optional] |
11
+ | **partial_failure** | [**SendInboxMessage200ResponseDataPartialFailure**](SendInboxMessage200ResponseDataPartialFailure.md) | | [optional] |
10
12
 
11
13
  ## Example
12
14
 
@@ -16,7 +18,9 @@ require 'zernio-sdk'
16
18
  instance = Zernio::SendInboxMessage200ResponseData.new(
17
19
  message_id: null,
18
20
  conversation_id: null,
19
- attachments: null
21
+ attachments: null,
22
+ message_ids: null,
23
+ partial_failure: null
20
24
  )
21
25
  ```
22
26
 
@@ -0,0 +1,22 @@
1
+ # Zernio::SendInboxMessage200ResponseDataPartialFailure
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **part** | **String** | | [optional] |
8
+ | **error** | **String** | | [optional] |
9
+ | **platform_error** | [**SendInboxMessage200ResponseDataPartialFailurePlatformError**](SendInboxMessage200ResponseDataPartialFailurePlatformError.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::SendInboxMessage200ResponseDataPartialFailure.new(
17
+ part: null,
18
+ error: null,
19
+ platform_error: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **Integer** | Meta error code | [optional] |
8
+ | **subcode** | **Integer** | Meta error_subcode | [optional] |
9
+ | **fbtrace_id** | **String** | Meta fbtrace_id, quote this in a Meta bug report | [optional] |
10
+ | **type** | **String** | Meta error type (e.g. OAuthException) | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError.new(
18
+ code: null,
19
+ subcode: null,
20
+ fbtrace_id: null,
21
+ type: null
22
+ )
23
+ ```
24
+
@@ -947,7 +947,7 @@ nil (empty response body)
947
947
 
948
948
  Message edited event
949
949
 
950
- Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, and Telegram. The payload includes the full editHistory so consumers can show prior versions.
950
+ Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, Telegram, and WhatsApp. The payload includes the full editHistory so consumers can show prior versions.
951
951
 
952
952
  ### Examples
953
953
 
@@ -878,7 +878,7 @@ module Zernio
878
878
  end
879
879
 
880
880
  # Message edited event
881
- # Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, and Telegram. The payload includes the full editHistory so consumers can show prior versions.
881
+ # Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, Telegram, and WhatsApp. The payload includes the full editHistory so consumers can show prior versions.
882
882
  # @param webhook_payload_message_edited [WebhookPayloadMessageEdited]
883
883
  # @param [Hash] opts the optional parameters
884
884
  # @return [nil]
@@ -888,7 +888,7 @@ module Zernio
888
888
  end
889
889
 
890
890
  # Message edited event
891
- # Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, and Telegram. The payload includes the full editHistory so consumers can show prior versions.
891
+ # Fired when a sender edits a previously-sent message. Supported on Instagram, Facebook Messenger, Telegram, and WhatsApp. The payload includes the full editHistory so consumers can show prior versions.
892
892
  # @param webhook_payload_message_edited [WebhookPayloadMessageEdited]
893
893
  # @param [Hash] opts the optional parameters
894
894
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -24,12 +24,19 @@ module Zernio
24
24
  # Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).
25
25
  attr_accessor :attachments
26
26
 
27
+ # Facebook/Instagram only. Present when an attachment and text were both requested: Meta has no single body shape for both, so the send is two Meta messages under the hood. First element === messageId (the attachment); second is the follow-up text.
28
+ attr_accessor :message_ids
29
+
30
+ attr_accessor :partial_failure
31
+
27
32
  # Attribute mapping from ruby-style variable name to JSON key.
28
33
  def self.attribute_map
29
34
  {
30
35
  :'message_id' => :'messageId',
31
36
  :'conversation_id' => :'conversationId',
32
- :'attachments' => :'attachments'
37
+ :'attachments' => :'attachments',
38
+ :'message_ids' => :'messageIds',
39
+ :'partial_failure' => :'partialFailure'
33
40
  }
34
41
  end
35
42
 
@@ -48,7 +55,9 @@ module Zernio
48
55
  {
49
56
  :'message_id' => :'String',
50
57
  :'conversation_id' => :'String',
51
- :'attachments' => :'Array<SendInboxMessage200ResponseDataAttachmentsInner>'
58
+ :'attachments' => :'Array<SendInboxMessage200ResponseDataAttachmentsInner>',
59
+ :'message_ids' => :'Array<String>',
60
+ :'partial_failure' => :'SendInboxMessage200ResponseDataPartialFailure'
52
61
  }
53
62
  end
54
63
 
@@ -87,6 +96,16 @@ module Zernio
87
96
  self.attachments = value
88
97
  end
89
98
  end
99
+
100
+ if attributes.key?(:'message_ids')
101
+ if (value = attributes[:'message_ids']).is_a?(Array)
102
+ self.message_ids = value
103
+ end
104
+ end
105
+
106
+ if attributes.key?(:'partial_failure')
107
+ self.partial_failure = attributes[:'partial_failure']
108
+ end
90
109
  end
91
110
 
92
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +130,9 @@ module Zernio
111
130
  self.class == o.class &&
112
131
  message_id == o.message_id &&
113
132
  conversation_id == o.conversation_id &&
114
- attachments == o.attachments
133
+ attachments == o.attachments &&
134
+ message_ids == o.message_ids &&
135
+ partial_failure == o.partial_failure
115
136
  end
116
137
 
117
138
  # @see the `==` method
@@ -123,7 +144,7 @@ module Zernio
123
144
  # Calculates hash code according to all attributes.
124
145
  # @return [Integer] Hash code
125
146
  def hash
126
- [message_id, conversation_id, attachments].hash
147
+ [message_id, conversation_id, attachments, message_ids, partial_failure].hash
127
148
  end
128
149
 
129
150
  # Builds the object from hash
@@ -0,0 +1,200 @@
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
+ # Facebook/Instagram only. The attachment was delivered but the follow-up text message was rejected by Meta and was not stored; the response is still a 200 because the attachment send succeeded.
18
+ class SendInboxMessage200ResponseDataPartialFailure < ApiModelBase
19
+ attr_accessor :part
20
+
21
+ attr_accessor :error
22
+
23
+ attr_accessor :platform_error
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'part' => :'part',
51
+ :'error' => :'error',
52
+ :'platform_error' => :'platformError'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'part' => :'String',
70
+ :'error' => :'String',
71
+ :'platform_error' => :'SendInboxMessage200ResponseDataPartialFailurePlatformError'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SendInboxMessage200ResponseDataPartialFailure` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SendInboxMessage200ResponseDataPartialFailure`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'part')
98
+ self.part = attributes[:'part']
99
+ end
100
+
101
+ if attributes.key?(:'error')
102
+ self.error = attributes[:'error']
103
+ end
104
+
105
+ if attributes.key?(:'platform_error')
106
+ self.platform_error = attributes[:'platform_error']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
122
+ part_validator = EnumAttributeValidator.new('String', ["text"])
123
+ return false unless part_validator.valid?(@part)
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method checking allowed values (enum).
128
+ # @param [Object] part Object to be assigned
129
+ def part=(part)
130
+ validator = EnumAttributeValidator.new('String', ["text"])
131
+ unless validator.valid?(part)
132
+ fail ArgumentError, "invalid value for \"part\", must be one of #{validator.allowable_values}."
133
+ end
134
+ @part = part
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ part == o.part &&
143
+ error == o.error &&
144
+ platform_error == o.platform_error
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [part, error, platform_error].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -0,0 +1,179 @@
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
+ # Meta's own diagnostic fields for the rejected follow-up, same shape as the 400 response's platformError.
18
+ class SendInboxMessage200ResponseDataPartialFailurePlatformError < ApiModelBase
19
+ # Meta error code
20
+ attr_accessor :code
21
+
22
+ # Meta error_subcode
23
+ attr_accessor :subcode
24
+
25
+ # Meta fbtrace_id, quote this in a Meta bug report
26
+ attr_accessor :fbtrace_id
27
+
28
+ # Meta error type (e.g. OAuthException)
29
+ attr_accessor :type
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'code' => :'code',
35
+ :'subcode' => :'subcode',
36
+ :'fbtrace_id' => :'fbtraceId',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'code' => :'Integer',
55
+ :'subcode' => :'Integer',
56
+ :'fbtrace_id' => :'String',
57
+ :'type' => :'String'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'code')
84
+ self.code = attributes[:'code']
85
+ end
86
+
87
+ if attributes.key?(:'subcode')
88
+ self.subcode = attributes[:'subcode']
89
+ end
90
+
91
+ if attributes.key?(:'fbtrace_id')
92
+ self.fbtrace_id = attributes[:'fbtrace_id']
93
+ end
94
+
95
+ if attributes.key?(:'type')
96
+ self.type = attributes[:'type']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ code == o.code &&
121
+ subcode == o.subcode &&
122
+ fbtrace_id == o.fbtrace_id &&
123
+ type == o.type
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [code, subcode, fbtrace_id, type].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ if value.nil?
168
+ is_nullable = self.class.openapi_nullable.include?(attr)
169
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
170
+ end
171
+
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ end
178
+
179
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Webhook payload for message.edited events. Fires when the sender edits a previously-sent message. Supported platforms: Instagram, Facebook Messenger, Telegram. The message object reflects the LATEST state; editHistory contains every prior version in order (oldest first), so the last entry is the version immediately before the current content.
17
+ # Webhook payload for message.edited events. Fires when the sender edits a previously-sent message. Supported platforms: Instagram, Facebook Messenger, Telegram, WhatsApp. The message object reflects the LATEST state; editHistory contains every prior version in order (oldest first), so the last entry is the version immediately before the current content.
18
18
  class WebhookPayloadMessageEdited < ApiModelBase
19
19
  attr_accessor :id
20
20
 
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.788'
14
+ VERSION = '0.0.790'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -1280,6 +1280,8 @@ require 'zernio-sdk/models/send_discord_direct_message_request_attachments_inner
1280
1280
  require 'zernio-sdk/models/send_inbox_message200_response'
1281
1281
  require 'zernio-sdk/models/send_inbox_message200_response_data'
1282
1282
  require 'zernio-sdk/models/send_inbox_message200_response_data_attachments_inner'
1283
+ require 'zernio-sdk/models/send_inbox_message200_response_data_partial_failure'
1284
+ require 'zernio-sdk/models/send_inbox_message200_response_data_partial_failure_platform_error'
1283
1285
  require 'zernio-sdk/models/send_inbox_message400_response'
1284
1286
  require 'zernio-sdk/models/send_inbox_message400_response_platform_error'
1285
1287
  require 'zernio-sdk/models/send_inbox_message_request'
data/openapi.yaml CHANGED
@@ -162,7 +162,7 @@ x-documentation:
162
162
  - `message.received` - New inbound DM or SMS received (SMS arrives with `platform: "sms"`)
163
163
  - `conversation.started` - A new conversation opened between one of your accounts and a contact, in either direction (any DM platform, and SMS); fires only the first time the thread appears
164
164
  - `message.sent` - DM sent via the API
165
- - `message.edited` - A sender edited a message (Instagram, Messenger, Telegram)
165
+ - `message.edited` - A sender edited a message (Instagram, Messenger, Telegram, WhatsApp)
166
166
  - `message.deleted` - A sender deleted ("unsent") a message (Instagram; WhatsApp in both directions, whether the business deleted a message it sent or the customer deleted one they sent). `message.direction` tells the two apart.
167
167
  - `message.delivered` - An outgoing message was delivered (WhatsApp, Messenger, SMS)
168
168
  - `message.read` - An outgoing message was read by the recipient (WhatsApp, Messenger, Instagram)
@@ -4138,7 +4138,7 @@ components:
4138
4138
  description: |
4139
4139
  Webhook payload for message.edited events. Fires when the sender
4140
4140
  edits a previously-sent message. Supported platforms: Instagram,
4141
- Facebook Messenger, Telegram. The message object reflects the
4141
+ Facebook Messenger, Telegram, WhatsApp. The message object reflects the
4142
4142
  LATEST state; editHistory contains every prior version in order
4143
4143
  (oldest first), so the last entry is the version immediately before
4144
4144
  the current content.
@@ -9459,8 +9459,8 @@ webhooks:
9459
9459
  summary: Message edited event
9460
9460
  description: |
9461
9461
  Fired when a sender edits a previously-sent message. Supported on
9462
- Instagram, Facebook Messenger, and Telegram. The payload includes the
9463
- full editHistory so consumers can show prior versions.
9462
+ Instagram, Facebook Messenger, Telegram, and WhatsApp. The payload
9463
+ includes the full editHistory so consumers can show prior versions.
9464
9464
  tags: [Webhook Events]
9465
9465
  requestBody:
9466
9466
  required: true
@@ -27344,6 +27344,24 @@ paths:
27344
27344
  properties:
27345
27345
  type: { type: string }
27346
27346
  url: { type: string }
27347
+ messageIds:
27348
+ type: array
27349
+ description: 'Facebook/Instagram only. Present when an attachment and text were both requested: Meta has no single body shape for both, so the send is two Meta messages under the hood. First element === messageId (the attachment); second is the follow-up text.'
27350
+ items: { type: string }
27351
+ partialFailure:
27352
+ type: object
27353
+ description: 'Facebook/Instagram only. The attachment was delivered but the follow-up text message was rejected by Meta and was not stored; the response is still a 200 because the attachment send succeeded.'
27354
+ properties:
27355
+ part: { type: string, enum: [text] }
27356
+ error: { type: string }
27357
+ platformError:
27358
+ type: object
27359
+ description: "Meta's own diagnostic fields for the rejected follow-up, same shape as the 400 response's platformError."
27360
+ properties:
27361
+ code: { type: integer, description: "Meta error code" }
27362
+ subcode: { type: integer, description: "Meta error_subcode" }
27363
+ fbtraceId: { type: string, description: "Meta fbtrace_id, quote this in a Meta bug report" }
27364
+ type: { type: string, description: "Meta error type (e.g. OAuthException)" }
27347
27365
  '400':
27348
27366
  description: 'Bad request (e.g., attachment not supported for platform, validation error, category combined with a template or attachment, category used on a non-WhatsApp account, or the WhatsApp Business Account is not eligible for Direct Send)'
27349
27367
  content:
@@ -0,0 +1,54 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError do
21
+ #let(:instance) { Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError.new }
22
+
23
+ describe 'test an instance of SendInboxMessage200ResponseDataPartialFailurePlatformError' do
24
+ it 'should create an instance of SendInboxMessage200ResponseDataPartialFailurePlatformError' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessage200ResponseDataPartialFailurePlatformError)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "code"' 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 "subcode"' 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
+ describe 'test attribute "fbtrace_id"' 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
+
48
+ describe 'test attribute "type"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,52 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::SendInboxMessage200ResponseDataPartialFailure
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::SendInboxMessage200ResponseDataPartialFailure do
21
+ #let(:instance) { Zernio::SendInboxMessage200ResponseDataPartialFailure.new }
22
+
23
+ describe 'test an instance of SendInboxMessage200ResponseDataPartialFailure' do
24
+ it 'should create an instance of SendInboxMessage200ResponseDataPartialFailure' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessage200ResponseDataPartialFailure)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "part"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["text"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.part = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "error"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "platform_error"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ end
@@ -45,4 +45,16 @@ describe Zernio::SendInboxMessage200ResponseData do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "message_ids"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "partial_failure"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
48
60
  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.788
4
+ version: 0.0.790
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -1378,6 +1378,8 @@ files:
1378
1378
  - docs/SendInboxMessage200Response.md
1379
1379
  - docs/SendInboxMessage200ResponseData.md
1380
1380
  - docs/SendInboxMessage200ResponseDataAttachmentsInner.md
1381
+ - docs/SendInboxMessage200ResponseDataPartialFailure.md
1382
+ - docs/SendInboxMessage200ResponseDataPartialFailurePlatformError.md
1381
1383
  - docs/SendInboxMessage400Response.md
1382
1384
  - docs/SendInboxMessage400ResponsePlatformError.md
1383
1385
  - docs/SendInboxMessageRequest.md
@@ -3217,6 +3219,8 @@ files:
3217
3219
  - lib/zernio-sdk/models/send_inbox_message200_response.rb
3218
3220
  - lib/zernio-sdk/models/send_inbox_message200_response_data.rb
3219
3221
  - lib/zernio-sdk/models/send_inbox_message200_response_data_attachments_inner.rb
3222
+ - lib/zernio-sdk/models/send_inbox_message200_response_data_partial_failure.rb
3223
+ - lib/zernio-sdk/models/send_inbox_message200_response_data_partial_failure_platform_error.rb
3220
3224
  - lib/zernio-sdk/models/send_inbox_message400_response.rb
3221
3225
  - lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb
3222
3226
  - lib/zernio-sdk/models/send_inbox_message_request.rb
@@ -5031,6 +5035,8 @@ files:
5031
5035
  - spec/models/send_discord_direct_message_request_attachments_inner_spec.rb
5032
5036
  - spec/models/send_discord_direct_message_request_spec.rb
5033
5037
  - spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb
5038
+ - spec/models/send_inbox_message200_response_data_partial_failure_platform_error_spec.rb
5039
+ - spec/models/send_inbox_message200_response_data_partial_failure_spec.rb
5034
5040
  - spec/models/send_inbox_message200_response_data_spec.rb
5035
5041
  - spec/models/send_inbox_message200_response_spec.rb
5036
5042
  - spec/models/send_inbox_message400_response_platform_error_spec.rb
@@ -7211,6 +7217,7 @@ test_files:
7211
7217
  - spec/models/list_instagram_stories200_response_spec.rb
7212
7218
  - spec/models/get_ad_account_finance200_response_spec.rb
7213
7219
  - spec/models/send_sms_request_spec.rb
7220
+ - spec/models/send_inbox_message200_response_data_partial_failure_spec.rb
7214
7221
  - spec/models/uploaded_or_derived_audience_companies_inner_spec.rb
7215
7222
  - spec/models/list_whats_app_group_join_requests200_response_join_requests_inner_spec.rb
7216
7223
  - spec/models/send_inbox_message_request_interactive_action_spec.rb
@@ -7263,6 +7270,7 @@ test_files:
7263
7270
  - spec/models/update_whats_app_flow_request_spec.rb
7264
7271
  - spec/models/create_inbox_conversation404_response_spec.rb
7265
7272
  - spec/models/send_conversions200_response_failures_inner_code_spec.rb
7273
+ - spec/models/send_inbox_message200_response_data_partial_failure_platform_error_spec.rb
7266
7274
  - spec/models/edit_inbox_message200_response_data_spec.rb
7267
7275
  - spec/models/respond_to_phone_number_reviewer_request_documents_inner_spec.rb
7268
7276
  - spec/models/instagram_platform_data_trial_params_spec.rb