Class: ApiReference::NewLicenseTypeConfiguration

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/api_reference/models/new_license_type_configuration.rb

Overview

NewLicenseTypeConfiguration Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(license_grouping_key: SKIP, license_type_id: SKIP) ⇒ NewLicenseTypeConfiguration

Returns a new instance of NewLicenseTypeConfiguration.



44
45
46
47
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 44

def initialize(license_grouping_key: SKIP, license_type_id: SKIP)
  @license_grouping_key = license_grouping_key unless license_grouping_key == SKIP
  @license_type_id = license_type_id unless license_type_id == SKIP
end

Instance Attribute Details

#license_grouping_keyString

The property used to group this price for licensing

Returns:

  • (String)


14
15
16
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 14

def license_grouping_key
  @license_grouping_key
end

#license_type_idString

The ID of the license type associated with this price.

Returns:

  • (String)


18
19
20
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 18

def license_type_id
  @license_type_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 50

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  license_grouping_key =
    hash.key?('license_grouping_key') ? hash['license_grouping_key'] : SKIP
  license_type_id =
    hash.key?('license_type_id') ? hash['license_type_id'] : SKIP

  # Create object from extracted values.
  NewLicenseTypeConfiguration.new(license_grouping_key: license_grouping_key,
                                  license_type_id: license_type_id)
end

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
26
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 21

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['license_grouping_key'] = 'license_grouping_key'
  @_hash['license_type_id'] = 'license_type_id'
  @_hash
end

.nullablesObject

An array for nullable fields



37
38
39
40
41
42
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 37

def self.nullables
  %w[
    license_grouping_key
    license_type_id
  ]
end

.optionalsObject

An array for optional fields



29
30
31
32
33
34
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 29

def self.optionals
  %w[
    license_grouping_key
    license_type_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



72
73
74
75
76
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 72

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} license_grouping_key: #{@license_grouping_key.inspect}, license_type_id:"\
  " #{@license_type_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



65
66
67
68
69
# File 'lib/api_reference/models/new_license_type_configuration.rb', line 65

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} license_grouping_key: #{@license_grouping_key}, license_type_id:"\
  " #{@license_type_id}>"
end