Class: GoogleCheckout::OrderCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/google-checkout/command.rb

Overview

Abstract class for all commands associated with an existing order.

Direct Known Subclasses

ChargeOrder, DeliverOrder, SendBuyerMessage

Constant Summary

Constants inherited from Command

Command::PRODUCTION_REQUEST_URL, Command::SANDBOX_REQUEST_URL

Instance Attribute Summary collapse

Attributes inherited from Command

#currency, #merchant_id, #merchant_key

Instance Method Summary collapse

Methods inherited from Command

#post, #url, x509_store

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

#amountObject

Returns the value of attribute amount.



98
99
100
# File 'lib/google-checkout/command.rb', line 98

def amount
  @amount
end

#google_order_numberObject

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