Class: Google::Apis::ContentV2::ProductShipping

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ProductShipping

Returns a new instance of ProductShipping.


5454
5455
5456
# File 'generated/google/apis/content_v2/classes.rb', line 5454

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

Instance Attribute Details

#countryString

The CLDR territory code of the country to which an item will ship. Corresponds to the JSON property country

Returns:

  • (String)

5418
5419
5420
# File 'generated/google/apis/content_v2/classes.rb', line 5418

def country
  @country
end

#location_group_nameString

The location where the shipping is applicable, represented by a location group name. Corresponds to the JSON property locationGroupName

Returns:

  • (String)

5424
5425
5426
# File 'generated/google/apis/content_v2/classes.rb', line 5424

def location_group_name
  @location_group_name
end

#location_idString

The numeric id of a location that the shipping rate applies to as defined in the AdWords API. Corresponds to the JSON property locationId

Returns:

  • (String)

5430
5431
5432
# File 'generated/google/apis/content_v2/classes.rb', line 5430

def location_id
  @location_id
end

#postal_codeString

The postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between two postal codes or two postal code prefixes of equal length. Corresponds to the JSON property postalCode

Returns:

  • (String)

5437
5438
5439
# File 'generated/google/apis/content_v2/classes.rb', line 5437

def postal_code
  @postal_code
end

#priceGoogle::Apis::ContentV2::Price

Fixed shipping price, represented as a number. Corresponds to the JSON property price


5442
5443
5444
# File 'generated/google/apis/content_v2/classes.rb', line 5442

def price
  @price
end

#regionString

The geographic region to which a shipping rate applies (e.g. zip code). Corresponds to the JSON property region

Returns:

  • (String)

5447
5448
5449
# File 'generated/google/apis/content_v2/classes.rb', line 5447

def region
  @region
end

#serviceString

A free-form description of the service class or delivery speed. Corresponds to the JSON property service

Returns:

  • (String)

5452
5453
5454
# File 'generated/google/apis/content_v2/classes.rb', line 5452

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


5459
5460
5461
5462
5463
5464
5465
5466
5467
# File 'generated/google/apis/content_v2/classes.rb', line 5459

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @location_group_name = args[:location_group_name] if args.key?(:location_group_name)
  @location_id = args[:location_id] if args.key?(:location_id)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @price = args[:price] if args.key?(:price)
  @region = args[:region] if args.key?(:region)
  @service = args[:service] if args.key?(:service)
end