Skip to content

Where to get ids for location, prices to order storages? #178

@ematpoc

Description

@ematpoc

Hi,
I want to create an app to order storages. Looking at the example here https://sldn.softlayer.com/go/order_endurance_storage.go/:

//To get the list of valid prices for the package use the SoftLayer_Product_Package:getItemPrices method
prices := []datatypes.Product_Item_Price {
		{ Id: sl.Int(45098) },  // Block Storage
		{ Id: sl.Int(45058) },  // Endurance Storage
		{ Id: sl.Int(45148) },  // 40 GB Storage Space
		{ Id: sl.Int(45068) },  // 0.25 IOPS per GB
	}

Where those ids are taken from? How to get Ids for File Storage, Performance Storage, different Storage Spaces, Iops and locations, etc?
I was trying to call getItemPrices hoping that it gives me list of prices but it looks like I do it wrong:

svc := services.GetProductPackageService(sess)
pricing, err := svc.GetItemPrices()

but I got this:
SoftLayer_Exception: Object does not exist to execute method on. (SoftLayer_Product_Package::getItemPrices) (HTTP 200)

Could you help out?
BR

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions