From 146e23ddff24116ddaec400b04873a1fb186f7b4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 10 Nov 2020 02:22:04 -0800 Subject: [PATCH] feat: Automated regeneration of content v2.1 client (#1452) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-11-10 02:08:13,039 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-content-v2.1 nothing to commit, working tree clean 2020-11-10 02:08:13,070 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth content v2.1 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth content v2.1 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.5 Installing i18n 1.8.5 Fetching minitest 5.14.2 Installing minitest 5.14.2 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.8 Installing tzinfo 1.2.8 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.3.1 Installing json 2.3.1 with native extensions Fetching docile 1.3.2 Installing docile 1.3.2 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching crack 0.4.4 Installing crack 0.4.4 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.1.0 Installing faraday 1.1.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching rexml 3.2.4 Installing rexml 3.2.4 Using google-api-client 0.49.0 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.1104 Installing mime-types-data 3.2020.1104 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.10.0 Installing rspec-support 3.10.0 Fetching rspec-core 3.10.0 Installing rspec-core 3.10.0 Fetching rspec-expectations 3.10.0 Installing rspec-expectations 3.10.0 Fetching rspec-mocks 3.10.0 Installing rspec-mocks 3.10.0 Fetching rspec 3.10.0 Installing rspec 3.10.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.20.0 Installing parallel 1.20.0 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.2 Installing powerpack 0.1.2 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.25 Installing yard 0.9.25 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.0 Installing redcarpet 3.5.0 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.10.1 Installing ruby-progressbar 1.10.1 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 31 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen generated --api=content.v2.1 --names-out=/workspace/api_names_out.yaml Loading content, version v2.1 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/content.v2.1.json W, [2020-11-10T10:08:38.394593 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.394659 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.395884 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.395910 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.396483 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.396499 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.399179 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.399210 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.399803 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.399819 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.403060 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.403087 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.405010 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.405033 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.409316 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.409343 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.419829 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.419862 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.426272 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.426312 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.426929 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.426946 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.428167 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.428186 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.430682 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.430706 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.431271 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.431285 #242] WARN -- : Changed to 'method_prop' W, [2020-11-10T10:08:38.433854 #242] WARN -- : Found reserved property 'method' W, [2020-11-10T10:08:38.433879 #242] WARN -- : Changed to 'method_prop' conflict google/apis/content_v2_1.rb Wrote metadata to generated/google/apis/content_v2_1/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google/apis/content_v2_1/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/bcc4dc3c-f04b-44c0-b838-d4409e56bd5b/targets - [ ] To automatically regenerate this PR, check this box. --- api_names_out.yaml | 54 +++ generated/google/apis/content_v2_1.rb | 2 +- generated/google/apis/content_v2_1/classes.rb | 450 +++++++++++++++++- .../apis/content_v2_1/representations.rb | 136 ++++++ generated/google/apis/content_v2_1/service.rb | 37 +- .../google/apis/content_v2_1/synth.metadata | 2 +- 6 files changed, 674 insertions(+), 7 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index fd9eb736d..9ace21553 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -55883,6 +55883,16 @@ "/content:v2.1/DatafeedstatusesListResponse/nextPageToken": next_page_token "/content:v2.1/DatafeedstatusesListResponse/resources": resources "/content:v2.1/DatafeedstatusesListResponse/resources/resource": resource +"/content:v2.1/DateTime": date_time +"/content:v2.1/DateTime/day": day +"/content:v2.1/DateTime/hours": hours +"/content:v2.1/DateTime/minutes": minutes +"/content:v2.1/DateTime/month": month +"/content:v2.1/DateTime/nanos": nanos +"/content:v2.1/DateTime/seconds": seconds +"/content:v2.1/DateTime/timeZone": time_zone +"/content:v2.1/DateTime/utcOffset": utc_offset +"/content:v2.1/DateTime/year": year "/content:v2.1/DeliveryTime": delivery_time "/content:v2.1/DeliveryTime/cutoffTime": cutoff_time "/content:v2.1/DeliveryTime/handlingBusinessDayConfig": handling_business_day_config @@ -56333,6 +56343,42 @@ "/content:v2.1/OrderShipmentScheduledDeliveryDetails": order_shipment_scheduled_delivery_details "/content:v2.1/OrderShipmentScheduledDeliveryDetails/carrierPhoneNumber": carrier_phone_number "/content:v2.1/OrderShipmentScheduledDeliveryDetails/scheduledDate": scheduled_date +"/content:v2.1/OrderTrackingSignal": order_tracking_signal +"/content:v2.1/OrderTrackingSignal/customerShippingFee": customer_shipping_fee +"/content:v2.1/OrderTrackingSignal/deliveryPostalCode": delivery_postal_code +"/content:v2.1/OrderTrackingSignal/deliveryRegionCode": delivery_region_code +"/content:v2.1/OrderTrackingSignal/lineItems": line_items +"/content:v2.1/OrderTrackingSignal/lineItems/line_item": line_item +"/content:v2.1/OrderTrackingSignal/merchantId": merchant_id +"/content:v2.1/OrderTrackingSignal/orderCreatedTime": order_created_time +"/content:v2.1/OrderTrackingSignal/orderId": order_id +"/content:v2.1/OrderTrackingSignal/orderTrackingSignalId": order_tracking_signal_id +"/content:v2.1/OrderTrackingSignal/shipmentLineItemMapping": shipment_line_item_mapping +"/content:v2.1/OrderTrackingSignal/shipmentLineItemMapping/shipment_line_item_mapping": shipment_line_item_mapping +"/content:v2.1/OrderTrackingSignal/shippingInfo": shipping_info +"/content:v2.1/OrderTrackingSignal/shippingInfo/shipping_info": shipping_info +"/content:v2.1/OrderTrackingSignalLineItemDetails": order_tracking_signal_line_item_details +"/content:v2.1/OrderTrackingSignalLineItemDetails/gtin": gtin +"/content:v2.1/OrderTrackingSignalLineItemDetails/lineItemId": line_item_id +"/content:v2.1/OrderTrackingSignalLineItemDetails/mpn": mpn +"/content:v2.1/OrderTrackingSignalLineItemDetails/productId": product_id +"/content:v2.1/OrderTrackingSignalLineItemDetails/quantity": quantity +"/content:v2.1/OrderTrackingSignalShipmentLineItemMapping": order_tracking_signal_shipment_line_item_mapping +"/content:v2.1/OrderTrackingSignalShipmentLineItemMapping/lineItemId": line_item_id +"/content:v2.1/OrderTrackingSignalShipmentLineItemMapping/quantity": quantity +"/content:v2.1/OrderTrackingSignalShipmentLineItemMapping/shipmentId": shipment_id +"/content:v2.1/OrderTrackingSignalShippingInfo": order_tracking_signal_shipping_info +"/content:v2.1/OrderTrackingSignalShippingInfo/actualDeliveryTime": actual_delivery_time +"/content:v2.1/OrderTrackingSignalShippingInfo/carrierName": carrier_name +"/content:v2.1/OrderTrackingSignalShippingInfo/carrierServiceName": carrier_service_name +"/content:v2.1/OrderTrackingSignalShippingInfo/earliestDeliveryPromiseTime": earliest_delivery_promise_time +"/content:v2.1/OrderTrackingSignalShippingInfo/latestDeliveryPromiseTime": latest_delivery_promise_time +"/content:v2.1/OrderTrackingSignalShippingInfo/originPostalCode": origin_postal_code +"/content:v2.1/OrderTrackingSignalShippingInfo/originRegionCode": origin_region_code +"/content:v2.1/OrderTrackingSignalShippingInfo/shipmentId": shipment_id +"/content:v2.1/OrderTrackingSignalShippingInfo/shippedTime": shipped_time +"/content:v2.1/OrderTrackingSignalShippingInfo/shippingStatus": shipping_status +"/content:v2.1/OrderTrackingSignalShippingInfo/trackingId": tracking_id "/content:v2.1/OrderinvoicesCreateChargeInvoiceRequest": orderinvoices_create_charge_invoice_request "/content:v2.1/OrderinvoicesCreateChargeInvoiceRequest/invoiceId": invoice_id "/content:v2.1/OrderinvoicesCreateChargeInvoiceRequest/invoiceSummary": invoice_summary @@ -56728,6 +56774,9 @@ "/content:v2.1/Price": price "/content:v2.1/Price/currency": currency "/content:v2.1/Price/value": value +"/content:v2.1/PriceAmount": price_amount +"/content:v2.1/PriceAmount/currency": currency +"/content:v2.1/PriceAmount/value": value "/content:v2.1/Product": product "/content:v2.1/Product/additionalImageLinks": additional_image_links "/content:v2.1/Product/additionalImageLinks/additional_image_link": additional_image_link @@ -57317,6 +57366,9 @@ "/content:v2.1/TestOrderPickupDetailsPickupPerson": test_order_pickup_details_pickup_person "/content:v2.1/TestOrderPickupDetailsPickupPerson/name": name "/content:v2.1/TestOrderPickupDetailsPickupPerson/phoneNumber": phone_number +"/content:v2.1/TimeZone": time_zone +"/content:v2.1/TimeZone/id": id +"/content:v2.1/TimeZone/version": version "/content:v2.1/TransitTable": transit_table "/content:v2.1/TransitTable/postalCodeGroupNames": postal_code_group_names "/content:v2.1/TransitTable/postalCodeGroupNames/postal_code_group_name": postal_code_group_name @@ -57629,6 +57681,8 @@ "/content:v2.1/content.orders.updateshipment": updateshipment_order "/content:v2.1/content.orders.updateshipment/merchantId": merchant_id "/content:v2.1/content.orders.updateshipment/orderId": order_id +"/content:v2.1/content.ordertrackingsignals.create": create_ordertrackingsignal +"/content:v2.1/content.ordertrackingsignals.create/merchantId": merchant_id "/content:v2.1/content.pos.custombatch": custombatch_po "/content:v2.1/content.pos.delete": delete_po "/content:v2.1/content.pos.delete/merchantId": merchant_id diff --git a/generated/google/apis/content_v2_1.rb b/generated/google/apis/content_v2_1.rb index 4c35832d0..15b1e6594 100644 --- a/generated/google/apis/content_v2_1.rb +++ b/generated/google/apis/content_v2_1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/shopping-content/v2/ module ContentV2_1 VERSION = 'V2_1' - REVISION = '20201029' + REVISION = '20201104' # Manage your product listings and accounts for Google Shopping AUTH_CONTENT = 'https://www.googleapis.com/auth/content' diff --git a/generated/google/apis/content_v2_1/classes.rb b/generated/google/apis/content_v2_1/classes.rb index 007cd0717..0c8cbe87a 100644 --- a/generated/google/apis/content_v2_1/classes.rb +++ b/generated/google/apis/content_v2_1/classes.rb @@ -2496,6 +2496,91 @@ module Google end end + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + class DateTime + include Google::Apis::Core::Hashable + + # Required. Day of month. Must be from 1 to 31 and valid for the year and month. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may + # choose to allow the value "24:00:00" for scenarios like business closing time. + # Corresponds to the JSON property `hours` + # @return [Fixnum] + attr_accessor :hours + + # Required. Minutes of hour of day. Must be from 0 to 59. + # Corresponds to the JSON property `minutes` + # @return [Fixnum] + attr_accessor :minutes + + # Required. Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + # Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # Corresponds to the JSON property `seconds` + # @return [Fixnum] + attr_accessor :seconds + + # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/ + # time-zones). + # Corresponds to the JSON property `timeZone` + # @return [Google::Apis::ContentV2_1::TimeZone] + attr_accessor :time_zone + + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For + # example, a UTC offset of -4:00 would be represented as ` seconds: -14400 `. + # Corresponds to the JSON property `utcOffset` + # @return [String] + attr_accessor :utc_offset + + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime + # without a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @day = args[:day] if args.key?(:day) + @hours = args[:hours] if args.key?(:hours) + @minutes = args[:minutes] if args.key?(:minutes) + @month = args[:month] if args.key?(:month) + @nanos = args[:nanos] if args.key?(:nanos) + @seconds = args[:seconds] if args.key?(:seconds) + @time_zone = args[:time_zone] if args.key?(:time_zone) + @utc_offset = args[:utc_offset] if args.key?(:utc_offset) + @year = args[:year] if args.key?(:year) + end + end + # class DeliveryTime include Google::Apis::Core::Hashable @@ -5636,6 +5721,311 @@ module Google end end + # Represents a merchant trade from which signals are extracted, e.g. shipping. + class OrderTrackingSignal + include Google::Apis::Core::Hashable + + # The price represented as a number and currency. + # Corresponds to the JSON property `customerShippingFee` + # @return [Google::Apis::ContentV2_1::PriceAmount] + attr_accessor :customer_shipping_fee + + # Required. The delivery postal code, as a continuous string without spaces or + # dashes, e.g. "95016". + # Corresponds to the JSON property `deliveryPostalCode` + # @return [String] + attr_accessor :delivery_postal_code + + # Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/ + # latest/common/main/en.xml) for the shipping destination. + # Corresponds to the JSON property `deliveryRegionCode` + # @return [String] + attr_accessor :delivery_region_code + + # Information about line items in the order. + # Corresponds to the JSON property `lineItems` + # @return [Array] + attr_accessor :line_items + + # The Google merchant ID of this order tracking signal. This value is optional. + # If left unset, the caller's merchant ID is used. You must request access in + # order to provide data on behalf of another merchant. For more information, see + # [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking- + # signals). + # Corresponds to the JSON property `merchantId` + # @return [Fixnum] + attr_accessor :merchant_id + + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + # Corresponds to the JSON property `orderCreatedTime` + # @return [Google::Apis::ContentV2_1::DateTime] + attr_accessor :order_created_time + + # Required. The ID of the order on the merchant side. + # Corresponds to the JSON property `orderId` + # @return [String] + attr_accessor :order_id + + # Output only. The ID that uniquely identifies this order tracking signal. + # Corresponds to the JSON property `orderTrackingSignalId` + # @return [Fixnum] + attr_accessor :order_tracking_signal_id + + # The mapping of the line items to the shipment information. + # Corresponds to the JSON property `shipmentLineItemMapping` + # @return [Array] + attr_accessor :shipment_line_item_mapping + + # The shipping information for the order. + # Corresponds to the JSON property `shippingInfo` + # @return [Array] + attr_accessor :shipping_info + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @customer_shipping_fee = args[:customer_shipping_fee] if args.key?(:customer_shipping_fee) + @delivery_postal_code = args[:delivery_postal_code] if args.key?(:delivery_postal_code) + @delivery_region_code = args[:delivery_region_code] if args.key?(:delivery_region_code) + @line_items = args[:line_items] if args.key?(:line_items) + @merchant_id = args[:merchant_id] if args.key?(:merchant_id) + @order_created_time = args[:order_created_time] if args.key?(:order_created_time) + @order_id = args[:order_id] if args.key?(:order_id) + @order_tracking_signal_id = args[:order_tracking_signal_id] if args.key?(:order_tracking_signal_id) + @shipment_line_item_mapping = args[:shipment_line_item_mapping] if args.key?(:shipment_line_item_mapping) + @shipping_info = args[:shipping_info] if args.key?(:shipping_info) + end + end + + # The line items of the order. + class OrderTrackingSignalLineItemDetails + include Google::Apis::Core::Hashable + + # The Global Trade Item Number. + # Corresponds to the JSON property `gtin` + # @return [String] + attr_accessor :gtin + + # Required. The ID for this line item. + # Corresponds to the JSON property `lineItemId` + # @return [String] + attr_accessor :line_item_id + + # The manufacturer part number. + # Corresponds to the JSON property `mpn` + # @return [String] + attr_accessor :mpn + + # Required. The Content API REST ID of the product, in the form channel: + # contentLanguage:targetCountry:offerId. + # Corresponds to the JSON property `productId` + # @return [String] + attr_accessor :product_id + + # Required. The quantity of the line item in the order. + # Corresponds to the JSON property `quantity` + # @return [Fixnum] + attr_accessor :quantity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gtin = args[:gtin] if args.key?(:gtin) + @line_item_id = args[:line_item_id] if args.key?(:line_item_id) + @mpn = args[:mpn] if args.key?(:mpn) + @product_id = args[:product_id] if args.key?(:product_id) + @quantity = args[:quantity] if args.key?(:quantity) + end + end + + # Represents how many items are in the shipment for the given shipment_id and + # line_item_id. + class OrderTrackingSignalShipmentLineItemMapping + include Google::Apis::Core::Hashable + + # Required. The line item ID. + # Corresponds to the JSON property `lineItemId` + # @return [String] + attr_accessor :line_item_id + + # Required. The line item quantity in the shipment. + # Corresponds to the JSON property `quantity` + # @return [Fixnum] + attr_accessor :quantity + + # Required. The shipment ID. + # Corresponds to the JSON property `shipmentId` + # @return [String] + attr_accessor :shipment_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @line_item_id = args[:line_item_id] if args.key?(:line_item_id) + @quantity = args[:quantity] if args.key?(:quantity) + @shipment_id = args[:shipment_id] if args.key?(:shipment_id) + end + end + + # The shipping information for the order. + class OrderTrackingSignalShippingInfo + include Google::Apis::Core::Hashable + + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + # Corresponds to the JSON property `actualDeliveryTime` + # @return [Google::Apis::ContentV2_1::DateTime] + attr_accessor :actual_delivery_time + + # The name of the shipping carrier for the delivery. This field is required if + # one of the following fields is absent: earliest_delivery_promise_time, + # latest_delivery_promise_time, and actual_delivery_time. + # Corresponds to the JSON property `carrierName` + # @return [String] + attr_accessor :carrier_name + + # The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc. + # Corresponds to the JSON property `carrierServiceName` + # @return [String] + attr_accessor :carrier_service_name + + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + # Corresponds to the JSON property `earliestDeliveryPromiseTime` + # @return [Google::Apis::ContentV2_1::DateTime] + attr_accessor :earliest_delivery_promise_time + + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + # Corresponds to the JSON property `latestDeliveryPromiseTime` + # @return [Google::Apis::ContentV2_1::DateTime] + attr_accessor :latest_delivery_promise_time + + # The origin postal code, as a continuous string without spaces or dashes, e.g. " + # 95016". + # Corresponds to the JSON property `originPostalCode` + # @return [String] + attr_accessor :origin_postal_code + + # The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/ + # common/main/en.xml) for the shipping origin. + # Corresponds to the JSON property `originRegionCode` + # @return [String] + attr_accessor :origin_region_code + + # Required. The shipment ID. + # Corresponds to the JSON property `shipmentId` + # @return [String] + attr_accessor :shipment_id + + # Represents civil time (or occasionally physical time). This type can represent + # a civil time in one of a few possible ways: * When utc_offset is set and + # time_zone is unset: a civil time on a calendar day with a particular offset + # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a + # calendar day in a particular time zone. * When neither time_zone nor + # utc_offset is set: a civil time on a calendar day in local time. The date is + # relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is + # considered not to have a specific year. month and day must have valid, non- + # zero values. This type may also be used to represent a physical time if all + # the date and time fields are set and either case of the `time_offset` oneof is + # set. Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in another + # field. This type is more flexible than some applications may want. Make sure + # to document and validate your application's limitations. + # Corresponds to the JSON property `shippedTime` + # @return [Google::Apis::ContentV2_1::DateTime] + attr_accessor :shipped_time + + # The status of the shipment. + # Corresponds to the JSON property `shippingStatus` + # @return [String] + attr_accessor :shipping_status + + # The tracking ID of the shipment. This field is required if one of the + # following fields is absent: earliest_delivery_promise_time, + # latest_delivery_promise_time, and actual_delivery_time. + # Corresponds to the JSON property `trackingId` + # @return [String] + attr_accessor :tracking_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @actual_delivery_time = args[:actual_delivery_time] if args.key?(:actual_delivery_time) + @carrier_name = args[:carrier_name] if args.key?(:carrier_name) + @carrier_service_name = args[:carrier_service_name] if args.key?(:carrier_service_name) + @earliest_delivery_promise_time = args[:earliest_delivery_promise_time] if args.key?(:earliest_delivery_promise_time) + @latest_delivery_promise_time = args[:latest_delivery_promise_time] if args.key?(:latest_delivery_promise_time) + @origin_postal_code = args[:origin_postal_code] if args.key?(:origin_postal_code) + @origin_region_code = args[:origin_region_code] if args.key?(:origin_region_code) + @shipment_id = args[:shipment_id] if args.key?(:shipment_id) + @shipped_time = args[:shipped_time] if args.key?(:shipped_time) + @shipping_status = args[:shipping_status] if args.key?(:shipping_status) + @tracking_id = args[:tracking_id] if args.key?(:tracking_id) + end + end + # class OrderinvoicesCreateChargeInvoiceRequest include Google::Apis::Core::Hashable @@ -8489,6 +8879,31 @@ module Google end end + # The price represented as a number and currency. + class PriceAmount + include Google::Apis::Core::Hashable + + # The currency of the price. + # Corresponds to the JSON property `currency` + # @return [String] + attr_accessor :currency + + # The price represented as a number. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @currency = args[:currency] if args.key?(:currency) + @value = args[:value] if args.key?(:value) + end + end + # Required product attributes are primarily defined by the products data # specification. See the Products Data Specification Help Center article for # information. Some attributes are country-specific, so make sure you select the @@ -10415,15 +10830,16 @@ module Google # The percentage delta relative to the offer selling price. This field is signed. # It must be negative in floor. When it is used in floor, it should be > -100. - # If an offer is selling at $10 and this field is -30 in floor, the repricing - # rule only applies if the calculated new price is >= $7. + # For example, if an offer is selling at $10 and this field is -30 in floor, the + # repricing rule only applies if the calculated new price is >= $7. # Corresponds to the JSON property `percentageDelta` # @return [Fixnum] attr_accessor :percentage_delta # The price micros relative to the offer selling price. This field is signed. It - # must be negative in floor. If an offer is selling at $10 and this field is -$2 - # in floor, the repricing rule only applies if the calculated new price is >= $8. + # must be negative in floor. For example, if an offer is selling at $10 and this + # field is -$2 in floor, the repricing rule only applies if the calculated new + # price is >= $8. # Corresponds to the JSON property `priceDelta` # @return [String] attr_accessor :price_delta @@ -12366,6 +12782,32 @@ module Google end end + # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/ + # time-zones). + class TimeZone + include Google::Apis::Core::Hashable + + # IANA Time Zone Database time zone, e.g. "America/New_York". + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional. IANA Time Zone Database version number, e.g. "2019a". + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @version = args[:version] if args.key?(:version) + end + end + # class TransitTable include Google::Apis::Core::Hashable diff --git a/generated/google/apis/content_v2_1/representations.rb b/generated/google/apis/content_v2_1/representations.rb index 0d81a9ddc..560eb51b7 100644 --- a/generated/google/apis/content_v2_1/representations.rb +++ b/generated/google/apis/content_v2_1/representations.rb @@ -418,6 +418,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DateTime + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DeliveryTime class Representation < Google::Apis::Core::JsonRepresentation; end @@ -868,6 +874,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class OrderTrackingSignal + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OrderTrackingSignalLineItemDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OrderTrackingSignalShipmentLineItemMapping + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OrderTrackingSignalShippingInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class OrderinvoicesCreateChargeInvoiceRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1342,6 +1372,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class PriceAmount + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Product class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1852,6 +1888,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class TimeZone + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TransitTable class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2592,6 +2634,22 @@ module Google end end + class DateTime + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :day, as: 'day' + property :hours, as: 'hours' + property :minutes, as: 'minutes' + property :month, as: 'month' + property :nanos, as: 'nanos' + property :seconds, as: 'seconds' + property :time_zone, as: 'timeZone', class: Google::Apis::ContentV2_1::TimeZone, decorator: Google::Apis::ContentV2_1::TimeZone::Representation + + property :utc_offset, as: 'utcOffset' + property :year, as: 'year' + end + end + class DeliveryTime # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3455,6 +3513,68 @@ module Google end end + class OrderTrackingSignal + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :customer_shipping_fee, as: 'customerShippingFee', class: Google::Apis::ContentV2_1::PriceAmount, decorator: Google::Apis::ContentV2_1::PriceAmount::Representation + + property :delivery_postal_code, as: 'deliveryPostalCode' + property :delivery_region_code, as: 'deliveryRegionCode' + collection :line_items, as: 'lineItems', class: Google::Apis::ContentV2_1::OrderTrackingSignalLineItemDetails, decorator: Google::Apis::ContentV2_1::OrderTrackingSignalLineItemDetails::Representation + + property :merchant_id, :numeric_string => true, as: 'merchantId' + property :order_created_time, as: 'orderCreatedTime', class: Google::Apis::ContentV2_1::DateTime, decorator: Google::Apis::ContentV2_1::DateTime::Representation + + property :order_id, as: 'orderId' + property :order_tracking_signal_id, :numeric_string => true, as: 'orderTrackingSignalId' + collection :shipment_line_item_mapping, as: 'shipmentLineItemMapping', class: Google::Apis::ContentV2_1::OrderTrackingSignalShipmentLineItemMapping, decorator: Google::Apis::ContentV2_1::OrderTrackingSignalShipmentLineItemMapping::Representation + + collection :shipping_info, as: 'shippingInfo', class: Google::Apis::ContentV2_1::OrderTrackingSignalShippingInfo, decorator: Google::Apis::ContentV2_1::OrderTrackingSignalShippingInfo::Representation + + end + end + + class OrderTrackingSignalLineItemDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gtin, as: 'gtin' + property :line_item_id, as: 'lineItemId' + property :mpn, as: 'mpn' + property :product_id, as: 'productId' + property :quantity, :numeric_string => true, as: 'quantity' + end + end + + class OrderTrackingSignalShipmentLineItemMapping + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :line_item_id, as: 'lineItemId' + property :quantity, :numeric_string => true, as: 'quantity' + property :shipment_id, as: 'shipmentId' + end + end + + class OrderTrackingSignalShippingInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :actual_delivery_time, as: 'actualDeliveryTime', class: Google::Apis::ContentV2_1::DateTime, decorator: Google::Apis::ContentV2_1::DateTime::Representation + + property :carrier_name, as: 'carrierName' + property :carrier_service_name, as: 'carrierServiceName' + property :earliest_delivery_promise_time, as: 'earliestDeliveryPromiseTime', class: Google::Apis::ContentV2_1::DateTime, decorator: Google::Apis::ContentV2_1::DateTime::Representation + + property :latest_delivery_promise_time, as: 'latestDeliveryPromiseTime', class: Google::Apis::ContentV2_1::DateTime, decorator: Google::Apis::ContentV2_1::DateTime::Representation + + property :origin_postal_code, as: 'originPostalCode' + property :origin_region_code, as: 'originRegionCode' + property :shipment_id, as: 'shipmentId' + property :shipped_time, as: 'shippedTime', class: Google::Apis::ContentV2_1::DateTime, decorator: Google::Apis::ContentV2_1::DateTime::Representation + + property :shipping_status, as: 'shippingStatus' + property :tracking_id, as: 'trackingId' + end + end + class OrderinvoicesCreateChargeInvoiceRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -4254,6 +4374,14 @@ module Google end end + class PriceAmount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :currency, as: 'currency' + property :value, as: 'value' + end + end + class Product # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -5297,6 +5425,14 @@ module Google end end + class TimeZone + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :version, as: 'version' + end + end + class TransitTable # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/content_v2_1/service.rb b/generated/google/apis/content_v2_1/service.rb index c30945aaf..999289404 100644 --- a/generated/google/apis/content_v2_1/service.rb +++ b/generated/google/apis/content_v2_1/service.rb @@ -1017,7 +1017,9 @@ module Google execute_or_queue_command(command, &block) end - # Invokes a fetch for the datafeed in your Merchant Center account. + # Invokes a fetch for the datafeed in your Merchant Center account. If you need + # to call this method more than once per day, we recommend you use the Products + # service to update your product data. # @param [Fixnum] merchant_id # The ID of the account that manages the datafeed. This account cannot be a # multi-client account. @@ -2958,6 +2960,39 @@ module Google execute_or_queue_command(command, &block) end + # Creates new order tracking signal. + # @param [Fixnum] merchant_id + # The ID of the merchant for which the order signal is created. + # @param [Google::Apis::ContentV2_1::OrderTrackingSignal] order_tracking_signal_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::ContentV2_1::OrderTrackingSignal] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContentV2_1::OrderTrackingSignal] + # + # @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 create_ordertrackingsignal(merchant_id, order_tracking_signal_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'content/v2.1/{merchantId}/ordertrackingsignals', options) + command.request_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation + command.request_object = order_tracking_signal_object + command.response_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation + command.response_class = Google::Apis::ContentV2_1::OrderTrackingSignal + command.params['merchantId'] = merchant_id unless merchant_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Batches multiple POS-related calls in a single request. # @param [Google::Apis::ContentV2_1::PosCustomBatchRequest] pos_custom_batch_request_object # @param [String] fields diff --git a/generated/google/apis/content_v2_1/synth.metadata b/generated/google/apis/content_v2_1/synth.metadata index c64640077..1e633be7c 100644 --- a/generated/google/apis/content_v2_1/synth.metadata +++ b/generated/google/apis/content_v2_1/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "1130b30359ce3074f730262c819abc46257df961" + "sha": "f4816b814d93bcc387c461c05515a06df139c939" } } ]