zernio-sdk 0.0.811 → 0.0.812
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94c1b8d8762e8ac96f0dcd54ac2a3fba405f9aea07fa6537bb49cd4cb20011e3
|
|
4
|
+
data.tar.gz: 6674637bdcfaa210cd85c62a3d83bb8ef0dae4d666fc73773c0f17d3c3b29439
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eda431e1568c572d5ded0d20d0d40b9f35d7f005bcf85110e3ee753ec508fab1f181268c600c4eeaf03f2935525aabf06fbc90c2344a0ad9b7f6de438d08d503
|
|
7
|
+
data.tar.gz: de31319ad6da45239d98df7bffbc50c86223786d2aa8b8c7c771bc2175c16ad738c8d79df32a36a6edf3b5bf0892d70db233b78ad4f2383e7d145ade82ebc0fe
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **is_subscribed** | **Boolean** | | [optional][default to true] |
|
|
13
13
|
| **notes** | **String** | | [optional] |
|
|
14
14
|
| **account_id** | **String** | Optional. Creates a channel if provided with platform + platformIdentifier | [optional] |
|
|
15
|
-
| **platform** | **String** |
|
|
15
|
+
| **platform** | **String** | Channel platform. Only the enum values support contact channels; any other platform is rejected with code platform_not_supported. | [optional] |
|
|
16
16
|
| **platform_identifier** | **String** | | [optional] |
|
|
17
17
|
| **display_identifier** | **String** | | [optional] |
|
|
18
18
|
|
|
@@ -379,7 +379,7 @@ module Zernio
|
|
|
379
379
|
if @api_client.config.debugging
|
|
380
380
|
@api_client.config.logger.debug 'Calling API: ContactsApi.list_contacts ...'
|
|
381
381
|
end
|
|
382
|
-
allowable_values = ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp"]
|
|
382
|
+
allowable_values = ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp", "slack"]
|
|
383
383
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
384
384
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
385
385
|
end
|
|
@@ -32,12 +32,35 @@ module Zernio
|
|
|
32
32
|
# Optional. Creates a channel if provided with platform + platformIdentifier
|
|
33
33
|
attr_accessor :account_id
|
|
34
34
|
|
|
35
|
+
# Channel platform. Only the enum values support contact channels; any other platform is rejected with code platform_not_supported.
|
|
35
36
|
attr_accessor :platform
|
|
36
37
|
|
|
37
38
|
attr_accessor :platform_identifier
|
|
38
39
|
|
|
39
40
|
attr_accessor :display_identifier
|
|
40
41
|
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
41
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
65
|
def self.attribute_map
|
|
43
66
|
{
|
|
@@ -179,6 +202,8 @@ module Zernio
|
|
|
179
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
180
203
|
return false if @profile_id.nil?
|
|
181
204
|
return false if @name.nil?
|
|
205
|
+
platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp", "slack"])
|
|
206
|
+
return false unless platform_validator.valid?(@platform)
|
|
182
207
|
true
|
|
183
208
|
end
|
|
184
209
|
|
|
@@ -202,6 +227,16 @@ module Zernio
|
|
|
202
227
|
@name = name
|
|
203
228
|
end
|
|
204
229
|
|
|
230
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
231
|
+
# @param [Object] platform Object to be assigned
|
|
232
|
+
def platform=(platform)
|
|
233
|
+
validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp", "slack"])
|
|
234
|
+
unless validator.valid?(platform)
|
|
235
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
236
|
+
end
|
|
237
|
+
@platform = platform
|
|
238
|
+
end
|
|
239
|
+
|
|
205
240
|
# Checks equality by comparing each attribute.
|
|
206
241
|
# @param [Object] Object to be compared
|
|
207
242
|
def ==(o)
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -37883,7 +37883,7 @@ paths:
|
|
|
37883
37883
|
- { name: search, in: query, schema: { type: string }, description: 'Case-insensitive substring match on the contact name, email and company. Phone numbers and other platform identifiers are not matched: they live on the contact channel, not on the contact. To reach a contact from an inbox webhook, use the conversation.contactId it already carries.' }
|
|
37884
37884
|
- { name: tag, in: query, schema: { type: string } }
|
|
37885
37885
|
- { name: tags, in: query, schema: { type: string }, description: 'Comma-separated tags, matches contacts carrying any of them' }
|
|
37886
|
-
- { name: platform, in: query, schema: { type: string, enum: [instagram, facebook, telegram, twitter, bluesky, reddit, whatsapp] } }
|
|
37886
|
+
- { name: platform, in: query, schema: { type: string, enum: [instagram, facebook, telegram, twitter, bluesky, reddit, whatsapp, slack] } }
|
|
37887
37887
|
- { name: isSubscribed, in: query, schema: { type: string, enum: ['true', 'false'] } }
|
|
37888
37888
|
- { name: limit, in: query, schema: { type: integer, default: 50, maximum: 200 } }
|
|
37889
37889
|
- { name: skip, in: query, schema: { type: integer, default: 0 } }
|
|
@@ -37954,7 +37954,7 @@ paths:
|
|
|
37954
37954
|
isSubscribed: { type: boolean, default: true }
|
|
37955
37955
|
notes: { type: string }
|
|
37956
37956
|
accountId: { type: string, description: Optional. Creates a channel if provided with platform + platformIdentifier }
|
|
37957
|
-
platform: { type: string }
|
|
37957
|
+
platform: { type: string, enum: [instagram, facebook, telegram, twitter, bluesky, reddit, whatsapp, slack], description: 'Channel platform. Only the enum values support contact channels; any other platform is rejected with code platform_not_supported.' }
|
|
37958
37958
|
platformIdentifier: { type: string }
|
|
37959
37959
|
displayIdentifier: { type: string }
|
|
37960
37960
|
responses:
|
|
@@ -37988,7 +37988,7 @@ paths:
|
|
|
37988
37988
|
platformIdentifier: { type: string }
|
|
37989
37989
|
displayIdentifier: { type: string }
|
|
37990
37990
|
warning: { type: string }
|
|
37991
|
-
'400': { description: Invalid request }
|
|
37991
|
+
'400': { description: 'Invalid request. Channel fields are all-or-nothing: accountId, platform and platformIdentifier must be sent together (code: missing_required_field). A platform outside the enum does not support contact channels (code: platform_not_supported, details.supportedPlatforms lists the valid values).' }
|
|
37992
37992
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
37993
37993
|
'409': { description: 'Duplicate channel. The platformIdentifier is already bound to a channel on this accountId.' }
|
|
37994
37994
|
|
|
@@ -38188,7 +38188,7 @@ paths:
|
|
|
38188
38188
|
skipped: { type: integer }
|
|
38189
38189
|
errors: { type: array, items: { type: string }, description: 'Per-contact failures, e.g. an identifier that is not a valid phone number' }
|
|
38190
38190
|
total: { type: integer }
|
|
38191
|
-
'400': { description: 'Contact missing required field name, or a row carries platformIdentifier/accountId with no top-level accountId to attach it to. A row missing platformIdentifier while accountId IS set is not a 400: it is reported in errors[] under a 200.' }
|
|
38191
|
+
'400': { description: 'Contact missing required field name, or a row carries platformIdentifier/accountId with no top-level accountId to attach it to. A row missing platformIdentifier while accountId IS set is not a 400: it is reported in errors[] under a 200. An accountId on a platform with no contact channels rejects the whole import (code: platform_not_supported, details.supportedPlatforms lists the valid values).' }
|
|
38192
38192
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
38193
38193
|
|
|
38194
38194
|
/v1/contacts/{contactId}/fields/{slug}:
|
|
@@ -78,6 +78,10 @@ describe Zernio::CreateContactRequest do
|
|
|
78
78
|
describe 'test attribute "platform"' do
|
|
79
79
|
it 'should work' do
|
|
80
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "twitter", "bluesky", "reddit", "whatsapp", "slack"])
|
|
82
|
+
# validator.allowable_values.each do |value|
|
|
83
|
+
# expect { instance.platform = value }.not_to raise_error
|
|
84
|
+
# end
|
|
81
85
|
end
|
|
82
86
|
end
|
|
83
87
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.812
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|