Class: Intacct::Functions::Read
- Inherits:
-
Object
- Object
- Intacct::Functions::Read
- Defined in:
- lib/intacct/functions/read.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object, keys:, fields:, **args) ⇒ Read
constructor
A new instance of Read.
- #to_xml ⇒ Object
Constructor Details
#initialize(object, keys:, fields:, **args) ⇒ Read
Returns a new instance of Read.
6 7 8 9 10 11 |
# File 'lib/intacct/functions/read.rb', line 6 def initialize(object, keys:, fields:, **args) @object = object @keys = keys @fields = fields @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/intacct/functions/read.rb', line 4 def args @args end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
4 5 6 |
# File 'lib/intacct/functions/read.rb', line 4 def fields @fields end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
4 5 6 |
# File 'lib/intacct/functions/read.rb', line 4 def keys @keys end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/intacct/functions/read.rb', line 4 def object @object end |
Instance Method Details
#to_xml ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/intacct/functions/read.rb', line 13 def to_xml builder = Builder::XmlMarkup.new builder.read do builder.object @object builder.keys keys.join(',') fields_value = @fields.any? ? @fields.join(',') : '*' builder.fields fields_value args.each do |key, value| builder.tag!(key, value) end end end |