Sha256: 5d1437137d84806b0b76420f93f81c6aefe2c64f566fea54edbb3e3a8fb82160

Contents?: true

Size: 1.89 KB

Versions: 19

Compression:

Stored size: 1.89 KB

Contents

#
# Author:: Celso Fernandes (<fernandes@zertico.com>)
# © Copyright IBM Corporation 2015.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#

module Fog
  module Softlayer
    class Product

      class Package < Fog::Model

        # A package's internal identifier. Everything regarding a SoftLayer_Product_Package is tied back to this id.
        identity  :id,                           :type => :integer
        
        # A generic description of the processor type and count. This includes HTML, so you may want to strip these tags if you plan to use it.
        attribute :description,         :aliases => 'description', :type => :string

        # This is only needed for step-based order verification. We use this for the order forms, but it is not required. This step is the first SoftLayer_Product_Package_Step for this package. Use this for for filtering which item categories are returned as a part of SoftLayer_Product_Package_Order_Configuration.
        attribute :first_order_step_id,         :aliases => 'firstOrderStepId', :type => :integer

        # If package is active or not
        attribute :is_active,         :aliases => 'isActive', :type => :integer

        # The description of the package. For server packages, this is usually a detailed description of processor type and count.
        attribute :name,         :aliases => 'name', :type => :string

        # This currently contains no information but is here for future use.
        attribute :sub_description,         :aliases => 'subDescription', :type => :string

        # The server unit size this package will match to.
        attribute :unit_size,         :aliases => 'unitSize', :type => :integer

        def initialize(attributes = {})
          super(attributes)
        end
        
        def items
          Fog::Softlayer::Product::Items.new(:service => service, package_id: id).all
        end
      end
    end
  end
end

Version data entries

19 entries across 17 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/models/product/package.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/models/product/package.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.1.4 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.1.3 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.1.2 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.1.1 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.1.0 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.0.3 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.0.2 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.0.1 lib/fog/softlayer/models/product/package.rb
fog-softlayer-1.0.0 lib/fog/softlayer/models/product/package.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.7 lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.6 lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.5 lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.4 lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.3 lib/fog/softlayer/models/product/package.rb
fog-softlayer-0.4.2 lib/fog/softlayer/models/product/package.rb