Class: VisaAcceptanceMergedSpec::PtsV1TransactionBatchesIdGet200Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PtsV1TransactionBatchesIdGet200Response
- Defined in:
- lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb
Overview
PtsV1TransactionBatchesIdGet200Response Model.
Instance Attribute Summary collapse
-
#accepted_transaction_count ⇒ Integer
Number of transactions accepted.
-
#completion_date ⇒ String
The date when the batch template processing completed.
-
#id ⇒ String
Unique identifier assigned to the batch file.
-
#links ⇒ Links14
The status of you batch template processing.
-
#rejected_transaction_count ⇒ String
Number of transactions rejected.
-
#status ⇒ String
The status of you batch template processing.
-
#transaction_count ⇒ Integer
Number of transactions in the transaction.
-
#upload_date ⇒ String
Date when the batch template was update.
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(id: SKIP, upload_date: SKIP, completion_date: SKIP, transaction_count: SKIP, accepted_transaction_count: SKIP, rejected_transaction_count: SKIP, status: SKIP, links: SKIP, additional_properties: nil) ⇒ PtsV1TransactionBatchesIdGet200Response
constructor
A new instance of PtsV1TransactionBatchesIdGet200Response.
-
#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(id: SKIP, upload_date: SKIP, completion_date: SKIP, transaction_count: SKIP, accepted_transaction_count: SKIP, rejected_transaction_count: SKIP, status: SKIP, links: SKIP, additional_properties: nil) ⇒ PtsV1TransactionBatchesIdGet200Response
Returns a new instance of PtsV1TransactionBatchesIdGet200Response.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 77 def initialize(id: SKIP, upload_date: SKIP, completion_date: SKIP, transaction_count: SKIP, accepted_transaction_count: SKIP, rejected_transaction_count: SKIP, status: SKIP, links: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @upload_date = upload_date unless upload_date == SKIP @completion_date = completion_date unless completion_date == SKIP @transaction_count = transaction_count unless transaction_count == SKIP unless accepted_transaction_count == SKIP @accepted_transaction_count = accepted_transaction_count end unless rejected_transaction_count == SKIP @rejected_transaction_count = rejected_transaction_count end @status = status unless status == SKIP @links = links unless links == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#accepted_transaction_count ⇒ Integer
Number of transactions accepted.
30 31 32 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 30 def accepted_transaction_count @accepted_transaction_count end |
#completion_date ⇒ String
The date when the batch template processing completed.
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 22 def completion_date @completion_date end |
#id ⇒ String
Unique identifier assigned to the batch file.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 14 def id @id end |
#links ⇒ Links14
The status of you batch template processing.
42 43 44 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 42 def links @links end |
#rejected_transaction_count ⇒ String
Number of transactions rejected.
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 34 def rejected_transaction_count @rejected_transaction_count end |
#status ⇒ String
The status of you batch template processing.
38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 38 def status @status end |
#transaction_count ⇒ Integer
Number of transactions in the transaction.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 26 def transaction_count @transaction_count end |
#upload_date ⇒ String
Date when the batch template was update.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 18 def upload_date @upload_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 102 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP upload_date = hash.key?('uploadDate') ? hash['uploadDate'] : SKIP completion_date = hash.key?('completionDate') ? hash['completionDate'] : SKIP transaction_count = hash.key?('transactionCount') ? hash['transactionCount'] : SKIP accepted_transaction_count = hash.key?('acceptedTransactionCount') ? hash['acceptedTransactionCount'] : SKIP rejected_transaction_count = hash.key?('rejectedTransactionCount') ? hash['rejectedTransactionCount'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP links = Links14.from_hash(hash['_links']) if hash['_links'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. PtsV1TransactionBatchesIdGet200Response.new(id: id, upload_date: upload_date, completion_date: completion_date, transaction_count: transaction_count, accepted_transaction_count: accepted_transaction_count, rejected_transaction_count: rejected_transaction_count, status: status, links: links, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['upload_date'] = 'uploadDate' @_hash['completion_date'] = 'completionDate' @_hash['transaction_count'] = 'transactionCount' @_hash['accepted_transaction_count'] = 'acceptedTransactionCount' @_hash['rejected_transaction_count'] = 'rejectedTransactionCount' @_hash['status'] = 'status' @_hash['links'] = '_links' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 73 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 59 def self.optionals %w[ id upload_date completion_date transaction_count accepted_transaction_count rejected_transaction_count status links ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
149 150 151 152 153 154 155 156 157 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 149 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, upload_date: #{@upload_date.inspect}, completion_date:"\ " #{@completion_date.inspect}, transaction_count: #{@transaction_count.inspect},"\ " accepted_transaction_count: #{@accepted_transaction_count.inspect},"\ " rejected_transaction_count: #{@rejected_transaction_count.inspect}, status:"\ " #{@status.inspect}, links: #{@links.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
139 140 141 142 143 144 145 146 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_id_get200_response.rb', line 139 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, upload_date: #{@upload_date}, completion_date:"\ " #{@completion_date}, transaction_count: #{@transaction_count}, accepted_transaction_count:"\ " #{@accepted_transaction_count}, rejected_transaction_count:"\ " #{@rejected_transaction_count}, status: #{@status}, links: #{@links},"\ " additional_properties: #{@additional_properties}>" end |