Class: IntacctRB::Base
- Includes:
- Hooks, Hooks::InstanceHooks
- Defined in:
- lib/intacctrb/base.rb
Direct Known Subclasses
APPayment, APPaymentRequest, Account, Attachment, Bill, Contact, Customer, Employee, Invoice, JournalEntry, Vendor
Instance Attribute Summary collapse
-
#current_user ⇒ Object
Returns the value of attribute current_user.
-
#data ⇒ Object
Returns the value of attribute data.
-
#intacct_action ⇒ Object
Returns the value of attribute intacct_action.
-
#object ⇒ Object
Returns the value of attribute object.
-
#response ⇒ Object
Returns the value of attribute response.
-
#sent_xml ⇒ Object
Returns the value of attribute sent_xml.
Instance Method Summary collapse
-
#initialize(*params) ⇒ Base
constructor
A new instance of Base.
- #intacct_id ⇒ Object
Constructor Details
#initialize(*params) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 22 23 |
# File 'lib/intacctrb/base.rb', line 16 def initialize *params if params[0].is_a? Hash json_data = params[0].to_json params[0] = JSON.parse(json_data, object_class: OpenStruct) end params[0] ||= OpenStruct.new() super(*params) end |
Instance Attribute Details
#current_user ⇒ Object
Returns the value of attribute current_user
2 3 4 |
# File 'lib/intacctrb/base.rb', line 2 def current_user @current_user end |
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/intacctrb/base.rb', line 14 def data @data end |
#intacct_action ⇒ Object
Returns the value of attribute intacct_action.
14 15 16 |
# File 'lib/intacctrb/base.rb', line 14 def intacct_action @intacct_action end |
#object ⇒ Object
Returns the value of attribute object
2 3 4 |
# File 'lib/intacctrb/base.rb', line 2 def object @object end |
#response ⇒ Object
Returns the value of attribute response.
14 15 16 |
# File 'lib/intacctrb/base.rb', line 14 def response @response end |
#sent_xml ⇒ Object
Returns the value of attribute sent_xml.
14 15 16 |
# File 'lib/intacctrb/base.rb', line 14 def sent_xml @sent_xml end |
Instance Method Details
#intacct_id ⇒ Object
25 26 27 |
# File 'lib/intacctrb/base.rb', line 25 def intacct_id object.intacct_id end |