From 310e74a08799a88e0e7c6b3dd7e630eb42c683a4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Sep 2024 00:12:17 +0000 Subject: [PATCH 1/4] fix!: The type of an existing field `time_zone` is changed from `message` to `string` in message `.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest` fix!: An existing field `account_aggregation` is removed from message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` fix!: Changed field behavior for an existing field `service` in message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` fix!: Changed field behavior for an existing field `region_code` in message `.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest` fix!: Changed field behavior for an existing field `kind` in message `.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest` feat: A new field `account_aggregation` is added to message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` feat: A new message `AccountAggregation` is added feat: A new service `AutofeedSettingsService` is added feat: A new message `AutofeedSettings` is added feat: A new resource_definition `merchantapi.googleapis.com/AutofeedSettings` is added feat: A new message `GetAutofeedSettingsRequest` is added feat: A new message `UpdateAutofeedSettingsRequest` is added feat: A new field `korean_business_registration_number` is added to message `.google.shopping.merchant.accounts.v1beta.BusinessInfo` PiperOrigin-RevId: 678841094 Source-Link: https://github.com/googleapis/googleapis/commit/005df4681b89bd204a90b76168a6dc9d9e7bf4fe Source-Link: https://github.com/googleapis/googleapis-gen/commit/1c58da100531d09e9123331d121f410e7d00e4aa Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiIxYzU4ZGExMDA1MzFkMDllOTEyMzMzMWQxMjFmNDEwZTdkMDBlNGFhIn0= --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 ++ .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-accounts/Gemfile | 13 + .../LICENSE.md | 201 ++++++ .../README.md | 104 ++++ .../Rakefile | 169 ++++++ .../google-shopping-merchant-accounts.gemspec | 27 + .../lib/google-shopping-merchant-accounts.rb | 19 + .../lib/google/shopping/merchant/accounts.rb | 574 ++++++++++++++++++ .../shopping/merchant/accounts/version.rb | 28 + .../shopping/merchant/accounts/client_test.rb | 320 ++++++++++ .../merchant/accounts/version_test.rb | 26 + .../test/helper.rb | 25 + 18 files changed, 1747 insertions(+) create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json new file mode 100644 index 000000000000..c943e89923bf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts", + "distribution_name": "google-shopping-merchant-accounts", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml new file mode 100644 index 000000000000..fc0ca898b771 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-accounts.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md new file mode 100644 index 000000000000..196c82db354c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-accounts library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/accounts" + +client = Google::Shopping::Merchant::Accounts.account_tax_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts" + +Google::Shopping::Merchant::Accounts.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Accounts.account_tax_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-accounts +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/accounts" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Accounts.account_tax_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile new file mode 100644 index 000000000000..8a8ea4728ebf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-accounts-v1beta", path: "../google-shopping-merchant-accounts-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/README.md b/owl-bot-staging/google-shopping-merchant-accounts/README.md new file mode 100644 index 000000000000..0d2646902b7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/README.md @@ -0,0 +1,104 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`. +The gem `google-shopping-merchant-accounts` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts) +for this library, google-shopping-merchant-accounts, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-accounts-v1beta](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-accounts +``` + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-accounts`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-accounts-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile new file mode 100644 index 000000000000..f5b597187baa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-accounts acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-accounts gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-accounts gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts" + header "google-shopping-merchant-accounts rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec new file mode 100644 index 000000000000..8720776f4197 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts" + gem.version = Google::Shopping::Merchant::Accounts::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." + gem.summary = "Programmatically manage your Merchant Center Accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb new file mode 100644 index 000000000000..fab4c72eda64 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts" unless defined? Google::Shopping::Merchant::Accounts::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb new file mode 100644 index 000000000000..7493b8eb9ce8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb @@ -0,0 +1,574 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/accounts/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + ## + # Create a new client object for AccountTaxService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountTaxService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountTaxService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountTaxService + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.account_tax_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountTaxService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AccountIssueService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountIssueService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountIssueService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountIssueService + # + # Service to support `AccountIssueService` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.account_issue_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountIssueService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for UserService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::UserService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/UserService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the UserService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About UserService + # + # Service to support user API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.user_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:UserService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AccountsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountsService + # + # Service to support Accounts API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.accounts_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AutofeedSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AutofeedSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AutofeedSettingsService + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for BusinessIdentityService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessIdentityService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BusinessIdentityService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About BusinessIdentityService + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.business_identity_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessIdentityService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for BusinessInfoService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessInfoService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BusinessInfoService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About BusinessInfoService + # + # Service to support business info API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.business_info_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessInfoService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for EmailPreferencesService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/EmailPreferencesService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the EmailPreferencesService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About EmailPreferencesService + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.email_preferences_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:EmailPreferencesService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for HomepageService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/HomepageService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the HomepageService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About HomepageService + # + # Service to support an API for a store's homepage. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.homepage_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:HomepageService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for OnlineReturnPolicyService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/OnlineReturnPolicyService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the OnlineReturnPolicyService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About OnlineReturnPolicyService + # + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.online_return_policy_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:OnlineReturnPolicyService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for ProgramsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ProgramsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProgramsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ProgramsService + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.programs_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ProgramsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for RegionsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/RegionsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the RegionsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About RegionsService + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.regions_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:RegionsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for ShippingSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ShippingSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ShippingSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ShippingSettingsService + # + # Service to get method call shipping setting information per Merchant API + # method. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.shipping_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ShippingSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for TermsOfServiceService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TermsOfServiceService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About TermsOfServiceService + # + # Service to support `TermsOfService` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.terms_of_service_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for TermsOfServiceAgreementStateService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceAgreementStateService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TermsOfServiceAgreementStateService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About TermsOfServiceAgreementStateService + # + # Service to support `TermsOfServiceAgreementState` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.terms_of_service_agreement_state_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceAgreementStateService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts", "helpers.rb" +require "google/shopping/merchant/accounts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb new file mode 100644 index 000000000000..fff78e7ce1ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb new file mode 100644 index 000000000000..fe6088a49431 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb @@ -0,0 +1,320 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/accounts" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Accounts::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_account_tax_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client + end + end + + def test_account_tax_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client, client + end + end + + def test_account_issue_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client + end + end + + def test_account_issue_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client, client + end + end + + def test_user_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.user_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client + end + end + + def test_user_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.user_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client, client + end + end + + def test_accounts_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.accounts_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client + end + end + + def test_accounts_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.accounts_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client, client + end + end + + def test_autofeed_settings_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client + end + end + + def test_autofeed_settings_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client, client + end + end + + def test_business_identity_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client + end + end + + def test_business_identity_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client, client + end + end + + def test_business_info_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.business_info_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client + end + end + + def test_business_info_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.business_info_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client, client + end + end + + def test_email_preferences_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client + end + end + + def test_email_preferences_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client, client + end + end + + def test_homepage_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.homepage_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client + end + end + + def test_homepage_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.homepage_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client, client + end + end + + def test_online_return_policy_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client + end + end + + def test_online_return_policy_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client, client + end + end + + def test_programs_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.programs_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client + end + end + + def test_programs_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.programs_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client, client + end + end + + def test_regions_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.regions_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client + end + end + + def test_regions_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.regions_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client, client + end + end + + def test_shipping_settings_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client + end + end + + def test_shipping_settings_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client, client + end + end + + def test_terms_of_service_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client + end + end + + def test_terms_of_service_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client, client + end + end + + def test_terms_of_service_agreement_state_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client + end + end + + def test_terms_of_service_agreement_state_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb new file mode 100644 index 000000000000..0a74bcea01d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/accounts/version" + +class Google::Shopping::Merchant::Accounts::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Accounts::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From fe50a322c94a4a78ec8aaf32a4973f7cbda576c6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Sep 2024 00:14:44 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.repo-metadata.json | 2 +- google-shopping-merchant-accounts/README.md | 3 +- .../google-shopping-merchant-accounts.gemspec | 4 +- .../lib/google/shopping/merchant/accounts.rb | 35 ++ .../shopping/merchant/accounts/client_test.rb | 19 + .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 -- .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 ---- .../CHANGELOG.md | 2 - .../google-shopping-merchant-accounts/Gemfile | 13 - .../LICENSE.md | 201 ------ .../README.md | 104 ---- .../Rakefile | 169 ------ .../google-shopping-merchant-accounts.gemspec | 27 - .../lib/google-shopping-merchant-accounts.rb | 19 - .../lib/google/shopping/merchant/accounts.rb | 574 ------------------ .../shopping/merchant/accounts/version.rb | 28 - .../shopping/merchant/accounts/client_test.rb | 320 ---------- .../merchant/accounts/version_test.rb | 26 - .../test/helper.rb | 25 - 23 files changed, 59 insertions(+), 1751 deletions(-) delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb diff --git a/google-shopping-merchant-accounts/.repo-metadata.json b/google-shopping-merchant-accounts/.repo-metadata.json index 91c5a1b05f62..0276f641e2d4 100644 --- a/google-shopping-merchant-accounts/.repo-metadata.json +++ b/google-shopping-merchant-accounts/.repo-metadata.json @@ -11,7 +11,7 @@ "release_level": "preview", "repo": "googleapis/google-cloud-ruby", "requires_billing": true, - "ruby-cloud-description": "Programmatically manage your Merchant Center accounts.", + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", "ruby-cloud-product-url": "https://developers.google.com/merchant/api", "library_type": "GAPIC_MANUAL" } diff --git a/google-shopping-merchant-accounts/README.md b/google-shopping-merchant-accounts/README.md index 3b9418805c12..0d2646902b7d 100644 --- a/google-shopping-merchant-accounts/README.md +++ b/google-shopping-merchant-accounts/README.md @@ -1,7 +1,8 @@ # Ruby Client for the Merchant API -Programmatically manage your Merchant Center accounts. +Programmatically manage your Merchant Center Accounts. +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. Actual client classes for the various versions of this API are defined in _versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`. diff --git a/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec index c0b5aa35260c..8720776f4197 100644 --- a/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec +++ b/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec @@ -9,8 +9,8 @@ Gem::Specification.new do |gem| gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" - gem.description = "Programmatically manage your Merchant Center accounts." - gem.summary = "Programmatically manage your Merchant Center accounts." + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." + gem.summary = "Programmatically manage your Merchant Center Accounts." gem.homepage = "https://github.com/googleapis/google-cloud-ruby" gem.license = "Apache-2.0" diff --git a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb index 611964e70886..7493b8eb9ce8 100644 --- a/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb +++ b/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb @@ -168,6 +168,41 @@ def self.accounts_service version: :v1beta, transport: :grpc, &block service_module.const_get(:Client).new(&block) end + ## + # Create a new client object for AutofeedSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AutofeedSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AutofeedSettingsService + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + ## # Create a new client object for BusinessIdentityService. # diff --git a/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb index 4ca3397c2b10..fe6088a49431 100644 --- a/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb +++ b/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb @@ -109,6 +109,25 @@ def test_accounts_service_rest end end + def test_autofeed_settings_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client + end + end + + def test_autofeed_settings_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client, client + end + end + def test_business_identity_service_grpc Gapic::ServiceStub.stub :new, DummyStub.new do grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json deleted file mode 100644 index c943e89923bf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts", - "distribution_name": "google-shopping-merchant-accounts", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml deleted file mode 100644 index fc0ca898b771..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-accounts.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md deleted file mode 100644 index 196c82db354c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-accounts library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/accounts" - -client = Google::Shopping::Merchant::Accounts.account_tax_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts" - -Google::Shopping::Merchant::Accounts.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Accounts.account_tax_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-accounts -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/accounts" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Accounts.account_tax_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile deleted file mode 100644 index 8a8ea4728ebf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-accounts-v1beta", path: "../google-shopping-merchant-accounts-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/README.md b/owl-bot-staging/google-shopping-merchant-accounts/README.md deleted file mode 100644 index 0d2646902b7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`. -The gem `google-shopping-merchant-accounts` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts) -for this library, google-shopping-merchant-accounts, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-accounts-v1beta](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-accounts -``` - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-accounts`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-accounts-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile deleted file mode 100644 index f5b597187baa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-accounts acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-accounts gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-accounts gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-accounts gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-accounts gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts" - header "google-shopping-merchant-accounts rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-accounts smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-accounts acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec deleted file mode 100644 index 8720776f4197..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts" - gem.version = Google::Shopping::Merchant::Accounts::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." - gem.summary = "Programmatically manage your Merchant Center Accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb deleted file mode 100644 index fab4c72eda64..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts" unless defined? Google::Shopping::Merchant::Accounts::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb deleted file mode 100644 index 7493b8eb9ce8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb +++ /dev/null @@ -1,574 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/accounts/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - ## - # Create a new client object for AccountTaxService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountTaxService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountTaxService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountTaxService - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.account_tax_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountTaxService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AccountIssueService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountIssueService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountIssueService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountIssueService - # - # Service to support `AccountIssueService` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.account_issue_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountIssueService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for UserService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::UserService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/UserService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the UserService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About UserService - # - # Service to support user API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.user_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:UserService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AccountsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountsService - # - # Service to support Accounts API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.accounts_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AutofeedSettingsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AutofeedSettingsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AutofeedSettingsService - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for BusinessIdentityService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessIdentityService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the BusinessIdentityService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About BusinessIdentityService - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.business_identity_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessIdentityService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for BusinessInfoService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessInfoService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the BusinessInfoService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About BusinessInfoService - # - # Service to support business info API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.business_info_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessInfoService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for EmailPreferencesService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/EmailPreferencesService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the EmailPreferencesService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About EmailPreferencesService - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.email_preferences_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:EmailPreferencesService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for HomepageService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/HomepageService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the HomepageService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About HomepageService - # - # Service to support an API for a store's homepage. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.homepage_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:HomepageService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for OnlineReturnPolicyService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/OnlineReturnPolicyService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the OnlineReturnPolicyService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About OnlineReturnPolicyService - # - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.online_return_policy_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:OnlineReturnPolicyService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for ProgramsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ProgramsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProgramsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ProgramsService - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.programs_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ProgramsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for RegionsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/RegionsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the RegionsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About RegionsService - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.regions_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:RegionsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for ShippingSettingsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ShippingSettingsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ShippingSettingsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ShippingSettingsService - # - # Service to get method call shipping setting information per Merchant API - # method. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.shipping_settings_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ShippingSettingsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for TermsOfServiceService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TermsOfServiceService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About TermsOfServiceService - # - # Service to support `TermsOfService` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.terms_of_service_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for TermsOfServiceAgreementStateService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceAgreementStateService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TermsOfServiceAgreementStateService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About TermsOfServiceAgreementStateService - # - # Service to support `TermsOfServiceAgreementState` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.terms_of_service_agreement_state_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceAgreementStateService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts", "helpers.rb" -require "google/shopping/merchant/accounts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb deleted file mode 100644 index fff78e7ce1ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb deleted file mode 100644 index fe6088a49431..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/accounts" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Accounts::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_account_tax_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client - end - end - - def test_account_tax_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client, client - end - end - - def test_account_issue_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client - end - end - - def test_account_issue_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client, client - end - end - - def test_user_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.user_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client - end - end - - def test_user_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.user_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client, client - end - end - - def test_accounts_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.accounts_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client - end - end - - def test_accounts_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.accounts_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client, client - end - end - - def test_autofeed_settings_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client - end - end - - def test_autofeed_settings_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client, client - end - end - - def test_business_identity_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client - end - end - - def test_business_identity_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client, client - end - end - - def test_business_info_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.business_info_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client - end - end - - def test_business_info_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.business_info_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client, client - end - end - - def test_email_preferences_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client - end - end - - def test_email_preferences_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client, client - end - end - - def test_homepage_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.homepage_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client - end - end - - def test_homepage_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.homepage_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client, client - end - end - - def test_online_return_policy_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client - end - end - - def test_online_return_policy_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client, client - end - end - - def test_programs_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.programs_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client - end - end - - def test_programs_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.programs_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client, client - end - end - - def test_regions_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.regions_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client - end - end - - def test_regions_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.regions_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client, client - end - end - - def test_shipping_settings_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client - end - end - - def test_shipping_settings_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client, client - end - end - - def test_terms_of_service_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client - end - end - - def test_terms_of_service_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client, client - end - end - - def test_terms_of_service_agreement_state_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client - end - end - - def test_terms_of_service_agreement_state_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb deleted file mode 100644 index 0a74bcea01d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/accounts/version" - -class Google::Shopping::Merchant::Accounts::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Accounts::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" From d54b11e933c681d07fb2e936d3409f6d70c0e80c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 2 Oct 2024 22:55:19 +0000 Subject: [PATCH 3/4] feat: Updated google-shopping-merchant-accounts-v1beta dependency PiperOrigin-RevId: 681535191 Source-Link: https://github.com/googleapis/googleapis/commit/e7fa33a66aa893b474af3b1a3a04192e47524559 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e248c3e5099740ced81701876ca8cd8976bb7a0 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiIzZTI0OGMzZTUwOTk3NDBjZWQ4MTcwMTg3NmNhOGNkODk3NmJiN2EwIn0= --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 ++ .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 ++++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-accounts/Gemfile | 13 + .../LICENSE.md | 201 ++++++ .../README.md | 104 ++++ .../Rakefile | 169 ++++++ .../google-shopping-merchant-accounts.gemspec | 27 + .../lib/google-shopping-merchant-accounts.rb | 19 + .../lib/google/shopping/merchant/accounts.rb | 574 ++++++++++++++++++ .../shopping/merchant/accounts/version.rb | 28 + .../shopping/merchant/accounts/client_test.rb | 320 ++++++++++ .../merchant/accounts/version_test.rb | 26 + .../test/helper.rb | 25 + 18 files changed, 1747 insertions(+) create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json new file mode 100644 index 000000000000..c943e89923bf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "merchantapi.googleapis.com", + "api_shortname": "merchantapi", + "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts", + "distribution_name": "google-shopping-merchant-accounts", + "is_cloud": false, + "language": "ruby", + "name": "merchantapi", + "name_pretty": "Merchant API", + "product_documentation": "https://developers.google.com/merchant/api", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", + "ruby-cloud-product-url": "https://developers.google.com/merchant/api", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml new file mode 100644 index 000000000000..fc0ca898b771 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-accounts.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-shopping-merchant-accounts.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts new file mode 100644 index 000000000000..7f1a344f5a8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Merchant API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md new file mode 100644 index 000000000000..196c82db354c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-accounts library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-shopping-merchant-accounts library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/shopping/merchant/accounts" + +client = Google::Shopping::Merchant::Accounts.account_tax_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/shopping/merchant/accounts" + +Google::Shopping::Merchant::Accounts.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Shopping::Merchant::Accounts.account_tax_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-shopping-merchant-accounts +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/shopping/merchant/accounts" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Shopping::Merchant::Accounts.account_tax_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile new file mode 100644 index 000000000000..8a8ea4728ebf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile @@ -0,0 +1,13 @@ +source "https://rubygems.org" + +gemspec + +gem "google-shopping-merchant-accounts-v1beta", path: "../google-shopping-merchant-accounts-v1beta" + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/README.md b/owl-bot-staging/google-shopping-merchant-accounts/README.md new file mode 100644 index 000000000000..0d2646902b7d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/README.md @@ -0,0 +1,104 @@ +# Ruby Client for the Merchant API + +Programmatically manage your Merchant Center Accounts. + +Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`. +The gem `google-shopping-merchant-accounts` is the main client library that brings the +verisoned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts) +for this library, google-shopping-merchant-accounts, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-shopping-merchant-accounts-v1beta](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta). + +See also the [Product Documentation](https://developers.google.com/merchant/api) +for more usage information. + +## Quick Start + +``` +$ gem install google-shopping-merchant-accounts +``` + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-accounts`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-accounts-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-shopping-merchant-accounts`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-shopping-merchant-accounts-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile new file mode 100644 index 000000000000..f5b597187baa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-shopping-merchant-accounts acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" + ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-shopping-merchant-accounts gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-shopping-merchant-accounts gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-shopping-merchant-accounts gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-accounts" + header "google-shopping-merchant-accounts rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-accounts yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-accounts test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-shopping-merchant-accounts acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec new file mode 100644 index 000000000000..1dd9c8bbce89 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/accounts/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-accounts" + gem.version = Google::Shopping::Merchant::Accounts::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." + gem.summary = "Programmatically manage your Merchant Center Accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.2", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb new file mode 100644 index 000000000000..fab4c72eda64 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/shopping/merchant/accounts" unless defined? Google::Shopping::Merchant::Accounts::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb new file mode 100644 index 000000000000..7493b8eb9ce8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb @@ -0,0 +1,574 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/shopping/merchant/accounts/version" + +require "googleauth" + +module Google + module Shopping + module Merchant + module Accounts + ## + # Create a new client object for AccountTaxService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountTaxService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountTaxService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountTaxService + # + # Manages account level tax setting data. + # + # This API defines the following resource model: + # + # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.account_tax_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountTaxService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AccountIssueService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountIssueService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountIssueService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountIssueService + # + # Service to support `AccountIssueService` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.account_issue_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountIssueService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for UserService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::UserService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/UserService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the UserService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About UserService + # + # Service to support user API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.user_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:UserService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AccountsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AccountsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AccountsService + # + # Service to support Accounts API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.accounts_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for AutofeedSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AutofeedSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About AutofeedSettingsService + # + # Service to support + # [autofeed](https://support.google.com/merchants/answer/7538732) setting. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for BusinessIdentityService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessIdentityService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BusinessIdentityService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About BusinessIdentityService + # + # Service to support [business + # identity](https://support.google.com/merchants/answer/12564247) API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.business_identity_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessIdentityService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for BusinessInfoService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessInfoService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BusinessInfoService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About BusinessInfoService + # + # Service to support business info API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.business_info_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessInfoService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for EmailPreferencesService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/EmailPreferencesService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the EmailPreferencesService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About EmailPreferencesService + # + # Service to support the `EmailPreferences` API. + # + # This service only permits retrieving and updating email preferences for the + # authenticated user. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.email_preferences_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:EmailPreferencesService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for HomepageService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/HomepageService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the HomepageService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About HomepageService + # + # Service to support an API for a store's homepage. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.homepage_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:HomepageService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for OnlineReturnPolicyService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/OnlineReturnPolicyService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the OnlineReturnPolicyService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About OnlineReturnPolicyService + # + # The service facilitates the management of a merchant's remorse return policy + # configuration, encompassing return policies for both ads and free listings + # ## programs. This API defines the following resource model: + # + # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.online_return_policy_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:OnlineReturnPolicyService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for ProgramsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ProgramsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProgramsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ProgramsService + # + # Service for program management. + # + # Programs provide a mechanism for adding functionality to merchant accounts. A + # typical example of this is the [Free product + # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) + # program, which enables products from a merchant's store to be shown across + # Google for free. + # + # This service exposes methods to retrieve a merchant's + # participation in all available programs, in addition to methods for + # explicitly enabling or disabling participation in each program. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.programs_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ProgramsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for RegionsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/RegionsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the RegionsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About RegionsService + # + # Manages regions configuration. + # + # This API defines the following resource model: + # + # - [Region][google.shopping.merchant.accounts.v1main.Region] + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.regions_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:RegionsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for ShippingSettingsService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ShippingSettingsService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ShippingSettingsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About ShippingSettingsService + # + # Service to get method call shipping setting information per Merchant API + # method. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.shipping_settings_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ShippingSettingsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for TermsOfServiceService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TermsOfServiceService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About TermsOfServiceService + # + # Service to support `TermsOfService` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.terms_of_service_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Create a new client object for TermsOfServiceAgreementStateService. + # + # By default, this returns an instance of + # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceAgreementStateService/Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TermsOfServiceAgreementStateService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # ## About TermsOfServiceAgreementStateService + # + # Service to support `TermsOfServiceAgreementState` API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.terms_of_service_agreement_state_service version: :v1beta, transport: :grpc, &block + require "google/shopping/merchant/accounts/#{version.to_s.downcase}" + + package_name = Google::Shopping::Merchant::Accounts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceAgreementStateService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + end + end + end +end + +helper_path = ::File.join __dir__, "accounts", "helpers.rb" +require "google/shopping/merchant/accounts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb new file mode 100644 index 000000000000..fff78e7ce1ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Accounts + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb new file mode 100644 index 000000000000..fe6088a49431 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb @@ -0,0 +1,320 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/accounts" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Shopping::Merchant::Accounts::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_account_tax_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client + end + end + + def test_account_tax_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client, client + end + end + + def test_account_issue_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client + end + end + + def test_account_issue_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client, client + end + end + + def test_user_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.user_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client + end + end + + def test_user_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.user_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client, client + end + end + + def test_accounts_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.accounts_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client + end + end + + def test_accounts_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.accounts_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client, client + end + end + + def test_autofeed_settings_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client + end + end + + def test_autofeed_settings_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client, client + end + end + + def test_business_identity_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client + end + end + + def test_business_identity_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client, client + end + end + + def test_business_info_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.business_info_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client + end + end + + def test_business_info_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.business_info_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client, client + end + end + + def test_email_preferences_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client + end + end + + def test_email_preferences_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client, client + end + end + + def test_homepage_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.homepage_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client + end + end + + def test_homepage_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.homepage_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client, client + end + end + + def test_online_return_policy_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client + end + end + + def test_online_return_policy_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client, client + end + end + + def test_programs_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.programs_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client + end + end + + def test_programs_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.programs_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client, client + end + end + + def test_regions_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.regions_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client + end + end + + def test_regions_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.regions_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client, client + end + end + + def test_shipping_settings_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client + end + end + + def test_shipping_settings_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client, client + end + end + + def test_terms_of_service_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client + end + end + + def test_terms_of_service_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client, client + end + end + + def test_terms_of_service_agreement_state_service_grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client + end + end + + def test_terms_of_service_agreement_state_service_rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb new file mode 100644 index 000000000000..0a74bcea01d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/shopping/merchant/accounts/version" + +class Google::Shopping::Merchant::Accounts::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Shopping::Merchant::Accounts::VERSION + end +end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 3c5b9c38fc69ab691d574c8f56048a76e3795881 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 2 Oct 2024 22:57:47 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-shopping-merchant-accounts.gemspec | 2 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 -- .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 ---- .../CHANGELOG.md | 2 - .../google-shopping-merchant-accounts/Gemfile | 13 - .../LICENSE.md | 201 ------ .../README.md | 104 ---- .../Rakefile | 169 ------ .../google-shopping-merchant-accounts.gemspec | 27 - .../lib/google-shopping-merchant-accounts.rb | 19 - .../lib/google/shopping/merchant/accounts.rb | 574 ------------------ .../shopping/merchant/accounts/version.rb | 28 - .../shopping/merchant/accounts/client_test.rb | 320 ---------- .../merchant/accounts/version_test.rb | 26 - .../test/helper.rb | 25 - 19 files changed, 1 insertion(+), 1748 deletions(-) delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb diff --git a/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec index 8720776f4197..1dd9c8bbce89 100644 --- a/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec +++ b/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec @@ -23,5 +23,5 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.7" gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.0", "< 2.a" + gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.2", "< 2.a" end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore b/owl-bot-staging/google-shopping-merchant-accounts/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json deleted file mode 100644 index c943e89923bf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "merchantapi.googleapis.com", - "api_shortname": "merchantapi", - "client_documentation": "https://rubydoc.info/gems/google-shopping-merchant-accounts", - "distribution_name": "google-shopping-merchant-accounts", - "is_cloud": false, - "language": "ruby", - "name": "merchantapi", - "name_pretty": "Merchant API", - "product_documentation": "https://developers.google.com/merchant/api", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment.", - "ruby-cloud-product-url": "https://developers.google.com/merchant/api", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml deleted file mode 100644 index fc0ca898b771..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-accounts.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-shopping-merchant-accounts.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb b/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts b/owl-bot-staging/google-shopping-merchant-accounts/.yardopts deleted file mode 100644 index 7f1a344f5a8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Merchant API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md deleted file mode 100644 index 196c82db354c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-accounts library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-shopping-merchant-accounts library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/shopping/merchant/accounts" - -client = Google::Shopping::Merchant::Accounts.account_tax_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/shopping/merchant/accounts" - -Google::Shopping::Merchant::Accounts.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Shopping::Merchant::Accounts.account_tax_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-shopping-merchant-accounts -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/shopping/merchant/accounts" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Shopping::Merchant::Accounts.account_tax_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile b/owl-bot-staging/google-shopping-merchant-accounts/Gemfile deleted file mode 100644 index 8a8ea4728ebf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-shopping-merchant-accounts-v1beta", path: "../google-shopping-merchant-accounts-v1beta" - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md b/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/README.md b/owl-bot-staging/google-shopping-merchant-accounts/README.md deleted file mode 100644 index 0d2646902b7d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Ruby Client for the Merchant API - -Programmatically manage your Merchant Center Accounts. - -Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-shopping-merchant-accounts-v*`. -The gem `google-shopping-merchant-accounts` is the main client library that brings the -verisoned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-accounts) -for this library, google-shopping-merchant-accounts, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-shopping-merchant-accounts-v1beta](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta). - -See also the [Product Documentation](https://developers.google.com/merchant/api) -for more usage information. - -## Quick Start - -``` -$ gem install google-shopping-merchant-accounts -``` - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-accounts`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-accounts-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-shopping-merchant-accounts`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-shopping-merchant-accounts-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile b/owl-bot-staging/google-shopping-merchant-accounts/Rakefile deleted file mode 100644 index f5b597187baa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-shopping-merchant-accounts acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/shopping/merchant/accounts/v1beta/account_tax_service/credentials" - ::Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-shopping-merchant-accounts gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-accounts gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-shopping-merchant-accounts gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-shopping-merchant-accounts gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-accounts" - header "google-shopping-merchant-accounts rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-accounts yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-accounts test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-shopping-merchant-accounts smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-shopping-merchant-accounts acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec b/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec deleted file mode 100644 index 1dd9c8bbce89..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/google-shopping-merchant-accounts.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/accounts/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-accounts" - gem.version = Google::Shopping::Merchant::Accounts::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Merchant API consists of multiple Sub-APIs. Accounts Sub-API: Enables you to programmatically manage your accounts. Conversions Sub-API: Enables you to programmatically manage your conversion sources for a merchant account. Datasources Sub-API: Enables you to programmatically manage your datasources. Inventories Sub-API: This bundle enables you to programmatically manage your local and regional inventories. Local Feeds Partnerships Sub-API: This bundle enables LFP partners to submit local inventories for a merchant. Notifications Sub-API: This bundle enables you to programmatically manage your notification subscriptions. Products Sub-API: This bundle enables you to programmatically manage your products. Promotions Sub-API: This bundle enables you to programmatically manage your promotions for products. Quota Sub-API: This bundle enables you to list your quotas for all APIs you are using. Reports Sub-API: This bundle enables you to programmatically retrieve reports and insights about products, their performance and their competitive environment." - gem.summary = "Programmatically manage your Merchant Center Accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-shopping-merchant-accounts-v1beta", ">= 0.2", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb deleted file mode 100644 index fab4c72eda64..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google-shopping-merchant-accounts.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/shopping/merchant/accounts" unless defined? Google::Shopping::Merchant::Accounts::VERSION diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb deleted file mode 100644 index 7493b8eb9ce8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts.rb +++ /dev/null @@ -1,574 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/shopping/merchant/accounts/version" - -require "googleauth" - -module Google - module Shopping - module Merchant - module Accounts - ## - # Create a new client object for AccountTaxService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountTaxService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountTaxService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountTaxService - # - # Manages account level tax setting data. - # - # This API defines the following resource model: - # - # - [AccountTax][google.shopping.merchant.accounts.v1main.AccountTax] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.account_tax_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountTaxService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AccountIssueService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountIssueService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountIssueService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountIssueService - # - # Service to support `AccountIssueService` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.account_issue_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountIssueService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for UserService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::UserService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/UserService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the UserService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About UserService - # - # Service to support user API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.user_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:UserService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AccountsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AccountsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AccountsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AccountsService - # - # Service to support Accounts API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.accounts_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AccountsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for AutofeedSettingsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/AutofeedSettingsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AutofeedSettingsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About AutofeedSettingsService - # - # Service to support - # [autofeed](https://support.google.com/merchants/answer/7538732) setting. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.autofeed_settings_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:AutofeedSettingsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for BusinessIdentityService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessIdentityService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the BusinessIdentityService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About BusinessIdentityService - # - # Service to support [business - # identity](https://support.google.com/merchants/answer/12564247) API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.business_identity_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessIdentityService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for BusinessInfoService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/BusinessInfoService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the BusinessInfoService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About BusinessInfoService - # - # Service to support business info API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.business_info_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:BusinessInfoService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for EmailPreferencesService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/EmailPreferencesService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the EmailPreferencesService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About EmailPreferencesService - # - # Service to support the `EmailPreferences` API. - # - # This service only permits retrieving and updating email preferences for the - # authenticated user. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.email_preferences_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:EmailPreferencesService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for HomepageService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/HomepageService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the HomepageService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About HomepageService - # - # Service to support an API for a store's homepage. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.homepage_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:HomepageService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for OnlineReturnPolicyService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/OnlineReturnPolicyService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the OnlineReturnPolicyService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About OnlineReturnPolicyService - # - # The service facilitates the management of a merchant's remorse return policy - # configuration, encompassing return policies for both ads and free listings - # ## programs. This API defines the following resource model: - # - # [OnlineReturnPolicy][google.shopping.merchant.accounts.v1.OnlineReturnPolicy] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.online_return_policy_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:OnlineReturnPolicyService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for ProgramsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ProgramsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProgramsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ProgramsService - # - # Service for program management. - # - # Programs provide a mechanism for adding functionality to merchant accounts. A - # typical example of this is the [Free product - # listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) - # program, which enables products from a merchant's store to be shown across - # Google for free. - # - # This service exposes methods to retrieve a merchant's - # participation in all available programs, in addition to methods for - # explicitly enabling or disabling participation in each program. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.programs_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ProgramsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for RegionsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/RegionsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the RegionsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About RegionsService - # - # Manages regions configuration. - # - # This API defines the following resource model: - # - # - [Region][google.shopping.merchant.accounts.v1main.Region] - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.regions_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:RegionsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for ShippingSettingsService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/ShippingSettingsService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ShippingSettingsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About ShippingSettingsService - # - # Service to get method call shipping setting information per Merchant API - # method. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.shipping_settings_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:ShippingSettingsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for TermsOfServiceService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TermsOfServiceService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About TermsOfServiceService - # - # Service to support `TermsOfService` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.terms_of_service_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Create a new client object for TermsOfServiceAgreementStateService. - # - # By default, this returns an instance of - # [Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client](https://rubydoc.info/gems/google-shopping-merchant-accounts-v1beta/Google/Shopping/Merchant/Accounts/V1beta/TermsOfServiceAgreementStateService/Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TermsOfServiceAgreementStateService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # ## About TermsOfServiceAgreementStateService - # - # Service to support `TermsOfServiceAgreementState` API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.terms_of_service_agreement_state_service version: :v1beta, transport: :grpc, &block - require "google/shopping/merchant/accounts/#{version.to_s.downcase}" - - package_name = Google::Shopping::Merchant::Accounts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Shopping::Merchant::Accounts.const_get(package_name).const_get(:TermsOfServiceAgreementStateService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - end - end - end -end - -helper_path = ::File.join __dir__, "accounts", "helpers.rb" -require "google/shopping/merchant/accounts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb b/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb deleted file mode 100644 index fff78e7ce1ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/lib/google/shopping/merchant/accounts/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Accounts - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb deleted file mode 100644 index fe6088a49431..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/client_test.rb +++ /dev/null @@ -1,320 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/accounts" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Shopping::Merchant::Accounts::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_account_tax_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Client, client - end - end - - def test_account_tax_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.account_tax_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountTaxService::Rest::Client, client - end - end - - def test_account_issue_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Client, client - end - end - - def test_account_issue_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.account_issue_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountIssueService::Rest::Client, client - end - end - - def test_user_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.user_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Client, client - end - end - - def test_user_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.user_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::UserService::Rest::Client, client - end - end - - def test_accounts_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.accounts_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Client, client - end - end - - def test_accounts_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.accounts_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AccountsService::Rest::Client, client - end - end - - def test_autofeed_settings_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Client, client - end - end - - def test_autofeed_settings_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.autofeed_settings_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::AutofeedSettingsService::Rest::Client, client - end - end - - def test_business_identity_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Client, client - end - end - - def test_business_identity_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.business_identity_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessIdentityService::Rest::Client, client - end - end - - def test_business_info_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.business_info_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Client, client - end - end - - def test_business_info_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.business_info_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::BusinessInfoService::Rest::Client, client - end - end - - def test_email_preferences_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Client, client - end - end - - def test_email_preferences_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.email_preferences_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::EmailPreferencesService::Rest::Client, client - end - end - - def test_homepage_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.homepage_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Client, client - end - end - - def test_homepage_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.homepage_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::HomepageService::Rest::Client, client - end - end - - def test_online_return_policy_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Client, client - end - end - - def test_online_return_policy_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.online_return_policy_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::OnlineReturnPolicyService::Rest::Client, client - end - end - - def test_programs_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.programs_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client, client - end - end - - def test_programs_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.programs_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client, client - end - end - - def test_regions_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.regions_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client, client - end - end - - def test_regions_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.regions_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Rest::Client, client - end - end - - def test_shipping_settings_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Client, client - end - end - - def test_shipping_settings_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.shipping_settings_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::ShippingSettingsService::Rest::Client, client - end - end - - def test_terms_of_service_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Client, client - end - end - - def test_terms_of_service_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.terms_of_service_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceService::Rest::Client, client - end - end - - def test_terms_of_service_agreement_state_service_grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Client, client - end - end - - def test_terms_of_service_agreement_state_service_rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Shopping::Merchant::Accounts.terms_of_service_agreement_state_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Shopping::Merchant::Accounts::V1beta::TermsOfServiceAgreementStateService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb deleted file mode 100644 index 0a74bcea01d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/google/shopping/merchant/accounts/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/shopping/merchant/accounts/version" - -class Google::Shopping::Merchant::Accounts::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Shopping::Merchant::Accounts::VERSION - end -end diff --git a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb b/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-accounts/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"