Class: Google::Apis::ContentV2_1::ProductShipping

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductShipping

Returns a new instance of ProductShipping.



10165
10166
10167
# File 'lib/google/apis/content_v2_1/classes.rb', line 10165

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)


10129
10130
10131
# File 'lib/google/apis/content_v2_1/classes.rb', line 10129

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)


10135
10136
10137
# File 'lib/google/apis/content_v2_1/classes.rb', line 10135

def location_group_name
  @location_group_name
end

#location_idFixnum

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:

  • (Fixnum)


10141
10142
10143
# File 'lib/google/apis/content_v2_1/classes.rb', line 10141

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)


10148
10149
10150
# File 'lib/google/apis/content_v2_1/classes.rb', line 10148

def postal_code
  @postal_code
end

#priceGoogle::Apis::ContentV2_1::Price

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



10153
10154
10155
# File 'lib/google/apis/content_v2_1/classes.rb', line 10153

def price
  @price
end

#regionString

The geographic region to which a shipping rate applies. Corresponds to the JSON property region

Returns:

  • (String)


10158
10159
10160
# File 'lib/google/apis/content_v2_1/classes.rb', line 10158

def region
  @region
end

#serviceString

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

Returns:

  • (String)


10163
10164
10165
# File 'lib/google/apis/content_v2_1/classes.rb', line 10163

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10170
10171
10172
10173
10174
10175
10176
10177
10178
# File 'lib/google/apis/content_v2_1/classes.rb', line 10170

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