Module: Markety::Command::GetCustomObject
- Included in:
- Markety::Client
- Defined in:
- lib/markety/command/get_custom_object.rb
Instance Method Summary collapse
- #convert_keys(keys) ⇒ Object
-
#get_custom_object_by_keys(object_type_name, keys) ⇒ Object
keys can be a hash or an array of hashes.
Instance Method Details
#convert_keys(keys) ⇒ Object
10 11 12 13 14 |
# File 'lib/markety/command/get_custom_object.rb', line 10 def convert_keys(keys) keys.map do |key, value| {"attrName" => key, "attrValue" => value} end end |
#get_custom_object_by_keys(object_type_name, keys) ⇒ Object
keys can be a hash or an array of hashes
6 7 8 |
# File 'lib/markety/command/get_custom_object.rb', line 6 def get_custom_object_by_keys(object_type_name, keys) send_request(:get_custom_objects, {"objTypeName" => object_type_name, "customObjKeyList" => {"attribute" => convert_keys(keys)}}) end |