Skip to content

Accessing _info metadata from service ticket #3

@bartbunting

Description

@bartbunting

Hi,

I am trying to access the values in the _info metadata of a service ticket.

This appears not to be possible currentlyunless I'm missing something.

The values show up in the debug output when the ticket is retrieved:

"_info":{"lastUpdated":"2018-03-04T12:22:10Z","updatedBy":"bart","

When I try and access via the _info metadata object they do not exist.

error: undefined method `last_updated' for #<ConnectWise::Metadata:0x00007f94bddfac10>

The code is:

puts "Last updated: #{t._info.last_updated}"

Looking at the metadata.rb model there appear to be no accessors defined for any of the values that show up in the debug.

Is it a case of simply defining these?

I'm sorry I don't understand how the classes are generated.

Happy to make a patch if it is as simple as defining the missing data.

Any advice welcome.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions