late-sdk 0.0.49 → 0.0.51

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/docs/AccountWithFollowerStats.md +3 -1
  4. data/docs/AccountWithFollowerStatsAllOfAccountStats.md +38 -0
  5. data/docs/GMBAttributesApi.md +16 -8
  6. data/docs/GMBFoodMenusApi.md +16 -8
  7. data/docs/GMBLocationDetailsApi.md +10 -4
  8. data/docs/GMBMediaApi.md +18 -8
  9. data/docs/GMBPlaceActionsApi.md +18 -8
  10. data/docs/GMBReviewsApi.md +2 -0
  11. data/docs/GetWhatsAppDisplayName200Response.md +20 -0
  12. data/docs/GetWhatsAppDisplayName200ResponseDisplayName.md +22 -0
  13. data/docs/UpdateWhatsAppDisplayName200Response.md +22 -0
  14. data/docs/UpdateWhatsAppDisplayName200ResponseDisplayName.md +20 -0
  15. data/docs/UpdateWhatsAppDisplayNameRequest.md +20 -0
  16. data/docs/WhatsAppApi.md +212 -0
  17. data/lib/late-sdk/api/gmb_attributes_api.rb +6 -0
  18. data/lib/late-sdk/api/gmb_food_menus_api.rb +6 -0
  19. data/lib/late-sdk/api/gmb_location_details_api.rb +6 -0
  20. data/lib/late-sdk/api/gmb_media_api.rb +9 -0
  21. data/lib/late-sdk/api/gmb_place_actions_api.rb +9 -0
  22. data/lib/late-sdk/api/gmb_reviews_api.rb +3 -0
  23. data/lib/late-sdk/api/whats_app_api.rb +208 -0
  24. data/lib/late-sdk/models/account_with_follower_stats.rb +13 -4
  25. data/lib/late-sdk/models/account_with_follower_stats_all_of_account_stats.rb +249 -0
  26. data/lib/late-sdk/models/get_whats_app_display_name200_response.rb +156 -0
  27. data/lib/late-sdk/models/get_whats_app_display_name200_response_display_name.rb +202 -0
  28. data/lib/late-sdk/models/update_whats_app_display_name200_response.rb +165 -0
  29. data/lib/late-sdk/models/update_whats_app_display_name200_response_display_name.rb +190 -0
  30. data/lib/late-sdk/models/update_whats_app_display_name_request.rb +210 -0
  31. data/lib/late-sdk/version.rb +1 -1
  32. data/lib/late-sdk.rb +6 -0
  33. data/openapi.yaml +194 -0
  34. data/spec/api/gmb_attributes_api_spec.rb +2 -0
  35. data/spec/api/gmb_food_menus_api_spec.rb +2 -0
  36. data/spec/api/gmb_location_details_api_spec.rb +2 -0
  37. data/spec/api/gmb_media_api_spec.rb +3 -0
  38. data/spec/api/gmb_place_actions_api_spec.rb +3 -0
  39. data/spec/api/gmb_reviews_api_spec.rb +1 -0
  40. data/spec/api/whats_app_api_spec.rb +37 -0
  41. data/spec/models/account_with_follower_stats_all_of_account_stats_spec.rb +96 -0
  42. data/spec/models/account_with_follower_stats_spec.rb +6 -0
  43. data/spec/models/get_whats_app_display_name200_response_display_name_spec.rb +52 -0
  44. data/spec/models/get_whats_app_display_name200_response_spec.rb +42 -0
  45. data/spec/models/update_whats_app_display_name200_response_display_name_spec.rb +46 -0
  46. data/spec/models/update_whats_app_display_name200_response_spec.rb +48 -0
  47. data/spec/models/update_whats_app_display_name_request_spec.rb +42 -0
  48. metadata +25 -1
@@ -1189,6 +1189,70 @@ module Late
1189
1189
  return data, status_code, headers
1190
1190
  end
1191
1191
 
1192
+ # Get display name and review status
1193
+ # Fetch the current display name and its Meta review status for a WhatsApp Business account. Display name changes require Meta approval and can take 1-3 business days.
1194
+ # @param account_id [String] WhatsApp social account ID
1195
+ # @param [Hash] opts the optional parameters
1196
+ # @return [GetWhatsAppDisplayName200Response]
1197
+ def get_whats_app_display_name(account_id, opts = {})
1198
+ data, _status_code, _headers = get_whats_app_display_name_with_http_info(account_id, opts)
1199
+ data
1200
+ end
1201
+
1202
+ # Get display name and review status
1203
+ # Fetch the current display name and its Meta review status for a WhatsApp Business account. Display name changes require Meta approval and can take 1-3 business days.
1204
+ # @param account_id [String] WhatsApp social account ID
1205
+ # @param [Hash] opts the optional parameters
1206
+ # @return [Array<(GetWhatsAppDisplayName200Response, Integer, Hash)>] GetWhatsAppDisplayName200Response data, response status code and response headers
1207
+ def get_whats_app_display_name_with_http_info(account_id, opts = {})
1208
+ if @api_client.config.debugging
1209
+ @api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_display_name ...'
1210
+ end
1211
+ # verify the required parameter 'account_id' is set
1212
+ if @api_client.config.client_side_validation && account_id.nil?
1213
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_display_name"
1214
+ end
1215
+ # resource path
1216
+ local_var_path = '/v1/whatsapp/business-profile/display-name'
1217
+
1218
+ # query parameters
1219
+ query_params = opts[:query_params] || {}
1220
+ query_params[:'accountId'] = account_id
1221
+
1222
+ # header parameters
1223
+ header_params = opts[:header_params] || {}
1224
+ # HTTP header 'Accept' (if needed)
1225
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1226
+
1227
+ # form parameters
1228
+ form_params = opts[:form_params] || {}
1229
+
1230
+ # http body (model)
1231
+ post_body = opts[:debug_body]
1232
+
1233
+ # return_type
1234
+ return_type = opts[:debug_return_type] || 'GetWhatsAppDisplayName200Response'
1235
+
1236
+ # auth_names
1237
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1238
+
1239
+ new_options = opts.merge(
1240
+ :operation => :"WhatsAppApi.get_whats_app_display_name",
1241
+ :header_params => header_params,
1242
+ :query_params => query_params,
1243
+ :form_params => form_params,
1244
+ :body => post_body,
1245
+ :auth_names => auth_names,
1246
+ :return_type => return_type
1247
+ )
1248
+
1249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1250
+ if @api_client.config.debugging
1251
+ @api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_display_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1252
+ end
1253
+ return data, status_code, headers
1254
+ end
1255
+
1192
1256
  # List contact groups
1193
1257
  # List all contact groups for a WhatsApp account with contact counts. Groups are derived from the groups field on contacts, not stored as separate documents.
1194
1258
  # @param account_id [String] WhatsApp social account ID
@@ -1944,6 +2008,74 @@ module Late
1944
2008
  return data, status_code, headers
1945
2009
  end
1946
2010
 
2011
+ # Request display name change
2012
+ # Submit a display name change request for the WhatsApp Business account. The new name must follow WhatsApp naming guidelines (3-512 characters, must represent your business). Changes require Meta review and approval, which typically takes 1-3 business days.
2013
+ # @param update_whats_app_display_name_request [UpdateWhatsAppDisplayNameRequest]
2014
+ # @param [Hash] opts the optional parameters
2015
+ # @return [UpdateWhatsAppDisplayName200Response]
2016
+ def update_whats_app_display_name(update_whats_app_display_name_request, opts = {})
2017
+ data, _status_code, _headers = update_whats_app_display_name_with_http_info(update_whats_app_display_name_request, opts)
2018
+ data
2019
+ end
2020
+
2021
+ # Request display name change
2022
+ # Submit a display name change request for the WhatsApp Business account. The new name must follow WhatsApp naming guidelines (3-512 characters, must represent your business). Changes require Meta review and approval, which typically takes 1-3 business days.
2023
+ # @param update_whats_app_display_name_request [UpdateWhatsAppDisplayNameRequest]
2024
+ # @param [Hash] opts the optional parameters
2025
+ # @return [Array<(UpdateWhatsAppDisplayName200Response, Integer, Hash)>] UpdateWhatsAppDisplayName200Response data, response status code and response headers
2026
+ def update_whats_app_display_name_with_http_info(update_whats_app_display_name_request, opts = {})
2027
+ if @api_client.config.debugging
2028
+ @api_client.config.logger.debug 'Calling API: WhatsAppApi.update_whats_app_display_name ...'
2029
+ end
2030
+ # verify the required parameter 'update_whats_app_display_name_request' is set
2031
+ if @api_client.config.client_side_validation && update_whats_app_display_name_request.nil?
2032
+ fail ArgumentError, "Missing the required parameter 'update_whats_app_display_name_request' when calling WhatsAppApi.update_whats_app_display_name"
2033
+ end
2034
+ # resource path
2035
+ local_var_path = '/v1/whatsapp/business-profile/display-name'
2036
+
2037
+ # query parameters
2038
+ query_params = opts[:query_params] || {}
2039
+
2040
+ # header parameters
2041
+ header_params = opts[:header_params] || {}
2042
+ # HTTP header 'Accept' (if needed)
2043
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2044
+ # HTTP header 'Content-Type'
2045
+ content_type = @api_client.select_header_content_type(['application/json'])
2046
+ if !content_type.nil?
2047
+ header_params['Content-Type'] = content_type
2048
+ end
2049
+
2050
+ # form parameters
2051
+ form_params = opts[:form_params] || {}
2052
+
2053
+ # http body (model)
2054
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_whats_app_display_name_request)
2055
+
2056
+ # return_type
2057
+ return_type = opts[:debug_return_type] || 'UpdateWhatsAppDisplayName200Response'
2058
+
2059
+ # auth_names
2060
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2061
+
2062
+ new_options = opts.merge(
2063
+ :operation => :"WhatsAppApi.update_whats_app_display_name",
2064
+ :header_params => header_params,
2065
+ :query_params => query_params,
2066
+ :form_params => form_params,
2067
+ :body => post_body,
2068
+ :auth_names => auth_names,
2069
+ :return_type => return_type
2070
+ )
2071
+
2072
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2073
+ if @api_client.config.debugging
2074
+ @api_client.config.logger.debug "API called: WhatsAppApi#update_whats_app_display_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2075
+ end
2076
+ return data, status_code, headers
2077
+ end
2078
+
1947
2079
  # Update template
1948
2080
  # Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
1949
2081
  # @param template_name [String] Template name
@@ -2017,5 +2149,81 @@ module Late
2017
2149
  end
2018
2150
  return data, status_code, headers
2019
2151
  end
2152
+
2153
+ # Upload profile picture
2154
+ # Upload a new profile picture for the WhatsApp Business Profile. Uses Meta's resumable upload API under the hood: creates an upload session, uploads the image bytes, then updates the business profile with the resulting handle.
2155
+ # @param account_id [String] WhatsApp social account ID
2156
+ # @param file [File] Image file (JPEG or PNG, max 5MB, recommended 640x640)
2157
+ # @param [Hash] opts the optional parameters
2158
+ # @return [UnpublishPost200Response]
2159
+ def upload_whats_app_profile_photo(account_id, file, opts = {})
2160
+ data, _status_code, _headers = upload_whats_app_profile_photo_with_http_info(account_id, file, opts)
2161
+ data
2162
+ end
2163
+
2164
+ # Upload profile picture
2165
+ # Upload a new profile picture for the WhatsApp Business Profile. Uses Meta&#39;s resumable upload API under the hood: creates an upload session, uploads the image bytes, then updates the business profile with the resulting handle.
2166
+ # @param account_id [String] WhatsApp social account ID
2167
+ # @param file [File] Image file (JPEG or PNG, max 5MB, recommended 640x640)
2168
+ # @param [Hash] opts the optional parameters
2169
+ # @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
2170
+ def upload_whats_app_profile_photo_with_http_info(account_id, file, opts = {})
2171
+ if @api_client.config.debugging
2172
+ @api_client.config.logger.debug 'Calling API: WhatsAppApi.upload_whats_app_profile_photo ...'
2173
+ end
2174
+ # verify the required parameter 'account_id' is set
2175
+ if @api_client.config.client_side_validation && account_id.nil?
2176
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.upload_whats_app_profile_photo"
2177
+ end
2178
+ # verify the required parameter 'file' is set
2179
+ if @api_client.config.client_side_validation && file.nil?
2180
+ fail ArgumentError, "Missing the required parameter 'file' when calling WhatsAppApi.upload_whats_app_profile_photo"
2181
+ end
2182
+ # resource path
2183
+ local_var_path = '/v1/whatsapp/business-profile/photo'
2184
+
2185
+ # query parameters
2186
+ query_params = opts[:query_params] || {}
2187
+
2188
+ # header parameters
2189
+ header_params = opts[:header_params] || {}
2190
+ # HTTP header 'Accept' (if needed)
2191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2192
+ # HTTP header 'Content-Type'
2193
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
2194
+ if !content_type.nil?
2195
+ header_params['Content-Type'] = content_type
2196
+ end
2197
+
2198
+ # form parameters
2199
+ form_params = opts[:form_params] || {}
2200
+ form_params['accountId'] = account_id
2201
+ form_params['file'] = file
2202
+
2203
+ # http body (model)
2204
+ post_body = opts[:debug_body]
2205
+
2206
+ # return_type
2207
+ return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
2208
+
2209
+ # auth_names
2210
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2211
+
2212
+ new_options = opts.merge(
2213
+ :operation => :"WhatsAppApi.upload_whats_app_profile_photo",
2214
+ :header_params => header_params,
2215
+ :query_params => query_params,
2216
+ :form_params => form_params,
2217
+ :body => post_body,
2218
+ :auth_names => auth_names,
2219
+ :return_type => return_type
2220
+ )
2221
+
2222
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2223
+ if @api_client.config.debugging
2224
+ @api_client.config.logger.debug "API called: WhatsAppApi#upload_whats_app_profile_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2225
+ end
2226
+ return data, status_code, headers
2227
+ end
2020
2228
  end
2021
2229
  end
@@ -52,6 +52,8 @@ module Late
52
52
  # Number of historical snapshots
53
53
  attr_accessor :data_points
54
54
 
55
+ attr_accessor :account_stats
56
+
55
57
  # Attribute mapping from ruby-style variable name to JSON key.
56
58
  def self.attribute_map
57
59
  {
@@ -69,7 +71,8 @@ module Late
69
71
  :'last_updated' => :'lastUpdated',
70
72
  :'growth' => :'growth',
71
73
  :'growth_percentage' => :'growthPercentage',
72
- :'data_points' => :'dataPoints'
74
+ :'data_points' => :'dataPoints',
75
+ :'account_stats' => :'accountStats'
73
76
  }
74
77
  end
75
78
 
@@ -100,7 +103,8 @@ module Late
100
103
  :'last_updated' => :'Time',
101
104
  :'growth' => :'Float',
102
105
  :'growth_percentage' => :'Float',
103
- :'data_points' => :'Float'
106
+ :'data_points' => :'Float',
107
+ :'account_stats' => :'AccountWithFollowerStatsAllOfAccountStats'
104
108
  }
105
109
  end
106
110
 
@@ -192,6 +196,10 @@ module Late
192
196
  if attributes.key?(:'data_points')
193
197
  self.data_points = attributes[:'data_points']
194
198
  end
199
+
200
+ if attributes.key?(:'account_stats')
201
+ self.account_stats = attributes[:'account_stats']
202
+ end
195
203
  end
196
204
 
197
205
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -228,7 +236,8 @@ module Late
228
236
  last_updated == o.last_updated &&
229
237
  growth == o.growth &&
230
238
  growth_percentage == o.growth_percentage &&
231
- data_points == o.data_points
239
+ data_points == o.data_points &&
240
+ account_stats == o.account_stats
232
241
  end
233
242
 
234
243
  # @see the `==` method
@@ -240,7 +249,7 @@ module Late
240
249
  # Calculates hash code according to all attributes.
241
250
  # @return [Integer] Hash code
242
251
  def hash
243
- [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, profile_picture, current_followers, last_updated, growth, growth_percentage, data_points].hash
252
+ [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, profile_picture, current_followers, last_updated, growth, growth_percentage, data_points, account_stats].hash
244
253
  end
245
254
 
246
255
  # Builds the object from hash
