Class: Google::Apis::MerchantapiAccountsV1beta::CarrierRate
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiAccountsV1beta::CarrierRate
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb
Overview
A list of carrier rates that can be referred to by main_table
or
single_value
.
Instance Attribute Summary collapse
-
#carrier ⇒ String
Required.
-
#carrier_service ⇒ String
Required.
-
#flat_adjustment ⇒ Google::Apis::MerchantapiAccountsV1beta::Price
The price represented as a number and currency.
-
#name ⇒ String
Required.
-
#origin_postal_code ⇒ String
Required.
-
#percentage_adjustment ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CarrierRate
constructor
A new instance of CarrierRate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CarrierRate
Returns a new instance of CarrierRate.
490 491 492 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 490 def initialize(**args) update!(**args) end |
Instance Attribute Details
#carrier ⇒ String
Required. Carrier service, such as "UPS"
or "Fedex"
.
Corresponds to the JSON property carrier
461 462 463 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 461 def carrier @carrier end |
#carrier_service ⇒ String
Required. Carrier service, such as "ground"
or "2 days"
.
Corresponds to the JSON property carrierService
466 467 468 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 466 def carrier_service @carrier_service end |
#flat_adjustment ⇒ Google::Apis::MerchantapiAccountsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property flatAdjustment
471 472 473 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 471 def flat_adjustment @flat_adjustment end |
#name ⇒ String
Required. Name of the carrier rate. Must be unique per rate group.
Corresponds to the JSON property name
476 477 478 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 476 def name @name end |
#origin_postal_code ⇒ String
Required. Shipping origin for this carrier rate.
Corresponds to the JSON property originPostalCode
481 482 483 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 481 def origin_postal_code @origin_postal_code end |
#percentage_adjustment ⇒ String
Optional. 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%.
Corresponds to the JSON property percentageAdjustment
488 489 490 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 488 def percentage_adjustment @percentage_adjustment end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
495 496 497 498 499 500 501 502 |
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 495 def update!(**args) @carrier = args[:carrier] if args.key?(:carrier) @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 |