Class: Kaui::Charge

Inherits:
Base
  • Object
show all
Defined in:
app/models/kaui/charge.rb

Instance Attribute Summary

Attributes inherited from Base

#errors

Instance Method Summary collapse

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