Class: Recharge::Product
- Inherits:
-
Object
- Object
- Recharge::Product
- Includes:
- HappyMapper
- Defined in:
- lib/recharge/product.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 = '') ⇒ Product
constructor
A new instance of Product.
- #update(attributes = {}, apiKey = nil) ⇒ Object
Constructor Details
#initialize(id = '') ⇒ Product
Returns a new instance of Product.
14 15 16 |
# File 'lib/recharge/product.rb', line 14 def initialize(id='') @id = id end |
Class Method Details
.create(attributes = {}, apiKey = nil) ⇒ Object
25 26 27 28 |
# File 'lib/recharge/product.rb', line 25 def self.create (attributes = {}, apiKey=nil) responseXML = Recharge::Base.post('products', attributes, apiKey) parse(responseXML.to_s) end |