tessl install tessl/pypi-google-shopping-merchant-conversions@1.0.0Google 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%
Build a utility that manages conversion sources across different API versions of the Google Shopping Merchant Conversions service.
Create a Python module that provides a version-aware client manager for the Google Shopping Merchant Conversions API. The system should:
Create a module with a ConversionVersionManager class that:
@generates
class ConversionVersionManager:
"""Manages conversion source operations across API versions."""
def __init__(self, merchant_id: str):
"""
Initialize the version manager.
Args:
merchant_id: The merchant account ID
"""
pass
def initialize_clients(self) -> None:
"""Initialize both stable and beta API clients."""
pass
def get_client(self, version: str):
"""
Get the client for the specified version.
Args:
version: Either 'stable' or 'beta'
Returns:
The API client for the specified version
Raises:
ValueError: If version is not 'stable' or 'beta'
"""
pass
def list_sources(self, version: str = 'stable') -> list:
"""
List conversion sources using specified API version.
Args:
version: Either 'stable' or 'beta', defaults to 'stable'
Returns:
List of conversion sources from the specified version
Raises:
ValueError: If version is not 'stable' or 'beta'
"""
passProvides the Google Shopping Merchant Conversions API client library for both stable (v1) and beta (v1beta) versions.