late-sdk 0.0.786 → 0.0.788
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 +4 -0
- data/docs/AccountsApi.md +70 -0
- data/docs/CreateInboxConversationRequest.md +3 -1
- data/docs/CreateInboxConversationRequestHeaderLocation.md +24 -0
- data/docs/GetAccountPosts200Response.md +22 -0
- data/docs/GetAccountPosts200ResponsePostsInner.md +42 -0
- data/docs/MessagesApi.md +2 -2
- data/lib/zernio-sdk/api/accounts_api.rb +63 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +13 -4
- data/lib/zernio-sdk/models/create_inbox_conversation_request_header_location.rb +213 -0
- data/lib/zernio-sdk/models/get_account_posts200_response.rb +201 -0
- data/lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb +262 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +103 -1
- data/spec/api/accounts_api_spec.rb +12 -0
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/create_inbox_conversation_request_header_location_spec.rb +54 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
- data/spec/models/get_account_posts200_response_posts_inner_spec.rb +108 -0
- data/spec/models/get_account_posts200_response_spec.rb +52 -0
- data/zernio-sdk-0.0.788.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.786.gem +0 -0
|
@@ -0,0 +1,213 @@
|
|
|
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
|
+
# WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
|
|
18
|
+
class CreateInboxConversationRequestHeaderLocation < ApiModelBase
|
|
19
|
+
# Latitude in decimal degrees.
|
|
20
|
+
attr_accessor :latitude
|
|
21
|
+
|
|
22
|
+
# Longitude in decimal degrees.
|
|
23
|
+
attr_accessor :longitude
|
|
24
|
+
|
|
25
|
+
# Location name shown to the recipient (e.g. a business name).
|
|
26
|
+
attr_accessor :name
|
|
27
|
+
|
|
28
|
+
# Location address shown to the recipient.
|
|
29
|
+
attr_accessor :address
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'latitude' => :'latitude',
|
|
35
|
+
:'longitude' => :'longitude',
|
|
36
|
+
:'name' => :'name',
|
|
37
|
+
:'address' => :'address'
|
|
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
|
+
:'latitude' => :'Float',
|
|
55
|
+
:'longitude' => :'Float',
|
|
56
|
+
:'name' => :'String',
|
|
57
|
+
:'address' => :'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::CreateInboxConversationRequestHeaderLocation` 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::CreateInboxConversationRequestHeaderLocation`. 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?(:'latitude')
|
|
84
|
+
self.latitude = attributes[:'latitude']
|
|
85
|
+
else
|
|
86
|
+
self.latitude = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'longitude')
|
|
90
|
+
self.longitude = attributes[:'longitude']
|
|
91
|
+
else
|
|
92
|
+
self.longitude = nil
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'name')
|
|
96
|
+
self.name = attributes[:'name']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'address')
|
|
100
|
+
self.address = attributes[:'address']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
if @latitude.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "latitude", latitude cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @longitude.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
invalid_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check to see if the all the properties in the model are valid
|
|
121
|
+
# @return true if the model is valid
|
|
122
|
+
def valid?
|
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
124
|
+
return false if @latitude.nil?
|
|
125
|
+
return false if @longitude.nil?
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] latitude Value to be assigned
|
|
131
|
+
def latitude=(latitude)
|
|
132
|
+
if latitude.nil?
|
|
133
|
+
fail ArgumentError, 'latitude cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@latitude = latitude
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] longitude Value to be assigned
|
|
141
|
+
def longitude=(longitude)
|
|
142
|
+
if longitude.nil?
|
|
143
|
+
fail ArgumentError, 'longitude cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@longitude = longitude
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Checks equality by comparing each attribute.
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def ==(o)
|
|
152
|
+
return true if self.equal?(o)
|
|
153
|
+
self.class == o.class &&
|
|
154
|
+
latitude == o.latitude &&
|
|
155
|
+
longitude == o.longitude &&
|
|
156
|
+
name == o.name &&
|
|
157
|
+
address == o.address
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# @see the `==` method
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def eql?(o)
|
|
163
|
+
self == o
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Calculates hash code according to all attributes.
|
|
167
|
+
# @return [Integer] Hash code
|
|
168
|
+
def hash
|
|
169
|
+
[latitude, longitude, name, address].hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def self.build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
transformed_hash = {}
|
|
179
|
+
openapi_types.each_pair do |key, type|
|
|
180
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = nil
|
|
182
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
183
|
+
# check to ensure the input is an array given that the attribute
|
|
184
|
+
# is documented as an array but the input is not
|
|
185
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
186
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
187
|
+
end
|
|
188
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
new(transformed_hash)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns the object in the form of hash
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_hash
|
|
198
|
+
hash = {}
|
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
+
value = self.send(attr)
|
|
201
|
+
if value.nil?
|
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
hash[param] = _to_hash(value)
|
|
207
|
+
end
|
|
208
|
+
hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
end
|
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
class GetAccountPosts200Response < ApiModelBase
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
attr_accessor :posts
|
|
21
|
+
|
|
22
|
+
attr_accessor :last_updated
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'status' => :'status',
|
|
50
|
+
:'posts' => :'posts',
|
|
51
|
+
:'last_updated' => :'lastUpdated'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'status' => :'String',
|
|
69
|
+
:'posts' => :'Array<GetAccountPosts200ResponsePostsInner>',
|
|
70
|
+
:'last_updated' => :'Time'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAccountPosts200Response` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAccountPosts200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'status')
|
|
97
|
+
self.status = attributes[:'status']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'posts')
|
|
101
|
+
if (value = attributes[:'posts']).is_a?(Array)
|
|
102
|
+
self.posts = value
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'last_updated')
|
|
107
|
+
self.last_updated = attributes[:'last_updated']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
invalid_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
def valid?
|
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
|
+
status_validator = EnumAttributeValidator.new('String', ["success"])
|
|
124
|
+
return false unless status_validator.valid?(@status)
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
129
|
+
# @param [Object] status Object to be assigned
|
|
130
|
+
def status=(status)
|
|
131
|
+
validator = EnumAttributeValidator.new('String', ["success"])
|
|
132
|
+
unless validator.valid?(status)
|
|
133
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
134
|
+
end
|
|
135
|
+
@status = status
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
status == o.status &&
|
|
144
|
+
posts == o.posts &&
|
|
145
|
+
last_updated == o.last_updated
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[status, posts, last_updated].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
transformed_hash = {}
|
|
167
|
+
openapi_types.each_pair do |key, type|
|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = nil
|
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
new(transformed_hash)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = self.send(attr)
|
|
189
|
+
if value.nil?
|
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
hash[param] = _to_hash(value)
|
|
195
|
+
end
|
|
196
|
+
hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
@@ -0,0 +1,262 @@
|
|
|
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
|
+
class GetAccountPosts200ResponsePostsInner < ApiModelBase
|
|
18
|
+
# The platform's own post id (the video ID on YouTube)
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :platform
|
|
22
|
+
|
|
23
|
+
# Caption or title, empty string when the post has no text
|
|
24
|
+
attr_accessor :message
|
|
25
|
+
|
|
26
|
+
attr_accessor :created_time
|
|
27
|
+
|
|
28
|
+
# Public URL of the post on the platform
|
|
29
|
+
attr_accessor :permalink
|
|
30
|
+
|
|
31
|
+
# Thumbnail or media URL
|
|
32
|
+
attr_accessor :picture
|
|
33
|
+
|
|
34
|
+
attr_accessor :media_type
|
|
35
|
+
|
|
36
|
+
attr_accessor :comment_count
|
|
37
|
+
|
|
38
|
+
attr_accessor :like_count
|
|
39
|
+
|
|
40
|
+
# Facebook and LinkedIn only
|
|
41
|
+
attr_accessor :reaction_count
|
|
42
|
+
|
|
43
|
+
attr_accessor :share_count
|
|
44
|
+
|
|
45
|
+
# Bluesky content id, required to reply to the post
|
|
46
|
+
attr_accessor :cid
|
|
47
|
+
|
|
48
|
+
# Reddit only
|
|
49
|
+
attr_accessor :subreddit
|
|
50
|
+
|
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'id' => :'id',
|
|
55
|
+
:'platform' => :'platform',
|
|
56
|
+
:'message' => :'message',
|
|
57
|
+
:'created_time' => :'createdTime',
|
|
58
|
+
:'permalink' => :'permalink',
|
|
59
|
+
:'picture' => :'picture',
|
|
60
|
+
:'media_type' => :'mediaType',
|
|
61
|
+
:'comment_count' => :'commentCount',
|
|
62
|
+
:'like_count' => :'likeCount',
|
|
63
|
+
:'reaction_count' => :'reactionCount',
|
|
64
|
+
:'share_count' => :'shareCount',
|
|
65
|
+
:'cid' => :'cid',
|
|
66
|
+
:'subreddit' => :'subreddit'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'id' => :'String',
|
|
84
|
+
:'platform' => :'String',
|
|
85
|
+
:'message' => :'String',
|
|
86
|
+
:'created_time' => :'Time',
|
|
87
|
+
:'permalink' => :'String',
|
|
88
|
+
:'picture' => :'String',
|
|
89
|
+
:'media_type' => :'String',
|
|
90
|
+
:'comment_count' => :'Integer',
|
|
91
|
+
:'like_count' => :'Integer',
|
|
92
|
+
:'reaction_count' => :'Integer',
|
|
93
|
+
:'share_count' => :'Integer',
|
|
94
|
+
:'cid' => :'String',
|
|
95
|
+
:'subreddit' => :'String'
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# List of attributes with nullable: true
|
|
100
|
+
def self.openapi_nullable
|
|
101
|
+
Set.new([
|
|
102
|
+
])
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Initializes the object
|
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
107
|
+
def initialize(attributes = {})
|
|
108
|
+
if (!attributes.is_a?(Hash))
|
|
109
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAccountPosts200ResponsePostsInner` initialize method"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
113
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
115
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAccountPosts200ResponsePostsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
117
|
+
end
|
|
118
|
+
h[k.to_sym] = v
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'id')
|
|
122
|
+
self.id = attributes[:'id']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'platform')
|
|
126
|
+
self.platform = attributes[:'platform']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'message')
|
|
130
|
+
self.message = attributes[:'message']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'created_time')
|
|
134
|
+
self.created_time = attributes[:'created_time']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'permalink')
|
|
138
|
+
self.permalink = attributes[:'permalink']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'picture')
|
|
142
|
+
self.picture = attributes[:'picture']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'media_type')
|
|
146
|
+
self.media_type = attributes[:'media_type']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'comment_count')
|
|
150
|
+
self.comment_count = attributes[:'comment_count']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'like_count')
|
|
154
|
+
self.like_count = attributes[:'like_count']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'reaction_count')
|
|
158
|
+
self.reaction_count = attributes[:'reaction_count']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'share_count')
|
|
162
|
+
self.share_count = attributes[:'share_count']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'cid')
|
|
166
|
+
self.cid = attributes[:'cid']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'subreddit')
|
|
170
|
+
self.subreddit = attributes[:'subreddit']
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
175
|
+
# @return Array for valid properties with the reasons
|
|
176
|
+
def list_invalid_properties
|
|
177
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
178
|
+
invalid_properties = Array.new
|
|
179
|
+
invalid_properties
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Check to see if the all the properties in the model are valid
|
|
183
|
+
# @return true if the model is valid
|
|
184
|
+
def valid?
|
|
185
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
186
|
+
true
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Checks equality by comparing each attribute.
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def ==(o)
|
|
192
|
+
return true if self.equal?(o)
|
|
193
|
+
self.class == o.class &&
|
|
194
|
+
id == o.id &&
|
|
195
|
+
platform == o.platform &&
|
|
196
|
+
message == o.message &&
|
|
197
|
+
created_time == o.created_time &&
|
|
198
|
+
permalink == o.permalink &&
|
|
199
|
+
picture == o.picture &&
|
|
200
|
+
media_type == o.media_type &&
|
|
201
|
+
comment_count == o.comment_count &&
|
|
202
|
+
like_count == o.like_count &&
|
|
203
|
+
reaction_count == o.reaction_count &&
|
|
204
|
+
share_count == o.share_count &&
|
|
205
|
+
cid == o.cid &&
|
|
206
|
+
subreddit == o.subreddit
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @see the `==` method
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def eql?(o)
|
|
212
|
+
self == o
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Calculates hash code according to all attributes.
|
|
216
|
+
# @return [Integer] Hash code
|
|
217
|
+
def hash
|
|
218
|
+
[id, platform, message, created_time, permalink, picture, media_type, comment_count, like_count, reaction_count, share_count, cid, subreddit].hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Builds the object from hash
|
|
222
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
223
|
+
# @return [Object] Returns the model itself
|
|
224
|
+
def self.build_from_hash(attributes)
|
|
225
|
+
return nil unless attributes.is_a?(Hash)
|
|
226
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
227
|
+
transformed_hash = {}
|
|
228
|
+
openapi_types.each_pair do |key, type|
|
|
229
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
230
|
+
transformed_hash["#{key}"] = nil
|
|
231
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
232
|
+
# check to ensure the input is an array given that the attribute
|
|
233
|
+
# is documented as an array but the input is not
|
|
234
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
235
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
236
|
+
end
|
|
237
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
238
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
new(transformed_hash)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the object in the form of hash
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_hash
|
|
247
|
+
hash = {}
|
|
248
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
249
|
+
value = self.send(attr)
|
|
250
|
+
if value.nil?
|
|
251
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
252
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
hash[param] = _to_hash(value)
|
|
256
|
+
end
|
|
257
|
+
hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -261,6 +261,7 @@ require 'zernio-sdk/models/create_inbox_conversation404_response'
|
|
|
261
261
|
require 'zernio-sdk/models/create_inbox_conversation422_response'
|
|
262
262
|
require 'zernio-sdk/models/create_inbox_conversation429_response'
|
|
263
263
|
require 'zernio-sdk/models/create_inbox_conversation_request'
|
|
264
|
+
require 'zernio-sdk/models/create_inbox_conversation_request_header_location'
|
|
264
265
|
require 'zernio-sdk/models/create_inbox_conversation_request_header_media'
|
|
265
266
|
require 'zernio-sdk/models/create_inbox_conversation_request_template_button_params_inner'
|
|
266
267
|
require 'zernio-sdk/models/create_invite_token201_response'
|
|
@@ -496,6 +497,8 @@ require 'zernio-sdk/models/get_account_health200_response_permissions_posting_in
|
|
|
496
497
|
require 'zernio-sdk/models/get_account_health200_response_platform_connection'
|
|
497
498
|
require 'zernio-sdk/models/get_account_health200_response_platform_connection_meta_error'
|
|
498
499
|
require 'zernio-sdk/models/get_account_health200_response_token_status'
|
|
500
|
+
require 'zernio-sdk/models/get_account_posts200_response'
|
|
501
|
+
require 'zernio-sdk/models/get_account_posts200_response_posts_inner'
|
|
499
502
|
require 'zernio-sdk/models/get_ad200_response'
|
|
500
503
|
require 'zernio-sdk/models/get_ad_account_finance200_response'
|
|
501
504
|
require 'zernio-sdk/models/get_ad_account_finance200_response_funding_source'
|