Class: VisaAcceptanceMergedSpec::PtsV1TransactionBatchesGet200Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PtsV1TransactionBatchesGet200Response
- Defined in:
- lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb
Overview
PtsV1TransactionBatchesGet200Response Model.
Instance Attribute Summary collapse
-
#links ⇒ Links13
TODO: Write general description for this method.
-
#submit_time_utc ⇒ String
Time of request in UTC.
-
#transaction_batches ⇒ Array[TransactionBatch]
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(transaction_batches: SKIP, links: SKIP, submit_time_utc: SKIP, additional_properties: nil) ⇒ PtsV1TransactionBatchesGet200Response
constructor
A new instance of PtsV1TransactionBatchesGet200Response.
-
#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(transaction_batches: SKIP, links: SKIP, submit_time_utc: SKIP, additional_properties: nil) ⇒ PtsV1TransactionBatchesGet200Response
Returns a new instance of PtsV1TransactionBatchesGet200Response.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 51 def initialize(transaction_batches: SKIP, links: SKIP, submit_time_utc: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @transaction_batches = transaction_batches unless transaction_batches == SKIP @links = links unless links == SKIP @submit_time_utc = submit_time_utc unless submit_time_utc == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#links ⇒ Links13
TODO: Write general description for this method
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 18 def links @links end |
#submit_time_utc ⇒ String
Time of request in UTC. Format: YYYY-MM-DDThh:mm:ssZ
Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57
(10:47:57 p.m.).
The T separates the date and the time. The Z indicates UTC.
Returned by Visa Acceptance for all services.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 26 def submit_time_utc @submit_time_utc end |
#transaction_batches ⇒ Array[TransactionBatch]
TODO: Write general description for this method
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 14 def transaction_batches @transaction_batches end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 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 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 63 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 transaction_batches = nil unless hash['transactionBatches'].nil? transaction_batches = [] hash['transactionBatches'].each do |structure| transaction_batches << (TransactionBatch.from_hash(structure) if structure) end end transaction_batches = SKIP unless hash.key?('transactionBatches') links = Links13.from_hash(hash['_links']) if hash['_links'] submit_time_utc = hash.key?('submitTimeUtc') ? hash['submitTimeUtc'] : SKIP # 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. PtsV1TransactionBatchesGet200Response.new(transaction_batches: transaction_batches, links: links, submit_time_utc: submit_time_utc, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['transaction_batches'] = 'transactionBatches' @_hash['links'] = '_links' @_hash['submit_time_utc'] = 'submitTimeUtc' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 44 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 38 def self.optionals %w[ transaction_batches links submit_time_utc ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
103 104 105 106 107 108 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 103 def inspect class_name = self.class.name.split('::').last "<#{class_name} transaction_batches: #{@transaction_batches.inspect}, links:"\ " #{@links.inspect}, submit_time_utc: #{@submit_time_utc.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
96 97 98 99 100 |
# File 'lib/visa_acceptance_merged_spec/models/pts_v1_transaction_batches_get200_response.rb', line 96 def to_s class_name = self.class.name.split('::').last "<#{class_name} transaction_batches: #{@transaction_batches}, links: #{@links},"\ " submit_time_utc: #{@submit_time_utc}, additional_properties: #{@additional_properties}>" end |