@@ -10,16 +10,22 @@ module SoftLayer
1010 # the product order is the price_id, the rest of the information is provided
1111 # to make the object friendly to humans who may be searching for the
1212 # meaning of a given price_id.
13- class ProductConfigurationOption < Struct . new ( :capacity , :capacityRestrictionMaximum , :capacityRestrictionMinimum ,
14- :capacityRestrictionType , :description , :hourlyRecurringFee , :laborFee , :oneTimeFee , :price_id , :recurringFee ,
15- :requiredCoreCount , :setupFee , :units )
13+ #
14+ # DEPRECATION WARNING: The following configuration option keys have been deprecated and
15+ # will be removed with the next major version: capacityRestrictionMaximum, capacityRestrictionMinimum,
16+ # capacityRestrictionType, hourlyRecurringFee, laborFee, oneTimeFee, recurringFee, requiredCoreCount, setupFee
17+ class ProductConfigurationOption < Struct . new ( :capacity , :capacityRestrictionMaximum , :capicity_restriction_maximum ,
18+ :capacityRestrictionMinimum , :capacity_restriction_minimum , :capacityRestrictionType , :capacity_restriction_type ,
19+ :description , :hourlyRecurringFee , :hourly_recurring_fee , :laborFee , :labor_fee , :oneTimeFee , :one_time_fee ,
20+ :price_id , :recurringFee , :recurring_fee , :requiredCoreCount , :required_core_count , :setupFee , :setup_fee , :units )
1621 # Is it evil, or just incongruous to give methods to a struct?
1722
1823 def initialize ( package_item_data , price_item_data )
1924 self . capacity = package_item_data [ 'capacity' ]
2025 self . description = package_item_data [ 'description' ]
2126 self . units = package_item_data [ 'units' ]
2227
28+ #DEPRECATION WARNING: All these are deprecated and will be removed with the next major version, pleace use keys below
2329 self . capacityRestrictionMaximum = price_item_data [ 'capacityRestrictionMaximum' ] ? price_item_data [ 'capacityRestrictionMaximum' ] : nil
2430 self . capacityRestrictionMinimum = price_item_data [ 'capacityRestrictionMinimum' ] ? price_item_data [ 'capacityRestrictionMinimum' ] : nil
2531 self . capacityRestrictionType = price_item_data [ 'capacityRestrictionType' ] ? price_item_data [ 'capacityRestrictionType' ] : nil
@@ -30,6 +36,16 @@ def initialize(package_item_data, price_item_data)
3036 self . recurringFee = price_item_data [ 'recurringFee' ] ? price_item_data [ 'recurringFee' ] . to_f : 0.0
3137 self . requiredCoreCount = price_item_data [ 'requiredCoreCount' ] ? price_item_data [ 'requiredCoreCount' ] : nil
3238 self . setupFee = price_item_data [ 'setupFee' ] ? price_item_data [ 'setupFee' ] . to_f : 0.0
39+
40+ self . capacity_restriction_maximum = price_item_data [ 'capacityRestrictionMaximum' ] ? price_item_data [ 'capacityRestrictionMaximum' ] : nil
41+ self . capacity_restriction_minimum = price_item_data [ 'capacityRestrictionMinimum' ] ? price_item_data [ 'capacityRestrictionMinimum' ] : nil
42+ self . capacity_restriction_type = price_item_data [ 'capacityRestrictionType' ] ? price_item_data [ 'capacityRestrictionType' ] : nil
43+ self . hourly_recurring_fee = price_item_data [ 'hourlyRecurringFee' ] ? price_item_data [ 'hourlyRecurringFee' ] . to_f : 0.0
44+ self . labor_fee = price_item_data [ 'laborFee' ] ? price_item_data [ 'laborFee' ] . to_f : 0.0
45+ self . one_time_fee = price_item_data [ 'oneTimeFee' ] ? price_item_data [ 'oneTimeFee' ] . to_f : 0.0
46+ self . recurring_fee = price_item_data [ 'recurringFee' ] ? price_item_data [ 'recurringFee' ] . to_f : 0.0
47+ self . required_core_count = price_item_data [ 'requiredCoreCount' ] ? price_item_data [ 'requiredCoreCount' ] : nil
48+ self . setup_fee = price_item_data [ 'setupFee' ] ? price_item_data [ 'setupFee' ] . to_f : 0.0
3349 end
3450
3551 # returns true if the configuration option has no fees associated with it.
@@ -51,10 +67,19 @@ def free?
5167 class ProductItemCategory < ModelBase
5268 include ::SoftLayer ::DynamicAttribute
5369
70+ ##
71+ # :attr_reader: category_code
72+ # The categoryCode is a primary identifier for a particular
73+ # category. It is a string like 'os' or 'ram'
74+ sl_attr :category_code , 'categoryCode'
75+
5476 ##
5577 # :attr_reader:
5678 # The categoryCode is a primary identifier for a particular
5779 # category. It is a string like 'os' or 'ram'
80+ #
81+ # DEPRECATION WARNING: This attribute is deprecated in favor of category_code
82+ # and will be removed in the next major release.
5883 sl_attr :categoryCode
5984
6085 ##
0 commit comments