55#++
66
77module SoftLayer
8- class Ticket < SoftLayer ::ModelBase
8+ class Ticket < SoftLayer ::ModelBase
99
1010 ##
1111 # :attr_reader:
@@ -35,12 +35,12 @@ def server_admin_ticket?
3535 self [ 'serverAdministrationFlag' ] != 0
3636 end
3737
38- ##
39- # Add an update to this ticket.
40- #
41- def update ( body = nil )
42- self . service . edit ( self . softlayer_hash , body )
43- end
38+ ##
39+ # Add an update to this ticket.
40+ #
41+ def update ( body = nil )
42+ self . service . edit ( self . softlayer_hash , body )
43+ end
4444
4545 ##
4646 # Override of service from ModelBase. Returns the SoftLayer_Ticket service
@@ -52,7 +52,7 @@ def service
5252 ##
5353 # Override from model base. Requests new details about the ticket
5454 # from the server.
55- def softlayer_properties ( object_mask = nil )
55+ def softlayer_properties ( object_mask = nil )
5656 my_service = self . service
5757
5858 if ( object_mask )
@@ -62,12 +62,12 @@ def softlayer_properties(object_mask = nil)
6262 end
6363
6464 my_service . getObject ( )
65- end
65+ end
6666
6767 ##
6868 # Returns the default object mask,as a hash, that is used when
6969 # retrieving ticket information from the SoftLayer server.
70- def self . default_object_mask
70+ def self . default_object_mask
7171 {
7272 "mask" => [
7373 'id' , # This is an internal ticket ID, not the one usually seen in the portal
@@ -84,23 +84,23 @@ def self.default_object_mask
8484 'serverAdministrationFlag' , # This comes in from the server as an integer :-(
8585 ]
8686 } . to_sl_object_mask
87- end
87+ end
8888
8989 ##
9090 # Queries the SoftLayer API to retrieve a list of the valid
9191 # ticket subjects.
92- def self . ticket_subjects ( client = nil )
93- @ticket_subjects ||= nil
92+ def self . ticket_subjects ( client = nil )
93+ @ticket_subjects ||= nil
9494
95- if !@ticket_subjects
95+ if !@ticket_subjects
9696 softlayer_client = client || Client . default_client
9797 raise "#{ __method__ } requires a client but none was given and Client::default_client is not set" if !softlayer_client
9898
99- @ticket_subjects = softlayer_client [ :Ticket_Subject ] . getAllObjects ( ) ;
100- end
99+ @ticket_subjects = softlayer_client [ :Ticket_Subject ] . getAllObjects ( ) ;
100+ end
101101
102- @ticket_subjects
103- end
102+ @ticket_subjects
103+ end
104104
105105 ##
106106 # Find the ticket with the given ID and return it
@@ -112,7 +112,7 @@ def self.ticket_subjects(client = nil)
112112 # If a client is not provided then the routine will search Client::default_client
113113 # If Client::default_client is also nil the routine will raise an error.
114114 #
115- def self . ticket_with_id ( ticket_id , options = { } )
115+ def self . ticket_with_id ( ticket_id , options = { } )
116116 softlayer_client = options [ :client ] || Client . default_client
117117 raise "#{ __method__ } requires a client but none was given and Client::default_client is not set" if !softlayer_client
118118
@@ -167,5 +167,5 @@ def self.create_standard_ticket(options = {})
167167 ticket_data = softlayer_client [ :Ticket ] . createStandardTicket ( new_ticket , body )
168168 return new ( softlayer_client , ticket_data )
169169 end
170- end
171- end
170+ end
171+ end
0 commit comments