Class CommerceTransactionAsyncClient (0.1.0)

CommerceTransactionAsyncClient(
    *,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: typing.Optional[
        typing.Union[
            str,
            google.cloud.commerceproducer_v1beta.services.commerce_transaction.transports.base.CommerceTransactionTransport,
            typing.Callable[
                [...],
                google.cloud.commerceproducer_v1beta.services.commerce_transaction.transports.base.CommerceTransactionTransport,
            ],
        ]
    ] = "grpc_asyncio",
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
    client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)

APIs related to managing resources that model commercial transactions.

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
Type Description
str The API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
Type Description
CommerceTransactionTransport The transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
Type Description
str The universe domain used by the client instance.

Methods

CommerceTransactionAsyncClient

CommerceTransactionAsyncClient(
    *,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: typing.Optional[
        typing.Union[
            str,
            google.cloud.commerceproducer_v1beta.services.commerce_transaction.transports.base.CommerceTransactionTransport,
            typing.Callable[
                [...],
                google.cloud.commerceproducer_v1beta.services.commerce_transaction.transports.base.CommerceTransactionTransport,
            ],
        ]
    ] = "grpc_asyncio",
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
    client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)

Instantiates the commerce transaction async client.

Parameters
Name Description
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Optional[Union[str,CommerceTransactionTransport,Callable[..., CommerceTransactionTransport]]]

The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the CommerceTransactionTransport constructor. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
Type Description
google.auth.exceptions.MutualTlsChannelError If mutual TLS transport creation failed for any reason.

cancel_operation

cancel_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.CancelOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

cancel_private_offer

cancel_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.CancelPrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer

Cancels the target PrivateOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_cancel_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.CancelPrivateOfferRequest(
        name="name_value",
    )

    # Make the request
    response = await client.cancel_private_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.CancelPrivateOfferRequest, dict]]

The request object. Message for cancelling a PrivateOffer

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOffer Message describing PrivateOffer resource. Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

create_private_offer

create_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.CreatePrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer

Creates a new PrivateOffer in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_create_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    private_offer = commerceproducer_v1beta.PrivateOffer()
    private_offer.single_product_offer.amended_private_offer = "amended_private_offer_value"

    request = commerceproducer_v1beta.CreatePrivateOfferRequest(
        parent="parent_value",
        private_offer=private_offer,
    )

    # Make the request
    response = await client.create_private_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.CreatePrivateOfferRequest, dict]]

The request object. Message for creating a PrivateOffer

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOffer Message describing PrivateOffer resource. Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

create_private_offer_document

create_private_offer_document(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.CreatePrivateOfferDocumentRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOfferDocument

Creates a new PrivateOfferDocument in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_create_private_offer_document():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    private_offer_document = commerceproducer_v1beta.PrivateOfferDocument()
    private_offer_document.inline_content = b'inline_content_blob'
    private_offer_document.document_type = "STANDARD_END_USER_LICENSE_AGREEMENT_V2"

    request = commerceproducer_v1beta.CreatePrivateOfferDocumentRequest(
        parent="parent_value",
        private_offer_document=private_offer_document,
    )

    # Make the request
    response = await client.create_private_offer_document(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.CreatePrivateOfferDocumentRequest, dict]]

The request object. Message for creating a PrivateOfferDocument.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOfferDocument Message describing the PrivateOfferDocument resource. Used to attach documents to a private offer in state DRAFT. Once a private offer is no longer in state DRAFT, the set of child documents is immutable. Existing documents cannot be updated or deleted, and new documents cannot be added. A private offer must include a EULA, either by assigning a standard EULA or attaching a custom EULA document, or a statement of work document.

delete_operation

delete_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.DeleteOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_private_offer

delete_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.DeletePrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes the target PrivateOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_delete_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.DeletePrivateOfferRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_private_offer(request=request)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.DeletePrivateOfferRequest, dict]]

The request object. Message for deleting a PrivateOffer

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_private_offer_document

delete_private_offer_document(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.DeletePrivateOfferDocumentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes the target PrivateOfferDocument.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_delete_private_offer_document():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.DeletePrivateOfferDocumentRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_private_offer_document(request=request)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.DeletePrivateOfferDocumentRequest, dict]]

The request object. Message for deleting a PrivateOfferDocument

name str

Required. Name of the resource. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
CommerceTransactionAsyncClient The constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
Name Description
info dict

The service account private key info.

Returns
Type Description
CommerceTransactionAsyncClient The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
CommerceTransactionAsyncClient The constructed client.

get_location

get_location(
    request: typing.Optional[
        typing.Union[google.cloud.location.locations_pb2.GetLocationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
Name Description
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.Location Location object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
Name Description
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If any errors happen.
Returns
Type Description
Tuple[str, Callable[[], Tuple[bytes, bytes]]] returns the API endpoint and the client cert source to use.

get_operation

get_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.GetOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
Name Description
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.Operation An Operation object.

get_private_offer

get_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetPrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer

Gets details of a single PrivateOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetPrivateOfferRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_private_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetPrivateOfferRequest, dict]]

The request object. Message for getting a PrivateOffer

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOffer Message describing PrivateOffer resource. Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

get_private_offer_document

get_private_offer_document(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetPrivateOfferDocumentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOfferDocument

Gets details of a single PrivateOfferDocument.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_private_offer_document():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetPrivateOfferDocumentRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_private_offer_document(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetPrivateOfferDocumentRequest, dict]]

The request object. Message for getting a PrivateOfferDocument

name str

Required. Name of the resource. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOfferDocument Message describing the PrivateOfferDocument resource. Used to attach documents to a private offer in state DRAFT. Once a private offer is no longer in state DRAFT, the set of child documents is immutable. Existing documents cannot be updated or deleted, and new documents cannot be added. A private offer must include a EULA, either by assigning a standard EULA or attaching a custom EULA document, or a statement of work document.

get_service

get_service(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetServiceRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.service.Service

Gets details of a single Service.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_service():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetServiceRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_service(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetServiceRequest, dict]]

The request object. Message for getting a Service

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.Service Message describing Service resource.

get_sku

get_sku(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetSkuRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.sku.Sku

Gets details of a single Sku.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_sku():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetSkuRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_sku(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetSkuRequest, dict]]

The request object. Message for getting a Sku

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.Sku Message describing the Sku resource. Encapsulates and represents a stock keeping unit (SKU), the atomic unit of pricing and billing in Google Cloud. Each customer charge is associated with and originates from exactly one SKU. While the Cloud Marketplace Sku resource shares a close relationship with the public [Sku resource in the Cloud Billing API](https://cloud.google.com/billing/docs/how-to/get-pricing-information-api), Cloud Marketplace SKUs are represented here with additional information in an alternative format tailored for use by Cloud Marketplace partners, and are not necessarily public and by extension are not generally visible in the Cloud Billing API or the [Google Cloud Public SKUs](https://cloud.google.com/skus). Note on terminology: While the name of the resource derives from the acronym 'SKU' it is named 'Sku' for consistency with other resource type names, and may be rendered variously as 'Sku', 'sku', or 'SKU' across this and other documentation.

get_sku_group

get_sku_group(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetSkuGroupRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.sku_group.SkuGroup

Gets details of a single SkuGroup.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_sku_group():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetSkuGroupRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_sku_group(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetSkuGroupRequest, dict]]

The request object. Message for getting a SkuGroup

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.SkuGroup Message describing SkuGroup resource

get_standard_offer

get_standard_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.GetStandardOfferRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.standard_offer.StandardOffer

Gets details of a single StandardOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_get_standard_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.GetStandardOfferRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_standard_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.GetStandardOfferRequest, dict]]

The request object. Message for getting a StandardOffer

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.StandardOffer Message describing the StandardOffer resource.

get_transport_class

get_transport_class(
    label: typing.Optional[str] = None,
) -> typing.Type[
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.transports.base.CommerceTransactionTransport
]

Returns an appropriate transport class.

Parameter
Name Description
label typing.Optional[str]

The name of the desired transport. If none is provided, then the first transport in the registry is used.

list_locations

list_locations(
    request: typing.Optional[
        typing.Union[google.cloud.location.locations_pb2.ListLocationsRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
Name Description
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.ListLocationsResponse Response message for ListLocations method.

list_operations

list_operations(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.ListOperationsRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
Name Description
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.ListOperationsResponse Response message for ListOperations method.

list_private_offer_documents

list_private_offer_documents(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListPrivateOfferDocumentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListPrivateOfferDocumentsAsyncPager
)

Lists PrivateOfferDocuments for the given parent.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_private_offer_documents():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListPrivateOfferDocumentsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_private_offer_documents(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListPrivateOfferDocumentsRequest, dict]]

The request object. Message for requesting list of PrivateOfferDocuments

parent str

Required. Parent value for ListPrivateOfferDocumentsRequest. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListPrivateOfferDocumentsAsyncPager Message for response to listing PrivateOfferDocuments Iterating over this object will yield results and resolve additional pages automatically.

list_private_offers

list_private_offers(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListPrivateOffersRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListPrivateOffersAsyncPager
)

Lists PrivateOffers for the given parent.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_private_offers():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListPrivateOffersRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_private_offers(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListPrivateOffersRequest, dict]]

The request object. Message for requesting list of PrivateOffers

parent str

Required. Parent value for ListPrivateOffersRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListPrivateOffersAsyncPager Message for response to listing PrivateOffers Iterating over this object will yield results and resolve additional pages automatically.

list_services

list_services(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListServicesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListServicesAsyncPager
)

Lists Services in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_services():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListServicesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_services(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListServicesRequest, dict]]

The request object. Message for requesting list of Services

parent str

Required. Parent value for ListServicesRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListServicesAsyncPager Message for response to listing Services Iterating over this object will yield results and resolve additional pages automatically.

list_sku_groups

list_sku_groups(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListSkuGroupsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListSkuGroupsAsyncPager
)

Lists SkuGroups for the given parent.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_sku_groups():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListSkuGroupsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_sku_groups(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListSkuGroupsRequest, dict]]

The request object. Message for requesting list of SkuGroups

parent str

Required. Parent value for ListSkuGroupsRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListSkuGroupsAsyncPager Message for response to listing SkuGroups Iterating over this object will yield results and resolve additional pages automatically.

list_skus

list_skus(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListSkusRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListSkusAsyncPager
)

Lists Skus for the given parent.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_skus():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListSkusRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_skus(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListSkusRequest, dict]]

The request object. Message for requesting list of Skus

parent str

Required. Parent value for ListSkusRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListSkusAsyncPager Message for response to listing Skus Iterating over this object will yield results and resolve additional pages automatically.

list_standard_offers

list_standard_offers(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.ListStandardOffersRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListStandardOffersAsyncPager
)

Lists StandardOffers for the given parent.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_list_standard_offers():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.ListStandardOffersRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_standard_offers(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.ListStandardOffersRequest, dict]]

The request object. Message for requesting list of StandardOffers

parent str

Required. Parent value for ListStandardOffersRequest This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.services.commerce_transaction.pagers.ListStandardOffersAsyncPager Message for response to listing StandardOffers Iterating over this object will yield results and resolve additional pages automatically.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_private_offer_document_path

parse_private_offer_document_path(path: str) -> typing.Dict[str, str]

Parses a private_offer_document path into its component segments.

parse_private_offer_path

parse_private_offer_path(path: str) -> typing.Dict[str, str]

Parses a private_offer path into its component segments.

parse_service_path

parse_service_path(path: str) -> typing.Dict[str, str]

Parses a service path into its component segments.

parse_sku_group_path

parse_sku_group_path(path: str) -> typing.Dict[str, str]

Parses a sku_group path into its component segments.

parse_sku_path

parse_sku_path(path: str) -> typing.Dict[str, str]

Parses a sku path into its component segments.

parse_standard_offer_path

parse_standard_offer_path(path: str) -> typing.Dict[str, str]

Parses a standard_offer path into its component segments.

private_offer_document_path

private_offer_document_path(
    project: str, location: str, private_offer: str, document: str
) -> str

Returns a fully-qualified private_offer_document string.

private_offer_path

private_offer_path(project: str, location: str, private_offer: str) -> str

Returns a fully-qualified private_offer string.

publish_private_offer

publish_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.PublishPrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer

Publishes the target PrivateOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_publish_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    request = commerceproducer_v1beta.PublishPrivateOfferRequest(
        name="name_value",
    )

    # Make the request
    response = await client.publish_private_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.PublishPrivateOfferRequest, dict]]

The request object. Message for publishing a PrivateOffer

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOffer Message describing PrivateOffer resource. Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

service_path

service_path(project: str, location: str, service: str) -> str

Returns a fully-qualified service string.

sku_group_path

sku_group_path(project: str, location: str, sku_group: str) -> str

Returns a fully-qualified sku_group string.

sku_path

sku_path(project: str, location: str, service: str, sku: str) -> str

Returns a fully-qualified sku string.

standard_offer_path

standard_offer_path(
    project: str, location: str, service: str, standard_offer: str
) -> str

Returns a fully-qualified standard_offer string.

update_private_offer

update_private_offer(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.UpdatePrivateOfferRequest,
            dict,
        ]
    ] = None,
    *,
    private_offer: typing.Optional[
        google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOffer

Updates the target PrivateOffer.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_update_private_offer():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    private_offer = commerceproducer_v1beta.PrivateOffer()
    private_offer.single_product_offer.amended_private_offer = "amended_private_offer_value"

    request = commerceproducer_v1beta.UpdatePrivateOfferRequest(
        private_offer=private_offer,
    )

    # Make the request
    response = await client.update_private_offer(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.UpdatePrivateOfferRequest, dict]]

The request object. Message for updating a PrivateOffer

private_offer PrivateOffer

Required. The resource being updated This corresponds to the private_offer field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. The list of fields to update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. If unspecified, all fields present in the request will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOffer Message describing PrivateOffer resource. Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

update_private_offer_document

update_private_offer_document(
    request: typing.Optional[
        typing.Union[
            google.cloud.commerceproducer_v1beta.types.commerce_transaction.UpdatePrivateOfferDocumentRequest,
            dict,
        ]
    ] = None,
    *,
    private_offer_document: typing.Optional[
        google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOfferDocument
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.commerceproducer_v1beta.types.private_offer.PrivateOfferDocument

Updates the target PrivateOfferDocument.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import commerceproducer_v1beta

async def sample_update_private_offer_document():
    # Create a client
    client = commerceproducer_v1beta.CommerceTransactionAsyncClient()

    # Initialize request argument(s)
    private_offer_document = commerceproducer_v1beta.PrivateOfferDocument()
    private_offer_document.inline_content = b'inline_content_blob'
    private_offer_document.document_type = "STANDARD_END_USER_LICENSE_AGREEMENT_V2"

    request = commerceproducer_v1beta.UpdatePrivateOfferDocumentRequest(
        private_offer_document=private_offer_document,
    )

    # Make the request
    response = await client.update_private_offer_document(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Optional[Union[google.cloud.commerceproducer_v1beta.types.UpdatePrivateOfferDocumentRequest, dict]]

The request object. Message for updating a PrivateOfferDocument

private_offer_document PrivateOfferDocument

Required. The resource being updated. This corresponds to the private_offer_document field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. The list of fields to update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. If unspecified, all fields present in the request will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.commerceproducer_v1beta.types.PrivateOfferDocument Message describing the PrivateOfferDocument resource. Used to attach documents to a private offer in state DRAFT. Once a private offer is no longer in state DRAFT, the set of child documents is immutable. Existing documents cannot be updated or deleted, and new documents cannot be added. A private offer must include a EULA, either by assigning a standard EULA or attaching a custom EULA document, or a statement of work document.