commerceproducer

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package commerceproducer is an auto-generated package for the Cloud Commerce Producer API.

Partner API for the Cloud Commerce Producer API Early Access.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/commerceproducer/apiv1beta@latest
ctx := context.Background()
// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := commerceproducer.NewCommerceTransactionClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

req := &commerceproducerpb.CancelPrivateOfferRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#CancelPrivateOfferRequest.
}
resp, err := c.CancelPrivateOffer(ctx, req)
if err != nil {
	// TODO: Handle error.
}
// TODO: Use resp.
_ = resp

Use of Context

The ctx passed to NewCommerceTransactionClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

Types

type CommerceTransactionCallOptions

type CommerceTransactionCallOptions struct {
	ListServices               []gax.CallOption
	GetService                 []gax.CallOption
	ListPrivateOffers          []gax.CallOption
	GetPrivateOffer            []gax.CallOption
	ResolveAmendmentTarget     []gax.CallOption
	CreatePrivateOffer         []gax.CallOption
	UpdatePrivateOffer         []gax.CallOption
	PublishPrivateOffer        []gax.CallOption
	CancelPrivateOffer         []gax.CallOption
	DeletePrivateOffer         []gax.CallOption
	ListPrivateOfferDocuments  []gax.CallOption
	GetPrivateOfferDocument    []gax.CallOption
	CreatePrivateOfferDocument []gax.CallOption
	UpdatePrivateOfferDocument []gax.CallOption
	DeletePrivateOfferDocument []gax.CallOption
	ListStandardOffers         []gax.CallOption
	GetStandardOffer           []gax.CallOption
	GetSku                     []gax.CallOption
	ListSkus                   []gax.CallOption
	GetSkuGroup                []gax.CallOption
	ListSkuGroups              []gax.CallOption
	GetLocation                []gax.CallOption
	ListLocations              []gax.CallOption
	CancelOperation            []gax.CallOption
	DeleteOperation            []gax.CallOption
	GetOperation               []gax.CallOption
	ListOperations             []gax.CallOption
}

CommerceTransactionCallOptions contains the retry settings for each method of CommerceTransactionClient.

type CommerceTransactionClient

type CommerceTransactionClient struct {

	// The call options for this service.
	CallOptions *CommerceTransactionCallOptions
	// contains filtered or unexported fields
}

CommerceTransactionClient is a client for interacting with Cloud Commerce Producer API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

APIs related to managing resources that model commercial transactions.

func NewCommerceTransactionClient

func NewCommerceTransactionClient(ctx context.Context, opts ...option.ClientOption) (*CommerceTransactionClient, error)

NewCommerceTransactionClient creates a new commerce transaction client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

APIs related to managing resources that model commercial transactions.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewCommerceTransactionRESTClient

func NewCommerceTransactionRESTClient(ctx context.Context, opts ...option.ClientOption) (*CommerceTransactionClient, error)

NewCommerceTransactionRESTClient creates a new commerce transaction rest client.

APIs related to managing resources that model commercial transactions.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*CommerceTransactionClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CommerceTransactionClient) CancelPrivateOffer

CancelPrivateOffer cancels the target PrivateOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.CancelPrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#CancelPrivateOfferRequest.
	}
	resp, err := c.CancelPrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) Close

func (c *CommerceTransactionClient) Close() error

Close closes the connection to the API service. **Always** call Close() when the client is no longer required.

func (*CommerceTransactionClient) Connection deprecated

func (c *CommerceTransactionClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*CommerceTransactionClient) CreatePrivateOffer

CreatePrivateOffer creates a new PrivateOffer in a given project and location.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.CreatePrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#CreatePrivateOfferRequest.
	}
	resp, err := c.CreatePrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) CreatePrivateOfferDocument

CreatePrivateOfferDocument creates a new PrivateOfferDocument in a given project and location.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.CreatePrivateOfferDocumentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#CreatePrivateOfferDocumentRequest.
	}
	resp, err := c.CreatePrivateOfferDocument(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.DeleteOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
	}
	err = c.DeleteOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CommerceTransactionClient) DeletePrivateOffer

DeletePrivateOffer deletes the target PrivateOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.DeletePrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#DeletePrivateOfferRequest.
	}
	err = c.DeletePrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CommerceTransactionClient) DeletePrivateOfferDocument

DeletePrivateOfferDocument deletes the target PrivateOfferDocument.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.DeletePrivateOfferDocumentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#DeletePrivateOfferDocumentRequest.
	}
	err = c.DeletePrivateOfferDocument(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CommerceTransactionClient) GetLocation

GetLocation gets information about a location.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.GetLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
	}
	resp, err := c.GetLocation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetPrivateOffer

GetPrivateOffer gets details of a single PrivateOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetPrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetPrivateOfferRequest.
	}
	resp, err := c.GetPrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetPrivateOfferDocument

GetPrivateOfferDocument gets details of a single PrivateOfferDocument.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetPrivateOfferDocumentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetPrivateOfferDocumentRequest.
	}
	resp, err := c.GetPrivateOfferDocument(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetService

GetService gets details of a single Service.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetServiceRequest.
	}
	resp, err := c.GetService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetSku

GetSku gets details of a single Sku.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetSkuRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetSkuRequest.
	}
	resp, err := c.GetSku(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetSkuGroup

GetSkuGroup gets details of a single SkuGroup.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetSkuGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetSkuGroupRequest.
	}
	resp, err := c.GetSkuGroup(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) GetStandardOffer

GetStandardOffer gets details of a single StandardOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.GetStandardOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#GetStandardOfferRequest.
	}
	resp, err := c.GetStandardOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) ListLocations

ListLocations lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	"google.golang.org/api/iterator"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	it := c.ListLocations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*locationpb.ListLocationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &locationpb.ListLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
	}
	for resp, err := range c.ListLocations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	it := c.ListOperations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	for resp, err := range c.ListOperations(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListPrivateOfferDocuments

ListPrivateOfferDocuments lists PrivateOfferDocuments for the given parent.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListPrivateOfferDocumentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListPrivateOfferDocumentsRequest.
	}
	it := c.ListPrivateOfferDocuments(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListPrivateOfferDocumentsResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListPrivateOfferDocumentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListPrivateOfferDocumentsRequest.
	}
	for resp, err := range c.ListPrivateOfferDocuments(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListPrivateOffers

ListPrivateOffers lists PrivateOffers for the given parent.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListPrivateOffersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListPrivateOffersRequest.
	}
	it := c.ListPrivateOffers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListPrivateOffersResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListPrivateOffersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListPrivateOffersRequest.
	}
	for resp, err := range c.ListPrivateOffers(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListServices

ListServices lists Services in a given project and location.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListServicesRequest.
	}
	it := c.ListServices(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListServicesResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListServicesRequest.
	}
	for resp, err := range c.ListServices(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListSkuGroups

ListSkuGroups lists SkuGroups for the given parent.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListSkuGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListSkuGroupsRequest.
	}
	it := c.ListSkuGroups(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListSkuGroupsResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListSkuGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListSkuGroupsRequest.
	}
	for resp, err := range c.ListSkuGroups(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListSkus

ListSkus lists Skus for the given parent.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListSkusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListSkusRequest.
	}
	it := c.ListSkus(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListSkusResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListSkusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListSkusRequest.
	}
	for resp, err := range c.ListSkus(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) ListStandardOffers

ListStandardOffers lists StandardOffers for the given parent.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListStandardOffersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListStandardOffersRequest.
	}
	it := c.ListStandardOffers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*commerceproducerpb.ListStandardOffersResponse)
	}
}
Example (All)
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ListStandardOffersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ListStandardOffersRequest.
	}
	for resp, err := range c.ListStandardOffers(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CommerceTransactionClient) PublishPrivateOffer

PublishPrivateOffer publishes the target PrivateOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.PublishPrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#PublishPrivateOfferRequest.
	}
	resp, err := c.PublishPrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) ResolveAmendmentTarget added in v0.3.0

ResolveAmendmentTarget resolves the existing offer that must be amended when creating a new PrivateOffer. Use this method to determine the correct amendment target before creating or publishing an offer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.ResolveAmendmentTargetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#ResolveAmendmentTargetRequest.
	}
	resp, err := c.ResolveAmendmentTarget(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) UpdatePrivateOffer

UpdatePrivateOffer updates the target PrivateOffer.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.UpdatePrivateOfferRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#UpdatePrivateOfferRequest.
	}
	resp, err := c.UpdatePrivateOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CommerceTransactionClient) UpdatePrivateOfferDocument

UpdatePrivateOfferDocument updates the target PrivateOfferDocument.

Example
package main

import (
	"context"

	commerceproducer "cloud.google.com/go/commerceproducer/apiv1beta"
	commerceproducerpb "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb"
)

func main() {
	ctx := context.Background()
	// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := commerceproducer.NewCommerceTransactionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &commerceproducerpb.UpdatePrivateOfferDocumentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb#UpdatePrivateOfferDocumentRequest.
	}
	resp, err := c.UpdatePrivateOfferDocument(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type LocationIterator

type LocationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
	// contains filtered or unexported fields
}

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*LocationIterator) Next

func (it *LocationIterator) Next() (*locationpb.Location, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*LocationIterator) PageInfo

func (it *LocationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type OperationIterator

type OperationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*OperationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*OperationIterator) PageInfo

func (it *OperationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type PrivateOfferDocumentIterator

type PrivateOfferDocumentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.PrivateOfferDocument, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PrivateOfferDocumentIterator manages a stream of *commerceproducerpb.PrivateOfferDocument.

func (*PrivateOfferDocumentIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*PrivateOfferDocumentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PrivateOfferDocumentIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type PrivateOfferIterator

type PrivateOfferIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.PrivateOffer, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PrivateOfferIterator manages a stream of *commerceproducerpb.PrivateOffer.

func (*PrivateOfferIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*PrivateOfferIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PrivateOfferIterator) PageInfo

func (it *PrivateOfferIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ServiceIterator

type ServiceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.Service, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ServiceIterator manages a stream of *commerceproducerpb.Service.

func (*ServiceIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ServiceIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ServiceIterator) PageInfo

func (it *ServiceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SkuGroupIterator

type SkuGroupIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.SkuGroup, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SkuGroupIterator manages a stream of *commerceproducerpb.SkuGroup.

func (*SkuGroupIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*SkuGroupIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SkuGroupIterator) PageInfo

func (it *SkuGroupIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SkuIterator

type SkuIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.Sku, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SkuIterator manages a stream of *commerceproducerpb.Sku.

func (*SkuIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*SkuIterator) Next

func (it *SkuIterator) Next() (*commerceproducerpb.Sku, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SkuIterator) PageInfo

func (it *SkuIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type StandardOfferIterator

type StandardOfferIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*commerceproducerpb.StandardOffer, nextPageToken string, err error)
	// contains filtered or unexported fields
}

StandardOfferIterator manages a stream of *commerceproducerpb.StandardOffer.

func (*StandardOfferIterator) All

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*StandardOfferIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*StandardOfferIterator) PageInfo

func (it *StandardOfferIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL