late-sdk 0.0.790 → 0.0.792

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/DeleteWhatsAppTemplate200Response.md +24 -0
  4. data/docs/DeleteWhatsAppTemplateById200Response.md +24 -0
  5. data/docs/GetWhatsAppTemplate200ResponseTemplate.md +7 -3
  6. data/docs/GetWhatsAppTemplate409Response.md +26 -0
  7. data/docs/GetWhatsAppTemplate409ResponseDetails.md +18 -0
  8. data/docs/LinkedInMentionsApi.md +1 -1
  9. data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +3 -1
  10. data/docs/UpdateWhatsAppTemplateById200Response.md +20 -0
  11. data/docs/UpdateWhatsAppTemplateById200ResponseTemplate.md +24 -0
  12. data/docs/UpdateWhatsAppTemplateByIdRequest.md +20 -0
  13. data/docs/UpdateWhatsAppTemplateRequest.md +2 -0
  14. data/docs/WhatsAppApi.md +256 -24
  15. data/lib/zernio-sdk/api/linked_in_mentions_api.rb +2 -2
  16. data/lib/zernio-sdk/api/whats_app_api.rb +250 -17
  17. data/lib/zernio-sdk/models/delete_whats_app_template200_response.rb +210 -0
  18. data/lib/zernio-sdk/models/delete_whats_app_template_by_id200_response.rb +208 -0
  19. data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +26 -4
  20. data/lib/zernio-sdk/models/get_whats_app_template409_response.rb +241 -0
  21. data/lib/zernio-sdk/models/get_whats_app_template409_response_details.rb +149 -0
  22. data/lib/zernio-sdk/models/update_whats_app_template200_response_template.rb +12 -1
  23. data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response.rb +156 -0
  24. data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response_template.rb +175 -0
  25. data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +203 -0
  26. data/lib/zernio-sdk/models/update_whats_app_template_request.rb +11 -1
  27. data/lib/zernio-sdk/version.rb +1 -1
  28. data/lib/zernio-sdk.rb +7 -0
  29. data/openapi.yaml +288 -36
  30. data/spec/api/linked_in_mentions_api_spec.rb +1 -1
  31. data/spec/api/whats_app_api_spec.rb +52 -8
  32. data/spec/models/delete_whats_app_template200_response_spec.rb +58 -0
  33. data/spec/models/delete_whats_app_template_by_id200_response_spec.rb +58 -0
  34. data/spec/models/get_whats_app_template200_response_template_spec.rb +12 -0
  35. data/spec/models/get_whats_app_template409_response_details_spec.rb +36 -0
  36. data/spec/models/get_whats_app_template409_response_spec.rb +72 -0
  37. data/spec/models/update_whats_app_template200_response_template_spec.rb +6 -0
  38. data/spec/models/update_whats_app_template_by_id200_response_spec.rb +42 -0
  39. data/spec/models/update_whats_app_template_by_id200_response_template_spec.rb +54 -0
  40. data/spec/models/update_whats_app_template_by_id_request_spec.rb +42 -0
  41. data/spec/models/update_whats_app_template_request_spec.rb +6 -0
  42. data/zernio-sdk-0.0.792.gem +0 -0
  43. metadata +31 -3
  44. data/zernio-sdk-0.0.790.gem +0 -0
data/openapi.yaml CHANGED
@@ -22196,8 +22196,8 @@ paths:
22196
22196
  Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text.
22197
22197
 
22198
22198
  Requirements:
22199
- - Person mentions require the LinkedIn account to be admin of at least one organization. This is a LinkedIn API limitation: the only endpoints that resolve profile URLs to member URNs (vanityUrl, peopleTypeahead) are scoped to organization followers. There is no public LinkedIn API to resolve a vanity URL without organization context.
22200
- - Organization mentions (e.g. @Microsoft) work without this requirement.
22199
+ - Person mentions require the LinkedIn account to be admin of at least one organization: both endpoints that resolve a profile URL to a member URN take an organization you administer. Organization mentions (e.g. @Microsoft) have no such requirement.
22200
+ - The two are not scoped alike. peopleTypeahead?q=organizationFollowers only returns that organization's followers; vanityUrl?q=vanityUrlAsOrganization does not, and its resolvable set is opaque. A 404 here does not mean the person is unknown to you or unknown to LinkedIn: a live public profile can 404 with no reason given.
22201
22201
  - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile.
22202
22202
  - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
22203
22203
  parameters:
@@ -22328,7 +22328,7 @@ paths:
22328
22328
  error: { type: string }
22329
22329
  examples:
22330
22330
  memberNotFound:
22331
- value: { error: "Member not found. Check the LinkedIn URL is correct." }
22331
+ value: { error: "LinkedIn couldn't resolve this profile. Not every profile is resolvable through LinkedIn's API, even public ones, and LinkedIn gives no reason. Check the profile address is current (people can change theirs), or mention a company instead." }
22332
22332
  orgNotFound:
22333
22333
  value: { error: "Organization not found. Check the LinkedIn company URL is correct." }
22334
22334
 
@@ -29933,8 +29933,9 @@ paths:
29933
29933
  tags: [WhatsApp]
29934
29934
  summary: List templates
29935
29935
  description: |
29936
- List all message templates for the WhatsApp Business Account (WABA) associated with the given account.
29937
- Templates are fetched directly from the WhatsApp Cloud API.
29936
+ List message templates for the WhatsApp Business Account (WABA) associated with the given account.
29937
+ Templates are fetched directly from the WhatsApp Cloud API. One entry per **name + language**:
29938
+ a multi-language template appears once per language, each with its own Meta `id`.
29938
29939
  security:
29939
29940
  - bearerAuth: []
29940
29941
  parameters:
@@ -29944,6 +29945,24 @@ paths:
29944
29945
  description: WhatsApp social account ID
29945
29946
  schema:
29946
29947
  type: string
29948
+ - name: name
29949
+ in: query
29950
+ required: false
29951
+ description: 'Exact template name; returns every language variant of that family.'
29952
+ schema:
29953
+ type: string
29954
+ - name: language
29955
+ in: query
29956
+ required: false
29957
+ description: 'Exact language code (e.g. en_US).'
29958
+ schema:
29959
+ type: string
29960
+ - name: status
29961
+ in: query
29962
+ required: false
29963
+ schema:
29964
+ type: string
29965
+ enum: [APPROVED, REJECTED, PENDING, PAUSED, DISABLED, IN_APPEAL, PENDING_DELETION]
29947
29966
  responses:
29948
29967
  '200':
29949
29968
  description: Templates retrieved successfully
@@ -30115,14 +30134,21 @@ paths:
30115
30134
  tags: [WhatsApp]
30116
30135
  summary: Get template
30117
30136
  description: |
30118
- Retrieve a single message template by name.
30137
+ Retrieve one message template variant by name.
30138
+
30139
+ Meta stores one template per **name + language**, so a name identifies a family of variants,
30140
+ each with its own Meta id. Pass `language` to address one variant. Without it, a name with a
30141
+ single variant resolves to that variant; a name with several returns `409 ambiguous_template`
30142
+ with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`);
30143
+ if the family has several regional variants for it, that is also a 409. A full code (`es_ES`)
30144
+ must match exactly. Variants in `PENDING_DELETION` are not part of the family.
30119
30145
  security:
30120
30146
  - bearerAuth: []
30121
30147
  parameters:
30122
30148
  - name: templateName
30123
30149
  in: path
30124
30150
  required: true
30125
- description: Template name
30151
+ description: Template name (the family).
30126
30152
  schema:
30127
30153
  type: string
30128
30154
  - name: accountId
@@ -30131,6 +30157,12 @@ paths:
30131
30157
  description: WhatsApp social account ID
30132
30158
  schema:
30133
30159
  type: string
30160
+ - name: language
30161
+ in: query
30162
+ required: false
30163
+ description: 'Language code of the variant (e.g. en_US, es, pt_BR). Required when the family has several languages.'
30164
+ schema:
30165
+ type: string
30134
30166
  responses:
30135
30167
  '200':
30136
30168
  description: Template retrieved successfully
@@ -30143,18 +30175,35 @@ paths:
30143
30175
  template:
30144
30176
  type: object
30145
30177
  properties:
30146
- id: { type: string }
30178
+ id: { type: string, description: 'Meta template id. Unique per language variant; usable on /v1/whatsapp/templates/id/{templateId}.' }
30147
30179
  name: { type: string }
30148
30180
  status: { type: string }
30149
30181
  category: { type: string }
30150
- language: { type: string }
30182
+ language: { type: string, description: 'The variant actually returned.' }
30151
30183
  components:
30152
30184
  type: array
30153
30185
  items:
30154
30186
  type: object
30155
- '400': { description: accountId is required }
30187
+ rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
30188
+ quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
30189
+ '400': { $ref: '#/components/responses/BadRequest' }
30156
30190
  '401': { $ref: '#/components/responses/Unauthorized' }
30157
- '404': { $ref: '#/components/responses/NotFound' }
30191
+ '404': { description: 'Account not found, or no template with that name (and language, when given). details.languages lists the family''s languages when the name exists (code template_not_found).' }
30192
+ '409':
30193
+ description: 'The template name exists in several languages and no language was given (code ambiguous_template). details.languages lists them.'
30194
+ content:
30195
+ application/json:
30196
+ schema:
30197
+ type: object
30198
+ properties:
30199
+ error: { type: string }
30200
+ type: { type: string, enum: [invalid_request_error] }
30201
+ code: { type: string, enum: [ambiguous_template] }
30202
+ param: { type: string, enum: [language] }
30203
+ details:
30204
+ type: object
30205
+ properties:
30206
+ languages: { type: array, items: { type: string } }
30158
30207
  '502': { description: Meta rejected the request or was unreachable. Meta 4xx statuses are forwarded as-is. }
30159
30208
  patch:
30160
30209
  x-resource-group: "accounts"
@@ -30162,20 +30211,28 @@ paths:
30162
30211
  tags: [WhatsApp]
30163
30212
  summary: Update template
30164
30213
  description: |
30165
- Update a message template's components. Only certain fields can be updated depending on
30166
- the template's current approval state. Approved templates can only have components updated.
30214
+ Update one variant's components. Name, language and category cannot change after creation.
30215
+
30216
+ Meta stores one template per **name + language**, so a name identifies a family of variants,
30217
+ each with its own Meta id. Pass `language` to address one variant. Without it, a name with a
30218
+ single variant resolves to that variant; a name with several returns `409 ambiguous_template`
30219
+ with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`);
30220
+ if the family has several regional variants for it, that is also a 409. A full code (`es_ES`)
30221
+ must match exactly. Variants in `PENDING_DELETION` are not part of the family.
30167
30222
 
30168
- A successful update sends the template back to Meta for review, so the `status` returned
30169
- here is normally `PENDING`. The final outcome arrives later on the
30170
- `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be
30171
- edited again until Meta finishes reviewing it.
30223
+ Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved
30224
+ template can be edited once per 24 hours and up to 10 times per 30 days. A successful update
30225
+ sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`.
30226
+ The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the
30227
+ variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again
30228
+ until Meta finishes reviewing it.
30172
30229
  security:
30173
30230
  - bearerAuth: []
30174
30231
  parameters:
30175
30232
  - name: templateName
30176
30233
  in: path
30177
30234
  required: true
30178
- description: Template name
30235
+ description: Template name (the family).
30179
30236
  schema:
30180
30237
  type: string
30181
30238
  requestBody:
@@ -30191,6 +30248,9 @@ paths:
30191
30248
  accountId:
30192
30249
  type: string
30193
30250
  description: WhatsApp social account ID
30251
+ language:
30252
+ type: string
30253
+ description: 'Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.'
30194
30254
  components:
30195
30255
  type: array
30196
30256
  description: Updated template components
@@ -30199,15 +30259,16 @@ paths:
30199
30259
  $ref: '#/components/schemas/WhatsAppTemplateComponent'
30200
30260
  example:
30201
30261
  accountId: "507f1f77bcf86cd799439011"
30262
+ language: "es"
30202
30263
  components:
30203
30264
  - type: "body"
30204
- text: "Updated: Your order {{1}} is confirmed. Delivery by {{2}}"
30265
+ text: "Actualizado: tu pedido {{1}} está confirmado. Entrega el {{2}}"
30205
30266
  example:
30206
- body_text: [["ORD-12345", "April 1"]]
30267
+ body_text: [["ORD-12345", "1 de abril"]]
30207
30268
  - type: "buttons"
30208
30269
  buttons:
30209
30270
  - type: "quick_reply"
30210
- text: "Track Order"
30271
+ text: "Seguir pedido"
30211
30272
  responses:
30212
30273
  '200':
30213
30274
  description: Template updated successfully
@@ -30220,15 +30281,31 @@ paths:
30220
30281
  template:
30221
30282
  type: object
30222
30283
  properties:
30223
- id: { type: string }
30284
+ id: { type: string, description: 'Meta id of the edited variant.' }
30224
30285
  name: { type: string }
30286
+ language: { type: string, description: 'The variant that was edited.' }
30225
30287
  status:
30226
30288
  type: string
30227
30289
  description: 'Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.'
30228
30290
  example: PENDING
30229
- '400': { description: Validation error (missing fields) }
30291
+ '400': { $ref: '#/components/responses/BadRequest' }
30230
30292
  '401': { $ref: '#/components/responses/Unauthorized' }
30231
- '404': { $ref: '#/components/responses/NotFound' }
30293
+ '404': { description: 'Account not found, or no template with that name (and language, when given) (code template_not_found).' }
30294
+ '409':
30295
+ description: 'The template name exists in several languages and no language was given (code ambiguous_template). details.languages lists them.'
30296
+ content:
30297
+ application/json:
30298
+ schema:
30299
+ type: object
30300
+ properties:
30301
+ error: { type: string }
30302
+ type: { type: string, enum: [invalid_request_error] }
30303
+ code: { type: string, enum: [ambiguous_template] }
30304
+ param: { type: string, enum: [language] }
30305
+ details:
30306
+ type: object
30307
+ properties:
30308
+ languages: { type: array, items: { type: string } }
30232
30309
  '502': { description: Meta rejected the update or was unreachable. Meta 4xx statuses are forwarded as-is. }
30233
30310
  delete:
30234
30311
  x-resource-group: "accounts"
@@ -30236,14 +30313,19 @@ paths:
30236
30313
  tags: [WhatsApp]
30237
30314
  summary: Delete template
30238
30315
  description: |
30239
- Permanently delete a message template by name.
30316
+ Permanently delete a message template.
30317
+
30318
+ **Without `language` this deletes every language variant of the name** (Meta's own
30319
+ contract for deletion by name). Pass `language` to delete one variant only; the response
30320
+ `scope` says which happened. Meta keeps a deleted approved template in `PENDING_DELETION`
30321
+ for a while and the name cannot be reused for 30 days.
30240
30322
  security:
30241
30323
  - bearerAuth: []
30242
30324
  parameters:
30243
30325
  - name: templateName
30244
30326
  in: path
30245
30327
  required: true
30246
- description: Template name
30328
+ description: Template name (the family).
30247
30329
  schema:
30248
30330
  type: string
30249
30331
  - name: accountId
@@ -30252,6 +30334,12 @@ paths:
30252
30334
  description: WhatsApp social account ID
30253
30335
  schema:
30254
30336
  type: string
30337
+ - name: language
30338
+ in: query
30339
+ required: false
30340
+ description: 'Delete only this language variant (e.g. es). Omit to delete the whole family.'
30341
+ schema:
30342
+ type: string
30255
30343
  responses:
30256
30344
  '200':
30257
30345
  description: Template deleted successfully
@@ -30261,19 +30349,183 @@ paths:
30261
30349
  type: object
30262
30350
  properties:
30263
30351
  success: { type: boolean }
30352
+ scope: { type: string, enum: [all_languages, language], description: 'Whether the whole family or one variant was deleted.' }
30353
+ language: { type: string, description: 'The deleted variant; only when scope is language.' }
30264
30354
  message: { type: string }
30265
- example:
30266
- success: true
30267
- message: "Template \"order_confirmation\" deleted successfully"
30268
- '400': { description: accountId or template name is required }
30355
+ '400': { $ref: '#/components/responses/BadRequest' }
30269
30356
  '401': { $ref: '#/components/responses/Unauthorized' }
30270
- '404': { $ref: '#/components/responses/NotFound' }
30271
- '502': { description: Meta rejected the delete or was unreachable. Meta 4xx statuses are forwarded as-is. }
30272
-
30273
- # ──────────────────────────────────────────────────────────────────────────
30274
- # WHATSAPP BUSINESS CALLING
30275
- # ──────────────────────────────────────────────────────────────────────────
30357
+ '404': { description: 'Account not found, or (with language) no such variant (code template_not_found).' }
30358
+ '409':
30359
+ description: 'Only with language: a bare code (es) matched several regional variants (es_ES, es_MX), so nothing was deleted (code ambiguous_template). Without language there is no 409: the whole family is deleted.'
30360
+ content:
30361
+ application/json:
30362
+ schema:
30363
+ type: object
30364
+ properties:
30365
+ error: { type: string }
30366
+ type: { type: string, enum: [invalid_request_error] }
30367
+ code: { type: string, enum: [ambiguous_template] }
30368
+ param: { type: string, enum: [language] }
30369
+ details:
30370
+ type: object
30371
+ properties:
30372
+ languages: { type: array, items: { type: string } }
30373
+ '502': { description: Meta rejected the request or was unreachable. Meta 4xx statuses are forwarded as-is. }
30374
+ /v1/whatsapp/templates/id/{templateId}:
30375
+ get:
30376
+ x-resource-group: "accounts"
30377
+ operationId: getWhatsAppTemplateById
30378
+ tags: [WhatsApp]
30379
+ summary: Get template by id
30380
+ description: |
30381
+ Retrieve one template variant by its Meta id, the id every variant of a family has on its own
30382
+ and the one the `whatsapp.template.status_updated` webhook carries.
30383
+ security:
30384
+ - bearerAuth: []
30385
+ parameters:
30386
+ - name: templateId
30387
+ in: path
30388
+ required: true
30389
+ description: Meta template id (numeric).
30390
+ schema:
30391
+ type: string
30392
+ - name: accountId
30393
+ in: query
30394
+ required: true
30395
+ description: WhatsApp social account ID
30396
+ schema:
30397
+ type: string
30398
+ responses:
30399
+ '200':
30400
+ description: Template retrieved successfully
30401
+ content:
30402
+ application/json:
30403
+ schema:
30404
+ type: object
30405
+ properties:
30406
+ success: { type: boolean }
30407
+ template:
30408
+ type: object
30409
+ properties:
30410
+ id: { type: string, description: 'Meta template id. Unique per language variant; usable on /v1/whatsapp/templates/id/{templateId}.' }
30411
+ name: { type: string }
30412
+ status: { type: string }
30413
+ category: { type: string }
30414
+ language: { type: string, description: 'The variant actually returned.' }
30415
+ components:
30416
+ type: array
30417
+ items:
30418
+ type: object
30419
+ rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
30420
+ quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
30421
+ '400': { $ref: '#/components/responses/BadRequest' }
30422
+ '401': { $ref: '#/components/responses/Unauthorized' }
30423
+ '404': { description: Account not found. }
30424
+ '502': { description: 'Meta rejected the request (including an id the account cannot access) or was unreachable. Meta 4xx statuses are forwarded as-is.' }
30425
+ patch:
30426
+ x-resource-group: "accounts"
30427
+ operationId: updateWhatsAppTemplateById
30428
+ tags: [WhatsApp]
30429
+ summary: Update template by id
30430
+ description: |
30431
+ Update one variant's components by its Meta id. Name, language and category cannot change.
30276
30432
 
30433
+ Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved
30434
+ template can be edited once per 24 hours and up to 10 times per 30 days. A successful update
30435
+ sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`.
30436
+ The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the
30437
+ variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again
30438
+ until Meta finishes reviewing it.
30439
+ security:
30440
+ - bearerAuth: []
30441
+ parameters:
30442
+ - name: templateId
30443
+ in: path
30444
+ required: true
30445
+ description: Meta template id (numeric).
30446
+ schema:
30447
+ type: string
30448
+ requestBody:
30449
+ required: true
30450
+ content:
30451
+ application/json:
30452
+ schema:
30453
+ type: object
30454
+ required:
30455
+ - accountId
30456
+ - components
30457
+ properties:
30458
+ accountId:
30459
+ type: string
30460
+ description: WhatsApp social account ID
30461
+ components:
30462
+ type: array
30463
+ description: Updated template components
30464
+ minItems: 1
30465
+ items:
30466
+ $ref: '#/components/schemas/WhatsAppTemplateComponent'
30467
+ responses:
30468
+ '200':
30469
+ description: Template updated successfully
30470
+ content:
30471
+ application/json:
30472
+ schema:
30473
+ type: object
30474
+ properties:
30475
+ success: { type: boolean }
30476
+ template:
30477
+ type: object
30478
+ properties:
30479
+ id: { type: string }
30480
+ name: { type: string }
30481
+ language: { type: string }
30482
+ status:
30483
+ type: string
30484
+ description: 'Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.'
30485
+ example: PENDING
30486
+ '400': { $ref: '#/components/responses/BadRequest' }
30487
+ '401': { $ref: '#/components/responses/Unauthorized' }
30488
+ '404': { description: Account not found. }
30489
+ '502': { description: 'Meta rejected the update (including an id the account cannot access) or was unreachable. Meta 4xx statuses are forwarded as-is.' }
30490
+ delete:
30491
+ x-resource-group: "accounts"
30492
+ operationId: deleteWhatsAppTemplateById
30493
+ tags: [WhatsApp]
30494
+ summary: Delete template by id
30495
+ description: |
30496
+ Delete one language variant by its Meta id. Other languages of the same name are untouched.
30497
+ The name cannot be reused for 30 days once its last variant is deleted.
30498
+ security:
30499
+ - bearerAuth: []
30500
+ parameters:
30501
+ - name: templateId
30502
+ in: path
30503
+ required: true
30504
+ description: Meta template id (numeric).
30505
+ schema:
30506
+ type: string
30507
+ - name: accountId
30508
+ in: query
30509
+ required: true
30510
+ description: WhatsApp social account ID
30511
+ schema:
30512
+ type: string
30513
+ responses:
30514
+ '200':
30515
+ description: Variant deleted successfully
30516
+ content:
30517
+ application/json:
30518
+ schema:
30519
+ type: object
30520
+ properties:
30521
+ success: { type: boolean }
30522
+ scope: { type: string, enum: [language] }
30523
+ language: { type: string }
30524
+ message: { type: string }
30525
+ '400': { $ref: '#/components/responses/BadRequest' }
30526
+ '401': { $ref: '#/components/responses/Unauthorized' }
30527
+ '404': { description: Account not found. }
30528
+ '502': { description: 'Meta rejected the request (including an id the account cannot access) or was unreachable. Meta 4xx statuses are forwarded as-is.' }
30277
30529
  /v1/whatsapp/calling:
30278
30530
  get:
30279
30531
  x-resource-group: "accounts"
@@ -34,7 +34,7 @@ describe 'LinkedInMentionsApi' do
34
34
 
35
35
  # unit tests for get_linked_in_mentions
36
36
  # Resolve LinkedIn mention
37
- # Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization. This is a LinkedIn API limitation: the only endpoints that resolve profile URLs to member URNs (vanityUrl, peopleTypeahead) are scoped to organization followers. There is no public LinkedIn API to resolve a vanity URL without organization context. - Organization mentions (e.g. @Microsoft) work without this requirement. - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile. - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
37
+ # Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization: both endpoints that resolve a profile URL to a member URN take an organization you administer. Organization mentions (e.g. @Microsoft) have no such requirement. - The two are not scoped alike. peopleTypeahead?q=organizationFollowers only returns that organization's followers; vanityUrl?q=vanityUrlAsOrganization does not, and its resolvable set is opaque. A 404 here does not mean the person is unknown to you or unknown to LinkedIn: a live public profile can 404 with no reason given. - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile. - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
38
38
  # @param account_id The LinkedIn account ID
39
39
  # @param url LinkedIn profile URL, company URL, or vanity name.
40
40
  # @param [Hash] opts the optional parameters
@@ -136,17 +136,31 @@ describe 'WhatsAppApi' do
136
136
 
137
137
  # unit tests for delete_whats_app_template
138
138
  # Delete template
139
- # Permanently delete a message template by name.
140
- # @param template_name Template name
139
+ # Permanently delete a message template. **Without `language` this deletes every language variant of the name** (Meta's own contract for deletion by name). Pass `language` to delete one variant only; the response `scope` says which happened. Meta keeps a deleted approved template in `PENDING_DELETION` for a while and the name cannot be reused for 30 days.
140
+ # @param template_name Template name (the family).
141
141
  # @param account_id WhatsApp social account ID
142
142
  # @param [Hash] opts the optional parameters
143
- # @return [UnpublishPost200Response]
143
+ # @option opts [String] :language Delete only this language variant (e.g. es). Omit to delete the whole family.
144
+ # @return [DeleteWhatsAppTemplate200Response]
144
145
  describe 'delete_whats_app_template test' do
145
146
  it 'should work' do
146
147
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
148
  end
148
149
  end
149
150
 
151
+ # unit tests for delete_whats_app_template_by_id
152
+ # Delete template by id
153
+ # Delete one language variant by its Meta id. Other languages of the same name are untouched. The name cannot be reused for 30 days once its last variant is deleted.
154
+ # @param template_id Meta template id (numeric).
155
+ # @param account_id WhatsApp social account ID
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [DeleteWhatsAppTemplateById200Response]
158
+ describe 'delete_whats_app_template_by_id test' do
159
+ it 'should work' do
160
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
+ end
162
+ end
163
+
150
164
  # unit tests for delete_whatsapp_business_username
151
165
  # Delete business username
152
166
  # Release the currently claimed WhatsApp Business username from the account. After deletion the username becomes available for other accounts to claim.
@@ -250,10 +264,11 @@ describe 'WhatsAppApi' do
250
264
 
251
265
  # unit tests for get_whats_app_template
252
266
  # Get template
253
- # Retrieve a single message template by name.
254
- # @param template_name Template name
267
+ # Retrieve one message template variant by name. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family.
268
+ # @param template_name Template name (the family).
255
269
  # @param account_id WhatsApp social account ID
256
270
  # @param [Hash] opts the optional parameters
271
+ # @option opts [String] :language Language code of the variant (e.g. en_US, es, pt_BR). Required when the family has several languages.
257
272
  # @return [GetWhatsAppTemplate200Response]
258
273
  describe 'get_whats_app_template test' do
259
274
  it 'should work' do
@@ -261,11 +276,27 @@ describe 'WhatsAppApi' do
261
276
  end
262
277
  end
263
278
 
279
+ # unit tests for get_whats_app_template_by_id
280
+ # Get template by id
281
+ # Retrieve one template variant by its Meta id, the id every variant of a family has on its own and the one the `whatsapp.template.status_updated` webhook carries.
282
+ # @param template_id Meta template id (numeric).
283
+ # @param account_id WhatsApp social account ID
284
+ # @param [Hash] opts the optional parameters
285
+ # @return [GetWhatsAppTemplate200Response]
286
+ describe 'get_whats_app_template_by_id test' do
287
+ it 'should work' do
288
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
289
+ end
290
+ end
291
+
264
292
  # unit tests for get_whats_app_templates
265
293
  # List templates
266
- # List all message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API.
294
+ # List message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API. One entry per **name + language**: a multi-language template appears once per language, each with its own Meta `id`.
267
295
  # @param account_id WhatsApp social account ID
268
296
  # @param [Hash] opts the optional parameters
297
+ # @option opts [String] :name Exact template name; returns every language variant of that family.
298
+ # @option opts [String] :language Exact language code (e.g. en_US).
299
+ # @option opts [String] :status
269
300
  # @return [GetWhatsAppTemplates200Response]
270
301
  describe 'get_whats_app_templates test' do
271
302
  it 'should work' do
@@ -467,8 +498,8 @@ describe 'WhatsAppApi' do
467
498
 
468
499
  # unit tests for update_whats_app_template
469
500
  # Update template
470
- # 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. A successful update sends the template back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives later on the `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be edited again until Meta finishes reviewing it.
471
- # @param template_name Template name
501
+ # Update one variant's components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
502
+ # @param template_name Template name (the family).
472
503
  # @param update_whats_app_template_request
473
504
  # @param [Hash] opts the optional parameters
474
505
  # @return [UpdateWhatsAppTemplate200Response]
@@ -478,6 +509,19 @@ describe 'WhatsAppApi' do
478
509
  end
479
510
  end
480
511
 
512
+ # unit tests for update_whats_app_template_by_id
513
+ # Update template by id
514
+ # Update one variant's components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
515
+ # @param template_id Meta template id (numeric).
516
+ # @param update_whats_app_template_by_id_request
517
+ # @param [Hash] opts the optional parameters
518
+ # @return [UpdateWhatsAppTemplateById200Response]
519
+ describe 'update_whats_app_template_by_id test' do
520
+ it 'should work' do
521
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
522
+ end
523
+ end
524
+
481
525
  # unit tests for upload_whats_app_profile_photo
482
526
  # Upload profile picture
483
527
  # 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. Provide the image either as a binary upload (`multipart/form-data` with `file`) or as a download URL (`application/json` with `url`) — with a URL we fetch the image server-side and upload the bytes for you. Meta's profile-photo API is bytes-only, so there is no direct URL passthrough. JPEG/PNG, max 5MB either way.
@@ -0,0 +1,58 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::DeleteWhatsAppTemplate200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::DeleteWhatsAppTemplate200Response do
21
+ #let(:instance) { Zernio::DeleteWhatsAppTemplate200Response.new }
22
+
23
+ describe 'test an instance of DeleteWhatsAppTemplate200Response' do
24
+ it 'should create an instance of DeleteWhatsAppTemplate200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::DeleteWhatsAppTemplate200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "success"' 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 "scope"' 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', ["all_languages", "language"])
40
+ # validator.allowable_values.each do |value|
41
+ # expect { instance.scope = value }.not_to raise_error
42
+ # end
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "language"' 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
+ describe 'test attribute "message"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ end