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.
Methods inherited from BaseModel
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 |