Class: GoogleCheckout::Shipping::Pickup
- Defined in:
- lib/google-checkout/shipping/pickup.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(name, price = '0.00', currency = 'USD') ⇒ Pickup
constructor
A new instance of Pickup.
- #to_xml ⇒ Object
Constructor Details
#initialize(name, price = '0.00', currency = 'USD') ⇒ Pickup
Returns a new instance of Pickup.
7 8 9 10 11 |
# File 'lib/google-checkout/shipping/pickup.rb', line 7 def initialize(name, price = '0.00', currency = 'USD') @name = name @price = price @currency = currency end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/google-checkout/shipping/pickup.rb', line 5 def currency @currency end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/google-checkout/shipping/pickup.rb', line 5 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
5 6 7 |
# File 'lib/google-checkout/shipping/pickup.rb', line 5 def price @price end |
Instance Method Details
#to_xml ⇒ Object
13 14 15 16 17 18 |
# File 'lib/google-checkout/shipping/pickup.rb', line 13 def to_xml xml = Builder::XmlMarkup.new xml.tag!('pickup', :name => name) do xml.tag!('price', price, :currency => currency) end end |