Class: CtdDocumentation::AddLicenseResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CtdDocumentation::AddLicenseResponse
- Defined in:
- lib/ctd_documentation/models/add_license_response.rb
Overview
AddLicenseResponse Model.
Instance Attribute Summary collapse
-
#expiration_date ⇒ String
TODO: Write general description for this method.
-
#message ⇒ String
TODO: Write general description for this method.
-
#status ⇒ StatusEnum
TODO: Write general description for this method.
-
#success ⇒ TrueClass|FalseClass
TODO: Write general description for this method.
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(success = nil, message = nil, status = SKIP, expiration_date = SKIP) ⇒ AddLicenseResponse
constructor
A new instance of AddLicenseResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(success = nil, message = nil, status = SKIP, expiration_date = SKIP) ⇒ AddLicenseResponse
Returns a new instance of AddLicenseResponse.
51 52 53 54 55 56 57 58 59 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 51 def initialize(success = nil, = nil, status = SKIP, expiration_date = SKIP) @success = success = @status = status unless status == SKIP @expiration_date = expiration_date unless expiration_date == SKIP end |
Instance Attribute Details
#expiration_date ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 26 def expiration_date @expiration_date end |
#message ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 18 def end |
#status ⇒ StatusEnum
TODO: Write general description for this method
22 23 24 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 22 def status @status end |
#success ⇒ TrueClass|FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 14 def success @success end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. success = hash.key?('success') ? hash['success'] : nil = hash.key?('message') ? hash['message'] : nil status = hash.key?('status') ? hash['status'] : SKIP expiration_date = hash.key?('expiration_date') ? hash['expiration_date'] : SKIP # Create object from extracted values. AddLicenseResponse.new(success, , status, expiration_date) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['success'] = 'success' @_hash['message'] = 'message' @_hash['status'] = 'status' @_hash['expiration_date'] = 'expiration_date' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 |
# File 'lib/ctd_documentation/models/add_license_response.rb', line 39 def self.optionals %w[ status expiration_date ] end |