class Google::Apis::ContentV2_1::CarrierRate

Attributes

carrier_name[RW]

Carrier service, such as `“UPS”` or `“Fedex”`. The list of supported carriers can be retrieved via the `getSupportedCarriers` method. Required. Corresponds to the JSON property `carrierName` @return [String]

carrier_service[RW]

Carrier service, such as `“ground”` or `“2 days”`. The list of supported services for a carrier can be retrieved via the `getSupportedCarriers` method. Required. Corresponds to the JSON property `carrierService` @return [String]

flat_adjustment[RW]

Additive shipping rate modifier. Can be negative. For example “ “value”: “1”, “currency” : “USD” “ adds $1 to the rate, “ “value”: “-3”, “currency” : “USD” “ removes $3 from the rate. Optional. Corresponds to the JSON property `flatAdjustment` @return [Google::Apis::ContentV2_1::Price]

name[RW]

Name of the carrier rate. Must be unique per rate group. Required. Corresponds to the JSON property `name` @return [String]

origin_postal_code[RW]

Shipping origin for this carrier rate. Required. Corresponds to the JSON property `originPostalCode` @return [String]

percentage_adjustment[RW]

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%. Optional. Corresponds to the JSON property `percentageAdjustment` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/content_v2_1/classes.rb, line 1776
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/content_v2_1/classes.rb, line 1781
def update!(**args)
  @carrier_name = args[:carrier_name] if args.key?(:carrier_name)
  @carrier_service = args[:carrier_service] if args.key?(:carrier_service)
  @flat_adjustment = args[:flat_adjustment] if args.key?(:flat_adjustment)
  @name = args[:name] if args.key?(:name)
  @origin_postal_code = args[:origin_postal_code] if args.key?(:origin_postal_code)
  @percentage_adjustment = args[:percentage_adjustment] if args.key?(:percentage_adjustment)
end