Class: Google::Apis::ContentV2::AccountShippingCarrierRate

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

Overview

A carrier-calculated shipping rate.

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) ⇒ AccountShippingCarrierRate

Returns a new instance of AccountShippingCarrierRate.


249
250
251
# File 'generated/google/apis/content_v2/classes.rb', line 249

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

Instance Attribute Details

#carrierString

The carrier that is responsible for the shipping, such as "UPS", "FedEx", or " USPS". Corresponds to the JSON property carrier

Returns:

  • (String)

215
216
217
# File 'generated/google/apis/content_v2/classes.rb', line 215

def carrier
  @carrier
end

#carrier_serviceString

The carrier service, such as "Ground" or "2Day". Corresponds to the JSON property carrierService

Returns:

  • (String)

220
221
222
# File 'generated/google/apis/content_v2/classes.rb', line 220

def carrier_service
  @carrier_service
end

#modifier_flat_rateGoogle::Apis::ContentV2::Price

Additive shipping rate modifier. Corresponds to the JSON property modifierFlatRate


225
226
227
# File 'generated/google/apis/content_v2/classes.rb', line 225

def modifier_flat_rate
  @modifier_flat_rate
end

#modifier_percentString

Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. Corresponds to the JSON property modifierPercent

Returns:

  • (String)

231
232
233
# File 'generated/google/apis/content_v2/classes.rb', line 231

def modifier_percent
  @modifier_percent
end

#nameString

The name of the carrier rate. Corresponds to the JSON property name

Returns:

  • (String)

236
237
238
# File 'generated/google/apis/content_v2/classes.rb', line 236

def name
  @name
end

#sale_countryString

The sale country for which this carrier rate is valid, represented as a CLDR territory code. Corresponds to the JSON property saleCountry

Returns:

  • (String)

242
243
244
# File 'generated/google/apis/content_v2/classes.rb', line 242

def sale_country
  @sale_country
end

#shipping_originString

Shipping origin represented as a postal code. Corresponds to the JSON property shippingOrigin

Returns:

  • (String)

247
248
249
# File 'generated/google/apis/content_v2/classes.rb', line 247

def shipping_origin
  @shipping_origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


254
255
256
257
258
259
260
261
262
# File 'generated/google/apis/content_v2/classes.rb', line 254

def update!(**args)
  @carrier = args[:carrier] if args.key?(:carrier)
  @carrier_service = args[:carrier_service] if args.key?(:carrier_service)
  @modifier_flat_rate = args[:modifier_flat_rate] if args.key?(:modifier_flat_rate)
  @modifier_percent = args[:modifier_percent] if args.key?(:modifier_percent)
  @name = args[:name] if args.key?(:name)
  @sale_country = args[:sale_country] if args.key?(:sale_country)
  @shipping_origin = args[:shipping_origin] if args.key?(:shipping_origin)
end