late-sdk 0.0.597 → 0.0.599
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 +3 -0
- data/docs/CreatePostRequestPlatformsInnerPlatformSpecificData.md +2 -0
- data/docs/PlatformTargetPlatformSpecificData.md +2 -0
- data/docs/SendInboxMessage400Response.md +4 -2
- data/docs/SendInboxMessage400ResponsePlatformError.md +24 -0
- data/docs/SendPrivateReplyToComment400Response.md +20 -0
- data/docs/SlackPlatformData.md +26 -0
- data/lib/zernio-sdk/api/accounts_api.rb +1 -1
- data/lib/zernio-sdk/api/connect_api.rb +1 -1
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/create_post_request_platforms_inner_platform_specific_data.rb +1 -0
- data/lib/zernio-sdk/models/platform_target_platform_specific_data.rb +1 -0
- data/lib/zernio-sdk/models/send_inbox_message400_response.rb +16 -6
- data/lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb +179 -0
- data/lib/zernio-sdk/models/send_private_reply_to_comment400_response.rb +190 -0
- data/lib/zernio-sdk/models/slack_platform_data.rb +189 -0
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/validate_post_request_platforms_inner.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +37 -5
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/send_inbox_message400_response_platform_error_spec.rb +54 -0
- data/spec/models/send_inbox_message400_response_spec.rb +7 -1
- data/spec/models/send_private_reply_to_comment400_response_spec.rb +46 -0
- data/spec/models/slack_platform_data_spec.rb +60 -0
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/validate_post_request_platforms_inner_spec.rb +1 -1
- data/zernio-sdk-0.0.599.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.597.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 845a8dcc9a60d48e9026a2398ce2195149c7c42fd573407641fb21632487ea97
|
|
4
|
+
data.tar.gz: bb4179d668beebadf354fb5e714a9d31b740c6615e0eee141b75d57cf8fcb521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d1720224fb0e73313b1172a080b7dec14aeff78836d25fe9ad29416a3945fce38776f2cb9de02a2d100cc5f5550750f8e7103c9279a9908becbb8aed37f5306
|
|
7
|
+
data.tar.gz: b3efd80328faa59621f554773572494bb0a844877e6c13408cd3ad63896bb1e9279fdd46fec2b65e9922b7045e385ce692f71bed099fc8fc25744ddeccb14b9e
|
data/README.md
CHANGED
|
@@ -1708,6 +1708,7 @@ Class | Method | HTTP request | Description
|
|
|
1708
1708
|
- [Zernio::SendInboxMessage200Response](docs/SendInboxMessage200Response.md)
|
|
1709
1709
|
- [Zernio::SendInboxMessage200ResponseData](docs/SendInboxMessage200ResponseData.md)
|
|
1710
1710
|
- [Zernio::SendInboxMessage400Response](docs/SendInboxMessage400Response.md)
|
|
1711
|
+
- [Zernio::SendInboxMessage400ResponsePlatformError](docs/SendInboxMessage400ResponsePlatformError.md)
|
|
1711
1712
|
- [Zernio::SendInboxMessageRequest](docs/SendInboxMessageRequest.md)
|
|
1712
1713
|
- [Zernio::SendInboxMessageRequestButtonsInner](docs/SendInboxMessageRequestButtonsInner.md)
|
|
1713
1714
|
- [Zernio::SendInboxMessageRequestContactsInner](docs/SendInboxMessageRequestContactsInner.md)
|
|
@@ -1747,6 +1748,7 @@ Class | Method | HTTP request | Description
|
|
|
1747
1748
|
- [Zernio::SendInboxMessageRequestTemplateElementsInner](docs/SendInboxMessageRequestTemplateElementsInner.md)
|
|
1748
1749
|
- [Zernio::SendInboxMessageRequestTemplateElementsInnerButtonsInner](docs/SendInboxMessageRequestTemplateElementsInnerButtonsInner.md)
|
|
1749
1750
|
- [Zernio::SendPrivateReplyToComment200Response](docs/SendPrivateReplyToComment200Response.md)
|
|
1751
|
+
- [Zernio::SendPrivateReplyToComment400Response](docs/SendPrivateReplyToComment400Response.md)
|
|
1750
1752
|
- [Zernio::SendPrivateReplyToCommentRequest](docs/SendPrivateReplyToCommentRequest.md)
|
|
1751
1753
|
- [Zernio::SendPrivateReplyToCommentRequestButtonsInner](docs/SendPrivateReplyToCommentRequestButtonsInner.md)
|
|
1752
1754
|
- [Zernio::SendPrivateReplyToCommentRequestButtonsInnerOneOf](docs/SendPrivateReplyToCommentRequestButtonsInnerOneOf.md)
|
|
@@ -1775,6 +1777,7 @@ Class | Method | HTTP request | Description
|
|
|
1775
1777
|
- [Zernio::ShareSmsRegistration200Response](docs/ShareSmsRegistration200Response.md)
|
|
1776
1778
|
- [Zernio::ShareSmsRegistrationRequest](docs/ShareSmsRegistrationRequest.md)
|
|
1777
1779
|
- [Zernio::SharedAdAccount](docs/SharedAdAccount.md)
|
|
1780
|
+
- [Zernio::SlackPlatformData](docs/SlackPlatformData.md)
|
|
1778
1781
|
- [Zernio::SnapchatPlatformData](docs/SnapchatPlatformData.md)
|
|
1779
1782
|
- [Zernio::SocialAccount](docs/SocialAccount.md)
|
|
1780
1783
|
- [Zernio::SocialAccountProfileId](docs/SocialAccountProfileId.md)
|
|
@@ -22,6 +22,7 @@ Zernio::CreatePostRequestPlatformsInnerPlatformSpecificData.openapi_one_of
|
|
|
22
22
|
# :'LinkedInPlatformData',
|
|
23
23
|
# :'PinterestPlatformData',
|
|
24
24
|
# :'RedditPlatformData',
|
|
25
|
+
# :'SlackPlatformData',
|
|
25
26
|
# :'SnapchatPlatformData',
|
|
26
27
|
# :'TelegramPlatformData',
|
|
27
28
|
# :'ThreadsPlatformData',
|
|
@@ -63,6 +64,7 @@ Zernio::CreatePostRequestPlatformsInnerPlatformSpecificData.build(data_that_does
|
|
|
63
64
|
- `LinkedInPlatformData`
|
|
64
65
|
- `PinterestPlatformData`
|
|
65
66
|
- `RedditPlatformData`
|
|
67
|
+
- `SlackPlatformData`
|
|
66
68
|
- `SnapchatPlatformData`
|
|
67
69
|
- `TelegramPlatformData`
|
|
68
70
|
- `ThreadsPlatformData`
|
|
@@ -22,6 +22,7 @@ Zernio::PlatformTargetPlatformSpecificData.openapi_one_of
|
|
|
22
22
|
# :'LinkedInPlatformData',
|
|
23
23
|
# :'PinterestPlatformData',
|
|
24
24
|
# :'RedditPlatformData',
|
|
25
|
+
# :'SlackPlatformData',
|
|
25
26
|
# :'SnapchatPlatformData',
|
|
26
27
|
# :'TelegramPlatformData',
|
|
27
28
|
# :'ThreadsPlatformData',
|
|
@@ -63,6 +64,7 @@ Zernio::PlatformTargetPlatformSpecificData.build(data_that_doesnt_match)
|
|
|
63
64
|
- `LinkedInPlatformData`
|
|
64
65
|
- `PinterestPlatformData`
|
|
65
66
|
- `RedditPlatformData`
|
|
67
|
+
- `SlackPlatformData`
|
|
66
68
|
- `SnapchatPlatformData`
|
|
67
69
|
- `TelegramPlatformData`
|
|
68
70
|
- `ThreadsPlatformData`
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **error** | **String** | | [optional] |
|
|
8
|
-
| **code** | **String** |
|
|
8
|
+
| **code** | **String** | Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to. | [optional] |
|
|
9
|
+
| **platform_error** | [**SendInboxMessage400ResponsePlatformError**](SendInboxMessage400ResponsePlatformError.md) | | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::SendInboxMessage400Response.new(
|
|
16
17
|
error: null,
|
|
17
|
-
code: null
|
|
18
|
+
code: null,
|
|
19
|
+
platform_error: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::SendInboxMessage400ResponsePlatformError
|
|
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::SendInboxMessage400ResponsePlatformError.new(
|
|
18
|
+
code: null,
|
|
19
|
+
subcode: null,
|
|
20
|
+
fbtrace_id: null,
|
|
21
|
+
type: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::SendPrivateReplyToComment400Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | | [optional] |
|
|
8
|
+
| **code** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::SendPrivateReplyToComment400Response.new(
|
|
16
|
+
error: null,
|
|
17
|
+
code: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zernio::SlackPlatformData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **thread_ts** | **String** | Parent message ts to post this message as a thread reply (e.g. \"1503435956.000247\"). | [optional] |
|
|
8
|
+
| **unfurl_links** | **Boolean** | Expand links in the message into preview cards. Default true. | [optional] |
|
|
9
|
+
| **unfurl_media** | **Boolean** | Expand media links into inline previews. Default true. | [optional] |
|
|
10
|
+
| **username** | **String** | Override the bot display name for this message only (requires no setup; shown with an APP badge). Does not change the app identity in the sidebar. | [optional] |
|
|
11
|
+
| **icon_url** | **String** | Override the bot avatar image URL for this message only. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zernio-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Zernio::SlackPlatformData.new(
|
|
19
|
+
thread_ts: null,
|
|
20
|
+
unfurl_links: null,
|
|
21
|
+
unfurl_media: null,
|
|
22
|
+
username: null,
|
|
23
|
+
icon_url: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -168,7 +168,7 @@ module Zernio
|
|
|
168
168
|
if @api_client.config.debugging
|
|
169
169
|
@api_client.config.logger.debug 'Calling API: AccountsApi.get_all_accounts_health ...'
|
|
170
170
|
end
|
|
171
|
-
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp"]
|
|
171
|
+
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp"]
|
|
172
172
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
173
173
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
174
174
|
end
|
|
@@ -697,7 +697,7 @@ module Zernio
|
|
|
697
697
|
fail ArgumentError, "Missing the required parameter 'platform' when calling ConnectApi.get_connect_url"
|
|
698
698
|
end
|
|
699
699
|
# verify enum value
|
|
700
|
-
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "reddit", "pinterest", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp"]
|
|
700
|
+
allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "reddit", "pinterest", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp"]
|
|
701
701
|
if @api_client.config.client_side_validation && !allowable_values.include?(platform)
|
|
702
702
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
703
703
|
end
|
|
@@ -299,7 +299,7 @@ module Zernio
|
|
|
299
299
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
300
300
|
return false if @_id.nil?
|
|
301
301
|
return false if @platform.nil?
|
|
302
|
-
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
302
|
+
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
303
303
|
return false unless platform_validator.valid?(@platform)
|
|
304
304
|
return false if @profile_id.nil?
|
|
305
305
|
return false if @is_active.nil?
|
|
@@ -319,7 +319,7 @@ module Zernio
|
|
|
319
319
|
# Custom attribute writer method checking allowed values (enum).
|
|
320
320
|
# @param [Object] platform Object to be assigned
|
|
321
321
|
def platform=(platform)
|
|
322
|
-
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
322
|
+
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
323
323
|
unless validator.valid?(platform)
|
|
324
324
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
325
325
|
end
|
|
@@ -17,8 +17,11 @@ module Zernio
|
|
|
17
17
|
class SendInboxMessage400Response < ApiModelBase
|
|
18
18
|
attr_accessor :error
|
|
19
19
|
|
|
20
|
+
# Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to.
|
|
20
21
|
attr_accessor :code
|
|
21
22
|
|
|
23
|
+
attr_accessor :platform_error
|
|
24
|
+
|
|
22
25
|
class EnumAttributeValidator
|
|
23
26
|
attr_reader :datatype
|
|
24
27
|
attr_reader :allowable_values
|
|
@@ -45,7 +48,8 @@ module Zernio
|
|
|
45
48
|
def self.attribute_map
|
|
46
49
|
{
|
|
47
50
|
:'error' => :'error',
|
|
48
|
-
:'code' => :'code'
|
|
51
|
+
:'code' => :'code',
|
|
52
|
+
:'platform_error' => :'platformError'
|
|
49
53
|
}
|
|
50
54
|
end
|
|
51
55
|
|
|
@@ -63,7 +67,8 @@ module Zernio
|
|
|
63
67
|
def self.openapi_types
|
|
64
68
|
{
|
|
65
69
|
:'error' => :'String',
|
|
66
|
-
:'code' => :'String'
|
|
70
|
+
:'code' => :'String',
|
|
71
|
+
:'platform_error' => :'SendInboxMessage400ResponsePlatformError'
|
|
67
72
|
}
|
|
68
73
|
end
|
|
69
74
|
|
|
@@ -96,6 +101,10 @@ module Zernio
|
|
|
96
101
|
if attributes.key?(:'code')
|
|
97
102
|
self.code = attributes[:'code']
|
|
98
103
|
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'platform_error')
|
|
106
|
+
self.platform_error = attributes[:'platform_error']
|
|
107
|
+
end
|
|
99
108
|
end
|
|
100
109
|
|
|
101
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -110,7 +119,7 @@ module Zernio
|
|
|
110
119
|
# @return true if the model is valid
|
|
111
120
|
def valid?
|
|
112
121
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
-
code_validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION"])
|
|
122
|
+
code_validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT"])
|
|
114
123
|
return false unless code_validator.valid?(@code)
|
|
115
124
|
true
|
|
116
125
|
end
|
|
@@ -118,7 +127,7 @@ module Zernio
|
|
|
118
127
|
# Custom attribute writer method checking allowed values (enum).
|
|
119
128
|
# @param [Object] code Object to be assigned
|
|
120
129
|
def code=(code)
|
|
121
|
-
validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION"])
|
|
130
|
+
validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT"])
|
|
122
131
|
unless validator.valid?(code)
|
|
123
132
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
124
133
|
end
|
|
@@ -131,7 +140,8 @@ module Zernio
|
|
|
131
140
|
return true if self.equal?(o)
|
|
132
141
|
self.class == o.class &&
|
|
133
142
|
error == o.error &&
|
|
134
|
-
code == o.code
|
|
143
|
+
code == o.code &&
|
|
144
|
+
platform_error == o.platform_error
|
|
135
145
|
end
|
|
136
146
|
|
|
137
147
|
# @see the `==` method
|
|
@@ -143,7 +153,7 @@ module Zernio
|
|
|
143
153
|
# Calculates hash code according to all attributes.
|
|
144
154
|
# @return [Integer] Hash code
|
|
145
155
|
def hash
|
|
146
|
-
[error, code].hash
|
|
156
|
+
[error, code, platform_error].hash
|
|
147
157
|
end
|
|
148
158
|
|
|
149
159
|
# Builds the object from hash
|
|
@@ -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
|
|
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
|
+
# Instagram/Facebook only. Meta's own diagnostic fields for the rejected send, passed through verbatim so you can tell failure classes apart and quote them to Meta. Absent when the failure did not come from Meta.
|
|
18
|
+
class SendInboxMessage400ResponsePlatformError < 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::SendInboxMessage400ResponsePlatformError` 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::SendInboxMessage400ResponsePlatformError`. 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
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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
|
+
class SendPrivateReplyToComment400Response < ApiModelBase
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
class EnumAttributeValidator
|
|
23
|
+
attr_reader :datatype
|
|
24
|
+
attr_reader :allowable_values
|
|
25
|
+
|
|
26
|
+
def initialize(datatype, allowable_values)
|
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
|
28
|
+
case datatype.to_s
|
|
29
|
+
when /Integer/i
|
|
30
|
+
value.to_i
|
|
31
|
+
when /Float/i
|
|
32
|
+
value.to_f
|
|
33
|
+
else
|
|
34
|
+
value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def valid?(value)
|
|
40
|
+
!value || allowable_values.include?(value)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
|
+
def self.attribute_map
|
|
46
|
+
{
|
|
47
|
+
:'error' => :'error',
|
|
48
|
+
:'code' => :'code'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'error' => :'String',
|
|
66
|
+
:'code' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SendPrivateReplyToComment400Response` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SendPrivateReplyToComment400Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'error')
|
|
93
|
+
self.error = attributes[:'error']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'code')
|
|
97
|
+
self.code = attributes[:'code']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
code_validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION"])
|
|
114
|
+
return false unless code_validator.valid?(@code)
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
119
|
+
# @param [Object] code Object to be assigned
|
|
120
|
+
def code=(code)
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION"])
|
|
122
|
+
unless validator.valid?(code)
|
|
123
|
+
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
124
|
+
end
|
|
125
|
+
@code = code
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
error == o.error &&
|
|
134
|
+
code == o.code
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[error, code].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|