Class: Kaui::Charge
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Charge
constructor
A new instance of Charge.
Methods inherited from Base
#==, all, #attributes=, camelize, convert_hash_keys, count, define_attr, #destroy, find, from_json, has_many, has_one, human_attribute_name, lookup_ancestors, #new_record?, #persisted?, #read_attribute_for_validation, #save, #to_hash, to_money, #to_param, #update_attributes
Constructor Details
#initialize(data = {}) ⇒ Charge
Returns a new instance of Charge.
8 9 10 11 12 13 |
# File 'app/models/kaui/charge.rb', line 8 def initialize(data = {}) super(:account_id => data['accountId'] || data['account_id'], :invoice_id => data['invoiceId'] || data['invoice_id'], :amount => data['amount'], :description => data['description']) end |