Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/devtooling 653 - Implementing whatsapp resource #1588

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

shrutisuryawanshigenesys
Copy link
Collaborator

No description provided.

*/

// dataSourceConversationsMessagingIntegrationsWhatsappRead retrieves by name the id in question
func dataSourceConversationsMessagingIntegrationsWhatsappRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls enable caching for datasources too.

name = "Test Integration Whatsapp"
embedded_signup_access_token = "test_token"
messaging_setting_id = genesyscloud_conversations_messaging_settings.settings.id
supported_content_id = genesyscloud_conversations_messaging_supportedcontent.content.id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add activate section as well in this example

proxy := getConversationsMessagingIntegrationsWhatsappProxy(sdkConfig)

// Activate WhatsApp integration if requested, otherwise proceed with update
if activateWhatsapp := d.Get("activate_whatsapp").(*schema.Set); activateWhatsapp != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the user tries to make any other update.
this will always make an activate call of whatsapp, even if it is already activated
check for d.haschange of activate_whatsapp instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants