January 29, 2016

Classes SoftLayer_Account
Tags invoice

Determining your next bill

Example on how to use getNextInvoiceTotalAmount to retrieve the pre-tax total amount of an account's next invoice measured in US Dollars ($USD)
# SoftLayer library will look to see if these global variables are set when making a connection
# more information here: https://github.com/softlayer/softlayer-ruby/blob/master/lib/softlayer/Config.rb#L11-L58

require 'softlayer_api'
require 'pp'

client = SoftLayer::Client.new

total_amount = client['Account'].getNextInvoiceTotalAmount
puts "Next invoice total amount: #{total_amount}"

Example Output

Next invoice total amount: 250.26


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