late-sdk 0.0.50 → 0.0.52
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 +9 -0
- data/docs/AccountWithFollowerStats.md +3 -1
- data/docs/AccountWithFollowerStatsAllOfAccountStats.md +38 -0
- data/docs/GetWhatsAppDisplayName200Response.md +20 -0
- data/docs/GetWhatsAppDisplayName200ResponseDisplayName.md +22 -0
- data/docs/UpdateWhatsAppDisplayName200Response.md +22 -0
- data/docs/UpdateWhatsAppDisplayName200ResponseDisplayName.md +20 -0
- data/docs/UpdateWhatsAppDisplayNameRequest.md +20 -0
- data/docs/UsageStats.md +2 -0
- data/docs/WhatsAppApi.md +212 -0
- data/lib/late-sdk/api/whats_app_api.rb +208 -0
- data/lib/late-sdk/models/account_with_follower_stats.rb +13 -4
- data/lib/late-sdk/models/account_with_follower_stats_all_of_account_stats.rb +249 -0
- data/lib/late-sdk/models/get_whats_app_display_name200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_display_name200_response_display_name.rb +202 -0
- data/lib/late-sdk/models/update_whats_app_display_name200_response.rb +165 -0
- data/lib/late-sdk/models/update_whats_app_display_name200_response_display_name.rb +190 -0
- data/lib/late-sdk/models/update_whats_app_display_name_request.rb +210 -0
- data/lib/late-sdk/models/usage_stats.rb +11 -1
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +6 -0
- data/openapi.yaml +144 -0
- data/spec/api/whats_app_api_spec.rb +37 -0
- data/spec/models/account_with_follower_stats_all_of_account_stats_spec.rb +96 -0
- data/spec/models/account_with_follower_stats_spec.rb +6 -0
- data/spec/models/get_whats_app_display_name200_response_display_name_spec.rb +52 -0
- data/spec/models/get_whats_app_display_name200_response_spec.rb +42 -0
- data/spec/models/update_whats_app_display_name200_response_display_name_spec.rb +46 -0
- data/spec/models/update_whats_app_display_name200_response_spec.rb +48 -0
- data/spec/models/update_whats_app_display_name_request_spec.rb +42 -0
- data/spec/models/usage_stats_spec.rb +6 -0
- metadata +25 -1
|
@@ -0,0 +1,210 @@
|
|
|
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 UpdateWhatsAppDisplayNameRequest < ApiModelBase
|
|
18
|
+
# WhatsApp social account ID
|
|
19
|
+
attr_accessor :account_id
|
|
20
|
+
|
|
21
|
+
# New display name (must follow WhatsApp naming guidelines)
|
|
22
|
+
attr_accessor :display_name
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'account_id' => :'accountId',
|
|
28
|
+
:'display_name' => :'displayName'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'account_id' => :'String',
|
|
46
|
+
:'display_name' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateWhatsAppDisplayNameRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateWhatsAppDisplayNameRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'account_id')
|
|
73
|
+
self.account_id = attributes[:'account_id']
|
|
74
|
+
else
|
|
75
|
+
self.account_id = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'display_name')
|
|
79
|
+
self.display_name = attributes[:'display_name']
|
|
80
|
+
else
|
|
81
|
+
self.display_name = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @account_id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @display_name.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if @display_name.to_s.length > 512
|
|
99
|
+
invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 512.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @display_name.to_s.length < 3
|
|
103
|
+
invalid_properties.push('invalid value for "display_name", the character length must be greater than or equal to 3.')
|
|
104
|
+
end
|
|
105
|
+
|
|
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
|
+
return false if @account_id.nil?
|
|
114
|
+
return false if @display_name.nil?
|
|
115
|
+
return false if @display_name.to_s.length > 512
|
|
116
|
+
return false if @display_name.to_s.length < 3
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] account_id Value to be assigned
|
|
122
|
+
def account_id=(account_id)
|
|
123
|
+
if account_id.nil?
|
|
124
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@account_id = account_id
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] display_name Value to be assigned
|
|
132
|
+
def display_name=(display_name)
|
|
133
|
+
if display_name.nil?
|
|
134
|
+
fail ArgumentError, 'display_name cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if display_name.to_s.length > 512
|
|
138
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 512.'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if display_name.to_s.length < 3
|
|
142
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be greater than or equal to 3.'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@display_name = display_name
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def ==(o)
|
|
151
|
+
return true if self.equal?(o)
|
|
152
|
+
self.class == o.class &&
|
|
153
|
+
account_id == o.account_id &&
|
|
154
|
+
display_name == o.display_name
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[account_id, display_name].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
175
|
+
transformed_hash = {}
|
|
176
|
+
openapi_types.each_pair do |key, type|
|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = nil
|
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
184
|
+
end
|
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
new(transformed_hash)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
if value.nil?
|
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
hash[param] = _to_hash(value)
|
|
204
|
+
end
|
|
205
|
+
hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
@@ -21,6 +21,9 @@ module Late
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :signup_date
|
|
23
23
|
|
|
24
|
+
# Day of month (1-31) when the billing cycle resets
|
|
25
|
+
attr_accessor :billing_anchor_day
|
|
26
|
+
|
|
24
27
|
attr_accessor :limits
|
|
25
28
|
|
|
26
29
|
attr_accessor :usage
|
|
@@ -53,6 +56,7 @@ module Late
|
|
|
53
56
|
:'plan_name' => :'planName',
|
|
54
57
|
:'billing_period' => :'billingPeriod',
|
|
55
58
|
:'signup_date' => :'signupDate',
|
|
59
|
+
:'billing_anchor_day' => :'billingAnchorDay',
|
|
56
60
|
:'limits' => :'limits',
|
|
57
61
|
:'usage' => :'usage'
|
|
58
62
|
}
|
|
@@ -74,6 +78,7 @@ module Late
|
|
|
74
78
|
:'plan_name' => :'String',
|
|
75
79
|
:'billing_period' => :'String',
|
|
76
80
|
:'signup_date' => :'Time',
|
|
81
|
+
:'billing_anchor_day' => :'Integer',
|
|
77
82
|
:'limits' => :'UsageStatsLimits',
|
|
78
83
|
:'usage' => :'UsageStatsUsage'
|
|
79
84
|
}
|
|
@@ -113,6 +118,10 @@ module Late
|
|
|
113
118
|
self.signup_date = attributes[:'signup_date']
|
|
114
119
|
end
|
|
115
120
|
|
|
121
|
+
if attributes.key?(:'billing_anchor_day')
|
|
122
|
+
self.billing_anchor_day = attributes[:'billing_anchor_day']
|
|
123
|
+
end
|
|
124
|
+
|
|
116
125
|
if attributes.key?(:'limits')
|
|
117
126
|
self.limits = attributes[:'limits']
|
|
118
127
|
end
|
|
@@ -157,6 +166,7 @@ module Late
|
|
|
157
166
|
plan_name == o.plan_name &&
|
|
158
167
|
billing_period == o.billing_period &&
|
|
159
168
|
signup_date == o.signup_date &&
|
|
169
|
+
billing_anchor_day == o.billing_anchor_day &&
|
|
160
170
|
limits == o.limits &&
|
|
161
171
|
usage == o.usage
|
|
162
172
|
end
|
|
@@ -170,7 +180,7 @@ module Late
|
|
|
170
180
|
# Calculates hash code according to all attributes.
|
|
171
181
|
# @return [Integer] Hash code
|
|
172
182
|
def hash
|
|
173
|
-
[plan_name, billing_period, signup_date, limits, usage].hash
|
|
183
|
+
[plan_name, billing_period, signup_date, billing_anchor_day, limits, usage].hash
|
|
174
184
|
end
|
|
175
185
|
|
|
176
186
|
# Builds the object from hash
|
data/lib/late-sdk/version.rb
CHANGED
data/lib/late-sdk.rb
CHANGED
|
@@ -20,6 +20,7 @@ require 'late-sdk/configuration'
|
|
|
20
20
|
# Models
|
|
21
21
|
require 'late-sdk/models/account_get_response'
|
|
22
22
|
require 'late-sdk/models/account_with_follower_stats'
|
|
23
|
+
require 'late-sdk/models/account_with_follower_stats_all_of_account_stats'
|
|
23
24
|
require 'late-sdk/models/accounts_list_response'
|
|
24
25
|
require 'late-sdk/models/add_whats_app_broadcast_recipients200_response'
|
|
25
26
|
require 'late-sdk/models/add_whats_app_broadcast_recipients_request'
|
|
@@ -236,6 +237,8 @@ require 'late-sdk/models/get_whats_app_contacts200_response'
|
|
|
236
237
|
require 'late-sdk/models/get_whats_app_contacts200_response_contacts_inner'
|
|
237
238
|
require 'late-sdk/models/get_whats_app_contacts200_response_filters'
|
|
238
239
|
require 'late-sdk/models/get_whats_app_contacts200_response_pagination'
|
|
240
|
+
require 'late-sdk/models/get_whats_app_display_name200_response'
|
|
241
|
+
require 'late-sdk/models/get_whats_app_display_name200_response_display_name'
|
|
239
242
|
require 'late-sdk/models/get_whats_app_groups200_response'
|
|
240
243
|
require 'late-sdk/models/get_whats_app_groups200_response_groups_inner'
|
|
241
244
|
require 'late-sdk/models/get_whats_app_groups200_response_summary'
|
|
@@ -480,6 +483,9 @@ require 'late-sdk/models/update_whats_app_business_profile_request'
|
|
|
480
483
|
require 'late-sdk/models/update_whats_app_contact200_response'
|
|
481
484
|
require 'late-sdk/models/update_whats_app_contact200_response_contact'
|
|
482
485
|
require 'late-sdk/models/update_whats_app_contact_request'
|
|
486
|
+
require 'late-sdk/models/update_whats_app_display_name200_response'
|
|
487
|
+
require 'late-sdk/models/update_whats_app_display_name200_response_display_name'
|
|
488
|
+
require 'late-sdk/models/update_whats_app_display_name_request'
|
|
483
489
|
require 'late-sdk/models/update_whats_app_template200_response'
|
|
484
490
|
require 'late-sdk/models/update_whats_app_template200_response_template'
|
|
485
491
|
require 'late-sdk/models/update_whats_app_template_request'
|
data/openapi.yaml
CHANGED
|
@@ -1664,6 +1664,23 @@ components:
|
|
|
1664
1664
|
growth: { type: number, description: Follower change over period }
|
|
1665
1665
|
growthPercentage: { type: number, description: Percentage growth }
|
|
1666
1666
|
dataPoints: { type: number, description: Number of historical snapshots }
|
|
1667
|
+
accountStats:
|
|
1668
|
+
type: object
|
|
1669
|
+
description: |
|
|
1670
|
+
Platform-specific account stats from the latest daily snapshot.
|
|
1671
|
+
Fields vary by platform. Only present if metadata has been captured.
|
|
1672
|
+
properties:
|
|
1673
|
+
followingCount: { type: number, description: Number of accounts being followed }
|
|
1674
|
+
mediaCount: { type: number, description: Total media posts (Instagram) }
|
|
1675
|
+
videoCount: { type: number, description: Total videos (YouTube, TikTok) }
|
|
1676
|
+
tweetCount: { type: number, description: Total tweets (X/Twitter) }
|
|
1677
|
+
postsCount: { type: number, description: Total posts (Bluesky) }
|
|
1678
|
+
pinCount: { type: number, description: Total pins (Pinterest) }
|
|
1679
|
+
totalViews: { type: number, description: Total channel views (YouTube) }
|
|
1680
|
+
likesCount: { type: number, description: Total likes received (TikTok) }
|
|
1681
|
+
monthlyViews: { type: number, description: Monthly profile views (Pinterest) }
|
|
1682
|
+
listedCount: { type: number, description: Lists the user appears on (X/Twitter) }
|
|
1683
|
+
boardCount: { type: number, description: Total boards (Pinterest) }
|
|
1667
1684
|
ApiKey:
|
|
1668
1685
|
type: object
|
|
1669
1686
|
properties:
|
|
@@ -1700,6 +1717,7 @@ components:
|
|
|
1700
1717
|
planName: { type: string }
|
|
1701
1718
|
billingPeriod: { type: string, enum: [monthly, yearly] }
|
|
1702
1719
|
signupDate: { type: string, format: date-time }
|
|
1720
|
+
billingAnchorDay: { type: integer, description: "Day of month (1-31) when the billing cycle resets" }
|
|
1703
1721
|
limits:
|
|
1704
1722
|
type: object
|
|
1705
1723
|
properties:
|
|
@@ -4011,6 +4029,7 @@ paths:
|
|
|
4011
4029
|
planName: "Pro"
|
|
4012
4030
|
billingPeriod: "monthly"
|
|
4013
4031
|
signupDate: "2024-01-15T10:30:00Z"
|
|
4032
|
+
billingAnchorDay: 15
|
|
4014
4033
|
limits:
|
|
4015
4034
|
uploads: 500
|
|
4016
4035
|
profiles: 10
|
|
@@ -13215,6 +13234,131 @@ paths:
|
|
|
13215
13234
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
13216
13235
|
'404': { description: WhatsApp account not found }
|
|
13217
13236
|
|
|
13237
|
+
/v1/whatsapp/business-profile/photo:
|
|
13238
|
+
post:
|
|
13239
|
+
operationId: uploadWhatsAppProfilePhoto
|
|
13240
|
+
tags: [WhatsApp]
|
|
13241
|
+
summary: Upload profile picture
|
|
13242
|
+
description: |
|
|
13243
|
+
Upload a new profile picture for the WhatsApp Business Profile.
|
|
13244
|
+
Uses Meta's resumable upload API under the hood: creates an upload session,
|
|
13245
|
+
uploads the image bytes, then updates the business profile with the resulting handle.
|
|
13246
|
+
security:
|
|
13247
|
+
- bearerAuth: []
|
|
13248
|
+
requestBody:
|
|
13249
|
+
required: true
|
|
13250
|
+
content:
|
|
13251
|
+
multipart/form-data:
|
|
13252
|
+
schema:
|
|
13253
|
+
type: object
|
|
13254
|
+
required: [accountId, file]
|
|
13255
|
+
properties:
|
|
13256
|
+
accountId:
|
|
13257
|
+
type: string
|
|
13258
|
+
description: WhatsApp social account ID
|
|
13259
|
+
file:
|
|
13260
|
+
type: string
|
|
13261
|
+
format: binary
|
|
13262
|
+
description: Image file (JPEG or PNG, max 5MB, recommended 640x640)
|
|
13263
|
+
responses:
|
|
13264
|
+
'200':
|
|
13265
|
+
description: Profile picture updated successfully
|
|
13266
|
+
content:
|
|
13267
|
+
application/json:
|
|
13268
|
+
schema:
|
|
13269
|
+
type: object
|
|
13270
|
+
properties:
|
|
13271
|
+
success: { type: boolean }
|
|
13272
|
+
message: { type: string }
|
|
13273
|
+
'400': { description: Invalid file type, file too large, or missing parameters }
|
|
13274
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
13275
|
+
'404': { description: WhatsApp account not found }
|
|
13276
|
+
|
|
13277
|
+
/v1/whatsapp/business-profile/display-name:
|
|
13278
|
+
get:
|
|
13279
|
+
operationId: getWhatsAppDisplayName
|
|
13280
|
+
tags: [WhatsApp]
|
|
13281
|
+
summary: Get display name and review status
|
|
13282
|
+
description: |
|
|
13283
|
+
Fetch the current display name and its Meta review status for a WhatsApp Business account.
|
|
13284
|
+
Display name changes require Meta approval and can take 1-3 business days.
|
|
13285
|
+
security:
|
|
13286
|
+
- bearerAuth: []
|
|
13287
|
+
parameters:
|
|
13288
|
+
- name: accountId
|
|
13289
|
+
in: query
|
|
13290
|
+
required: true
|
|
13291
|
+
description: WhatsApp social account ID
|
|
13292
|
+
schema:
|
|
13293
|
+
type: string
|
|
13294
|
+
responses:
|
|
13295
|
+
'200':
|
|
13296
|
+
description: Display name info retrieved
|
|
13297
|
+
content:
|
|
13298
|
+
application/json:
|
|
13299
|
+
schema:
|
|
13300
|
+
type: object
|
|
13301
|
+
properties:
|
|
13302
|
+
success: { type: boolean }
|
|
13303
|
+
displayName:
|
|
13304
|
+
type: object
|
|
13305
|
+
properties:
|
|
13306
|
+
name: { type: string, description: Current verified display name }
|
|
13307
|
+
status:
|
|
13308
|
+
type: string
|
|
13309
|
+
enum: [APPROVED, PENDING_REVIEW, DECLINED, NONE]
|
|
13310
|
+
description: Meta review status for the display name
|
|
13311
|
+
phoneNumber: { type: string, description: Display phone number }
|
|
13312
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
13313
|
+
'404': { description: WhatsApp account not found }
|
|
13314
|
+
post:
|
|
13315
|
+
operationId: updateWhatsAppDisplayName
|
|
13316
|
+
tags: [WhatsApp]
|
|
13317
|
+
summary: Request display name change
|
|
13318
|
+
description: |
|
|
13319
|
+
Submit a display name change request for the WhatsApp Business account.
|
|
13320
|
+
The new name must follow WhatsApp naming guidelines (3-512 characters, must represent your business).
|
|
13321
|
+
Changes require Meta review and approval, which typically takes 1-3 business days.
|
|
13322
|
+
security:
|
|
13323
|
+
- bearerAuth: []
|
|
13324
|
+
requestBody:
|
|
13325
|
+
required: true
|
|
13326
|
+
content:
|
|
13327
|
+
application/json:
|
|
13328
|
+
schema:
|
|
13329
|
+
type: object
|
|
13330
|
+
required: [accountId, displayName]
|
|
13331
|
+
properties:
|
|
13332
|
+
accountId:
|
|
13333
|
+
type: string
|
|
13334
|
+
description: WhatsApp social account ID
|
|
13335
|
+
displayName:
|
|
13336
|
+
type: string
|
|
13337
|
+
minLength: 3
|
|
13338
|
+
maxLength: 512
|
|
13339
|
+
description: New display name (must follow WhatsApp naming guidelines)
|
|
13340
|
+
example:
|
|
13341
|
+
accountId: "507f1f77bcf86cd799439011"
|
|
13342
|
+
displayName: "My Business Name"
|
|
13343
|
+
responses:
|
|
13344
|
+
'200':
|
|
13345
|
+
description: Display name change submitted for review
|
|
13346
|
+
content:
|
|
13347
|
+
application/json:
|
|
13348
|
+
schema:
|
|
13349
|
+
type: object
|
|
13350
|
+
properties:
|
|
13351
|
+
success: { type: boolean }
|
|
13352
|
+
message: { type: string }
|
|
13353
|
+
displayName:
|
|
13354
|
+
type: object
|
|
13355
|
+
properties:
|
|
13356
|
+
name: { type: string }
|
|
13357
|
+
status: { type: string, enum: [PENDING_REVIEW] }
|
|
13358
|
+
'400': { description: Invalid display name (too short, too long, or missing) }
|
|
13359
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
13360
|
+
'404': { description: WhatsApp account not found }
|
|
13361
|
+
|
|
13218
13362
|
# ──────────────────────────────────────────────────────────────────────────
|
|
13219
13363
|
# PHONE NUMBERS
|
|
13220
13364
|
# ──────────────────────────────────────────────────────────────────────────
|
|
@@ -250,6 +250,18 @@ describe 'WhatsAppApi' do
|
|
|
250
250
|
end
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
+
# unit tests for get_whats_app_display_name
|
|
254
|
+
# Get display name and review status
|
|
255
|
+
# 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.
|
|
256
|
+
# @param account_id WhatsApp social account ID
|
|
257
|
+
# @param [Hash] opts the optional parameters
|
|
258
|
+
# @return [GetWhatsAppDisplayName200Response]
|
|
259
|
+
describe 'get_whats_app_display_name test' do
|
|
260
|
+
it 'should work' do
|
|
261
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
253
265
|
# unit tests for get_whats_app_groups
|
|
254
266
|
# List contact groups
|
|
255
267
|
# 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.
|
|
@@ -386,6 +398,18 @@ describe 'WhatsAppApi' do
|
|
|
386
398
|
end
|
|
387
399
|
end
|
|
388
400
|
|
|
401
|
+
# unit tests for update_whats_app_display_name
|
|
402
|
+
# Request display name change
|
|
403
|
+
# 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.
|
|
404
|
+
# @param update_whats_app_display_name_request
|
|
405
|
+
# @param [Hash] opts the optional parameters
|
|
406
|
+
# @return [UpdateWhatsAppDisplayName200Response]
|
|
407
|
+
describe 'update_whats_app_display_name test' do
|
|
408
|
+
it 'should work' do
|
|
409
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
|
|
389
413
|
# unit tests for update_whats_app_template
|
|
390
414
|
# Update template
|
|
391
415
|
# 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.
|
|
@@ -399,4 +423,17 @@ describe 'WhatsAppApi' do
|
|
|
399
423
|
end
|
|
400
424
|
end
|
|
401
425
|
|
|
426
|
+
# unit tests for upload_whats_app_profile_photo
|
|
427
|
+
# Upload profile picture
|
|
428
|
+
# 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.
|
|
429
|
+
# @param account_id WhatsApp social account ID
|
|
430
|
+
# @param file Image file (JPEG or PNG, max 5MB, recommended 640x640)
|
|
431
|
+
# @param [Hash] opts the optional parameters
|
|
432
|
+
# @return [UnpublishPost200Response]
|
|
433
|
+
describe 'upload_whats_app_profile_photo test' do
|
|
434
|
+
it 'should work' do
|
|
435
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
436
|
+
end
|
|
437
|
+
end
|
|
438
|
+
|
|
402
439
|
end
|
|
@@ -0,0 +1,96 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Late::AccountWithFollowerStatsAllOfAccountStats
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Late::AccountWithFollowerStatsAllOfAccountStats do
|
|
21
|
+
#let(:instance) { Late::AccountWithFollowerStatsAllOfAccountStats.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AccountWithFollowerStatsAllOfAccountStats' do
|
|
24
|
+
it 'should create an instance of AccountWithFollowerStatsAllOfAccountStats' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Late::AccountWithFollowerStatsAllOfAccountStats)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "following_count"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "media_count"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "video_count"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "tweet_count"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "posts_count"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "pin_count"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "total_views"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
describe 'test attribute "likes_count"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
describe 'test attribute "monthly_views"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
describe 'test attribute "listed_count"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
describe 'test attribute "board_count"' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
end
|
|
@@ -117,4 +117,10 @@ describe Late::AccountWithFollowerStats do
|
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
describe 'test attribute "account_stats"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
120
126
|
end
|
|
@@ -0,0 +1,52 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Late::GetWhatsAppDisplayName200ResponseDisplayName
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Late::GetWhatsAppDisplayName200ResponseDisplayName do
|
|
21
|
+
#let(:instance) { Late::GetWhatsAppDisplayName200ResponseDisplayName.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetWhatsAppDisplayName200ResponseDisplayName' do
|
|
24
|
+
it 'should create an instance of GetWhatsAppDisplayName200ResponseDisplayName' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Late::GetWhatsAppDisplayName200ResponseDisplayName)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "name"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "status"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["APPROVED", "PENDING_REVIEW", "DECLINED", "NONE"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.status = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "phone_number"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|