Ctrl + K
DocumentationLog inGet started

tessl/pypi-google-shopping-merchant-conversions

tessl install tessl/pypi-google-shopping-merchant-conversions@1.0.0

Google Shopping Merchant Conversions API client library for managing conversion sources and tracking.

Agent Success

Agent success rate when using this tile

82%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.17x

Baseline

Agent success rate without this tile

70%

task.mdevals/scenario-10/

Conversion Source Configuration Manager

Build a configuration manager that updates specific properties of Merchant Center conversion sources without affecting other fields.

Requirements

Your task is to implement a system that can selectively update conversion source properties. The system should:

  1. Retrieve an existing Merchant Center Destination conversion source
  2. Update only the display name, leaving all other properties unchanged
  3. Update only the currency code, leaving all other properties unchanged
  4. Update both the display name and currency code together, leaving attribution settings unchanged

Constraints

  • Use the appropriate mechanism to specify exactly which fields should be updated in each operation
  • Ensure that unspecified fields are not modified during updates
  • All update operations should work on the same conversion source
  • The implementation should demonstrate proper handling of partial updates

Test Cases

  • Given a conversion source with display_name="Original Name", when updating only the display_name to "Updated Name", then the currency_code and attribution_settings remain unchanged @test
  • Given a conversion source with currency_code="USD", when updating only the currency_code to "EUR", then the display_name and attribution_settings remain unchanged @test
  • Given a conversion source, when updating both display_name and currency_code, then only those two fields change and attribution_settings remain unchanged @test

Implementation

@generates

API

def update_display_name(client, conversion_source_name: str, new_display_name: str):
    """
    Update only the display name of a conversion source.

    Args:
        client: The ConversionSourcesServiceClient instance
        conversion_source_name: Full resource name of the conversion source
        new_display_name: The new display name to set

    Returns:
        The updated ConversionSource object
    """
    pass

def update_currency_code(client, conversion_source_name: str, new_currency_code: str):
    """
    Update only the currency code of a conversion source.

    Args:
        client: The ConversionSourcesServiceClient instance
        conversion_source_name: Full resource name of the conversion source
        new_currency_code: The new currency code to set

    Returns:
        The updated ConversionSource object
    """
    pass

def update_display_name_and_currency(client, conversion_source_name: str,
                                     new_display_name: str, new_currency_code: str):
    """
    Update both display name and currency code of a conversion source.

    Args:
        client: The ConversionSourcesServiceClient instance
        conversion_source_name: Full resource name of the conversion source
        new_display_name: The new display name to set
        new_currency_code: The new currency code to set

    Returns:
        The updated ConversionSource object
    """
    pass

Dependencies { .dependencies }

google-shopping-merchant-conversions { .dependency }

Provides the API client for managing conversion sources in Google Merchant Center.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/google-shopping-merchant-conversions@1.0.x
tile.json