You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/softlayer/VirtualServerUpgradeOrder.rb
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@
4
4
# For licensing information see the LICENSE.md file in the project root.
5
5
#++
6
6
7
-
8
7
moduleSoftLayer
9
8
# This class is used to order changes to a virtual server. Although
10
9
# the class is named "upgrade" this class can also be used for "downgrades"
@@ -35,11 +34,21 @@ class VirtualServerUpgradeOrder
35
34
# will be performed immediately
36
35
attr_accessor:upgrade_at
37
36
37
+
##
38
+
# Create an upgrade order for the virtual server provided.
39
+
#
38
40
definitialize(virtual_server)
39
41
raise"A virtual server must be provided at the time a virtual server order is created"if !virtual_server || !virtual_server.kind_of?(SoftLayer::VirtualServer)
40
42
@virtual_server=virtual_server
41
43
end
42
44
45
+
##
46
+
# Sends the order represented by this object to SoftLayer for validation.
47
+
#
48
+
# If a block is passed to verify, the code will send the order template
49
+
# being constructed to the block before the order is actually sent for
50
+
# validation.
51
+
#
43
52
defverify()
44
53
ifhas_order_items?
45
54
order_object=self.order_object
@@ -49,6 +58,13 @@ def verify()
49
58
end
50
59
end
51
60
61
+
##
62
+
# Places the order represented by this object. This is likely to
63
+
# involve a change to the charges on an account.
64
+
#
65
+
# If a block is passed to this routine, the code will send the order template
66
+
# being constructed to that block before the order is sent
0 commit comments