Class: GoogleCheckout::OrderCommand
- Defined in:
- lib/google-checkout/command.rb
Overview
Abstract class for all commands associated with an existing order.
Direct Known Subclasses
AddTrackingData, ChargeOrder, DeliverOrder, RefundOrder, SendBuyerMessage
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.
100 101 102 103 104 105 |
# File 'lib/google-checkout/command.rb', line 100 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.
94 95 96 |
# File 'lib/google-checkout/command.rb', line 94 def amount @amount end |
#google_order_number ⇒ Object
Returns the value of attribute google_order_number.
94 95 96 |
# File 'lib/google-checkout/command.rb', line 94 def google_order_number @google_order_number end |