Class: GoogleCheckout::OrderCommand
- Defined in:
- lib/google-checkout/command.rb
Overview
Abstract class for all commands associated with an existing order.
Direct Known Subclasses
Constant Summary
Constants inherited from Command
Command::PRODUCTION_REQUEST_URL, Command::SANDBOX_REQUEST_URL
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#google_order_number ⇒ Object
Returns the value of attribute google_order_number.
Attributes inherited from Command
#currency, #merchant_id, #merchant_key
Instance Method Summary collapse
-
#initialize(merchant_id, merchant_key, google_order_number) ⇒ OrderCommand
constructor
Make a new object.
Methods inherited from Command
Constructor Details
#initialize(merchant_id, merchant_key, google_order_number) ⇒ OrderCommand
Make a new object. Last argument is the Google’s order number as received in the NewOrderNotification.
104 105 106 107 108 109 |
# File 'lib/google-checkout/command.rb', line 104 def initialize(merchant_id, merchant_key, google_order_number) # TODO raise "Not an order number!" unless google_order_number.is_a? String super(merchant_id, merchant_key) @google_order_number = google_order_number @amount = 0.00 end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
98 99 100 |
# File 'lib/google-checkout/command.rb', line 98 def amount @amount end |
#google_order_number ⇒ Object
Returns the value of attribute google_order_number.
98 99 100 |
# File 'lib/google-checkout/command.rb', line 98 def google_order_number @google_order_number end |