Class: Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb
Overview
REST client for the CommerceTransaction service.
APIs related to managing resources that model commercial transactions.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the CommerceTransaction Client class.
Instance Method Summary collapse
-
#cancel_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Cancels the target PrivateOffer.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the CommerceTransaction Client instance.
-
#create_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Creates a new PrivateOffer in a given project and location.
-
#create_private_offer_document(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Creates a new PrivateOfferDocument in a given project and location.
-
#delete_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the target PrivateOffer.
-
#delete_private_offer_document(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the target PrivateOfferDocument.
-
#get_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Gets details of a single PrivateOffer.
-
#get_private_offer_document(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Gets details of a single PrivateOfferDocument.
-
#get_service(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::Service
Gets details of a single Service.
-
#get_sku(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::Sku
Gets details of a single Sku.
-
#get_sku_group(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::SkuGroup
Gets details of a single SkuGroup.
-
#get_standard_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::StandardOffer
Gets details of a single StandardOffer.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new CommerceTransaction REST client object.
-
#list_private_offer_documents(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>
Lists PrivateOfferDocuments for the given parent.
-
#list_private_offers(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>
Lists PrivateOffers for the given parent.
-
#list_services(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>
Lists Services in a given project and location.
-
#list_sku_groups(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>
Lists SkuGroups for the given parent.
-
#list_skus(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>
Lists Skus for the given parent.
-
#list_standard_offers(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>
Lists StandardOffers for the given parent.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#publish_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Publishes the target PrivateOffer.
-
#resolve_amendment_target(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse
Resolves the existing offer that must be amended when creating a new PrivateOffer.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_private_offer(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Updates the target PrivateOffer.
-
#update_private_offer_document(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Updates the target PrivateOfferDocument.
Methods included from Paths
#billing_account_path, #location_path, #private_offer_document_path, #private_offer_path, #service_path, #sku_group_path, #sku_path, #standard_offer_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new CommerceTransaction REST client object.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 205 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @commerce_transaction_stub = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @commerce_transaction_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @commerce_transaction_stub.endpoint config.universe_domain = @commerce_transaction_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @commerce_transaction_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
261 262 263 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 261 def location_client @location_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the CommerceTransaction Client class.
See Configuration for a description of the configuration fields.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "CommerceProducer", "V1beta"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_services.timeout = 60.0 default_config.rpcs.list_services.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_service.timeout = 60.0 default_config.rpcs.get_service.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_private_offers.timeout = 60.0 default_config.rpcs.list_private_offers.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_private_offer.timeout = 60.0 default_config.rpcs.get_private_offer.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.resolve_amendment_target.timeout = 60.0 default_config.rpcs.create_private_offer.timeout = 60.0 default_config.rpcs.update_private_offer.timeout = 60.0 default_config.rpcs.publish_private_offer.timeout = 60.0 default_config.rpcs.cancel_private_offer.timeout = 60.0 default_config.rpcs.delete_private_offer.timeout = 60.0 default_config.rpcs.list_private_offer_documents.timeout = 60.0 default_config.rpcs.list_private_offer_documents.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_private_offer_document.timeout = 60.0 default_config.rpcs.get_private_offer_document.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_private_offer_document.timeout = 60.0 default_config.rpcs.update_private_offer_document.timeout = 60.0 default_config.rpcs.delete_private_offer_document.timeout = 60.0 default_config.rpcs.list_standard_offers.timeout = 60.0 default_config.rpcs.list_standard_offers.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_standard_offer.timeout = 60.0 default_config.rpcs.get_standard_offer.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_sku.timeout = 60.0 default_config.rpcs.get_sku.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_skus.timeout = 60.0 default_config.rpcs.list_skus.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_sku_group.timeout = 60.0 default_config.rpcs.get_sku_group.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_sku_groups.timeout = 60.0 default_config.rpcs.list_sku_groups.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#cancel_private_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer #cancel_private_offer(name: nil, cancellation_note: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Cancels the target PrivateOffer.
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1011 def cancel_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.cancel_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.cancel_private_offer.timeout, metadata: , retry_policy: @config.rpcs.cancel_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.cancel_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#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 configure.
See Configuration for a description of the configuration fields.
175 176 177 178 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 175 def configure yield @config if block_given? @config end |
#create_private_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer #create_private_offer(parent: nil, private_offer: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Creates a new PrivateOffer in a given project and location.
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 766 def create_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_private_offer.timeout, metadata: , retry_policy: @config.rpcs.create_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.create_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_private_offer_document(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument #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.
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1344 def create_private_offer_document request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_private_offer_document..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_private_offer_document.timeout, metadata: , retry_policy: @config.rpcs.create_private_offer_document.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.create_private_offer_document request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_private_offer(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_private_offer(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty
Deletes the target PrivateOffer.
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1092 def delete_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_private_offer.timeout, metadata: , retry_policy: @config.rpcs.delete_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.delete_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_private_offer_document(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_private_offer_document(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the target PrivateOfferDocument.
1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1506 def delete_private_offer_document request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_private_offer_document..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_private_offer_document.timeout, metadata: , retry_policy: @config.rpcs.delete_private_offer_document.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.delete_private_offer_document request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_private_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer #get_private_offer(name: nil, view: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Gets details of a single PrivateOffer.
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 598 def get_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_private_offer.timeout, metadata: , retry_policy: @config.rpcs.get_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_private_offer_document(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument #get_private_offer_document(name: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Gets details of a single PrivateOfferDocument.
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1264 def get_private_offer_document request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_private_offer_document..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_private_offer_document.timeout, metadata: , retry_policy: @config.rpcs.get_private_offer_document.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_private_offer_document request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_service(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::Service #get_service(name: nil, view: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::Service
Gets details of a single Service.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 410 def get_service request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_service..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_service.timeout, metadata: , retry_policy: @config.rpcs.get_service.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_service request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_sku(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::Sku #get_sku(name: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::Sku
Gets details of a single Sku.
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1775 def get_sku request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_sku..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_sku.timeout, metadata: , retry_policy: @config.rpcs.get_sku.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_sku request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_sku_group(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::SkuGroup #get_sku_group(name: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::SkuGroup
Gets details of a single SkuGroup.
1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1947 def get_sku_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_sku_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_sku_group.timeout, metadata: , retry_policy: @config.rpcs.get_sku_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_sku_group request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_standard_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::StandardOffer #get_standard_offer(name: nil, view: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::StandardOffer
Gets details of a single StandardOffer.
1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1697 def get_standard_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_standard_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_standard_offer.timeout, metadata: , retry_policy: @config.rpcs.get_standard_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.get_standard_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_private_offer_documents(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument> #list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>
Lists PrivateOfferDocuments for the given parent.
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1184 def list_private_offer_documents request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_private_offer_documents..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_private_offer_documents.timeout, metadata: , retry_policy: @config.rpcs.list_private_offer_documents.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_private_offer_documents request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offer_documents, "private_offer_documents", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_private_offers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer> #list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>
Lists PrivateOffers for the given parent.
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 515 def list_private_offers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_private_offers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_private_offers.timeout, metadata: , retry_policy: @config.rpcs.list_private_offers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_private_offers request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offers, "private_offers", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_services(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service> #list_services(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>
Lists Services in a given project and location.
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 327 def list_services request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_services..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_services.timeout, metadata: , retry_policy: @config.rpcs.list_services.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_services request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_services, "services", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_sku_groups(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup> #list_sku_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>
Lists SkuGroups for the given parent.
2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 2039 def list_sku_groups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_sku_groups..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, metadata: , retry_policy: @config.rpcs.list_sku_groups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_sku_groups request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_sku_groups, "sku_groups", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_skus(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku> #list_skus(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>
Lists Skus for the given parent.
1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1867 def list_skus request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_skus..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_skus.timeout, metadata: , retry_policy: @config.rpcs.list_skus.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_skus request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_skus, "skus", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_standard_offers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer> #list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>
Lists StandardOffers for the given parent.
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1614 def list_standard_offers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_standard_offers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_standard_offers.timeout, metadata: , retry_policy: @config.rpcs.list_standard_offers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.list_standard_offers request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_standard_offers, "standard_offers", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
268 269 270 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 268 def logger @commerce_transaction_stub.logger end |
#publish_private_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer #publish_private_offer(name: nil, validate_only: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Publishes the target PrivateOffer.
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 930 def publish_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.publish_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.publish_private_offer.timeout, metadata: , retry_policy: @config.rpcs.publish_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.publish_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#resolve_amendment_target(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse #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.
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 686 def resolve_amendment_target request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.resolve_amendment_target..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.resolve_amendment_target.timeout, metadata: , retry_policy: @config.rpcs.resolve_amendment_target.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.resolve_amendment_target request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
185 186 187 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 185 def universe_domain @commerce_transaction_stub.universe_domain end |
#update_private_offer(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer #update_private_offer(update_mask: nil, private_offer: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer
Updates the target PrivateOffer.
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 850 def update_private_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_private_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_private_offer.timeout, metadata: , retry_policy: @config.rpcs.update_private_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.update_private_offer request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_private_offer_document(request, options = nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument #update_private_offer_document(private_offer_document: nil, update_mask: nil) ⇒ ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument
Updates the target PrivateOfferDocument.
1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 |
# File 'lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb', line 1428 def update_private_offer_document request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_private_offer_document..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_private_offer_document.timeout, metadata: , retry_policy: @config.rpcs.update_private_offer_document.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @commerce_transaction_stub.update_private_offer_document request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |