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.
8 9 10 11 12 13 |
# File 'lib/intacct/functions/read.rb', line 8 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.
6 7 8 |
# File 'lib/intacct/functions/read.rb', line 6 def args @args end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
6 7 8 |
# File 'lib/intacct/functions/read.rb', line 6 def fields @fields end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
6 7 8 |
# File 'lib/intacct/functions/read.rb', line 6 def keys @keys end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/intacct/functions/read.rb', line 6 def object @object end |
Instance Method Details
#to_xml ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/intacct/functions/read.rb', line 15 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 |