Class: Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod

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

Shipping cost calculation method. Exactly one of the field is set.

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

Returns a new instance of AccountShippingShippingServiceCalculationMethod.


566
567
568
# File 'generated/google/apis/content_v2/classes.rb', line 566

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

Instance Attribute Details

#carrier_rateString

Name of the carrier rate to use for the calculation. Corresponds to the JSON property carrierRate

Returns:

  • (String)

541
542
543
# File 'generated/google/apis/content_v2/classes.rb', line 541

def carrier_rate
  @carrier_rate
end

#excludedBoolean Also known as: excluded?

Delivery is excluded. Valid only within cost rules tree. Corresponds to the JSON property excluded

Returns:

  • (Boolean)

546
547
548
# File 'generated/google/apis/content_v2/classes.rb', line 546

def excluded
  @excluded
end

#flat_rateGoogle::Apis::ContentV2::Price

Fixed price shipping, represented as a floating point number associated with a currency. Corresponds to the JSON property flatRate


553
554
555
# File 'generated/google/apis/content_v2/classes.rb', line 553

def flat_rate
  @flat_rate
end

#percentage_rateString

Percentage of the price, represented as a floating point number without the percentage character. Corresponds to the JSON property percentageRate

Returns:

  • (String)

559
560
561
# File 'generated/google/apis/content_v2/classes.rb', line 559

def percentage_rate
  @percentage_rate
end

#rate_tableString

Name of the rate table to use for the calculation. Corresponds to the JSON property rateTable

Returns:

  • (String)

564
565
566
# File 'generated/google/apis/content_v2/classes.rb', line 564

def rate_table
  @rate_table
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


571
572
573
574
575
576
577
# File 'generated/google/apis/content_v2/classes.rb', line 571

def update!(**args)
  @carrier_rate = args[:carrier_rate] if args.key?(:carrier_rate)
  @excluded = args[:excluded] if args.key?(:excluded)
  @flat_rate = args[:flat_rate] if args.key?(:flat_rate)
  @percentage_rate = args[:percentage_rate] if args.key?(:percentage_rate)
  @rate_table = args[:rate_table] if args.key?(:rate_table)
end