Class: ShellDataReportingApIs::TransactionExceptionsResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::TransactionExceptionsResponse
- Defined in:
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb
Overview
TransactionExceptionsResponse Model.
Instance Attribute Summary collapse
-
#card_exceptions ⇒ Array[CardExceptions]
TODO: Write general description for this method.
-
#error ⇒ ErrorStatus
TODO: Write general description for this method.
-
#request_id ⇒ String
API Request Id.
-
#transaction_exceptions ⇒ Array[TransactionExceptions]
TODO: Write general description for this method.
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(card_exceptions = SKIP, transaction_exceptions = SKIP, error = SKIP, request_id = SKIP) ⇒ TransactionExceptionsResponse
constructor
A new instance of TransactionExceptionsResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(card_exceptions = SKIP, transaction_exceptions = SKIP, error = SKIP, request_id = SKIP) ⇒ TransactionExceptionsResponse
Returns a new instance of TransactionExceptionsResponse.
55 56 57 58 59 60 61 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 55 def initialize(card_exceptions = SKIP, transaction_exceptions = SKIP, error = SKIP, request_id = SKIP) @card_exceptions = card_exceptions unless card_exceptions == SKIP @transaction_exceptions = transaction_exceptions unless transaction_exceptions == SKIP @error = error unless error == SKIP @request_id = request_id unless request_id == SKIP end |
Instance Attribute Details
#card_exceptions ⇒ Array[CardExceptions]
TODO: Write general description for this method
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 14 def card_exceptions @card_exceptions end |
#error ⇒ ErrorStatus
TODO: Write general description for this method
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 22 def error @error end |
#request_id ⇒ String
API Request Id
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 26 def request_id @request_id end |
#transaction_exceptions ⇒ Array[TransactionExceptions]
TODO: Write general description for this method
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 18 def transaction_exceptions @transaction_exceptions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it card_exceptions = nil unless hash['CardExceptions'].nil? card_exceptions = [] hash['CardExceptions'].each do |structure| card_exceptions << (CardExceptions.from_hash(structure) if structure) end end card_exceptions = SKIP unless hash.key?('CardExceptions') # Parameter is an array, so we need to iterate through it transaction_exceptions = nil unless hash['TransactionExceptions'].nil? transaction_exceptions = [] hash['TransactionExceptions'].each do |structure| transaction_exceptions << (TransactionExceptions.from_hash(structure) if structure) end end transaction_exceptions = SKIP unless hash.key?('TransactionExceptions') error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP # Create object from extracted values. TransactionExceptionsResponse.new(card_exceptions, transaction_exceptions, error, request_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['card_exceptions'] = 'CardExceptions' @_hash['transaction_exceptions'] = 'TransactionExceptions' @_hash['error'] = 'Error' @_hash['request_id'] = 'RequestId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 52 53 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 49 def self.nullables %w[ transaction_exceptions ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb', line 39 def self.optionals %w[ card_exceptions transaction_exceptions error request_id ] end |