Class: Recharge::Charge
- Inherits:
-
Object
- Object
- Recharge::Charge
- Includes:
- HappyMapper
- Defined in:
- lib/recharge/charge.rb
Class Method Summary collapse
- .create(attributes = {}, apiKey = nil) ⇒ Object
- .find(id, apiKey = nil) ⇒ Object
- .find_all(apiKey = nil) ⇒ Object
Instance Method Summary collapse
- #destroy(apiKey = nil) ⇒ Object
-
#initialize(id = '') ⇒ Charge
constructor
A new instance of Charge.
- #update(attributes = {}, apiKey = nil) ⇒ Object
Constructor Details
#initialize(id = '') ⇒ Charge
Returns a new instance of Charge.
22 23 24 |
# File 'lib/recharge/charge.rb', line 22 def initialize(id='') @id = id end |
Class Method Details
.create(attributes = {}, apiKey = nil) ⇒ Object
33 34 35 36 |
# File 'lib/recharge/charge.rb', line 33 def self.create (attributes = {}, apiKey=nil) responseXML = Recharge::Base.post('charges', attributes, apiKey) parse(responseXML.to_s) end |