Class: ShellCardManagementApIs::ProductAllOf0
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::ProductAllOf0
- Defined in:
- lib/shell_card_management_ap_is/models/product_all_of0.rb
Overview
ProductAllOf0 Model.
Instance Attribute Summary collapse
-
#description ⇒ String
The description returned by the Gateway API.
-
#global_product_code ⇒ String
The productCode returned by the Gateway API.
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(global_product_code = nil, description = nil) ⇒ ProductAllOf0
constructor
A new instance of ProductAllOf0.
-
#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(global_product_code = nil, description = nil) ⇒ ProductAllOf0
Returns a new instance of ProductAllOf0.
42 43 44 45 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 42 def initialize(global_product_code = nil, description = nil) @global_product_code = global_product_code @description = description end |
Instance Attribute Details
#description ⇒ String
The description returned by the Gateway API.
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 19 def description @description end |
#global_product_code ⇒ String
The productCode returned by the Gateway API. Example: 021
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 15 def global_product_code @global_product_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. global_product_code = hash.key?('GlobalProductCode') ? hash['GlobalProductCode'] : nil description = hash.key?('Description') ? hash['Description'] : nil # Create object from extracted values. ProductAllOf0.new(global_product_code, description) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 27 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['global_product_code'] = 'GlobalProductCode' @_hash['description'] = 'Description' @_hash end |
.nullables ⇒ Object
An array for nullable fields
35 36 37 38 39 40 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 35 def self.nullables %w[ global_product_code description ] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 30 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
69 70 71 72 73 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 69 def inspect class_name = self.class.name.split('::').last "<#{class_name} global_product_code: #{@global_product_code.inspect}, description:"\ " #{@description.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 66 |
# File 'lib/shell_card_management_ap_is/models/product_all_of0.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} global_product_code: #{@global_product_code}, description:"\ " #{@description}>" end |