Sha256: d67d38eb71973d6564ee4a5de8ef68a5318c124b54cb0148b2456209a5981006
Contents?: true
Size: 524 Bytes
Versions: 11
Compression:
Stored size: 524 Bytes
Contents
module Seko class Dispatch def self.line_items(response) response.root_response["List"]["DispatchLineItem"] end # returns array of GUIDs def self.parse(response) dispatches = line_items(response) # API is flawed and returns an array if multiple dispatches if dispatches.is_a?(Array) dispatches.collect { |h| h["GUID"] } else # and a singular object otherwise # so we wrap it as an array Array(dispatches["GUID"]) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems