As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

OrderService

class google.ads.admanager_v1.services.order_service.OrderServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.ads.admanager_v1.services.order_service.transports.base.OrderServiceTransport, typing.Callable[[...], google.ads.admanager_v1.services.order_service.transports.base.OrderServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Provides methods for handling Order objects.

Instantiates the order service client.

Parameters
  • 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,OrderServiceTransport,Callable[..., OrderServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the OrderServiceTransport 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 the 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

property api_endpoint: str

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

batch_approve_and_overbook_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchApproveAndOverbookOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchApproveAndOverbookOrdersResponse[source]

Approves and overbooks a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_approve_and_overbook_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchApproveAndOverbookOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_approve_and_overbook_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchApproveAndOverbookOrdersRequest, dict]) – The request object. Request message for BatchApproveAndOverbookOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to approve and overbook. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchApproveAndOverbookOrders method.

Return type

google.ads.admanager_v1.types.BatchApproveAndOverbookOrdersResponse

batch_approve_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchApproveOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchApproveOrdersResponse[source]

Approves a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_approve_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchApproveOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_approve_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchApproveOrdersRequest, dict]) – The request object. Request message for BatchApproveOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to approve. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchApproveOrders method.

Return type

google.ads.admanager_v1.types.BatchApproveOrdersResponse

batch_approve_orders_without_reservation(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchApproveOrdersWithoutReservationRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchApproveOrdersWithoutReservationResponse[source]

Approves a list of Order objects without changing reservation status.

# 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.ads import admanager_v1

def sample_batch_approve_orders_without_reservation():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchApproveOrdersWithoutReservationRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_approve_orders_without_reservation(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchApproveOrdersWithoutReservationRequest, dict]) – The request object. Request message for BatchApproveOrdersWithoutReservation method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to approve. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchApproveOrdersWithoutReservation method.

Return type

google.ads.admanager_v1.types.BatchApproveOrdersWithoutReservationResponse

batch_archive_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchArchiveOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchArchiveOrdersResponse[source]

Archives a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_archive_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchArchiveOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_archive_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchArchiveOrdersRequest, dict]) – The request object. Request message for BatchArchiveOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to archive. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchArchiveOrders method.

Return type

google.ads.admanager_v1.types.BatchArchiveOrdersResponse

batch_create_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchCreateOrdersRequest, dict]] = None, *, parent: Optional[str] = None, requests: Optional[MutableSequence[google.ads.admanager_v1.types.order_service.CreateOrderRequest]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchCreateOrdersResponse[source]

Creates Order objects.

# 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.ads import admanager_v1

def sample_batch_create_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    requests = admanager_v1.CreateOrderRequest()
    requests.parent = "parent_value"

    request = admanager_v1.BatchCreateOrdersRequest(
        parent="parent_value",
        requests=requests,
    )

    # Make the request
    response = client.batch_create_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchCreateOrdersRequest, dict]) – The request object. Request object for BatchCreateOrders method.

  • parent (str) –

    Required. The parent resource where Orders will be created. Format: networks/{network_code} The parent field in the CreateOrderRequest must match this field.

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

  • requests (MutableSequence[google.ads.admanager_v1.types.CreateOrderRequest]) –

    Required. The Order objects to create. A maximum of 100 objects can be created in a batch.

    This corresponds to the requests field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchCreateOrders method.

Return type

google.ads.admanager_v1.types.BatchCreateOrdersResponse

batch_delete_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchDeleteOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchDeleteOrdersResponse[source]

Deletes a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_delete_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchDeleteOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_delete_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchDeleteOrdersRequest, dict]) – The request object. Request message for BatchDeleteOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to delete. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchDeleteOrders method.

Return type

google.ads.admanager_v1.types.BatchDeleteOrdersResponse

batch_disapprove_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchDisapproveOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchDisapproveOrdersResponse[source]

Disapproves a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_disapprove_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchDisapproveOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_disapprove_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchDisapproveOrdersRequest, dict]) – The request object. Request message for BatchDisapproveOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to disapprove. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchDisapproveOrders method.

Return type

google.ads.admanager_v1.types.BatchDisapproveOrdersResponse

batch_disapprove_orders_without_reservation_changes(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchDisapproveOrdersWithoutReservationChangesRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchDisapproveOrdersWithoutReservationChangesResponse[source]

Disapproves a list of Order objects without changing reservation status.

# 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.ads import admanager_v1

def sample_batch_disapprove_orders_without_reservation_changes():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchDisapproveOrdersWithoutReservationChangesRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_disapprove_orders_without_reservation_changes(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchDisapproveOrdersWithoutReservationChangesRequest, dict]) – The request object. Request message for BatchDisapproveOrdersWithoutReservationChanges method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to disapprove without reservation changes. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchDisapproveOrdersWithoutReservationChanges method.

Return type

google.ads.admanager_v1.types.BatchDisapproveOrdersWithoutReservationChangesResponse

batch_pause_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchPauseOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchPauseOrdersResponse[source]

Pauses a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_pause_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchPauseOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_pause_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchPauseOrdersRequest, dict]) – The request object. Request message for BatchPauseOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to pause. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchPauseOrders method.

Return type

google.ads.admanager_v1.types.BatchPauseOrdersResponse

batch_resume_and_overbook_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchResumeAndOverbookOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchResumeAndOverbookOrdersResponse[source]

Resumes and overbooks a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_resume_and_overbook_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchResumeAndOverbookOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_resume_and_overbook_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchResumeAndOverbookOrdersRequest, dict]) – The request object. Request message for BatchResumeAndOverbookOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to resume and overbook. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchResumeAndOverbookOrders method.

Return type

google.ads.admanager_v1.types.BatchResumeAndOverbookOrdersResponse

batch_resume_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchResumeOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchResumeOrdersResponse[source]

Resumes a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_resume_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchResumeOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_resume_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchResumeOrdersRequest, dict]) – The request object. Request message for BatchResumeOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to resume. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchResumeOrders method.

Return type

google.ads.admanager_v1.types.BatchResumeOrdersResponse

batch_retract_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchRetractOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchRetractOrdersResponse[source]

Retracts a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_retract_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchRetractOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_retract_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchRetractOrdersRequest, dict]) – The request object. Request message for BatchRetractOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to retract. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchRetractOrders method.

Return type

google.ads.admanager_v1.types.BatchRetractOrdersResponse

batch_retract_orders_without_reservation_changes(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchRetractOrdersWithoutReservationChangesRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchRetractOrdersWithoutReservationChangesResponse[source]

Retracts a list of Order objects without changing reservation status.

# 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.ads import admanager_v1

def sample_batch_retract_orders_without_reservation_changes():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchRetractOrdersWithoutReservationChangesRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_retract_orders_without_reservation_changes(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchRetractOrdersWithoutReservationChangesRequest, dict]) – The request object. Request message for BatchRetractOrdersWithoutReservationChanges method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to retract. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchRetractOrdersWithoutReservationChanges method.

Return type

google.ads.admanager_v1.types.BatchRetractOrdersWithoutReservationChangesResponse

batch_submit_orders_for_approval(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalResponse[source]

Submits a list of Order objects for approval.

# 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.ads import admanager_v1

def sample_batch_submit_orders_for_approval():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchSubmitOrdersForApprovalRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_submit_orders_for_approval(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalRequest, dict]) – The request object. Request message for BatchSubmitOrdersForApproval method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to submit for approval. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchSubmitOrdersForApproval method.

Return type

google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalResponse

batch_submit_orders_for_approval_and_overbook(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalAndOverbookRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalAndOverbookResponse[source]

Submits and overbooks a list of Order objects for approval.

# 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.ads import admanager_v1

def sample_batch_submit_orders_for_approval_and_overbook():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchSubmitOrdersForApprovalAndOverbookRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_submit_orders_for_approval_and_overbook(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalAndOverbookRequest, dict]) – The request object. Request message for BatchSubmitOrdersForApprovalAndOverbook method.

  • parent (str) – Required. Format: networks/{network_code} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to submit for approval and overbook. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchSubmitOrdersForApprovalAndOverbook method.

Return type

google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalAndOverbookResponse

batch_submit_orders_for_approval_without_reservation_changes(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalWithoutReservationChangesRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchSubmitOrdersForApprovalWithoutReservationChangesResponse[source]

Submits a list of Order objects for approval without changing reservation status.

# 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.ads import admanager_v1

def sample_batch_submit_orders_for_approval_without_reservation_changes():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchSubmitOrdersForApprovalWithoutReservationChangesRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_submit_orders_for_approval_without_reservation_changes(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalWithoutReservationChangesRequest, dict]) – The request object. Request message for BatchSubmitOrdersForApprovalWithoutReservationChanges method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to submit for approval. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for

BatchSubmitOrdersForApprovalWithoutReservationChanges method.

Return type

google.ads.admanager_v1.types.BatchSubmitOrdersForApprovalWithoutReservationChangesResponse

batch_unarchive_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchUnarchiveOrdersRequest, dict]] = None, *, parent: Optional[str] = None, names: Optional[MutableSequence[str]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchUnarchiveOrdersResponse[source]

Unarchives a list of Order objects.

# 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.ads import admanager_v1

def sample_batch_unarchive_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchUnarchiveOrdersRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    response = client.batch_unarchive_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchUnarchiveOrdersRequest, dict]) – The request object. Request message for BatchUnarchiveOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • names (MutableSequence[str]) –

    Required. The resource names of the orders to extract. Format: networks/{network_code}/orders/{order_id}

    This corresponds to the names field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchUnarchiveOrders method.

Return type

google.ads.admanager_v1.types.BatchUnarchiveOrdersResponse

batch_update_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.BatchUpdateOrdersRequest, dict]] = None, *, parent: Optional[str] = None, requests: Optional[MutableSequence[google.ads.admanager_v1.types.order_service.UpdateOrderRequest]] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_service.BatchUpdateOrdersResponse[source]

Batch updates Order objects.

# 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.ads import admanager_v1

def sample_batch_update_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.BatchUpdateOrdersRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.batch_update_orders(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.BatchUpdateOrdersRequest, dict]) – The request object. Request object for BatchUpdateOrders method.

  • parent (str) –

    Required. The parent resource where Orders will be updated. Format: networks/{network_code} The parent field in the UpdateOrderRequest must match this field.

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

  • requests (MutableSequence[google.ads.admanager_v1.types.UpdateOrderRequest]) –

    Required. The Order objects to update. A maximum of 100 objects can be updated in a batch.

    This corresponds to the requests field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – 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

Response object for BatchUpdateOrders method.

Return type

google.ads.admanager_v1.types.BatchUpdateOrdersResponse

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

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
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry.Retry) – 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

None

static common_billing_account_path(billing_account: str) str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str[source]

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str[source]

Returns a fully-qualified location string.

static common_organization_path(organization: str) str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

static company_path(network_code: str, company: str) str[source]

Returns a fully-qualified company string.

static contact_path(network_code: str, contact: str) str[source]

Returns a fully-qualified contact string.

static custom_field_path(network_code: str, custom_field: str) str[source]

Returns a fully-qualified custom_field string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

OrderServiceClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

OrderServiceClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

OrderServiceClient

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

Deprecated. 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.

Parameters

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.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

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

Gets the latest state of a long-running operation.

Parameters
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry.Retry) – 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

An Operation object.

Return type

Operation

get_order(request: Optional[Union[google.ads.admanager_v1.types.order_service.GetOrderRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.types.order_messages.Order[source]

Retrieves an Order object.

# 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.ads import admanager_v1

def sample_get_order():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.GetOrderRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_order(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.GetOrderRequest, dict]) – The request object. Request object for GetOrder method.

  • name (str) –

    Required. The resource name of the Order. Format: networks/{network_code}/orders/{order_id}

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

  • retry (google.api_core.retry.Retry) – 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

The Order resource.

Return type

google.ads.admanager_v1.types.Order

static label_path(network_code: str, label: str) str[source]

Returns a fully-qualified label string.

list_orders(request: Optional[Union[google.ads.admanager_v1.types.order_service.ListOrdersRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()) google.ads.admanager_v1.services.order_service.pagers.ListOrdersPager[source]

Lists Order objects.

Fields used for literal matching in filter string:

  • order_id

  • display_name

  • external_order_id

# 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.ads import admanager_v1

def sample_list_orders():
    # Create a client
    client = admanager_v1.OrderServiceClient()

    # Initialize request argument(s)
    request = admanager_v1.ListOrdersRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.ads.admanager_v1.types.ListOrdersRequest, dict]) – The request object. Request object for ListOrders method.

  • parent (str) –

    Required. The parent, which owns this collection of Orders. Format: networks/{network_code}

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

  • retry (google.api_core.retry.Retry) – 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

Response object for ListOrdersRequest containing matching Order

resources.

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.ads.admanager_v1.services.order_service.pagers.ListOrdersPager

static network_path(network_code: str) str[source]

Returns a fully-qualified network string.

static order_path(network_code: str, order: str) str[source]

Returns a fully-qualified order string.

static parse_common_billing_account_path(path: str) Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str][source]

Parse a project path into its component segments.

static parse_company_path(path: str) Dict[str, str][source]

Parses a company path into its component segments.

static parse_contact_path(path: str) Dict[str, str][source]

Parses a contact path into its component segments.

static parse_custom_field_path(path: str) Dict[str, str][source]

Parses a custom_field path into its component segments.

static parse_label_path(path: str) Dict[str, str][source]

Parses a label path into its component segments.

static parse_network_path(path: str) Dict[str, str][source]

Parses a network path into its component segments.

static parse_order_path(path: str) Dict[str, str][source]

Parses a order path into its component segments.

static parse_team_path(path: str) Dict[str, str][source]

Parses a team path into its component segments.

static parse_user_path(path: str) Dict[str, str][source]

Parses a user path into its component segments.

static team_path(network_code: str, team: str) str[source]

Returns a fully-qualified team string.

property transport: google.ads.admanager_v1.services.order_service.transports.base.OrderServiceTransport

Returns the transport used by the client instance.

Returns

The transport used by the client

instance.

Return type

OrderServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used by the client instance.

Return type

str

static user_path(network_code: str, user: str) str[source]

Returns a fully-qualified user string.

class google.ads.admanager_v1.services.order_service.pagers.ListOrdersPager(method: Callable[[...], google.ads.admanager_v1.types.order_service.ListOrdersResponse], request: google.ads.admanager_v1.types.order_service.ListOrdersRequest, response: google.ads.admanager_v1.types.order_service.ListOrdersResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, Union[str, bytes]]] = ())[source]

A pager for iterating through list_orders requests.

This class thinly wraps an initial google.ads.admanager_v1.types.ListOrdersResponse object, and provides an __iter__ method to iterate through its orders field.

If there are more pages, the __iter__ method will make additional ListOrders requests and continue to iterate through the orders field on the corresponding responses.

All the usual google.ads.admanager_v1.types.ListOrdersResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
  • method (Callable) – The method that was originally called, and which instantiated this pager.

  • request (google.ads.admanager_v1.types.ListOrdersRequest) – The initial request object.

  • response (google.ads.admanager_v1.types.ListOrdersResponse) – The initial response object.

  • retry (google.api_core.retry.Retry) – 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.