Class: Google::Apis::ContentV2::CarrierRate
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::ContentV2::CarrierRate
 
 
- 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
- 
  
    
      #carrier_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Carrier service, such as "UPS" or "Fedex".
 - 
  
    
      #carrier_service  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Carrier service, such as "ground" or "2 days".
 - 
  
    
      #flat_adjustment  ⇒ Google::Apis::ContentV2::Price 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Additive shipping rate modifier.
 - 
  
    
      #name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Name of the carrier rate.
 - 
  
    
      #origin_postal_code  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Shipping origin for this carrier rate.
 - 
  
    
      #percentage_adjustment  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Multiplicative shipping rate modifier as a number in decimal notation.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ CarrierRate 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of CarrierRate.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ CarrierRate
Returns a new instance of CarrierRate
      1516 1517 1518  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1516 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#carrier_name ⇒ String
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
      1484 1485 1486  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1484 def carrier_name @carrier_name end  | 
  
#carrier_service ⇒ String
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
      1490 1491 1492  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1490 def carrier_service @carrier_service end  | 
  
#flat_adjustment ⇒ Google::Apis::ContentV2::Price
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
      1497 1498 1499  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1497 def flat_adjustment @flat_adjustment end  | 
  
#name ⇒ String
Name of the carrier rate. Must be unique per rate group. Required.
Corresponds to the JSON property name
      1502 1503 1504  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1502 def name @name end  | 
  
#origin_postal_code ⇒ String
Shipping origin for this carrier rate. Required.
Corresponds to the JSON property originPostalCode
      1507 1508 1509  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1507 def origin_postal_code @origin_postal_code end  | 
  
#percentage_adjustment ⇒ String
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
      1514 1515 1516  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1514 def percentage_adjustment @percentage_adjustment end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      1521 1522 1523 1524 1525 1526 1527 1528  | 
    
      # File 'generated/google/apis/content_v2/classes.rb', line 1521 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  |