class SpiffyStoresAPI::Order

Public Instance Methods

cancel(options = {}) click to toggle source
# File lib/spiffy_stores_api/resources/order.rb, line 8
def cancel(options = {})
  load_attributes_from_response(post(:cancel, {}, options.to_json))
end
capture(amount = "") click to toggle source
# File lib/spiffy_stores_api/resources/order.rb, line 16
def capture(amount = "")
  Transaction.create(:amount => amount, :kind => "capture", :order_id => id)
end
close() click to toggle source
# File lib/spiffy_stores_api/resources/order.rb, line 5
def close;  load_attributes_from_response(post(:close, {}, only_id)); end
open() click to toggle source
# File lib/spiffy_stores_api/resources/order.rb, line 6
def open;   load_attributes_from_response(post(:open, {}, only_id)); end
transactions() click to toggle source
# File lib/spiffy_stores_api/resources/order.rb, line 12
def transactions
  Transaction.find(:all, :params => { :order_id => id })
end