September 1, 2016

Find standard location pricing for a package
Use an object filter to only return the Standard Location pricing for a SoftLayer package. This is a priceItemId that is standard accross all SoftLayer Datacenters

require 'softlayer_api'
require 'pp'

client = => 120)

object_filter = do |object_filter|
  object_filter.accept('items.prices.locationGroupId').when_it is_null

location = client['SoftLayer_Product_Package']
result = location.object_with_id(46).object_filter(object_filter).getItems

pp result


We would love to hear it
Open an issue