Cloud Commerce Producer V1BETA API - Class Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client (v0.1.0)

Reference documentation and code samples for the Cloud Commerce Producer V1BETA API class Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.

Client for the CommerceTransaction service.

APIs related to managing resources that model commercial transactions.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the CommerceTransaction Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all CommerceTransaction clients
::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config|
  config.timeout = 10.0
end

#cancel_private_offer

def cancel_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
def cancel_private_offer(name: nil, cancellation_note: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer

Cancels the target PrivateOffer.

Overloads
def cancel_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to cancel_private_offer via a request object, either of type Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_private_offer(name: nil, cancellation_note: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to cancel_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. Name of the resource
  • cancellation_note (::String) — Optional. Internal note relating to the cancellation. Stored on the cancelled offer. Not visible to customers.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new

# Call the cancel_private_offer method.
result = client.cancel_private_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
p result

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the CommerceTransaction Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_private_offer

def create_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
def create_private_offer(parent: nil, private_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer

Creates a new PrivateOffer in a given project and location.

Overloads
def create_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to create_private_offer via a request object, either of type Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_private_offer(parent: nil, private_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to create_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new

# Call the create_private_offer method.
result = client.create_private_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
p result

#create_private_offer_document

def create_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
def create_private_offer_document(parent: nil, private_offer_document: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument

Creates a new PrivateOfferDocument in a given project and location.

Overloads
def create_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to create_private_offer_document via a request object, either of type Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest or an equivalent Hash.
Parameters
def create_private_offer_document(parent: nil, private_offer_document: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to create_private_offer_document via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new

# Call the create_private_offer_document method.
result = client.create_private_offer_document request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.
p result

#delete_private_offer

def delete_private_offer(request, options = nil) -> ::Google::Protobuf::Empty
def delete_private_offer(name: nil, force: nil) -> ::Google::Protobuf::Empty

Deletes the target PrivateOffer.

Overloads
def delete_private_offer(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_private_offer via a request object, either of type DeletePrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_private_offer(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. Name of the resource
  • force (::Boolean) — Optional. Indicates whether to cascade the delete to child resources. If false, the request fails if child resources exist.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new

# Call the delete_private_offer method.
result = client.delete_private_offer request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_private_offer_document

def delete_private_offer_document(request, options = nil) -> ::Google::Protobuf::Empty
def delete_private_offer_document(name: nil) -> ::Google::Protobuf::Empty

Deletes the target PrivateOfferDocument.

Overloads
def delete_private_offer_document(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_private_offer_document via a request object, either of type DeletePrivateOfferDocumentRequest or an equivalent Hash.
Parameters
def delete_private_offer_document(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_private_offer_document via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new

# Call the delete_private_offer_document method.
result = client.delete_private_offer_document request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_private_offer

def get_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
def get_private_offer(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer

Gets details of a single PrivateOffer.

Overloads
def get_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to get_private_offer via a request object, either of type GetPrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_private_offer(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to get_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new

# Call the get_private_offer method.
result = client.get_private_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
p result

#get_private_offer_document

def get_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
def get_private_offer_document(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument

Gets details of a single PrivateOfferDocument.

Overloads
def get_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to get_private_offer_document via a request object, either of type GetPrivateOfferDocumentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_private_offer_document(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to get_private_offer_document via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new

# Call the get_private_offer_document method.
result = client.get_private_offer_document request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.
p result

#get_service

def get_service(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::Service
def get_service(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::Service

Gets details of a single Service.

Overloads
def get_service(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::Service
Pass arguments to get_service via a request object, either of type GetServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_service(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::Service
Pass arguments to get_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new

# Call the get_service method.
result = client.get_service request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service.
p result

#get_sku

def get_sku(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::Sku
def get_sku(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::Sku

Gets details of a single Sku.

Overloads
def get_sku(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::Sku
Pass arguments to get_sku via a request object, either of type GetSkuRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_sku(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::Sku
Pass arguments to get_sku via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new

# Call the get_sku method.
result = client.get_sku request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku.
p result

#get_sku_group

def get_sku_group(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::SkuGroup
def get_sku_group(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::SkuGroup

Gets details of a single SkuGroup.

Overloads
def get_sku_group(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::SkuGroup
Pass arguments to get_sku_group via a request object, either of type GetSkuGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_sku_group(name: nil) -> ::Google::Cloud::CommerceProducer::V1beta::SkuGroup
Pass arguments to get_sku_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new

# Call the get_sku_group method.
result = client.get_sku_group request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup.
p result

#get_standard_offer

def get_standard_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::StandardOffer
def get_standard_offer(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::StandardOffer

Gets details of a single StandardOffer.

Overloads
def get_standard_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::StandardOffer
Pass arguments to get_standard_offer via a request object, either of type GetStandardOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_standard_offer(name: nil, view: nil) -> ::Google::Cloud::CommerceProducer::V1beta::StandardOffer
Pass arguments to get_standard_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new

# Call the get_standard_offer method.
result = client.get_standard_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new CommerceTransaction client object.

Yields
  • (config) — Configure the CommerceTransaction client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config|
  config.timeout = 10.0
end

#list_private_offer_documents

def list_private_offer_documents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>
def list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>

Lists PrivateOfferDocuments for the given parent.

Overloads
def list_private_offer_documents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>
Pass arguments to list_private_offer_documents via a request object, either of type ListPrivateOfferDocumentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>
Pass arguments to list_private_offer_documents via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListPrivateOfferDocumentsRequest.
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A page token, received from a previous list response message. Provide this to retrieve the subsequent page.

    When paginating, all other parameters of the list request must match the request that returned the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new

# Call the list_private_offer_documents method.
result = client.list_private_offer_documents request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.
  p item
end

#list_private_offers

def list_private_offers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>
def list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>

Lists PrivateOffers for the given parent.

Overloads
def list_private_offers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>
Pass arguments to list_private_offers via a request object, either of type ListPrivateOffersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>
Pass arguments to list_private_offers via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListPrivateOffersRequest
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A page token, received from a previous list response message. Provide this to retrieve the subsequent page.

    When paginating, all other parameters of the list request must match the request that returned the page token.

  • filter (::String) —

    Optional. Filter expression that matches a subset of resources to show. See https://google.aip.dev/160 for more details. Only supports filtering by:

    • update_time. Example: update_time > "2012-04-21T11:30:00-04:00".
  • order_by (::String) —

    Optional. Ordering expression for sorting the results. See https://google.aip.dev/132#ordering for more details. If no value is present the default ordering is unspecified. Only supports ordering by:

    • update_time
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new

# Call the list_private_offers method.
result = client.list_private_offers request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
  p item
end

#list_services

def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>
def list_services(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>

Lists Services in a given project and location.

Overloads
def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>
Pass arguments to list_services via a request object, either of type ListServicesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_services(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>
Pass arguments to list_services via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListServicesRequest
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new

# Call the list_services method.
result = client.list_services request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service.
  p item
end

#list_sku_groups

def list_sku_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>
def list_sku_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>

Lists SkuGroups for the given parent.

Overloads
def list_sku_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>
Pass arguments to list_sku_groups via a request object, either of type ListSkuGroupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_sku_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>
Pass arguments to list_sku_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListSkuGroupsRequest
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A page token, received from a previous list response message. Provide this to retrieve the subsequent page.

    When paginating, all other parameters of the list request must match the request that returned the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new

# Call the list_sku_groups method.
result = client.list_sku_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.
  p item
end

#list_skus

def list_skus(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>
def list_skus(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>

Lists Skus for the given parent.

Overloads
def list_skus(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>
Pass arguments to list_skus via a request object, either of type ListSkusRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_skus(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>
Pass arguments to list_skus via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListSkusRequest
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A page token, received from a previous list response message. Provide this to retrieve the subsequent page.

    When paginating, all other parameters of the list request must match the request that returned the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new

# Call the list_skus method.
result = client.list_skus request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku.
  p item
end

#list_standard_offers

def list_standard_offers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>
def list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>

Lists StandardOffers for the given parent.

Overloads
def list_standard_offers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>
Pass arguments to list_standard_offers via a request object, either of type ListStandardOffersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>
Pass arguments to list_standard_offers via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListStandardOffersRequest
  • page_size (::Integer) — Optional. Maximum results to return. The service may return fewer than this value. The maximum value is 500; values above 500 will be coerced to 500. If unspecified, the server will default to the maximum.
  • page_token (::String) — Optional. A page token, received from a previous list response message. Provide this to retrieve the subsequent page.

    When paginating, all other parameters of the list request must match the request that returned the page token.

  • filter (::String) —

    Optional. Filter expression that matches a subset of resources to show. See https://google.aip.dev/160 for more details. Supports filtering by:

    • effective_time. Example: effective_time > "2012-04-21T11:30:00-04:00".
    • expire_time. Example: expire_time < "2026-05-06T00:00:00Z".
  • order_by (::String) —

    Optional. Ordering expression for sorting the results. See https://google.aip.dev/132#ordering for more details. If no value is present the default ordering is unspecified. Supports ordering by:

    • effective_time
    • expire_time
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new

# Call the list_standard_offers method.
result = client.list_standard_offers request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#publish_private_offer

def publish_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
def publish_private_offer(name: nil, validate_only: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer

Publishes the target PrivateOffer.

Overloads
def publish_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to publish_private_offer via a request object, either of type PublishPrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def publish_private_offer(name: nil, validate_only: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to publish_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. Name of the resource
  • validate_only (::Boolean) — Optional. If set to true, validates the request but does not execute it.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new

# Call the publish_private_offer method.
result = client.publish_private_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
p result

#resolve_amendment_target

def resolve_amendment_target(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse
def resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse

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.

Overloads
def resolve_amendment_target(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse
Pass arguments to resolve_amendment_target via a request object, either of type ResolveAmendmentTargetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse
Pass arguments to resolve_amendment_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ResolveAmendmentTargetRequest
  • target_billing_account (::String) — Required. The customer's billing account targeted by the offer. This is the billing account for which the new private offer will be created on. Format: billingAccounts/{billing_account}.
  • base_standard_offer (::String) — Required. The base standard offer that the private offer will be based on. Format: projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new

# Call the resolve_amendment_target method.
result = client.resolve_amendment_target request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_private_offer

def update_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
def update_private_offer(update_mask: nil, private_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer

Updates the target PrivateOffer.

Overloads
def update_private_offer(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to update_private_offer via a request object, either of type UpdatePrivateOfferRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_private_offer(update_mask: nil, private_offer: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Pass arguments to update_private_offer via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. If unspecified, all fields present in the request will be overwritten.
  • private_offer (::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash) — Required. The resource being updated
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new

# Call the update_private_offer method.
result = client.update_private_offer request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer.
p result

#update_private_offer_document

def update_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
def update_private_offer_document(private_offer_document: nil, update_mask: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument

Updates the target PrivateOfferDocument.

Overloads
def update_private_offer_document(request, options = nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to update_private_offer_document via a request object, either of type UpdatePrivateOfferDocumentRequest or an equivalent Hash.
Parameters
def update_private_offer_document(private_offer_document: nil, update_mask: nil) -> ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Pass arguments to update_private_offer_document via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • private_offer_document (::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash) — Required. The resource being updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. If unspecified, all fields present in the request will be overwritten.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/commerce_producer/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new

# Call the update_private_offer_document method.
result = client.update_private_offer_document request

# The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.
p result