Class: ApiReference::FetchLicenseByExternalId
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::FetchLicenseByExternalId
- Defined in:
- lib/api_reference/models/fetch_license_by_external_id.rb
Overview
FetchLicenseByExternalId Model.
Instance Attribute Summary collapse
-
#license_type_id ⇒ String
The ID of the license type to fetch the license for.
-
#subscription_id ⇒ String
The ID of the subscription to fetch the license for.
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(subscription_id:, license_type_id:) ⇒ FetchLicenseByExternalId
constructor
A new instance of FetchLicenseByExternalId.
-
#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(subscription_id:, license_type_id:) ⇒ FetchLicenseByExternalId
Returns a new instance of FetchLicenseByExternalId.
38 39 40 41 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 38 def initialize(subscription_id:, license_type_id:) @subscription_id = subscription_id @license_type_id = license_type_id end |
Instance Attribute Details
#license_type_id ⇒ String
The ID of the license type to fetch the license for.
18 19 20 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 18 def license_type_id @license_type_id end |
#subscription_id ⇒ String
The ID of the subscription to fetch the license for.
14 15 16 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 14 def subscription_id @subscription_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 44 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. subscription_id = hash.key?('subscription_id') ? hash['subscription_id'] : nil license_type_id = hash.key?('license_type_id') ? hash['license_type_id'] : nil # Create object from extracted values. FetchLicenseByExternalId.new(subscription_id: subscription_id, license_type_id: license_type_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['subscription_id'] = 'subscription_id' @_hash['license_type_id'] = 'license_type_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 34 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 29 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
66 67 68 69 70 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 66 def inspect class_name = self.class.name.split('::').last "<#{class_name} subscription_id: #{@subscription_id.inspect}, license_type_id:"\ " #{@license_type_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
59 60 61 62 63 |
# File 'lib/api_reference/models/fetch_license_by_external_id.rb', line 59 def to_s class_name = self.class.name.split('::').last "<#{class_name} subscription_id: #{@subscription_id}, license_type_id:"\ " #{@license_type_id}>" end |