late-sdk 0.0.110 → 0.0.112
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 +20 -0
- data/docs/AnalyticsApi.md +154 -0
- data/docs/CreateInboxConversation201Response.md +20 -0
- data/docs/CreateInboxConversation201ResponseData.md +26 -0
- data/docs/CreateInboxConversation400Response.md +20 -0
- data/docs/CreateInboxConversation422Response.md +20 -0
- data/docs/CreateInboxConversationRequest.md +26 -0
- data/docs/CreatePostRequest.md +2 -0
- data/docs/EditPost200Response.md +24 -0
- data/docs/EditPostRequest.md +20 -0
- data/docs/FacebookPlatformData.md +3 -1
- data/docs/GetGoogleBusinessPerformance200Response.md +28 -0
- data/docs/GetGoogleBusinessPerformance200ResponseDateRange.md +20 -0
- data/docs/GetGoogleBusinessPerformance200ResponseMetricsValue.md +20 -0
- data/docs/GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner.md +20 -0
- data/docs/GetGoogleBusinessPerformance400Response.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords200Response.md +28 -0
- data/docs/GetGoogleBusinessSearchKeywords200ResponseKeywordsInner.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords200ResponseMonthRange.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords400Response.md +18 -0
- data/docs/MessagesApi.md +70 -0
- data/docs/PostsApi.md +72 -0
- data/docs/TwitterPlatformData.md +3 -1
- data/docs/UpdatePostRequest.md +2 -0
- data/lib/late-sdk/api/analytics_api.rb +153 -0
- data/lib/late-sdk/api/messages_api.rb +68 -0
- data/lib/late-sdk/api/posts_api.rb +74 -0
- data/lib/late-sdk/models/create_inbox_conversation201_response.rb +156 -0
- data/lib/late-sdk/models/create_inbox_conversation201_response_data.rb +188 -0
- data/lib/late-sdk/models/create_inbox_conversation400_response.rb +190 -0
- data/lib/late-sdk/models/create_inbox_conversation422_response.rb +190 -0
- data/lib/late-sdk/models/create_inbox_conversation_request.rb +207 -0
- data/lib/late-sdk/models/create_post_request.rb +11 -1
- data/lib/late-sdk/models/edit_post200_response.rb +176 -0
- data/lib/late-sdk/models/edit_post_request.rb +216 -0
- data/lib/late-sdk/models/facebook_platform_data.rb +14 -2
- data/lib/late-sdk/models/get_google_business_performance200_response.rb +195 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_date_range.rb +156 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value.rb +159 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value_values_inner.rb +156 -0
- data/lib/late-sdk/models/get_google_business_performance400_response.rb +158 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response.rb +194 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response_keywords_inner.rb +156 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response_month_range.rb +156 -0
- data/lib/late-sdk/models/get_google_business_search_keywords400_response.rb +147 -0
- data/lib/late-sdk/models/twitter_platform_data.rb +16 -4
- data/lib/late-sdk/models/update_post_request.rb +11 -1
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +16 -0
- data/openapi.yaml +423 -1
- data/spec/api/analytics_api_spec.rb +29 -0
- data/spec/api/messages_api_spec.rb +12 -0
- data/spec/api/posts_api_spec.rb +13 -0
- data/spec/models/create_inbox_conversation201_response_data_spec.rb +60 -0
- data/spec/models/create_inbox_conversation201_response_spec.rb +42 -0
- data/spec/models/create_inbox_conversation400_response_spec.rb +46 -0
- data/spec/models/create_inbox_conversation422_response_spec.rb +46 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +60 -0
- data/spec/models/create_post_request_spec.rb +6 -0
- data/spec/models/edit_post200_response_spec.rb +54 -0
- data/spec/models/edit_post_request_spec.rb +46 -0
- data/spec/models/facebook_platform_data_spec.rb +6 -0
- data/spec/models/get_google_business_performance200_response_date_range_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_metrics_value_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_metrics_value_values_inner_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_spec.rb +66 -0
- data/spec/models/get_google_business_performance400_response_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_keywords_inner_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_month_range_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_spec.rb +66 -0
- data/spec/models/get_google_business_search_keywords400_response_spec.rb +36 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- data/spec/models/update_post_request_spec.rb +6 -0
- data/zernio-sdk-0.0.112.gem +0 -0
- metadata +67 -3
- data/zernio-sdk-0.0.110.gem +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class EditPostRequest < ApiModelBase
|
|
18
|
+
# The platform to edit the post on. Currently only twitter is supported.
|
|
19
|
+
attr_accessor :platform
|
|
20
|
+
|
|
21
|
+
# The new tweet text content
|
|
22
|
+
attr_accessor :content
|
|
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
|
+
:'platform' => :'platform',
|
|
50
|
+
:'content' => :'content'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns attribute mapping this model knows about
|
|
55
|
+
def self.acceptable_attribute_map
|
|
56
|
+
attribute_map
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns all the JSON keys this model knows about
|
|
60
|
+
def self.acceptable_attributes
|
|
61
|
+
acceptable_attribute_map.values
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute type mapping.
|
|
65
|
+
def self.openapi_types
|
|
66
|
+
{
|
|
67
|
+
:'platform' => :'String',
|
|
68
|
+
:'content' => :'String'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# List of attributes with nullable: true
|
|
73
|
+
def self.openapi_nullable
|
|
74
|
+
Set.new([
|
|
75
|
+
])
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Initializes the object
|
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
if (!attributes.is_a?(Hash))
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::EditPostRequest` initialize method"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
88
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::EditPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
90
|
+
end
|
|
91
|
+
h[k.to_sym] = v
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'platform')
|
|
95
|
+
self.platform = attributes[:'platform']
|
|
96
|
+
else
|
|
97
|
+
self.platform = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'content')
|
|
101
|
+
self.content = attributes[:'content']
|
|
102
|
+
else
|
|
103
|
+
self.content = nil
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @platform.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @content.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
+
return false if @platform.nil?
|
|
128
|
+
platform_validator = EnumAttributeValidator.new('String', ["twitter"])
|
|
129
|
+
return false unless platform_validator.valid?(@platform)
|
|
130
|
+
return false if @content.nil?
|
|
131
|
+
true
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
135
|
+
# @param [Object] platform Object to be assigned
|
|
136
|
+
def platform=(platform)
|
|
137
|
+
validator = EnumAttributeValidator.new('String', ["twitter"])
|
|
138
|
+
unless validator.valid?(platform)
|
|
139
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
140
|
+
end
|
|
141
|
+
@platform = platform
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] content Value to be assigned
|
|
146
|
+
def content=(content)
|
|
147
|
+
if content.nil?
|
|
148
|
+
fail ArgumentError, 'content cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@content = content
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
platform == o.platform &&
|
|
160
|
+
content == o.content
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# @see the `==` method
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def eql?(o)
|
|
166
|
+
self == o
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Calculates hash code according to all attributes.
|
|
170
|
+
# @return [Integer] Hash code
|
|
171
|
+
def hash
|
|
172
|
+
[platform, content].hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Builds the object from hash
|
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
177
|
+
# @return [Object] Returns the model itself
|
|
178
|
+
def self.build_from_hash(attributes)
|
|
179
|
+
return nil unless attributes.is_a?(Hash)
|
|
180
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
181
|
+
transformed_hash = {}
|
|
182
|
+
openapi_types.each_pair do |key, type|
|
|
183
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
184
|
+
transformed_hash["#{key}"] = nil
|
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
186
|
+
# check to ensure the input is an array given that the attribute
|
|
187
|
+
# is documented as an array but the input is not
|
|
188
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
189
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
190
|
+
end
|
|
191
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
192
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
new(transformed_hash)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the object in the form of hash
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_hash
|
|
201
|
+
hash = {}
|
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
203
|
+
value = self.send(attr)
|
|
204
|
+
if value.nil?
|
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
@@ -16,13 +16,16 @@ require 'time'
|
|
|
16
16
|
module Late
|
|
17
17
|
# Feed posts support up to 10 images (no mixed video+image). Stories require single media (24h, no captions). Reels require single vertical video (9:16, 3-60s).
|
|
18
18
|
class FacebookPlatformData < ApiModelBase
|
|
19
|
+
# When true, creates the post as an unpublished draft visible in Facebook Publishing Tools instead of publishing immediately. Supported for feed posts (text, link, image, video) and reels. Not supported for stories. Drafts expire after ~30 days.
|
|
20
|
+
attr_accessor :draft
|
|
21
|
+
|
|
19
22
|
# Set to 'story' for Page Stories (24h ephemeral) or 'reel' for Reels (short vertical video). Defaults to feed post if omitted.
|
|
20
23
|
attr_accessor :content_type
|
|
21
24
|
|
|
22
25
|
# Reel title (only for contentType=reel). Separate from the caption/content field.
|
|
23
26
|
attr_accessor :title
|
|
24
27
|
|
|
25
|
-
# Optional first comment to post immediately after publishing (feed posts only, not stories or reels)
|
|
28
|
+
# Optional first comment to post immediately after publishing (feed posts only, not stories or reels). Skipped when draft is true.
|
|
26
29
|
attr_accessor :first_comment
|
|
27
30
|
|
|
28
31
|
# Target Facebook Page ID for multi-page posting. If omitted, uses the default page. Use GET /v1/accounts/{id}/facebook-page to list pages.
|
|
@@ -53,6 +56,7 @@ module Late
|
|
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
57
|
def self.attribute_map
|
|
55
58
|
{
|
|
59
|
+
:'draft' => :'draft',
|
|
56
60
|
:'content_type' => :'contentType',
|
|
57
61
|
:'title' => :'title',
|
|
58
62
|
:'first_comment' => :'firstComment',
|
|
@@ -73,6 +77,7 @@ module Late
|
|
|
73
77
|
# Attribute type mapping.
|
|
74
78
|
def self.openapi_types
|
|
75
79
|
{
|
|
80
|
+
:'draft' => :'Boolean',
|
|
76
81
|
:'content_type' => :'String',
|
|
77
82
|
:'title' => :'String',
|
|
78
83
|
:'first_comment' => :'String',
|
|
@@ -102,6 +107,12 @@ module Late
|
|
|
102
107
|
h[k.to_sym] = v
|
|
103
108
|
}
|
|
104
109
|
|
|
110
|
+
if attributes.key?(:'draft')
|
|
111
|
+
self.draft = attributes[:'draft']
|
|
112
|
+
else
|
|
113
|
+
self.draft = false
|
|
114
|
+
end
|
|
115
|
+
|
|
105
116
|
if attributes.key?(:'content_type')
|
|
106
117
|
self.content_type = attributes[:'content_type']
|
|
107
118
|
end
|
|
@@ -151,6 +162,7 @@ module Late
|
|
|
151
162
|
def ==(o)
|
|
152
163
|
return true if self.equal?(o)
|
|
153
164
|
self.class == o.class &&
|
|
165
|
+
draft == o.draft &&
|
|
154
166
|
content_type == o.content_type &&
|
|
155
167
|
title == o.title &&
|
|
156
168
|
first_comment == o.first_comment &&
|
|
@@ -166,7 +178,7 @@ module Late
|
|
|
166
178
|
# Calculates hash code according to all attributes.
|
|
167
179
|
# @return [Integer] Hash code
|
|
168
180
|
def hash
|
|
169
|
-
[content_type, title, first_comment, page_id].hash
|
|
181
|
+
[draft, content_type, title, first_comment, page_id].hash
|
|
170
182
|
end
|
|
171
183
|
|
|
172
184
|
# Builds the object from hash
|
|
@@ -0,0 +1,195 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class GetGoogleBusinessPerformance200Response < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :platform
|
|
23
|
+
|
|
24
|
+
attr_accessor :date_range
|
|
25
|
+
|
|
26
|
+
# Each key is a metric name containing total and daily values.
|
|
27
|
+
attr_accessor :metrics
|
|
28
|
+
|
|
29
|
+
attr_accessor :data_delay
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'success' => :'success',
|
|
35
|
+
:'account_id' => :'accountId',
|
|
36
|
+
:'platform' => :'platform',
|
|
37
|
+
:'date_range' => :'dateRange',
|
|
38
|
+
:'metrics' => :'metrics',
|
|
39
|
+
:'data_delay' => :'dataDelay'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
acceptable_attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'success' => :'Boolean',
|
|
57
|
+
:'account_id' => :'String',
|
|
58
|
+
:'platform' => :'String',
|
|
59
|
+
:'date_range' => :'GetGoogleBusinessPerformance200ResponseDateRange',
|
|
60
|
+
:'metrics' => :'Hash<String, GetGoogleBusinessPerformance200ResponseMetricsValue>',
|
|
61
|
+
:'data_delay' => :'String'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetGoogleBusinessPerformance200Response` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetGoogleBusinessPerformance200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'success')
|
|
88
|
+
self.success = attributes[:'success']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'account_id')
|
|
92
|
+
self.account_id = attributes[:'account_id']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'platform')
|
|
96
|
+
self.platform = attributes[:'platform']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'date_range')
|
|
100
|
+
self.date_range = attributes[:'date_range']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'metrics')
|
|
104
|
+
if (value = attributes[:'metrics']).is_a?(Hash)
|
|
105
|
+
self.metrics = value
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'data_delay')
|
|
110
|
+
self.data_delay = attributes[:'data_delay']
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
+
# @return Array for valid properties with the reasons
|
|
116
|
+
def list_invalid_properties
|
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
118
|
+
invalid_properties = Array.new
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
success == o.success &&
|
|
135
|
+
account_id == o.account_id &&
|
|
136
|
+
platform == o.platform &&
|
|
137
|
+
date_range == o.date_range &&
|
|
138
|
+
metrics == o.metrics &&
|
|
139
|
+
data_delay == o.data_delay
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @see the `==` method
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def eql?(o)
|
|
145
|
+
self == o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Calculates hash code according to all attributes.
|
|
149
|
+
# @return [Integer] Hash code
|
|
150
|
+
def hash
|
|
151
|
+
[success, account_id, platform, date_range, metrics, data_delay].hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Builds the object from hash
|
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
156
|
+
# @return [Object] Returns the model itself
|
|
157
|
+
def self.build_from_hash(attributes)
|
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the object in the form of hash
|
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
|
179
|
+
def to_hash
|
|
180
|
+
hash = {}
|
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
182
|
+
value = self.send(attr)
|
|
183
|
+
if value.nil?
|
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
hash[param] = _to_hash(value)
|
|
189
|
+
end
|
|
190
|
+
hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class GetGoogleBusinessPerformance200ResponseDateRange < ApiModelBase
|
|
18
|
+
attr_accessor :start_date
|
|
19
|
+
|
|
20
|
+
attr_accessor :end_date
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'start_date' => :'startDate',
|
|
26
|
+
:'end_date' => :'endDate'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'start_date' => :'Date',
|
|
44
|
+
:'end_date' => :'Date'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetGoogleBusinessPerformance200ResponseDateRange` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetGoogleBusinessPerformance200ResponseDateRange`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'start_date')
|
|
71
|
+
self.start_date = attributes[:'start_date']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'end_date')
|
|
75
|
+
self.end_date = attributes[:'end_date']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
start_date == o.start_date &&
|
|
100
|
+
end_date == o.end_date
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[start_date, end_date].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|