Class: IntacctRB::Base

Inherits:
Struct
  • Object
show all
Includes:
Hooks, Hooks::InstanceHooks
Defined in:
lib/intacctrb/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_userObject

Returns the value of attribute current_user

Returns:

  • (Object)

    the current value of current_user



2
3
4
# File 'lib/intacctrb/base.rb', line 2

def current_user
  @current_user
end

#dataObject

Returns the value of attribute data.



14
15
16
# File 'lib/intacctrb/base.rb', line 14

def data
  @data
end

#intacct_actionObject

Returns the value of attribute intacct_action.



14
15
16
# File 'lib/intacctrb/base.rb', line 14

def intacct_action
  @intacct_action
end

#objectObject

Returns the value of attribute object

Returns:

  • (Object)

    the current value of object



2
3
4
# File 'lib/intacctrb/base.rb', line 2

def object
  @object
end

#responseObject

Returns the value of attribute response.



14
15
16
# File 'lib/intacctrb/base.rb', line 14

def response
  @response
end

#sent_xmlObject

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_idObject



25
26
27
# File 'lib/intacctrb/base.rb', line 25

def intacct_id
  object.intacct_id
end