diff --git a/api_names_out.yaml b/api_names_out.yaml index b1558536c04..dc20a3af4de 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -243182,6 +243182,87 @@ "/merchantapi:datasources_v1beta/merchantapi.accounts.dataSources.patch/name": name "/merchantapi:datasources_v1beta/merchantapi.accounts.dataSources.patch/updateMask": update_mask "/merchantapi:datasources_v1beta/quotaUser": quota_user +"/merchantapi:lfp_v1beta/Empty": empty +"/merchantapi:lfp_v1beta/LfpInventory": lfp_inventory +"/merchantapi:lfp_v1beta/LfpInventory/availability": availability +"/merchantapi:lfp_v1beta/LfpInventory/collectionTime": collection_time +"/merchantapi:lfp_v1beta/LfpInventory/contentLanguage": content_language +"/merchantapi:lfp_v1beta/LfpInventory/feedLabel": feed_label +"/merchantapi:lfp_v1beta/LfpInventory/gtin": gtin +"/merchantapi:lfp_v1beta/LfpInventory/name": name +"/merchantapi:lfp_v1beta/LfpInventory/offerId": offer_id +"/merchantapi:lfp_v1beta/LfpInventory/pickupMethod": pickup_method +"/merchantapi:lfp_v1beta/LfpInventory/pickupSla": pickup_sla +"/merchantapi:lfp_v1beta/LfpInventory/price": price +"/merchantapi:lfp_v1beta/LfpInventory/quantity": quantity +"/merchantapi:lfp_v1beta/LfpInventory/regionCode": region_code +"/merchantapi:lfp_v1beta/LfpInventory/storeCode": store_code +"/merchantapi:lfp_v1beta/LfpInventory/targetAccount": target_account +"/merchantapi:lfp_v1beta/LfpSale": lfp_sale +"/merchantapi:lfp_v1beta/LfpSale/contentLanguage": content_language +"/merchantapi:lfp_v1beta/LfpSale/feedLabel": feed_label +"/merchantapi:lfp_v1beta/LfpSale/gtin": gtin +"/merchantapi:lfp_v1beta/LfpSale/name": name +"/merchantapi:lfp_v1beta/LfpSale/offerId": offer_id +"/merchantapi:lfp_v1beta/LfpSale/price": price +"/merchantapi:lfp_v1beta/LfpSale/quantity": quantity +"/merchantapi:lfp_v1beta/LfpSale/regionCode": region_code +"/merchantapi:lfp_v1beta/LfpSale/saleTime": sale_time +"/merchantapi:lfp_v1beta/LfpSale/storeCode": store_code +"/merchantapi:lfp_v1beta/LfpSale/targetAccount": target_account +"/merchantapi:lfp_v1beta/LfpSale/uid": uid +"/merchantapi:lfp_v1beta/LfpStore": lfp_store +"/merchantapi:lfp_v1beta/LfpStore/gcidCategory": gcid_category +"/merchantapi:lfp_v1beta/LfpStore/gcidCategory/gcid_category": gcid_category +"/merchantapi:lfp_v1beta/LfpStore/matchingState": matching_state +"/merchantapi:lfp_v1beta/LfpStore/matchingStateHint": matching_state_hint +"/merchantapi:lfp_v1beta/LfpStore/name": name +"/merchantapi:lfp_v1beta/LfpStore/phoneNumber": phone_number +"/merchantapi:lfp_v1beta/LfpStore/placeId": place_id +"/merchantapi:lfp_v1beta/LfpStore/storeAddress": store_address +"/merchantapi:lfp_v1beta/LfpStore/storeCode": store_code +"/merchantapi:lfp_v1beta/LfpStore/storeName": store_name +"/merchantapi:lfp_v1beta/LfpStore/targetAccount": target_account +"/merchantapi:lfp_v1beta/LfpStore/websiteUri": website_uri +"/merchantapi:lfp_v1beta/ListLfpStoresResponse": list_lfp_stores_response +"/merchantapi:lfp_v1beta/ListLfpStoresResponse/lfpStores": lfp_stores +"/merchantapi:lfp_v1beta/ListLfpStoresResponse/lfpStores/lfp_store": lfp_store +"/merchantapi:lfp_v1beta/ListLfpStoresResponse/nextPageToken": next_page_token +"/merchantapi:lfp_v1beta/Price": price +"/merchantapi:lfp_v1beta/Price/amountMicros": amount_micros +"/merchantapi:lfp_v1beta/Price/currencyCode": currency_code +"/merchantapi:lfp_v1beta/ProductChange": product_change +"/merchantapi:lfp_v1beta/ProductChange/newValue": new_value +"/merchantapi:lfp_v1beta/ProductChange/oldValue": old_value +"/merchantapi:lfp_v1beta/ProductChange/regionCode": region_code +"/merchantapi:lfp_v1beta/ProductChange/reportingContext": reporting_context +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage": product_status_change_message +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/account": account +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/attribute": attribute +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/changes": changes +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/changes/change": change +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/managingAccount": managing_account +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/resource": resource +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/resourceId": resource_id +"/merchantapi:lfp_v1beta/ProductStatusChangeMessage/resourceType": resource_type +"/merchantapi:lfp_v1beta/fields": fields +"/merchantapi:lfp_v1beta/key": key +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpInventories.insert": insert_account_lfp_inventory +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpInventories.insert/parent": parent +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpSales.insert": insert_account_lfp_sale +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpSales.insert/parent": parent +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.delete": delete_account_lfp_store +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.delete/name": name +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.get": get_account_lfp_store +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.get/name": name +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.insert": insert_account_lfp_store +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.insert/parent": parent +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.list": list_account_lfp_stores +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.list/pageSize": page_size +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.list/pageToken": page_token +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.list/parent": parent +"/merchantapi:lfp_v1beta/merchantapi.accounts.lfpStores.list/targetAccount": target_account +"/merchantapi:lfp_v1beta/quotaUser": quota_user "/merchantapi:quota_v1beta/ListQuotaGroupsResponse": list_quota_groups_response "/merchantapi:quota_v1beta/ListQuotaGroupsResponse/nextPageToken": next_page_token "/merchantapi:quota_v1beta/ListQuotaGroupsResponse/quotaGroups": quota_groups diff --git a/generated/google-apis-merchantapi_lfp_v1beta/.repo-metadata.json b/generated/google-apis-merchantapi_lfp_v1beta/.repo-metadata.json new file mode 100644 index 00000000000..f8c36210401 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/.repo-metadata.json @@ -0,0 +1,7 @@ +{ + "api_id": "merchantapi:lfp_v1beta", + "name_pretty": "Merchant API", + "distribution_name": "google-apis-merchantapi_lfp_v1beta", + "language": "ruby", + "library_type": "REST" +} diff --git a/generated/google-apis-merchantapi_lfp_v1beta/.rspec b/generated/google-apis-merchantapi_lfp_v1beta/.rspec new file mode 100644 index 00000000000..16f9cdb0135 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/.rspec @@ -0,0 +1,2 @@ +--color +--format documentation diff --git a/generated/google-apis-merchantapi_lfp_v1beta/.yardopts b/generated/google-apis-merchantapi_lfp_v1beta/.yardopts new file mode 100644 index 00000000000..d31f33f9567 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/.yardopts @@ -0,0 +1,13 @@ +--hide-void-return +--no-private +--verbose +--title=google-apis-merchantapi_lfp_v1beta +--markup-provider=redcarpet +--markup=markdown +--main OVERVIEW.md +lib/google/apis/merchantapi_lfp_v1beta/*.rb +lib/google/apis/merchantapi_lfp_v1beta.rb +- +OVERVIEW.md +CHANGELOG.md +LICENSE.md diff --git a/generated/google-apis-merchantapi_lfp_v1beta/CHANGELOG.md b/generated/google-apis-merchantapi_lfp_v1beta/CHANGELOG.md new file mode 100644 index 00000000000..937f9f58636 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release history for google-apis-merchantapi_lfp_v1beta + +### v0.1.0 (2024-06-27) + +* Regenerated from discovery document revision 20240611 +* Regenerated using generator version 0.15.0 + diff --git a/generated/google-apis-merchantapi_lfp_v1beta/Gemfile b/generated/google-apis-merchantapi_lfp_v1beta/Gemfile new file mode 100644 index 00000000000..6fa8bb627a6 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/Gemfile @@ -0,0 +1,23 @@ +source 'https://rubygems.org' + +gemspec + +group :development do + gem "bundler", ">= 1.17" + gem "rake", ">= 12.0" + gem "rspec", "~> 3.9" + gem "opencensus", "~> 0.5" +end + +platforms :jruby do + group :development do + gem "jruby-openssl" + end +end + +platforms :ruby do + group :development do + gem "yard", "~> 0.9", ">= 0.9.25" + gem "redcarpet", "~> 3.5" + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/LICENSE.md b/generated/google-apis-merchantapi_lfp_v1beta/LICENSE.md new file mode 100644 index 00000000000..32916804156 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/LICENSE.md @@ -0,0 +1,202 @@ + + 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/generated/google-apis-merchantapi_lfp_v1beta/OVERVIEW.md b/generated/google-apis-merchantapi_lfp_v1beta/OVERVIEW.md new file mode 100644 index 00000000000..db11927fb5f --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/OVERVIEW.md @@ -0,0 +1,96 @@ +# Simple REST client for version LfpV1beta of the Merchant API + +This is a simple client library for version LfpV1beta of the Merchant API. It provides: + +* A client object that connects to the HTTP/JSON REST endpoint for the service. +* Ruby objects for data structures related to the service. +* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts. +* Control of retry, pagination, and timeouts. + +Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information. + +## Getting started + +### Before you begin + +There are a few setup steps you need to complete before you can use this library: + + 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts). + 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/). + 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) in the console. + +### Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'google-apis-merchantapi_lfp_v1beta', '~> 0.1' +``` + +And then execute: + +``` +$ bundle +``` + +Or install it yourself as: + +``` +$ gem install google-apis-merchantapi_lfp_v1beta +``` + +### Creating a client object + +Once the gem is installed, you can load the client code and instantiate a client. + +```ruby +# Load the client +require "google/apis/merchantapi_lfp_v1beta" + +# Create a client object +client = Google::Apis::MerchantapiLfpV1beta::MerchantService.new + +# Authenticate calls +client.authorization = # ... use the googleauth gem to create credentials +``` + +See the class reference docs for information on the methods you can call from a client. + +## Documentation + +More detailed descriptions of the Google simple REST clients are available in two documents. + + * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging. + * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables. + +(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Merchantapi service in particular.) + +For reference information on specific calls in the Merchant API, see the {Google::Apis::MerchantapiLfpV1beta::MerchantService class reference docs}. + +## Which client should I use? + +Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**. + +This library, `google-apis-merchantapi_lfp_v1beta`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-_`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward. + +Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients. + +Gem names for modern clients are often of the form `google-cloud-`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud--`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended. + +**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure. + +The [product documentation](https://developers.devsite.corp.google.com/merchant/api) may provide guidance regarding the preferred client library to use. + +## 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. + +## License + +This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}. + +## Support + +Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com). diff --git a/generated/google-apis-merchantapi_lfp_v1beta/Rakefile b/generated/google-apis-merchantapi_lfp_v1beta/Rakefile new file mode 100644 index 00000000000..defbde59776 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/Rakefile @@ -0,0 +1,28 @@ +require "bundler/gem_tasks" +task :release_gem do + Rake::Task["build"].invoke + Rake::Task["release:rubygem_push"].invoke +end + +require 'rake/clean' +CLOBBER.include('coverage', 'doc') +CLEAN.include('.yardoc') + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) + +begin + require 'yard' + require 'yard/rake/yardoc_task' + YARD::Rake::YardocTask.new do |t| + t.files = ['lib/**/*.rb', 'generated/**/*.rb'] + t.options = ['--verbose', '--markup', 'markdown'] + end +rescue LoadError + task :yard + puts "YARD not available" +end + +task :ci => [:spec, :yard, :build] + +task :default => :ci diff --git a/generated/google-apis-merchantapi_lfp_v1beta/google-apis-merchantapi_lfp_v1beta.gemspec b/generated/google-apis-merchantapi_lfp_v1beta/google-apis-merchantapi_lfp_v1beta.gemspec new file mode 100644 index 00000000000..732a7f3b0ca --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/google-apis-merchantapi_lfp_v1beta.gemspec @@ -0,0 +1,33 @@ +require File.expand_path("lib/google/apis/merchantapi_lfp_v1beta/gem_version", __dir__) +gem_version = Google::Apis::MerchantapiLfpV1beta::GEM_VERSION + +Gem::Specification.new do |gem| + gem.name = "google-apis-merchantapi_lfp_v1beta" + gem.version = gem_version + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.summary = "Simple REST client for Merchant API LfpV1beta" + gem.description = + "This is the simple REST client for Merchant API LfpV1beta." \ + " Simple REST clients are Ruby client libraries that provide access to" \ + " Google services via their HTTP REST API endpoints. These libraries are" \ + " generated and updated automatically based on the discovery documents" \ + " published by the service, and they handle most concerns such as" \ + " authentication, pagination, retry, timeouts, and logging. You can use" \ + " this client to access the Merchant API, but note that some" \ + " services may provide a separate modern client that is easier to use." + gem.homepage = "https://github.com/google/google-api-ruby-client" + gem.license = "Apache-2.0" + gem.metadata = { + "bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues", + "changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_lfp_v1beta/CHANGELOG.md", + "documentation_uri" => "https://googleapis.dev/ruby/google-apis-merchantapi_lfp_v1beta/v#{gem_version}", + "source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_lfp_v1beta" + } + + gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = '>= 2.7' + gem.add_runtime_dependency "google-apis-core", ">= 0.15.0", "< 2.a" +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google-apis-merchantapi_lfp_v1beta.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google-apis-merchantapi_lfp_v1beta.rb new file mode 100644 index 00000000000..ddd141fa4a1 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google-apis-merchantapi_lfp_v1beta.rb @@ -0,0 +1,15 @@ +# Copyright 2020 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 +# +# 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. + +require "google/apis/merchantapi_lfp_v1beta" diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta.rb new file mode 100644 index 00000000000..63d366a9995 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta.rb @@ -0,0 +1,36 @@ +# Copyright 2020 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 +# +# 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. + +require 'google/apis/merchantapi_lfp_v1beta/service.rb' +require 'google/apis/merchantapi_lfp_v1beta/classes.rb' +require 'google/apis/merchantapi_lfp_v1beta/representations.rb' +require 'google/apis/merchantapi_lfp_v1beta/gem_version.rb' + +module Google + module Apis + # Merchant API + # + # Programmatically manage your Merchant Center Accounts. + # + # @see https://developers.devsite.corp.google.com/merchant/api + module MerchantapiLfpV1beta + # Version of the Merchant API this client connects to. + # This is NOT the gem version. + VERSION = 'LfpV1beta' + + # Manage your product listings and accounts for Google Shopping + AUTH_CONTENT = 'https://www.googleapis.com/auth/content' + end + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/classes.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/classes.rb new file mode 100644 index 00000000000..3ad8a7e57b9 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/classes.rb @@ -0,0 +1,501 @@ +# Copyright 2020 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 +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiLfpV1beta + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: service Foo ` rpc Bar(google. + # protobuf.Empty) returns (google.protobuf.Empty); ` + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Local Inventory for the merchant. + class LfpInventory + include Google::Apis::Core::Hashable + + # Required. Availability of the product at this store. For accepted attribute + # values, see the [local product inventory data specification](https://support. + # google.com/merchants/answer/3061342) + # Corresponds to the JSON property `availability` + # @return [String] + attr_accessor :availability + + # Optional. The time when the inventory is collected. If not set, it will be set + # to the time when the inventory is submitted. + # Corresponds to the JSON property `collectionTime` + # @return [String] + attr_accessor :collection_time + + # Required. The two-letter ISO 639-1 language code for the item. + # Corresponds to the JSON property `contentLanguage` + # @return [String] + attr_accessor :content_language + + # Optional. The [feed label](https://developers.google.com/shopping-content/ + # guides/products/feed-labels) for the product. If this is not set, it will + # default to `regionCode`. + # Corresponds to the JSON property `feedLabel` + # @return [String] + attr_accessor :feed_label + + # Optional. The Global Trade Item Number of the product. + # Corresponds to the JSON property `gtin` + # @return [String] + attr_accessor :gtin + + # Output only. Identifier. The name for the `LfpInventory` resource. Format: ` + # accounts/`account`/lfpInventories/`target_merchant`~`store_code`~`offer`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. Immutable. A unique identifier for the product. If both inventories + # and sales are submitted for a merchant, this id should match for the same + # product. **Note**: if the merchant sells the same product new and used, they + # should have different IDs. + # Corresponds to the JSON property `offerId` + # @return [String] + attr_accessor :offer_id + + # Optional. Supported pickup method for this offer. Unless the value is "not + # supported", this field must be submitted together with `pickupSla`. For + # accepted attribute values, see the [local product inventory data specification] + # (https://support.google.com/merchants/answer/3061342). + # Corresponds to the JSON property `pickupMethod` + # @return [String] + attr_accessor :pickup_method + + # Optional. Expected date that an order will be ready for pickup relative to the + # order date. Must be submitted together with `pickupMethod`. For accepted + # attribute values, see the [local product inventory data specification](https:// + # support.google.com/merchants/answer/3061342). + # Corresponds to the JSON property `pickupSla` + # @return [String] + attr_accessor :pickup_sla + + # The price represented as a number and currency. + # Corresponds to the JSON property `price` + # @return [Google::Apis::MerchantapiLfpV1beta::Price] + attr_accessor :price + + # Optional. Quantity of the product available at this store. Must be greater + # than or equal to zero. + # Corresponds to the JSON property `quantity` + # @return [Fixnum] + attr_accessor :quantity + + # Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/ + # latest/common/main/en.xml) for the country where the product is sold. + # Corresponds to the JSON property `regionCode` + # @return [String] + attr_accessor :region_code + + # Required. The identifier of the merchant's store. Either the store code + # inserted through `InsertLfpStore` or the store code in the Business Profile. + # Corresponds to the JSON property `storeCode` + # @return [String] + attr_accessor :store_code + + # Required. The Merchant Center ID of the merchant to submit the inventory for. + # Corresponds to the JSON property `targetAccount` + # @return [Fixnum] + attr_accessor :target_account + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @availability = args[:availability] if args.key?(:availability) + @collection_time = args[:collection_time] if args.key?(:collection_time) + @content_language = args[:content_language] if args.key?(:content_language) + @feed_label = args[:feed_label] if args.key?(:feed_label) + @gtin = args[:gtin] if args.key?(:gtin) + @name = args[:name] if args.key?(:name) + @offer_id = args[:offer_id] if args.key?(:offer_id) + @pickup_method = args[:pickup_method] if args.key?(:pickup_method) + @pickup_sla = args[:pickup_sla] if args.key?(:pickup_sla) + @price = args[:price] if args.key?(:price) + @quantity = args[:quantity] if args.key?(:quantity) + @region_code = args[:region_code] if args.key?(:region_code) + @store_code = args[:store_code] if args.key?(:store_code) + @target_account = args[:target_account] if args.key?(:target_account) + end + end + + # A sale for the merchant. + class LfpSale + include Google::Apis::Core::Hashable + + # Required. The two-letter ISO 639-1 language code for the item. + # Corresponds to the JSON property `contentLanguage` + # @return [String] + attr_accessor :content_language + + # Optional. The [feed label](https://developers.google.com/shopping-content/ + # guides/products/feed-labels) for the product. If this is not set, it will + # default to `regionCode`. + # Corresponds to the JSON property `feedLabel` + # @return [String] + attr_accessor :feed_label + + # Required. The Global Trade Item Number of the sold product. + # Corresponds to the JSON property `gtin` + # @return [String] + attr_accessor :gtin + + # Output only. Identifier. The name of the `LfpSale` resource. Format: `accounts/ + # `account`/lfpSales/`sale`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. A unique identifier for the product. If both inventories and sales + # are submitted for a merchant, this id should match for the same product. ** + # Note**: if the merchant sells the same product new and used, they should have + # different IDs. + # Corresponds to the JSON property `offerId` + # @return [String] + attr_accessor :offer_id + + # The price represented as a number and currency. + # Corresponds to the JSON property `price` + # @return [Google::Apis::MerchantapiLfpV1beta::Price] + attr_accessor :price + + # Required. The relative change of the available quantity. Negative for items + # returned. + # Corresponds to the JSON property `quantity` + # @return [Fixnum] + attr_accessor :quantity + + # Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/ + # latest/common/main/en.xml) for the country where the product is sold. + # Corresponds to the JSON property `regionCode` + # @return [String] + attr_accessor :region_code + + # Required. The timestamp for the sale. + # Corresponds to the JSON property `saleTime` + # @return [String] + attr_accessor :sale_time + + # Required. The identifier of the merchant's store. Either a `storeCode` + # inserted through the API or the code of the store in the Business Profile. + # Corresponds to the JSON property `storeCode` + # @return [String] + attr_accessor :store_code + + # Required. The Merchant Center ID of the merchant to submit the sale for. + # Corresponds to the JSON property `targetAccount` + # @return [Fixnum] + attr_accessor :target_account + + # Output only. System generated globally unique ID for the `LfpSale`. + # Corresponds to the JSON property `uid` + # @return [String] + attr_accessor :uid + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_language = args[:content_language] if args.key?(:content_language) + @feed_label = args[:feed_label] if args.key?(:feed_label) + @gtin = args[:gtin] if args.key?(:gtin) + @name = args[:name] if args.key?(:name) + @offer_id = args[:offer_id] if args.key?(:offer_id) + @price = args[:price] if args.key?(:price) + @quantity = args[:quantity] if args.key?(:quantity) + @region_code = args[:region_code] if args.key?(:region_code) + @sale_time = args[:sale_time] if args.key?(:sale_time) + @store_code = args[:store_code] if args.key?(:store_code) + @target_account = args[:target_account] if args.key?(:target_account) + @uid = args[:uid] if args.key?(:uid) + end + end + + # A store for the merchant. This will be used to match to a store under the + # Google Business Profile of the target merchant. If a matching store can't be + # found, the inventories or sales submitted with the store code will not be used. + class LfpStore + include Google::Apis::Core::Hashable + + # Optional. [Google My Business category id](https://gcid-explorer.corp.google. + # com/static/gcid.html). + # Corresponds to the JSON property `gcidCategory` + # @return [Array] + attr_accessor :gcid_category + + # Optional. Output only. The state of matching to a Google Business Profile. See + # matchingStateHint for further details if no match is found. + # Corresponds to the JSON property `matchingState` + # @return [String] + attr_accessor :matching_state + + # Optional. Output only. The hint of why the matching has failed. This is only + # set when matchingState=`STORE_MATCHING_STATE_FAILED`. Possible values are: - "` + # linked-store-not-found`": There aren't any Google Business Profile stores + # available for matching. - "`store-match-not-found`": The provided `LfpStore` + # couldn't be matched to any of the connected Google Business Profile stores. + # Merchant Center account is connected correctly and stores are available on + # Google Business Profile, but the `LfpStore` location address does not match + # with Google Business Profile stores' addresses. Update the `LfpStore` address + # or Google Business Profile store address to match correctly. - "`store-match- + # unverified`": The provided `LfpStore` couldn't be matched to any of the + # connected Google Business Profile stores, as the matched Google Business + # Profile store is unverified. Go through the Google Business Profile + # verification process to match correctly. + # Corresponds to the JSON property `matchingStateHint` + # @return [String] + attr_accessor :matching_state_hint + + # Output only. Identifier. The name of the `LfpStore` resource. Format: ` + # accounts/`account`/lfpStores/`target_merchant`~`store_code`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The store phone number in [E.164](https://en.wikipedia.org/wiki/E. + # 164) format. Example: `+15556767888` + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + + # Optional. The [Google Place Id](https://developers.google.com/maps/ + # documentation/places/web-service/place-id#id-overview) of the store location. + # Corresponds to the JSON property `placeId` + # @return [String] + attr_accessor :place_id + + # Required. The street address of the store. Example: 1600 Amphitheatre Pkwy, + # Mountain View, CA 94043, USA. + # Corresponds to the JSON property `storeAddress` + # @return [String] + attr_accessor :store_address + + # Required. Immutable. A store identifier that is unique for the target merchant. + # Corresponds to the JSON property `storeCode` + # @return [String] + attr_accessor :store_code + + # Optional. The merchant or store name. + # Corresponds to the JSON property `storeName` + # @return [String] + attr_accessor :store_name + + # Required. The Merchant Center id of the merchant to submit the store for. + # Corresponds to the JSON property `targetAccount` + # @return [Fixnum] + attr_accessor :target_account + + # Optional. The website URL for the store or merchant. + # Corresponds to the JSON property `websiteUri` + # @return [String] + attr_accessor :website_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcid_category = args[:gcid_category] if args.key?(:gcid_category) + @matching_state = args[:matching_state] if args.key?(:matching_state) + @matching_state_hint = args[:matching_state_hint] if args.key?(:matching_state_hint) + @name = args[:name] if args.key?(:name) + @phone_number = args[:phone_number] if args.key?(:phone_number) + @place_id = args[:place_id] if args.key?(:place_id) + @store_address = args[:store_address] if args.key?(:store_address) + @store_code = args[:store_code] if args.key?(:store_code) + @store_name = args[:store_name] if args.key?(:store_name) + @target_account = args[:target_account] if args.key?(:target_account) + @website_uri = args[:website_uri] if args.key?(:website_uri) + end + end + + # Response message for the ListLfpStores method. + class ListLfpStoresResponse + include Google::Apis::Core::Hashable + + # The stores from the specified merchant. + # Corresponds to the JSON property `lfpStores` + # @return [Array] + attr_accessor :lfp_stores + + # A token, which can be sent as `pageToken` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lfp_stores = args[:lfp_stores] if args.key?(:lfp_stores) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The price represented as a number and currency. + class Price + include Google::Apis::Core::Hashable + + # The price represented as a number in micros (1 million micros is an equivalent + # to one's currency standard unit, for example, 1 USD = 1000000 micros). + # Corresponds to the JSON property `amountMicros` + # @return [Fixnum] + attr_accessor :amount_micros + + # The currency of the price using three-letter acronyms according to [ISO 4217]( + # http://en.wikipedia.org/wiki/ISO_4217). + # Corresponds to the JSON property `currencyCode` + # @return [String] + attr_accessor :currency_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @amount_micros = args[:amount_micros] if args.key?(:amount_micros) + @currency_code = args[:currency_code] if args.key?(:currency_code) + end + end + + # The change that happened to the product including old value, new value, + # country code as the region code and reporting context. + class ProductChange + include Google::Apis::Core::Hashable + + # The new value of the changed resource or attribute. + # Corresponds to the JSON property `newValue` + # @return [String] + attr_accessor :new_value + + # The old value of the changed resource or attribute. + # Corresponds to the JSON property `oldValue` + # @return [String] + attr_accessor :old_value + + # Countries that have the change (if applicable) + # Corresponds to the JSON property `regionCode` + # @return [String] + attr_accessor :region_code + + # Reporting contexts that have the change (if applicable) + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_value = args[:new_value] if args.key?(:new_value) + @old_value = args[:old_value] if args.key?(:old_value) + @region_code = args[:region_code] if args.key?(:region_code) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + end + end + + # The message that the merchant will receive to notify about product status + # change event + class ProductStatusChangeMessage + include Google::Apis::Core::Hashable + + # The target account that owns the entity that changed. Format : `accounts/` + # merchant_id`` + # Corresponds to the JSON property `account` + # @return [String] + attr_accessor :account + + # The attribute in the resource that changed, in this case it will be always ` + # Status`. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + # A message to describe the change that happened to the product + # Corresponds to the JSON property `changes` + # @return [Array] + attr_accessor :changes + + # The account that manages the merchant's account. can be the same as merchant + # id if it is standalone account. Format : `accounts/`service_provider_id`` + # Corresponds to the JSON property `managingAccount` + # @return [String] + attr_accessor :managing_account + + # The product name. Format: ``product.name=accounts/`account`/products/`product`` + # ` + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # The product id. + # Corresponds to the JSON property `resourceId` + # @return [String] + attr_accessor :resource_id + + # The resource that changed, in this case it will always be `Product`. + # Corresponds to the JSON property `resourceType` + # @return [String] + attr_accessor :resource_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account = args[:account] if args.key?(:account) + @attribute = args[:attribute] if args.key?(:attribute) + @changes = args[:changes] if args.key?(:changes) + @managing_account = args[:managing_account] if args.key?(:managing_account) + @resource = args[:resource] if args.key?(:resource) + @resource_id = args[:resource_id] if args.key?(:resource_id) + @resource_type = args[:resource_type] if args.key?(:resource_type) + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/gem_version.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/gem_version.rb new file mode 100644 index 00000000000..d5baf8711a2 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/gem_version.rb @@ -0,0 +1,28 @@ +# Copyright 2020 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 +# +# 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. + +module Google + module Apis + module MerchantapiLfpV1beta + # Version of the google-apis-merchantapi_lfp_v1beta gem + GEM_VERSION = "0.1.0" + + # Version of the code generator used to generate this client + GENERATOR_VERSION = "0.15.0" + + # Revision of the discovery document this client was generated from + REVISION = "20240611" + end + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/representations.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/representations.rb new file mode 100644 index 00000000000..26192632e0d --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/representations.rb @@ -0,0 +1,178 @@ +# Copyright 2020 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 +# +# 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. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiLfpV1beta + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LfpInventory + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LfpSale + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LfpStore + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLfpStoresResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Price + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductChange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductStatusChangeMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class LfpInventory + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :availability, as: 'availability' + property :collection_time, as: 'collectionTime' + property :content_language, as: 'contentLanguage' + property :feed_label, as: 'feedLabel' + property :gtin, as: 'gtin' + property :name, as: 'name' + property :offer_id, as: 'offerId' + property :pickup_method, as: 'pickupMethod' + property :pickup_sla, as: 'pickupSla' + property :price, as: 'price', class: Google::Apis::MerchantapiLfpV1beta::Price, decorator: Google::Apis::MerchantapiLfpV1beta::Price::Representation + + property :quantity, :numeric_string => true, as: 'quantity' + property :region_code, as: 'regionCode' + property :store_code, as: 'storeCode' + property :target_account, :numeric_string => true, as: 'targetAccount' + end + end + + class LfpSale + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_language, as: 'contentLanguage' + property :feed_label, as: 'feedLabel' + property :gtin, as: 'gtin' + property :name, as: 'name' + property :offer_id, as: 'offerId' + property :price, as: 'price', class: Google::Apis::MerchantapiLfpV1beta::Price, decorator: Google::Apis::MerchantapiLfpV1beta::Price::Representation + + property :quantity, :numeric_string => true, as: 'quantity' + property :region_code, as: 'regionCode' + property :sale_time, as: 'saleTime' + property :store_code, as: 'storeCode' + property :target_account, :numeric_string => true, as: 'targetAccount' + property :uid, as: 'uid' + end + end + + class LfpStore + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :gcid_category, as: 'gcidCategory' + property :matching_state, as: 'matchingState' + property :matching_state_hint, as: 'matchingStateHint' + property :name, as: 'name' + property :phone_number, as: 'phoneNumber' + property :place_id, as: 'placeId' + property :store_address, as: 'storeAddress' + property :store_code, as: 'storeCode' + property :store_name, as: 'storeName' + property :target_account, :numeric_string => true, as: 'targetAccount' + property :website_uri, as: 'websiteUri' + end + end + + class ListLfpStoresResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :lfp_stores, as: 'lfpStores', class: Google::Apis::MerchantapiLfpV1beta::LfpStore, decorator: Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Price + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :amount_micros, :numeric_string => true, as: 'amountMicros' + property :currency_code, as: 'currencyCode' + end + end + + class ProductChange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_value, as: 'newValue' + property :old_value, as: 'oldValue' + property :region_code, as: 'regionCode' + property :reporting_context, as: 'reportingContext' + end + end + + class ProductStatusChangeMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account, as: 'account' + property :attribute, as: 'attribute' + collection :changes, as: 'changes', class: Google::Apis::MerchantapiLfpV1beta::ProductChange, decorator: Google::Apis::MerchantapiLfpV1beta::ProductChange::Representation + + property :managing_account, as: 'managingAccount' + property :resource, as: 'resource' + property :resource_id, as: 'resourceId' + property :resource_type, as: 'resourceType' + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/service.rb b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/service.rb new file mode 100644 index 00000000000..329b8d7c379 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/lib/google/apis/merchantapi_lfp_v1beta/service.rb @@ -0,0 +1,275 @@ +# Copyright 2020 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 +# +# 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. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiLfpV1beta + # Merchant API + # + # Programmatically manage your Merchant Center Accounts. + # + # @example + # require 'google/apis/merchantapi_lfp_v1beta' + # + # Merchantapi = Google::Apis::MerchantapiLfpV1beta # Alias the module + # service = Merchantapi::MerchantService.new + # + # @see https://developers.devsite.corp.google.com/merchant/api + class MerchantService < Google::Apis::Core::BaseService + DEFAULT_ENDPOINT_TEMPLATE = "https://merchantapi.$UNIVERSE_DOMAIN$/" + + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super(DEFAULT_ENDPOINT_TEMPLATE, '', + client_name: 'google-apis-merchantapi_lfp_v1beta', + client_version: Google::Apis::MerchantapiLfpV1beta::GEM_VERSION) + @batch_path = 'batch' + end + + # Inserts a `LfpInventory` resource for the given target merchant account. If + # the resource already exists, it will be replaced. The inventory automatically + # expires after 30 days. + # @param [String] parent + # Required. The LFP provider account. Format: `accounts/`account`` + # @param [Google::Apis::MerchantapiLfpV1beta::LfpInventory] lfp_inventory_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::LfpInventory] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::LfpInventory] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_account_lfp_inventory(parent, lfp_inventory_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpInventories:insert', options) + command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpInventory::Representation + command.request_object = lfp_inventory_object + command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpInventory::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpInventory + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Inserts a `LfpSale` for the given merchant. + # @param [String] parent + # Required. The LFP provider account. Format: `accounts/`lfp_partner`` + # @param [Google::Apis::MerchantapiLfpV1beta::LfpSale] lfp_sale_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::LfpSale] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::LfpSale] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_account_lfp_sale(parent, lfp_sale_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpSales:insert', options) + command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpSale::Representation + command.request_object = lfp_sale_object + command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpSale::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpSale + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a store for a target merchant. + # @param [String] name + # Required. The name of the store to delete for the target merchant account. + # Format: `accounts/`account`/lfpStores/`target_merchant`~`store_code`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_lfp_store(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'lfp/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiLfpV1beta::Empty::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves information about a store. + # @param [String] name + # Required. The name of the store to retrieve. Format: `accounts/`account`/ + # lfpStores/`target_merchant`~`store_code`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::LfpStore] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::LfpStore] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_lfp_store(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'lfp/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpStore + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Inserts a store for the target merchant. If the store with the same store code + # already exists, it will be replaced. + # @param [String] parent + # Required. The LFP provider account Format: `accounts/`account`` + # @param [Google::Apis::MerchantapiLfpV1beta::LfpStore] lfp_store_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::LfpStore] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::LfpStore] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_account_lfp_store(parent, lfp_store_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'lfp/v1beta/{+parent}/lfpStores:insert', options) + command.request_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation + command.request_object = lfp_store_object + command.response_representation = Google::Apis::MerchantapiLfpV1beta::LfpStore::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::LfpStore + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the stores of the target merchant, specified by the filter in ` + # ListLfpStoresRequest`. + # @param [String] parent + # Required. The LFP partner. Format: `accounts/`account`` + # @param [Fixnum] page_size + # Optional. The maximum number of `LfpStore` resources for the given account to + # return. The service returns fewer than this value if the number of stores for + # the given account is less than the `pageSize`. The default value is 250. The + # maximum value is 1000; If a value higher than the maximum is specified, then + # the `pageSize` will default to the maximum. + # @param [String] page_token + # Optional. A page token, received from a previous `ListLfpStoresRequest` call. + # Provide the page token to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListLfpStoresRequest` must match the call that + # provided the page token. The token returned as nextPageToken in the response + # to the previous request. + # @param [Fixnum] target_account + # Required. The Merchant Center id of the merchant to list stores for. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_lfp_stores(parent, page_size: nil, page_token: nil, target_account: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'lfp/v1beta/{+parent}/lfpStores', options) + command.response_representation = Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse::Representation + command.response_class = Google::Apis::MerchantapiLfpV1beta::ListLfpStoresResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['targetAccount'] = target_account unless target_account.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_lfp_v1beta/spec/generated_spec.rb b/generated/google-apis-merchantapi_lfp_v1beta/spec/generated_spec.rb new file mode 100644 index 00000000000..25342c19fb2 --- /dev/null +++ b/generated/google-apis-merchantapi_lfp_v1beta/spec/generated_spec.rb @@ -0,0 +1,27 @@ +# Copyright 2020 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 +# +# 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. + +require "rspec" + +RSpec.describe "Google::Apis::MerchantapiLfpV1beta" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/merchantapi_lfp_v1beta" + end.not_to raise_error + expect do + Google::Apis::MerchantapiLfpV1beta::MerchantService.new + end.not_to raise_error + end +end