Close httplib2 connections.
getShippingSettings(name, x__xgafv=None)
Retrieve shipping setting information.
insert(parent, body=None, x__xgafv=None)
Replace the shipping setting of a merchant with the request shipping setting. Executing this method requires admin access.
close()
Close httplib2 connections.
getShippingSettings(name, x__xgafv=None)
Retrieve shipping setting information. Args: name: string, Required. The name of the shipping setting to retrieve. Format: `accounts/{account}/shippingsetting` (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # The merchant account's [shipping setting](https://support.google.com/merchants/answer/6069284). "etag": "A String", # Required. This field is used for avoid async issue. Make sure shipping setting data didn't change between get call and insert call. The user should do following steps: 1. Set etag field as empty string for initial shipping setting creation. 2. After initial creation, call get method to obtain an etag and current shipping setting data before call insert. 3. Modify to wanted shipping setting information. 4. Call insert method with the wanted shipping setting information with the etag obtained from step 2. 5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag. "name": "A String", # Identifier. The resource name of the shipping setting. Format: `accounts/{account}/shippingSetting` "services": [ # Optional. The target account's list of services. { # Shipping service. "active": True or False, # Required. A boolean exposing the active status of the shipping service. "currencyCode": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups. "deliveryCountries": [ # Required. The CLDR territory code of the countries to which the service applies. "A String", ], "deliveryTime": { # Time spent in various aspects from order to the delivery of the product. # Required. Time spent in various aspects from order to the delivery of the product. "cutoffTime": { # Business days cutoff time definition. # Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day. "timeZone": "A String", # Required. [Timezone identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) For example "Europe/Zurich". }, "handlingBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "maxHandlingDays": 42, # Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `min_handling_days`. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "maxTransitDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `min_transit_days`. "minHandlingDays": 42, # Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "minTransitDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Either `min_transit_days`, `max_transit_days` or `transit_time_table` must be set, but not both. "transitBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "transitTimeTable": { # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. "postalCodeGroupNames": [ # Required. A list of region names Region.name . The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. "A String", ], "rows": [ # Required. If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. { # If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. "values": [ # Required. Transit time range (min-max) in business days. { # Transit time range (min-max) in business days. "maxTransitDays": 42, # Must be greater than or equal to `min_transit_days`. "minTransitDays": 42, # Minimum transit time range in business days. 0 means same day delivery, 1 means next day delivery. }, ], }, ], "transitTimeLabels": [ # Required. A list of transit time labels. The last value can be `"all other labels"`. Example: `["food", "electronics", "all other labels"]`. "A String", ], }, "warehouseBasedDeliveryTimes": [ # Optional. Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in delivery time should be set. { # Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in `delivery_time` should be set. "carrier": "A String", # Required. Carrier, such as `"UPS"` or `"Fedex"`. [supported carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of the service must be in the eddSupportedServices list. "warehouse": "A String", # Required. Warehouse name. This should match warehouse }, ], }, "loyaltyPrograms": [ # Optional. Loyalty programs that this shipping service is limited to. { # [Loyalty program](https://support.google.com/merchants/answer/12922446) provided by a merchant. "loyaltyProgramTiers": [ # Optional. Loyalty program tier of this shipping service. { # Subset of a merchants loyalty program. "tierLabel": "A String", # The tier label [tier_label] sub-attribute differentiates offer level benefits between each tier. This value is also set in your program settings in Merchant Center, and is required for data source changes even if your loyalty program only has 1 tier. }, ], "programLabel": "A String", # This is the loyalty program label set in your loyalty program settings in Merchant Center. This sub-attribute allows Google to map your loyalty program to eligible offers. }, ], "minimumOrderValue": { # The price represented as a number and currency. # Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Cannot be set together with minimum_order_value_table. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "minimumOrderValueTable": { # Table of per store minimum order values for the pickup fulfillment type. # Table of per store minimum order values for the pickup fulfillment type. Cannot be set together with minimum_order_value. "storeCodeSetWithMovs": [ # Required. A list of store code sets sharing the same minimum order value (MOV). At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. { # A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. "storeCodes": [ # Optional. A list of unique store codes or empty for the catch all. "A String", ], "value": { # The price represented as a number and currency. # The minimum order value for the given stores. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, }, ], }, "rateGroups": [ # Optional. Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. { # Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. "applicableShippingLabels": [ # Required. A list of [shipping labels](https://support.google.com/merchants/answer/6324504) defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. "A String", ], "carrierRates": [ # Optional. A list of carrier rates that can be referred to by `main_table` or `single_value`. { # A list of carrier rates that can be referred to by `main_table` or `single_value`. Supported carrier services are defined in https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. "carrier": "A String", # Required. Carrier service, such as `"UPS"` or `"Fedex"`. "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. "flatAdjustment": { # The price represented as a number and currency. # Optional. Additive shipping rate modifier. Can be negative. For example `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the rate. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "name": "A String", # Required. Name of the carrier rate. Must be unique per rate group. "originPostalCode": "A String", # Required. Shipping origin for this carrier rate. "percentageAdjustment": "A String", # Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` decreases the rate by 3%. }, ], "mainTable": { # A table defining the rate group, when `single_value` is not expressive enough. # A table defining the rate group, when `single_value` is not expressive enough. Can only be set if `single_value` is not set. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, "name": "A String", # Optional. Name of the rate group. If set has to be unique within shipping service. "singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. # The value of the rate group (For example flat rate $10). Can only be set if `main_table` and `subtables` are not set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, "subtables": [ # Optional. A list of subtables referred to by `main_table`. Can only be set if `main_table` is set. { # A table defining the rate group, when `single_value` is not expressive enough. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, ], }, ], "serviceName": "A String", # Required. Free-form name of the service. Must be unique within target account. "shipmentType": "A String", # Type of locations this service ships orders to. "storeConfig": { # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. "cutoffConfig": { # Configs related to local delivery ends for the day. # Configs related to local delivery ends for the day. "localCutoffTime": { # Time that local delivery ends for the day. # Time that local delivery ends for the day. "hour": "A String", # Hour local delivery orders must be placed by to process the same day. "minute": "A String", # Minute local delivery orders must be placed by to process the same day. }, "noDeliveryPostCutoff": True or False, # Merchants can opt-out of showing n+1 day local delivery when they have a shipping service configured to n day local delivery. For example, if the shipping service defines same-day delivery, and it's past the cut-off, setting this field to `true` results in the calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the same example, setting this field to `false` results in the calculated shipping time being one day. This is only for local delivery. "storeCloseOffsetHours": "A String", # Only valid with local delivery fulfillment. Represents cutoff time as the number of hours before store closing. Mutually exclusive with `local_cutoff_time`. }, "serviceRadius": { # Maximum delivery radius. This is only required for the local delivery shipment type. # Maximum delivery radius. This is only required for the local delivery shipment type. "unit": "A String", # Unit can differ based on country, it is parameterized to include miles and kilometers. "value": "A String", # Integer value of distance. }, "storeCodes": [ # Optional. A list of store codes that provide local delivery. If empty, then `all_stores` must be true. "A String", ], "storeServiceType": "A String", # Indicates whether all stores, or selected stores, listed by this merchant provide local delivery. }, }, ], "warehouses": [ # Optional. A list of warehouses which can be referred to in `services`. { # A fulfillment warehouse, which stores and handles inventory. "businessDayConfig": { # Business days of the warehouse. # Business days of the warehouse. If not set, will be Monday to Friday by default. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "cutoffTime": { # The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. # Required. The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Hour is based on the timezone of warehouse. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Minute is based on the timezone of warehouse. }, "handlingDays": "A String", # Required. The number of days it takes for this warehouse to pack up and ship an item. This is on the warehouse level, but can be overridden on the offer level based on the attributes of an item. "name": "A String", # Required. The name of the warehouse. Must be unique within account. "shippingAddress": { # Shipping address of the warehouse. # Required. Shipping address of the warehouse. "administrativeArea": "A String", # Required. Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). "city": "A String", # Required. City, town or commune. May also include dependent localities or sublocalities (For example neighborhoods or suburbs). "postalCode": "A String", # Required. Postal code or ZIP (For example "94043"). "regionCode": "A String", # Required. [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (For example "US"). "streetAddress": "A String", # Street-level part of the address. For example: `111w 31st Street`. }, }, ], }
insert(parent, body=None, x__xgafv=None)
Replace the shipping setting of a merchant with the request shipping setting. Executing this method requires admin access. Args: parent: string, Required. The account where this product will be inserted. Format: accounts/{account} (required) body: object, The request body. The object takes the form of: { # The merchant account's [shipping setting](https://support.google.com/merchants/answer/6069284). "etag": "A String", # Required. This field is used for avoid async issue. Make sure shipping setting data didn't change between get call and insert call. The user should do following steps: 1. Set etag field as empty string for initial shipping setting creation. 2. After initial creation, call get method to obtain an etag and current shipping setting data before call insert. 3. Modify to wanted shipping setting information. 4. Call insert method with the wanted shipping setting information with the etag obtained from step 2. 5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag. "name": "A String", # Identifier. The resource name of the shipping setting. Format: `accounts/{account}/shippingSetting` "services": [ # Optional. The target account's list of services. { # Shipping service. "active": True or False, # Required. A boolean exposing the active status of the shipping service. "currencyCode": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups. "deliveryCountries": [ # Required. The CLDR territory code of the countries to which the service applies. "A String", ], "deliveryTime": { # Time spent in various aspects from order to the delivery of the product. # Required. Time spent in various aspects from order to the delivery of the product. "cutoffTime": { # Business days cutoff time definition. # Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day. "timeZone": "A String", # Required. [Timezone identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) For example "Europe/Zurich". }, "handlingBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "maxHandlingDays": 42, # Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `min_handling_days`. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "maxTransitDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `min_transit_days`. "minHandlingDays": 42, # Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "minTransitDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Either `min_transit_days`, `max_transit_days` or `transit_time_table` must be set, but not both. "transitBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "transitTimeTable": { # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. "postalCodeGroupNames": [ # Required. A list of region names Region.name . The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. "A String", ], "rows": [ # Required. If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. { # If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. "values": [ # Required. Transit time range (min-max) in business days. { # Transit time range (min-max) in business days. "maxTransitDays": 42, # Must be greater than or equal to `min_transit_days`. "minTransitDays": 42, # Minimum transit time range in business days. 0 means same day delivery, 1 means next day delivery. }, ], }, ], "transitTimeLabels": [ # Required. A list of transit time labels. The last value can be `"all other labels"`. Example: `["food", "electronics", "all other labels"]`. "A String", ], }, "warehouseBasedDeliveryTimes": [ # Optional. Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in delivery time should be set. { # Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in `delivery_time` should be set. "carrier": "A String", # Required. Carrier, such as `"UPS"` or `"Fedex"`. [supported carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of the service must be in the eddSupportedServices list. "warehouse": "A String", # Required. Warehouse name. This should match warehouse }, ], }, "loyaltyPrograms": [ # Optional. Loyalty programs that this shipping service is limited to. { # [Loyalty program](https://support.google.com/merchants/answer/12922446) provided by a merchant. "loyaltyProgramTiers": [ # Optional. Loyalty program tier of this shipping service. { # Subset of a merchants loyalty program. "tierLabel": "A String", # The tier label [tier_label] sub-attribute differentiates offer level benefits between each tier. This value is also set in your program settings in Merchant Center, and is required for data source changes even if your loyalty program only has 1 tier. }, ], "programLabel": "A String", # This is the loyalty program label set in your loyalty program settings in Merchant Center. This sub-attribute allows Google to map your loyalty program to eligible offers. }, ], "minimumOrderValue": { # The price represented as a number and currency. # Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Cannot be set together with minimum_order_value_table. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "minimumOrderValueTable": { # Table of per store minimum order values for the pickup fulfillment type. # Table of per store minimum order values for the pickup fulfillment type. Cannot be set together with minimum_order_value. "storeCodeSetWithMovs": [ # Required. A list of store code sets sharing the same minimum order value (MOV). At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. { # A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. "storeCodes": [ # Optional. A list of unique store codes or empty for the catch all. "A String", ], "value": { # The price represented as a number and currency. # The minimum order value for the given stores. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, }, ], }, "rateGroups": [ # Optional. Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. { # Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. "applicableShippingLabels": [ # Required. A list of [shipping labels](https://support.google.com/merchants/answer/6324504) defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. "A String", ], "carrierRates": [ # Optional. A list of carrier rates that can be referred to by `main_table` or `single_value`. { # A list of carrier rates that can be referred to by `main_table` or `single_value`. Supported carrier services are defined in https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. "carrier": "A String", # Required. Carrier service, such as `"UPS"` or `"Fedex"`. "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. "flatAdjustment": { # The price represented as a number and currency. # Optional. Additive shipping rate modifier. Can be negative. For example `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the rate. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "name": "A String", # Required. Name of the carrier rate. Must be unique per rate group. "originPostalCode": "A String", # Required. Shipping origin for this carrier rate. "percentageAdjustment": "A String", # Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` decreases the rate by 3%. }, ], "mainTable": { # A table defining the rate group, when `single_value` is not expressive enough. # A table defining the rate group, when `single_value` is not expressive enough. Can only be set if `single_value` is not set. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, "name": "A String", # Optional. Name of the rate group. If set has to be unique within shipping service. "singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. # The value of the rate group (For example flat rate $10). Can only be set if `main_table` and `subtables` are not set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, "subtables": [ # Optional. A list of subtables referred to by `main_table`. Can only be set if `main_table` is set. { # A table defining the rate group, when `single_value` is not expressive enough. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, ], }, ], "serviceName": "A String", # Required. Free-form name of the service. Must be unique within target account. "shipmentType": "A String", # Type of locations this service ships orders to. "storeConfig": { # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. "cutoffConfig": { # Configs related to local delivery ends for the day. # Configs related to local delivery ends for the day. "localCutoffTime": { # Time that local delivery ends for the day. # Time that local delivery ends for the day. "hour": "A String", # Hour local delivery orders must be placed by to process the same day. "minute": "A String", # Minute local delivery orders must be placed by to process the same day. }, "noDeliveryPostCutoff": True or False, # Merchants can opt-out of showing n+1 day local delivery when they have a shipping service configured to n day local delivery. For example, if the shipping service defines same-day delivery, and it's past the cut-off, setting this field to `true` results in the calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the same example, setting this field to `false` results in the calculated shipping time being one day. This is only for local delivery. "storeCloseOffsetHours": "A String", # Only valid with local delivery fulfillment. Represents cutoff time as the number of hours before store closing. Mutually exclusive with `local_cutoff_time`. }, "serviceRadius": { # Maximum delivery radius. This is only required for the local delivery shipment type. # Maximum delivery radius. This is only required for the local delivery shipment type. "unit": "A String", # Unit can differ based on country, it is parameterized to include miles and kilometers. "value": "A String", # Integer value of distance. }, "storeCodes": [ # Optional. A list of store codes that provide local delivery. If empty, then `all_stores` must be true. "A String", ], "storeServiceType": "A String", # Indicates whether all stores, or selected stores, listed by this merchant provide local delivery. }, }, ], "warehouses": [ # Optional. A list of warehouses which can be referred to in `services`. { # A fulfillment warehouse, which stores and handles inventory. "businessDayConfig": { # Business days of the warehouse. # Business days of the warehouse. If not set, will be Monday to Friday by default. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "cutoffTime": { # The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. # Required. The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Hour is based on the timezone of warehouse. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Minute is based on the timezone of warehouse. }, "handlingDays": "A String", # Required. The number of days it takes for this warehouse to pack up and ship an item. This is on the warehouse level, but can be overridden on the offer level based on the attributes of an item. "name": "A String", # Required. The name of the warehouse. Must be unique within account. "shippingAddress": { # Shipping address of the warehouse. # Required. Shipping address of the warehouse. "administrativeArea": "A String", # Required. Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). "city": "A String", # Required. City, town or commune. May also include dependent localities or sublocalities (For example neighborhoods or suburbs). "postalCode": "A String", # Required. Postal code or ZIP (For example "94043"). "regionCode": "A String", # Required. [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (For example "US"). "streetAddress": "A String", # Street-level part of the address. For example: `111w 31st Street`. }, }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # The merchant account's [shipping setting](https://support.google.com/merchants/answer/6069284). "etag": "A String", # Required. This field is used for avoid async issue. Make sure shipping setting data didn't change between get call and insert call. The user should do following steps: 1. Set etag field as empty string for initial shipping setting creation. 2. After initial creation, call get method to obtain an etag and current shipping setting data before call insert. 3. Modify to wanted shipping setting information. 4. Call insert method with the wanted shipping setting information with the etag obtained from step 2. 5. If shipping setting data changed between step 2 and step 4. Insert request will fail because the etag changes every time the shipping setting data changes. User should repeate step 2-4 with the new etag. "name": "A String", # Identifier. The resource name of the shipping setting. Format: `accounts/{account}/shippingSetting` "services": [ # Optional. The target account's list of services. { # Shipping service. "active": True or False, # Required. A boolean exposing the active status of the shipping service. "currencyCode": "A String", # The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups. "deliveryCountries": [ # Required. The CLDR territory code of the countries to which the service applies. "A String", ], "deliveryTime": { # Time spent in various aspects from order to the delivery of the product. # Required. Time spent in various aspects from order to the delivery of the product. "cutoffTime": { # Business days cutoff time definition. # Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day. "timeZone": "A String", # Required. [Timezone identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) For example "Europe/Zurich". }, "handlingBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "maxHandlingDays": 42, # Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `min_handling_days`. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "maxTransitDays": 42, # Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `min_transit_days`. "minHandlingDays": 42, # Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time. "minTransitDays": 42, # Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Either `min_transit_days`, `max_transit_days` or `transit_time_table` must be set, but not both. "transitBusinessDayConfig": { # Business days of the warehouse. # The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "transitTimeTable": { # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. # Transit time table, number of business days spent in transit based on row and column dimensions. Either `min_transit_days`, `max_transit_days` or `transit_time_table` can be set, but not both. "postalCodeGroupNames": [ # Required. A list of region names Region.name . The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. "A String", ], "rows": [ # Required. If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. { # If there's only one dimension set of `postal_code_group_names` or `transit_time_labels`, there are multiple rows each with one value for that dimension. If there are two dimensions, each row corresponds to a `postal_code_group_names`, and columns (values) to a `transit_time_labels`. "values": [ # Required. Transit time range (min-max) in business days. { # Transit time range (min-max) in business days. "maxTransitDays": 42, # Must be greater than or equal to `min_transit_days`. "minTransitDays": 42, # Minimum transit time range in business days. 0 means same day delivery, 1 means next day delivery. }, ], }, ], "transitTimeLabels": [ # Required. A list of transit time labels. The last value can be `"all other labels"`. Example: `["food", "electronics", "all other labels"]`. "A String", ], }, "warehouseBasedDeliveryTimes": [ # Optional. Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in delivery time should be set. { # Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in `delivery_time` should be set. "carrier": "A String", # Required. Carrier, such as `"UPS"` or `"Fedex"`. [supported carriers](https://support.google.com/merchants/answer/7050921#zippy=%2Ccarrier-rates-au-de-uk-and-us-only) "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. The name of the service must be in the eddSupportedServices list. "warehouse": "A String", # Required. Warehouse name. This should match warehouse }, ], }, "loyaltyPrograms": [ # Optional. Loyalty programs that this shipping service is limited to. { # [Loyalty program](https://support.google.com/merchants/answer/12922446) provided by a merchant. "loyaltyProgramTiers": [ # Optional. Loyalty program tier of this shipping service. { # Subset of a merchants loyalty program. "tierLabel": "A String", # The tier label [tier_label] sub-attribute differentiates offer level benefits between each tier. This value is also set in your program settings in Merchant Center, and is required for data source changes even if your loyalty program only has 1 tier. }, ], "programLabel": "A String", # This is the loyalty program label set in your loyalty program settings in Merchant Center. This sub-attribute allows Google to map your loyalty program to eligible offers. }, ], "minimumOrderValue": { # The price represented as a number and currency. # Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Cannot be set together with minimum_order_value_table. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "minimumOrderValueTable": { # Table of per store minimum order values for the pickup fulfillment type. # Table of per store minimum order values for the pickup fulfillment type. Cannot be set together with minimum_order_value. "storeCodeSetWithMovs": [ # Required. A list of store code sets sharing the same minimum order value (MOV). At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. { # A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency. "storeCodes": [ # Optional. A list of unique store codes or empty for the catch all. "A String", ], "value": { # The price represented as a number and currency. # The minimum order value for the given stores. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, }, ], }, "rateGroups": [ # Optional. Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. { # Shipping rate group definitions. Only the last one is allowed to have an empty `applicable_shipping_labels`, which means "everything else". The other `applicable_shipping_labels` must not overlap. "applicableShippingLabels": [ # Required. A list of [shipping labels](https://support.google.com/merchants/answer/6324504) defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. "A String", ], "carrierRates": [ # Optional. A list of carrier rates that can be referred to by `main_table` or `single_value`. { # A list of carrier rates that can be referred to by `main_table` or `single_value`. Supported carrier services are defined in https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only. "carrier": "A String", # Required. Carrier service, such as `"UPS"` or `"Fedex"`. "carrierService": "A String", # Required. Carrier service, such as `"ground"` or `"2 days"`. "flatAdjustment": { # The price represented as a number and currency. # Optional. Additive shipping rate modifier. Can be negative. For example `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the rate. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "name": "A String", # Required. Name of the carrier rate. Must be unique per rate group. "originPostalCode": "A String", # Required. Shipping origin for this carrier rate. "percentageAdjustment": "A String", # Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` decreases the rate by 3%. }, ], "mainTable": { # A table defining the rate group, when `single_value` is not expressive enough. # A table defining the rate group, when `single_value` is not expressive enough. Can only be set if `single_value` is not set. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, "name": "A String", # Optional. Name of the rate group. If set has to be unique within shipping service. "singleValue": { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. # The value of the rate group (For example flat rate $10). Can only be set if `main_table` and `subtables` are not set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, "subtables": [ # Optional. A list of subtables referred to by `main_table`. Can only be set if `main_table` is set. { # A table defining the rate group, when `single_value` is not expressive enough. "columnHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Headers of the table's columns. Optional: if not set then the table has only one dimension. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "name": "A String", # Name of the table. Required for subtables, ignored for the main table. "rowHeaders": { # A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `num_items`, `postal_code_group_names`, or `location` must be set. # Required. Headers of the table's rows. "locations": [ # Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. { # A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. "locationIds": [ # 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 (For example, state). "A String", ], }, ], "numberOfItems": [ # Required. A list of inclusive number of items upper bounds. The last value can be `"infinity"`. For example `["10", "50", "infinity"]` represents the headers "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only be set if all other fields are not set. "A String", ], "postalCodeGroupNames": [ # Required. A list of postal group names. The last value can be `"all other locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. "A String", ], "prices": [ # Required. A list of inclusive order price upper bounds. The last price's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All prices within a service must have the same currency. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The price represented as a number and currency. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, ], "weights": [ # Required. A list of inclusive order weight upper bounds. The last weight's value can be infinity by setting price amount_micros = -1. For example `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have the same unit. Must be non-empty. Must be positive except -1. Can only be set if all other fields are not set. { # The weight represented as the value in string and the unit. "amountMicros": "A String", # Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. "unit": "A String", # Required. The weight unit. Acceptable values are: kg and lb }, ], }, "rows": [ # Required. The list of rows that constitute the table. Must have the same length as `row_headers`. { # Include a list of cells. "cells": [ # Required. The list of cells that constitute the row. Must have the same length as `columnHeaders` for two-dimensional tables, a length of 1 for one-dimensional tables. { # The single value of a rate group or the value of a rate group table's cell. Exactly one of `no_shipping`, `flat_rate`, `price_percentage`, `carrier_rateName`, `subtable_name` must be set. "carrierRate": "A String", # The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. "flatRate": { # The price represented as a number and currency. # A flat rate. Can only be set if all other fields are not set. "amountMicros": "A String", # 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). "currencyCode": "A String", # The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). }, "noShipping": True or False, # If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set. "pricePercentage": "A String", # A percentage of the price represented as a number in decimal notation (For example, `"5.4"`). Can only be set if all other fields are not set. "subtable": "A String", # The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set. }, ], }, ], }, ], }, ], "serviceName": "A String", # Required. Free-form name of the service. Must be unique within target account. "shipmentType": "A String", # Type of locations this service ships orders to. "storeConfig": { # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. # A list of stores your products are delivered from. This is only valid for the local delivery shipment type. "cutoffConfig": { # Configs related to local delivery ends for the day. # Configs related to local delivery ends for the day. "localCutoffTime": { # Time that local delivery ends for the day. # Time that local delivery ends for the day. "hour": "A String", # Hour local delivery orders must be placed by to process the same day. "minute": "A String", # Minute local delivery orders must be placed by to process the same day. }, "noDeliveryPostCutoff": True or False, # Merchants can opt-out of showing n+1 day local delivery when they have a shipping service configured to n day local delivery. For example, if the shipping service defines same-day delivery, and it's past the cut-off, setting this field to `true` results in the calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the same example, setting this field to `false` results in the calculated shipping time being one day. This is only for local delivery. "storeCloseOffsetHours": "A String", # Only valid with local delivery fulfillment. Represents cutoff time as the number of hours before store closing. Mutually exclusive with `local_cutoff_time`. }, "serviceRadius": { # Maximum delivery radius. This is only required for the local delivery shipment type. # Maximum delivery radius. This is only required for the local delivery shipment type. "unit": "A String", # Unit can differ based on country, it is parameterized to include miles and kilometers. "value": "A String", # Integer value of distance. }, "storeCodes": [ # Optional. A list of store codes that provide local delivery. If empty, then `all_stores` must be true. "A String", ], "storeServiceType": "A String", # Indicates whether all stores, or selected stores, listed by this merchant provide local delivery. }, }, ], "warehouses": [ # Optional. A list of warehouses which can be referred to in `services`. { # A fulfillment warehouse, which stores and handles inventory. "businessDayConfig": { # Business days of the warehouse. # Business days of the warehouse. If not set, will be Monday to Friday by default. "businessDays": [ # Required. Regular business days. May not be empty. "A String", ], }, "cutoffTime": { # The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. # Required. The latest time of day that an order can be accepted and begin processing. Later orders will be processed in the next day. The time is based on the warehouse postal code. "hour": 42, # Required. Hour of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Hour is based on the timezone of warehouse. "minute": 42, # Required. Minute of the cutoff time until which an order has to be placed to be processed in the same day by the warehouse. Minute is based on the timezone of warehouse. }, "handlingDays": "A String", # Required. The number of days it takes for this warehouse to pack up and ship an item. This is on the warehouse level, but can be overridden on the offer level based on the attributes of an item. "name": "A String", # Required. The name of the warehouse. Must be unique within account. "shippingAddress": { # Shipping address of the warehouse. # Required. Shipping address of the warehouse. "administrativeArea": "A String", # Required. Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC"). "city": "A String", # Required. City, town or commune. May also include dependent localities or sublocalities (For example neighborhoods or suburbs). "postalCode": "A String", # Required. Postal code or ZIP (For example "94043"). "regionCode": "A String", # Required. [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (For example "US"). "streetAddress": "A String", # Street-level part of the address. For example: `111w 31st Street`. }, }, ], }