Class: Google4R::Checkout::ShippingMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/google4r/checkout/shared.rb

Overview

Abstract class for shipping methods. Do not use this class directly but only one of its subclasses.

Direct Known Subclasses

FlatRateShipping, PickupShipping

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeShippingMethod

Mark this class as abstract by throwing a RuntimeError on initialization.



422
423
424
# File 'lib/google4r/checkout/shared.rb', line 422

def initialize
  raise "Do not use the abstract class Google::Checkout::ShippingMethod!"
end

Instance Attribute Details

#nameObject

The name of the shipping method (string, required).



406
407
408
# File 'lib/google4r/checkout/shared.rb', line 406

def name
  @name
end

#priceObject

The price of the shipping method (Money instance, required).



409
410
411
# File 'lib/google4r/checkout/shared.rb', line 409

def price
  @price
end