Class: ApiReference::DeactivateLicense
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::DeactivateLicense
- Defined in:
- lib/api_reference/models/deactivate_license.rb
Overview
DeactivateLicense Model.
Instance Attribute Summary collapse
-
#end_date ⇒ Date
The date to deactivate the license.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(end_date: SKIP) ⇒ DeactivateLicense
constructor
A new instance of DeactivateLicense.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(end_date: SKIP) ⇒ DeactivateLicense
Returns a new instance of DeactivateLicense.
38 39 40 |
# File 'lib/api_reference/models/deactivate_license.rb', line 38 def initialize(end_date: SKIP) @end_date = end_date unless end_date == SKIP end |
Instance Attribute Details
#end_date ⇒ Date
The date to deactivate the license. If not provided, defaults to end of day today in the customer's timezone.
15 16 17 |
# File 'lib/api_reference/models/deactivate_license.rb', line 15 def end_date @end_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
43 44 45 46 47 48 49 50 51 |
# File 'lib/api_reference/models/deactivate_license.rb', line 43 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. end_date = hash.key?('end_date') ? hash['end_date'] : SKIP # Create object from extracted values. DeactivateLicense.new(end_date: end_date) end |
.names ⇒ Object
A mapping from model property names to API property names.
18 19 20 21 22 |
# File 'lib/api_reference/models/deactivate_license.rb', line 18 def self.names @_hash = {} if @_hash.nil? @_hash['end_date'] = 'end_date' @_hash end |
.nullables ⇒ Object
An array for nullable fields
32 33 34 35 36 |
# File 'lib/api_reference/models/deactivate_license.rb', line 32 def self.nullables %w[ end_date ] end |
.optionals ⇒ Object
An array for optional fields
25 26 27 28 29 |
# File 'lib/api_reference/models/deactivate_license.rb', line 25 def self.optionals %w[ end_date ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
60 61 62 63 |
# File 'lib/api_reference/models/deactivate_license.rb', line 60 def inspect class_name = self.class.name.split('::').last "<#{class_name} end_date: #{@end_date.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
54 55 56 57 |
# File 'lib/api_reference/models/deactivate_license.rb', line 54 def to_s class_name = self.class.name.split('::').last "<#{class_name} end_date: #{@end_date}>" end |