Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of content v2.1 client #1531

Merged
merged 1 commit into from Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 39 additions & 0 deletions api_names_out.yaml
Expand Up @@ -56487,6 +56487,10 @@
"/content:v2.1/ListCssesResponse/csses": csses
"/content:v2.1/ListCssesResponse/csses/css": css
"/content:v2.1/ListCssesResponse/nextPageToken": next_page_token
"/content:v2.1/ListRegionsResponse": list_regions_response
"/content:v2.1/ListRegionsResponse/nextPageToken": next_page_token
"/content:v2.1/ListRegionsResponse/regions": regions
"/content:v2.1/ListRegionsResponse/regions/region": region
"/content:v2.1/ListRepricingRulesResponse": list_repricing_rules_response
"/content:v2.1/ListRepricingRulesResponse/nextPageToken": next_page_token
"/content:v2.1/ListRepricingRulesResponse/repricingRules": repricing_rules
Expand Down Expand Up @@ -57453,6 +57457,24 @@
"/content:v2.1/RefundReason": refund_reason
"/content:v2.1/RefundReason/description": description
"/content:v2.1/RefundReason/reasonCode": reason_code
"/content:v2.1/Region": region
"/content:v2.1/Region/displayName": display_name
"/content:v2.1/Region/geotargetArea": geotarget_area
"/content:v2.1/Region/merchantId": merchant_id
"/content:v2.1/Region/postalCodeArea": postal_code_area
"/content:v2.1/Region/regionId": region_id
"/content:v2.1/Region/regionalInventoryEligible": regional_inventory_eligible
"/content:v2.1/Region/shippingEligible": shipping_eligible
"/content:v2.1/RegionGeoTargetArea": region_geo_target_area
"/content:v2.1/RegionGeoTargetArea/geotargetCriteriaIds": geotarget_criteria_ids
"/content:v2.1/RegionGeoTargetArea/geotargetCriteriaIds/geotarget_criteria_id": geotarget_criteria_id
"/content:v2.1/RegionPostalCodeArea": region_postal_code_area
"/content:v2.1/RegionPostalCodeArea/postalCodes": postal_codes
"/content:v2.1/RegionPostalCodeArea/postalCodes/postal_code": postal_code
"/content:v2.1/RegionPostalCodeArea/regionCode": region_code
"/content:v2.1/RegionPostalCodeAreaPostalCodeRange": region_postal_code_area_postal_code_range
"/content:v2.1/RegionPostalCodeAreaPostalCodeRange/begin": begin
"/content:v2.1/RegionPostalCodeAreaPostalCodeRange/end": end
"/content:v2.1/RegionalInventory": regional_inventory
"/content:v2.1/RegionalInventory/availability": availability
"/content:v2.1/RegionalInventory/customAttributes": custom_attributes
Expand Down Expand Up @@ -58169,6 +58191,23 @@
"/content:v2.1/content.regionalinventory.insert": insert_regionalinventory
"/content:v2.1/content.regionalinventory.insert/merchantId": merchant_id
"/content:v2.1/content.regionalinventory.insert/productId": product_id
"/content:v2.1/content.regions.create": create_region
"/content:v2.1/content.regions.create/merchantId": merchant_id
"/content:v2.1/content.regions.create/regionId": region_id
"/content:v2.1/content.regions.delete": delete_region
"/content:v2.1/content.regions.delete/merchantId": merchant_id
"/content:v2.1/content.regions.delete/regionId": region_id
"/content:v2.1/content.regions.get": get_region
"/content:v2.1/content.regions.get/merchantId": merchant_id
"/content:v2.1/content.regions.get/regionId": region_id
"/content:v2.1/content.regions.list": list_regions
"/content:v2.1/content.regions.list/merchantId": merchant_id
"/content:v2.1/content.regions.list/pageSize": page_size
"/content:v2.1/content.regions.list/pageToken": page_token
"/content:v2.1/content.regions.patch": patch_region
"/content:v2.1/content.regions.patch/merchantId": merchant_id
"/content:v2.1/content.regions.patch/regionId": region_id
"/content:v2.1/content.regions.patch/updateMask": update_mask
"/content:v2.1/content.repricingrules.create": create_repricingrule
"/content:v2.1/content.repricingrules.create/merchantId": merchant_id
"/content:v2.1/content.repricingrules.create/ruleId": rule_id
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/content_v2_1.rb
Expand Up @@ -25,7 +25,7 @@ module Apis
# @see https://developers.google.com/shopping-content/v2/
module ContentV2_1
VERSION = 'V2_1'
REVISION = '20201104'
REVISION = '20201113'

# Manage your product listings and accounts for Google Shopping
AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
Expand Down
179 changes: 175 additions & 4 deletions generated/google/apis/content_v2_1/classes.rb
Expand Up @@ -3709,6 +3709,32 @@ def update!(**args)
end
end

# Response message for the `ListRegions` method.
class ListRegionsResponse
include Google::Apis::Core::Hashable

# A token, which can be sent as `page_token` 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

# The regions from the specified merchant.
# Corresponds to the JSON property `regions`
# @return [Array<Google::Apis::ContentV2_1::Region>]
attr_accessor :regions

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@regions = args[:regions] if args.key?(:regions)
end
end

# Response message for the `ListRepricingRules` method.
class ListRepricingRulesResponse
include Google::Apis::Core::Hashable
Expand Down Expand Up @@ -4489,7 +4515,7 @@ class OrderCancellation
attr_accessor :quantity

# The reason for the cancellation. Orders that are canceled with a noInventory
# reason will lead to the removal of the product from Shopping Actions until you
# reason will lead to the removal of the product from Buy on Google until you
# make an update to that product. This will not affect your Shopping ads.
# Acceptable values are: - "`autoPostInternal`" - "`
# autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`
Expand Down Expand Up @@ -4537,8 +4563,8 @@ class OrderCustomer

# Email address for the merchant to send value-added tax or invoice
# documentation of the order. Only the last document sent is made available to
# the customer. For more information, see About automated VAT invoicing for
# Shopping Actions.
# the customer. For more information, see About automated VAT invoicing for Buy
# on Google.
# Corresponds to the JSON property `invoiceReceivingEmail`
# @return [String]
attr_accessor :invoice_receiving_email
Expand Down Expand Up @@ -8996,7 +9022,7 @@ class Product
# submitting any attribute of the feed specification in its generic form (e.g., `
# ` "name": "size type", "value": "regular" ``). This is useful for submitting
# attributes not explicitly exposed by the API, such as additional attributes
# used for Shopping Actions.
# used for Buy on Google (formerly known as Shopping Actions).
# Corresponds to the JSON property `customAttributes`
# @return [Array<Google::Apis::ContentV2_1::CustomAttribute>]
attr_accessor :custom_attributes
Expand Down Expand Up @@ -10397,6 +10423,151 @@ def update!(**args)
end
end

# Represents a geographic region that you can use as a target with both the `
# RegionalInventory` and `ShippingSettings` services. You can define regions as
# collections of either postal codes or, in some countries, using predefined
# geotargets.
class Region
include Google::Apis::Core::Hashable

# The display name of the region.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name

# A list of geotargets that defines the region area.
# Corresponds to the JSON property `geotargetArea`
# @return [Google::Apis::ContentV2_1::RegionGeoTargetArea]
attr_accessor :geotarget_area

# Output only. Immutable. Merchant that owns the region.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id

# A list of postal codes that defines the region area. Note: All regions defined
# using postal codes are accessible via the account's `ShippingSettings.
# postalCodeGroups` resource.
# Corresponds to the JSON property `postalCodeArea`
# @return [Google::Apis::ContentV2_1::RegionPostalCodeArea]
attr_accessor :postal_code_area

# Output only. Immutable. The ID uniquely identifying each region.
# Corresponds to the JSON property `regionId`
# @return [String]
attr_accessor :region_id

# Output only. Indicates if the region is eligible to use in the Regional
# Inventory configuration.
# Corresponds to the JSON property `regionalInventoryEligible`
# @return [Boolean]
attr_accessor :regional_inventory_eligible
alias_method :regional_inventory_eligible?, :regional_inventory_eligible

# Output only. Indicates if the region is eligible to use in the Shipping
# Services configuration.
# Corresponds to the JSON property `shippingEligible`
# @return [Boolean]
attr_accessor :shipping_eligible
alias_method :shipping_eligible?, :shipping_eligible

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@geotarget_area = args[:geotarget_area] if args.key?(:geotarget_area)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
@postal_code_area = args[:postal_code_area] if args.key?(:postal_code_area)
@region_id = args[:region_id] if args.key?(:region_id)
@regional_inventory_eligible = args[:regional_inventory_eligible] if args.key?(:regional_inventory_eligible)
@shipping_eligible = args[:shipping_eligible] if args.key?(:shipping_eligible)
end
end

# A list of geotargets that defines the region area.
class RegionGeoTargetArea
include Google::Apis::Core::Hashable

# Required. A non-empty list of [location IDs](https://developers.google.com/
# adwords/api/docs/appendix/geotargeting). They must all be of the same location
# type (e.g., state).
# Corresponds to the JSON property `geotargetCriteriaIds`
# @return [Array<Fixnum>]
attr_accessor :geotarget_criteria_ids

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@geotarget_criteria_ids = args[:geotarget_criteria_ids] if args.key?(:geotarget_criteria_ids)
end
end

# A list of postal codes that defines the region area. Note: All regions defined
# using postal codes are accessible via the account's `ShippingSettings.
# postalCodeGroups` resource.
class RegionPostalCodeArea
include Google::Apis::Core::Hashable

# Required. A range of postal codes.
# Corresponds to the JSON property `postalCodes`
# @return [Array<Google::Apis::ContentV2_1::RegionPostalCodeAreaPostalCodeRange>]
attr_accessor :postal_codes

# Required. CLDR territory code or the country the postal code group applies to.
# Corresponds to the JSON property `regionCode`
# @return [String]
attr_accessor :region_code

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@postal_codes = args[:postal_codes] if args.key?(:postal_codes)
@region_code = args[:region_code] if args.key?(:region_code)
end
end

# A range of postal codes that defines the region area.
class RegionPostalCodeAreaPostalCodeRange
include Google::Apis::Core::Hashable

# Required. A postal code or a pattern of the form prefix* denoting the
# inclusive lower bound of the range defining the area. Examples values: "94108",
# "9410*", "9*".
# Corresponds to the JSON property `begin`
# @return [String]
attr_accessor :begin

# Optional. A postal code or a pattern of the form prefix* denoting the
# inclusive upper bound of the range defining the area. It must have the same
# length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then
# postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a
# pattern then postalCodeRangeEnd must be a pattern with the same prefix length.
# Optional: if not set, then the area is defined as being all the postal codes
# matching postalCodeRangeBegin.
# Corresponds to the JSON property `end`
# @return [String]
attr_accessor :end

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@begin = args[:begin] if args.key?(:begin)
@end = args[:end] if args.key?(:end)
end
end

# Regional inventory resource. contains the regional name and all attributes
# which are overridden for the specified region.
class RegionalInventory
Expand Down
78 changes: 78 additions & 0 deletions generated/google/apis/content_v2_1/representations.rb
Expand Up @@ -622,6 +622,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class ListRegionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class ListRepricingRulesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -1534,6 +1540,30 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class Region
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class RegionGeoTargetArea
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class RegionPostalCodeArea
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class RegionPostalCodeAreaPostalCodeRange
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class RegionalInventory
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -2984,6 +3014,15 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class ListRegionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :regions, as: 'regions', class: Google::Apis::ContentV2_1::Region, decorator: Google::Apis::ContentV2_1::Region::Representation

end
end

class ListRepricingRulesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down Expand Up @@ -4752,6 +4791,45 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class Region
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :geotarget_area, as: 'geotargetArea', class: Google::Apis::ContentV2_1::RegionGeoTargetArea, decorator: Google::Apis::ContentV2_1::RegionGeoTargetArea::Representation

property :merchant_id, :numeric_string => true, as: 'merchantId'
property :postal_code_area, as: 'postalCodeArea', class: Google::Apis::ContentV2_1::RegionPostalCodeArea, decorator: Google::Apis::ContentV2_1::RegionPostalCodeArea::Representation

property :region_id, as: 'regionId'
property :regional_inventory_eligible, as: 'regionalInventoryEligible'
property :shipping_eligible, as: 'shippingEligible'
end
end

class RegionGeoTargetArea
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :geotarget_criteria_ids, as: 'geotargetCriteriaIds'
end
end

class RegionPostalCodeArea
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :postal_codes, as: 'postalCodes', class: Google::Apis::ContentV2_1::RegionPostalCodeAreaPostalCodeRange, decorator: Google::Apis::ContentV2_1::RegionPostalCodeAreaPostalCodeRange::Representation

property :region_code, as: 'regionCode'
end
end

class RegionPostalCodeAreaPostalCodeRange
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :begin, as: 'begin'
property :end, as: 'end'
end
end

class RegionalInventory
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down