Class: ShellCardManagementApIs::CreateCardResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CreateCardResponse
- Defined in:
- lib/shell_card_management_ap_is/models/create_card_response.rb
Overview
This entity models the data that is sent in the http response body for this operation.
Instance Attribute Summary collapse
-
#driver_and_vrn ⇒ String
Driver and VRN of the card.
-
#order_card_reference ⇒ Integer
Reference number for each individual card in the order.
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(driver_and_vrn = SKIP, order_card_reference = SKIP) ⇒ CreateCardResponse
constructor
A new instance of CreateCardResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(driver_and_vrn = SKIP, order_card_reference = SKIP) ⇒ CreateCardResponse
Returns a new instance of CreateCardResponse.
45 46 47 48 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 45 def initialize(driver_and_vrn = SKIP, order_card_reference = SKIP) @driver_and_vrn = driver_and_vrn unless driver_and_vrn == SKIP @order_card_reference = order_card_reference unless order_card_reference == SKIP end |
Instance Attribute Details
#driver_and_vrn ⇒ String
Driver and VRN of the card. ;( semicolon) is used as delimiter
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 15 def driver_and_vrn @driver_and_vrn end |
#order_card_reference ⇒ Integer
Reference number for each individual card in the order
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 19 def order_card_reference @order_card_reference end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 51 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. driver_and_vrn = hash.key?('DriverAndVRN') ? hash['DriverAndVRN'] : SKIP order_card_reference = hash.key?('OrderCardReference') ? hash['OrderCardReference'] : SKIP # Create object from extracted values. CreateCardResponse.new(driver_and_vrn, order_card_reference) 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/create_card_response.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['driver_and_vrn'] = 'DriverAndVRN' @_hash['order_card_reference'] = 'OrderCardReference' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 41 42 43 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 38 def self.nullables %w[ driver_and_vrn order_card_reference ] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 33 34 35 |
# File 'lib/shell_card_management_ap_is/models/create_card_response.rb', line 30 def self.optionals %w[ driver_and_vrn order_card_reference ] end |