zernio-sdk 0.0.823 → 0.0.824

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: c973ced2b792862d1674a18b816c13e6072ee715199b2d7b977253b97f037a3b
4
- data.tar.gz: c714a9953e07c2cb42774b5a36742630af7d5fbe0ba68a8faef919b603ef0e7a
3
+ metadata.gz: 3974fc48d9a3bda964506f69cf17fb0bf0ac48157b5dbcddb89d32383441d991
4
+ data.tar.gz: 29b7c41d40f85cd7359848a22ec3e57b877a364980bcaf92b978a34e6dc78d35
5
5
  SHA512:
6
- metadata.gz: cf1b2ff18f7fcf39318fe9825b3c549facb294e79ef4b0dd23f539caa2d86916c1e46935d870dae8f405d8ff72e9a5e88ef2fbce913bc721802845a520b9531d
7
- data.tar.gz: 8155282bf8ce47d7e4aad32a0128c92360ed12d21b171f881d8a5e8e0cf2e28f0993c54f3e9de72666c7030f770f3c64e178b89b31ee0ba6f6f05724f9fb7ad4
6
+ metadata.gz: 973d71e10cf8eb8f4703cc2f5dbf24b00fa8a9d5cf61fb97352da2e8dcabbe41333ca92b45e1d842d8340f0358646928f61f0dcfd5092b2e41167b2a2c0e99e8
7
+ data.tar.gz: d4f715f124e3a6d7fd1ff3d8b6f9df77d2a95db5f589e071cf8ae6ef8f7a7d239d5fd1d1187e43eb4afc4f97b4f5b2eb91e6aa5674089b2657e3a7611245eb77
data/README.md CHANGED
@@ -2344,6 +2344,7 @@ Class | Method | HTTP request | Description
2344
2344
  - [Zernio::WebhookPayloadMessageMetadata](docs/WebhookPayloadMessageMetadata.md)
2345
2345
  - [Zernio::WebhookPayloadMessageMetadataOrder](docs/WebhookPayloadMessageMetadataOrder.md)
2346
2346
  - [Zernio::WebhookPayloadMessageMetadataOrderProductItemsInner](docs/WebhookPayloadMessageMetadataOrderProductItemsInner.md)
2347
+ - [Zernio::WebhookPayloadMessageMetadataQuotedMessage](docs/WebhookPayloadMessageMetadataQuotedMessage.md)
2347
2348
  - [Zernio::WebhookPayloadMessageMetadataReferral](docs/WebhookPayloadMessageMetadataReferral.md)
2348
2349
  - [Zernio::WebhookPayloadMessageMetadataReferralAdsContextData](docs/WebhookPayloadMessageMetadataReferralAdsContextData.md)
2349
2350
  - [Zernio::WebhookPayloadMessageMetadataReferredProduct](docs/WebhookPayloadMessageMetadataReferredProduct.md)
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **quoted_message_id** | **String** | platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId. | [optional] |
7
+ | **quoted_message_id** | **String** | Raw platform envelope id (WhatsApp `context.id`; Instagram and Facebook Messenger `reply_to.mid`) of the message this one is a quote-reply to, forwarded verbatim. It may not equal the stored id of that message (see `quotedMessage.platformMessageId`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId. | [optional] |
8
+ | **quoted_message** | [**WebhookPayloadMessageMetadataQuotedMessage**](WebhookPayloadMessageMetadataQuotedMessage.md) | | [optional] |
8
9
  | **quick_reply_payload** | **String** | Payload from a quick reply tap (Facebook/Instagram Messenger). | [optional] |
9
10
  | **postback_payload** | **String** | Payload from a postback button tap (Facebook/Instagram Messenger). | [optional] |
10
11
  | **postback_title** | **String** | Title of the tapped postback button (Facebook/Instagram Messenger). | [optional] |
@@ -32,6 +33,7 @@ require 'zernio-sdk'
32
33
 
33
34
  instance = Zernio::WebhookPayloadMessageMetadata.new(
34
35
  quoted_message_id: null,
36
+ quoted_message: null,
35
37
  quick_reply_payload: null,
36
38
  postback_payload: null,
37
39
  postback_title: null,
@@ -0,0 +1,20 @@
1
+ # Zernio::WebhookPayloadMessageMetadataQuotedMessage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message_id** | **String** | Internal id of the stored quoted message. | [optional] |
8
+ | **platform_message_id** | **String** | The STORED message's platform id (what message.sent and list-messages return). Can differ from quotedMessageId, because Meta renders one message under a different wamid per perspective. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::WebhookPayloadMessageMetadataQuotedMessage.new(
16
+ message_id: null,
17
+ platform_message_id: null
18
+ )
19
+ ```
20
+
@@ -16,9 +16,11 @@ require 'time'
16
16
  module Zernio
17
17
  # Platform-specific message context (present when the message is a quick reply tap, postback button tap, inline keyboard callback, or a quote-reply to an earlier message)
18
18
  class WebhookPayloadMessageMetadata < ApiModelBase
19
- # platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId.
19
+ # Raw platform envelope id (WhatsApp `context.id`; Instagram and Facebook Messenger `reply_to.mid`) of the message this one is a quote-reply to, forwarded verbatim. It may not equal the stored id of that message (see `quotedMessage.platformMessageId`). On outgoing messages the same field appears on `message.sent`, but only on some surfaces: see WebhookPayloadMessageSent.metadata.quotedMessageId.
20
20
  attr_accessor :quoted_message_id
21
21
 
22
+ attr_accessor :quoted_message
23
+
22
24
  # Payload from a quick reply tap (Facebook/Instagram Messenger).
23
25
  attr_accessor :quick_reply_payload
24
26
 
@@ -97,6 +99,7 @@ module Zernio
97
99
  def self.attribute_map
98
100
  {
99
101
  :'quoted_message_id' => :'quotedMessageId',
102
+ :'quoted_message' => :'quotedMessage',
100
103
  :'quick_reply_payload' => :'quickReplyPayload',
101
104
  :'postback_payload' => :'postbackPayload',
102
105
  :'postback_title' => :'postbackTitle',
@@ -133,6 +136,7 @@ module Zernio
133
136
  def self.openapi_types
134
137
  {
135
138
  :'quoted_message_id' => :'String',
139
+ :'quoted_message' => :'WebhookPayloadMessageMetadataQuotedMessage',
136
140
  :'quick_reply_payload' => :'String',
137
141
  :'postback_payload' => :'String',
138
142
  :'postback_title' => :'String',
@@ -181,6 +185,10 @@ module Zernio
181
185
  self.quoted_message_id = attributes[:'quoted_message_id']
182
186
  end
183
187
 
188
+ if attributes.key?(:'quoted_message')
189
+ self.quoted_message = attributes[:'quoted_message']
190
+ end
191
+
184
192
  if attributes.key?(:'quick_reply_payload')
185
193
  self.quick_reply_payload = attributes[:'quick_reply_payload']
186
194
  end
@@ -307,6 +315,7 @@ module Zernio
307
315
  return true if self.equal?(o)
308
316
  self.class == o.class &&
309
317
  quoted_message_id == o.quoted_message_id &&
318
+ quoted_message == o.quoted_message &&
310
319
  quick_reply_payload == o.quick_reply_payload &&
311
320
  postback_payload == o.postback_payload &&
312
321
  postback_title == o.postback_title &&
@@ -337,7 +346,7 @@ module Zernio
337
346
  # Calculates hash code according to all attributes.
338
347
  # @return [Integer] Hash code
339
348
  def hash
340
- [quoted_message_id, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
349
+ [quoted_message_id, quoted_message, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
341
350
  end
342
351
 
343
352
  # Builds the object from hash
@@ -0,0 +1,159 @@
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
+ # Zernio's own ids for the message this one quote-replies to. Present only when that message is stored; WhatsApp only today.
18
+ class WebhookPayloadMessageMetadataQuotedMessage < ApiModelBase
19
+ # Internal id of the stored quoted message.
20
+ attr_accessor :message_id
21
+
22
+ # The STORED message's platform id (what message.sent and list-messages return). Can differ from quotedMessageId, because Meta renders one message under a different wamid per perspective.
23
+ attr_accessor :platform_message_id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'message_id' => :'messageId',
29
+ :'platform_message_id' => :'platformMessageId'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'message_id' => :'String',
47
+ :'platform_message_id' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WebhookPayloadMessageMetadataQuotedMessage` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WebhookPayloadMessageMetadataQuotedMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'message_id')
74
+ self.message_id = attributes[:'message_id']
75
+ end
76
+
77
+ if attributes.key?(:'platform_message_id')
78
+ self.platform_message_id = attributes[:'platform_message_id']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ message_id == o.message_id &&
103
+ platform_message_id == o.platform_message_id
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [message_id, platform_message_id].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Returns the object in the form of hash
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_hash
144
+ hash = {}
145
+ self.class.attribute_map.each_pair do |attr, param|
146
+ value = self.send(attr)
147
+ if value.nil?
148
+ is_nullable = self.class.openapi_nullable.include?(attr)
149
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
150
+ end
151
+
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ end
158
+
159
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.823'
14
+ VERSION = '0.0.824'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -1684,6 +1684,7 @@ require 'zernio-sdk/models/webhook_payload_message_message_sender_instagram_prof
1684
1684
  require 'zernio-sdk/models/webhook_payload_message_metadata'
1685
1685
  require 'zernio-sdk/models/webhook_payload_message_metadata_order'
1686
1686
  require 'zernio-sdk/models/webhook_payload_message_metadata_order_product_items_inner'
1687
+ require 'zernio-sdk/models/webhook_payload_message_metadata_quoted_message'
1687
1688
  require 'zernio-sdk/models/webhook_payload_message_metadata_referral'
1688
1689
  require 'zernio-sdk/models/webhook_payload_message_metadata_referral_ads_context_data'
1689
1690
  require 'zernio-sdk/models/webhook_payload_message_metadata_referred_product'
data/openapi.yaml CHANGED
@@ -3841,11 +3841,29 @@ components:
3841
3841
  quotedMessageId:
3842
3842
  type: string
3843
3843
  description: |
3844
- platformMessageId of the message this one is a quote-reply to.
3845
- WhatsApp (`context.id`), Instagram and Facebook Messenger
3846
- (`reply_to.mid`). On outgoing messages the same field appears on
3847
- `message.sent`, but only on some surfaces: see
3844
+ Raw platform envelope id (WhatsApp `context.id`; Instagram and
3845
+ Facebook Messenger `reply_to.mid`) of the message this one is a
3846
+ quote-reply to, forwarded verbatim. It may not equal the stored
3847
+ id of that message (see `quotedMessage.platformMessageId`). On
3848
+ outgoing messages the same field appears on `message.sent`, but
3849
+ only on some surfaces: see
3848
3850
  WebhookPayloadMessageSent.metadata.quotedMessageId.
3851
+ quotedMessage:
3852
+ type: object
3853
+ description: >-
3854
+ Zernio's own ids for the message this one quote-replies to.
3855
+ Present only when that message is stored; WhatsApp only today.
3856
+ properties:
3857
+ messageId:
3858
+ type: string
3859
+ description: Internal id of the stored quoted message.
3860
+ platformMessageId:
3861
+ type: string
3862
+ description: >-
3863
+ The STORED message's platform id (what message.sent and
3864
+ list-messages return). Can differ from quotedMessageId,
3865
+ because Meta renders one message under a different wamid
3866
+ per perspective.
3849
3867
  quickReplyPayload:
3850
3868
  type: string
3851
3869
  description: Payload from a quick reply tap (Facebook/Instagram Messenger).
@@ -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.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::WebhookPayloadMessageMetadataQuotedMessage
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::WebhookPayloadMessageMetadataQuotedMessage do
21
+ #let(:instance) { Zernio::WebhookPayloadMessageMetadataQuotedMessage.new }
22
+
23
+ describe 'test an instance of WebhookPayloadMessageMetadataQuotedMessage' do
24
+ it 'should create an instance of WebhookPayloadMessageMetadataQuotedMessage' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::WebhookPayloadMessageMetadataQuotedMessage)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "message_id"' 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 "platform_message_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
+
42
+ end
@@ -33,6 +33,12 @@ describe Zernio::WebhookPayloadMessageMetadata do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "quoted_message"' 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 "quick_reply_payload"' do
37
43
  it 'should work' do
38
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/