iachat/spec/services/whatsapp
Eduardo Policarpo 46b75e1b03
feat(whatsapp): add optional phone_number_id parameter to media retrieval API (#11823)
## Description

This pull request introduces an optional parameter, `phone_number_id`,
to the WhatsApp API call responsible for retrieving media. The addition
of this parameter allows for greater flexibility when interacting with
the WhatsApp API, as it can now accommodate scenarios where specifying a
particular phone number ID is necessary. This change is backward
compatible and does not affect existing functionality if the parameter
is not provided.

Fixes # (issue)

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

The changes were tested locally by invoking the WhatsApp media retrieval
API with and without the `phone_number_id` parameter. Both scenarios
were verified to ensure that:

- When `phone_number_id` is provided, the API call includes the
parameter and functions as expected.
- When `phone_number_id` is omitted, the API call continues to work as
before, maintaining backward compatibility.

No errors or warnings were observed during testing, and all relevant
unit tests passed successfully.

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-09-23 09:16:59 +05:30
..
providers fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
channel_creation_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
embedded_signup_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
facebook_api_client_spec.rb feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00
incoming_message_service_spec.rb feat: Add WhatsApp profile for contact name resolution (#12123) 2025-08-12 14:20:52 +05:30
incoming_message_whatsapp_cloud_service_spec.rb feat(whatsapp): add optional phone_number_id parameter to media retrieval API (#11823) 2025-09-23 09:16:59 +05:30
oneoff_campaign_service_spec.rb fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
phone_info_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
send_on_whatsapp_service_spec.rb chore: WhatsApp template message error handling for invalid templates (#12157) 2025-08-11 20:08:52 +05:30
template_parameter_converter_service_spec.rb fix: Handle nil processed_params for WhatsApp templates without params (#12177) 2025-08-12 22:56:53 +05:30
token_exchange_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
token_validation_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
webhook_setup_service_spec.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
webhook_teardown_service_spec.rb feat: add reauth flow for wa embedded signup (#11940) 2025-08-08 01:48:45 +05:30