Class: Recharge::Customer
- Inherits:
-
Object
- Object
- Recharge::Customer
- Includes:
- HappyMapper
- Defined in:
- lib/recharge/customer.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 = '') ⇒ Customer
constructor
A new instance of Customer.
- #update(attributes = {}, apiKey = nil) ⇒ Object
Constructor Details
#initialize(id = '') ⇒ Customer
Returns a new instance of Customer.
30 31 32 |
# File 'lib/recharge/customer.rb', line 30 def initialize(id='') @id = id end |
Class Method Details
.create(attributes = {}, apiKey = nil) ⇒ Object
41 42 43 44 |
# File 'lib/recharge/customer.rb', line 41 def self.create (attributes = {}, apiKey=nil) responseXML = Recharge::Base.post('customers', attributes, apiKey) parse(responseXML.to_s) end |