@@ -0,0 +1,249 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
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
+ # Platform-specific account stats from the latest daily snapshot. Fields vary by platform. Only present if metadata has been captured.
18
+ class AccountWithFollowerStatsAllOfAccountStats < ApiModelBase
19
+ # Number of accounts being followed
20
+ attr_accessor :following_count
21
+
22
+ # Total media posts (Instagram)
23
+ attr_accessor :media_count
24
+
25
+ # Total videos (YouTube
26
+ attr_accessor :video_count
27
+
28
+ # Total tweets (X/Twitter)
29
+ attr_accessor :tweet_count
30
+
31
+ # Total posts (Bluesky)
32
+ attr_accessor :posts_count
33
+
34
+ # Total pins (Pinterest)
35
+ attr_accessor :pin_count
36
+
37
+ # Total channel views (YouTube)
38
+ attr_accessor :total_views
39
+
40
+ # Total likes received (TikTok)
41
+ attr_accessor :likes_count
42
+
43
+ # Monthly profile views (Pinterest)
44
+ attr_accessor :monthly_views
45
+
46
+ # Lists the user appears on (X/Twitter)
47
+ attr_accessor :listed_count
48
+
49
+ # Total boards (Pinterest)
50
+ attr_accessor :board_count
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'following_count' => :'followingCount',
56
+ :'media_count' => :'mediaCount',
57
+ :'video_count' => :'videoCount',
58
+ :'tweet_count' => :'tweetCount',
59
+ :'posts_count' => :'postsCount',
60
+ :'pin_count' => :'pinCount',
61
+ :'total_views' => :'totalViews',
62
+ :'likes_count' => :'likesCount',
63
+ :'monthly_views' => :'monthlyViews',
64
+ :'listed_count' => :'listedCount',
65
+ :'board_count' => :'boardCount'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'following_count' => :'Float',
83
+ :'media_count' => :'Float',
84
+ :'video_count' => :'Float',
85
+ :'tweet_count' => :'Float',
86
+ :'posts_count' => :'Float',
87
+ :'pin_count' => :'Float',
88
+ :'total_views' => :'Float',
89
+ :'likes_count' => :'Float',
90
+ :'monthly_views' => :'Float',
91
+ :'listed_count' => :'Float',
92
+ :'board_count' => :'Float'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::AccountWithFollowerStatsAllOfAccountStats` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::AccountWithFollowerStatsAllOfAccountStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'following_count')
119
+ self.following_count = attributes[:'following_count']
120
+ end
121
+
122
+ if attributes.key?(:'media_count')
123
+ self.media_count = attributes[:'media_count']
124
+ end
125
+
126
+ if attributes.key?(:'video_count')
127
+ self.video_count = attributes[:'video_count']
128
+ end
129
+
130
+ if attributes.key?(:'tweet_count')
131
+ self.tweet_count = attributes[:'tweet_count']
132
+ end
133
+
134
+ if attributes.key?(:'posts_count')
135
+ self.posts_count = attributes[:'posts_count']
136
+ end
137
+
138
+ if attributes.key?(:'pin_count')
139
+ self.pin_count = attributes[:'pin_count']
140
+ end
141
+
142
+ if attributes.key?(:'total_views')
143
+ self.total_views = attributes[:'total_views']
144
+ end
145
+
146
+ if attributes.key?(:'likes_count')
147
+ self.likes_count = attributes[:'likes_count']
148
+ end
149
+
150
+ if attributes.key?(:'monthly_views')
151
+ self.monthly_views = attributes[:'monthly_views']
152
+ end
153
+
154
+ if attributes.key?(:'listed_count')
155
+ self.listed_count = attributes[:'listed_count']
156
+ end
157
+
158
+ if attributes.key?(:'board_count')
159
+ self.board_count = attributes[:'board_count']
160
+ end
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
+ invalid_properties = Array.new
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
+ true
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ following_count == o.following_count &&
184
+ media_count == o.media_count &&
185
+ video_count == o.video_count &&
186
+ tweet_count == o.tweet_count &&
187
+ posts_count == o.posts_count &&
188
+ pin_count == o.pin_count &&
189
+ total_views == o.total_views &&
190
+ likes_count == o.likes_count &&
191
+ monthly_views == o.monthly_views &&
192
+ listed_count == o.listed_count &&
193
+ board_count == o.board_count
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [following_count, media_count, video_count, tweet_count, posts_count, pin_count, total_views, likes_count, monthly_views, listed_count, board_count].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ end
248
+
249
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
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 GetWhatsAppDisplayName200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :display_name
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'display_name' => :'displayName'
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
+ :'success' => :'Boolean',
44
+ :'display_name' => :'GetWhatsAppDisplayName200ResponseDisplayName'
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::GetWhatsAppDisplayName200Response` 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::GetWhatsAppDisplayName200Response`. 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?(:'success')
71
+ self.success = attributes[:'success']
72
+ end
73
+
74
+ if attributes.key?(:'display_name')
75
+ self.display_name = attributes[:'display_name']
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
+ success == o.success &&
100
+ display_name == o.display_name
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
+ [success, display_name].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