November 28, 2015

Place quote order

Retrieve an order object from a quote and place an order based on it
require 'softlayer_api'

# Credentials to the SoftLayer API are grabbed from the config file by default.
# See
client =

QUOTE_ID = 1234

quote = client['Billing_Order_Quote'].object_with_id(QUOTE_ID)
order = quote.getRecalculatedOrderContainer['orderContainers'][0]

order['quantity'] = 1
order['virtualGuests'] = [{ 'hostname' => 'quotetest', 'domain' => '' }]

pp client['Product_Order'].placeOrder(order)


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue