Class: CyberSourceMergedSpec::ReportingV3PurchaseRefundDetailsGet200Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ReportingV3PurchaseRefundDetailsGet200Response
- Defined in:
- lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb
Overview
PurchaseAndRefundDetails
Instance Attribute Summary collapse
-
#authorizations ⇒ Array[Authorization]
List of Authorization Info values.
-
#fee_and_funding_details ⇒ Array[FeeAndFundingDetail]
List of Fee Funding Info values.
-
#limit ⇒ Integer
TODO: Write general description for this method.
-
#offset ⇒ Integer
TODO: Write general description for this method.
-
#others ⇒ Array[Other]
List of Other Info values.
-
#page_results ⇒ Integer
TODO: Write general description for this method.
-
#request_details ⇒ Array[RequestDetail]
List of Request Info values.
-
#settlement_statuses ⇒ Array[SettlementStatus]
List of Settlement Status Info values.
-
#settlements ⇒ Array[Settlement]
List of Settlement Info values.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(offset: SKIP, limit: SKIP, page_results: SKIP, request_details: SKIP, settlements: SKIP, authorizations: SKIP, fee_and_funding_details: SKIP, others: SKIP, settlement_statuses: SKIP, additional_properties: nil) ⇒ ReportingV3PurchaseRefundDetailsGet200Response
constructor
A new instance of ReportingV3PurchaseRefundDetailsGet200Response.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(offset: SKIP, limit: SKIP, page_results: SKIP, request_details: SKIP, settlements: SKIP, authorizations: SKIP, fee_and_funding_details: SKIP, others: SKIP, settlement_statuses: SKIP, additional_properties: nil) ⇒ ReportingV3PurchaseRefundDetailsGet200Response
Returns a new instance of ReportingV3PurchaseRefundDetailsGet200Response.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 83 def initialize(offset: SKIP, limit: SKIP, page_results: SKIP, request_details: SKIP, settlements: SKIP, authorizations: SKIP, fee_and_funding_details: SKIP, others: SKIP, settlement_statuses: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @offset = offset unless offset == SKIP @limit = limit unless limit == SKIP @page_results = page_results unless page_results == SKIP @request_details = request_details unless request_details == SKIP @settlements = settlements unless settlements == SKIP @authorizations = unless == SKIP @fee_and_funding_details = fee_and_funding_details unless fee_and_funding_details == SKIP @others = others unless others == SKIP @settlement_statuses = settlement_statuses unless settlement_statuses == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#authorizations ⇒ Array[Authorization]
List of Authorization Info values
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 34 def @authorizations end |
#fee_and_funding_details ⇒ Array[FeeAndFundingDetail]
List of Fee Funding Info values
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 38 def fee_and_funding_details @fee_and_funding_details end |
#limit ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 18 def limit @limit end |
#offset ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 14 def offset @offset end |
#others ⇒ Array[Other]
List of Other Info values
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 42 def others @others end |
#page_results ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 22 def page_results @page_results end |
#request_details ⇒ Array[RequestDetail]
List of Request Info values
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 26 def request_details @request_details end |
#settlement_statuses ⇒ Array[SettlementStatus]
List of Settlement Status Info values
46 47 48 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 46 def settlement_statuses @settlement_statuses end |
#settlements ⇒ Array[Settlement]
List of Settlement Info values
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 30 def settlements @settlements end |
Class Method Details
.from_element(root) ⇒ Object
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 192 def self.from_element(root) offset = XmlUtilities.from_element(root, 'offset', Integer) limit = XmlUtilities.from_element(root, 'limit', Integer) page_results = XmlUtilities.from_element(root, 'pageResults', Integer) request_details = XmlUtilities.from_element_to_array(root, 'RequestDetail', RequestDetail) settlements = XmlUtilities.from_element_to_array(root, 'Settlement', Settlement) = XmlUtilities.from_element_to_array(root, 'Authorization', Authorization) fee_and_funding_details = XmlUtilities.from_element_to_array( root, 'FeeAndFundingDetail', FeeAndFundingDetail ) others = XmlUtilities.from_element_to_array(root, 'Other', Other) settlement_statuses = XmlUtilities.from_element_to_array( root, 'SettlementStatus', SettlementStatus ) new(offset: offset, limit: limit, page_results: page_results, request_details: request_details, settlements: settlements, authorizations: , fee_and_funding_details: fee_and_funding_details, others: others, settlement_statuses: settlement_statuses, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 104 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. offset = hash.key?('offset') ? hash['offset'] : SKIP limit = hash.key?('limit') ? hash['limit'] : SKIP page_results = hash.key?('pageResults') ? hash['pageResults'] : SKIP # Parameter is an array, so we need to iterate through it request_details = nil unless hash['requestDetails'].nil? request_details = [] hash['requestDetails'].each do |structure| request_details << (RequestDetail.from_hash(structure) if structure) end end request_details = SKIP unless hash.key?('requestDetails') # Parameter is an array, so we need to iterate through it settlements = nil unless hash['settlements'].nil? settlements = [] hash['settlements'].each do |structure| settlements << (Settlement.from_hash(structure) if structure) end end settlements = SKIP unless hash.key?('settlements') # Parameter is an array, so we need to iterate through it = nil unless hash['authorizations'].nil? = [] hash['authorizations'].each do |structure| << (Authorization.from_hash(structure) if structure) end end = SKIP unless hash.key?('authorizations') # Parameter is an array, so we need to iterate through it fee_and_funding_details = nil unless hash['feeAndFundingDetails'].nil? fee_and_funding_details = [] hash['feeAndFundingDetails'].each do |structure| fee_and_funding_details << (FeeAndFundingDetail.from_hash(structure) if structure) end end fee_and_funding_details = SKIP unless hash.key?('feeAndFundingDetails') # Parameter is an array, so we need to iterate through it others = nil unless hash['others'].nil? others = [] hash['others'].each do |structure| others << (Other.from_hash(structure) if structure) end end others = SKIP unless hash.key?('others') # Parameter is an array, so we need to iterate through it settlement_statuses = nil unless hash['settlementStatuses'].nil? settlement_statuses = [] hash['settlementStatuses'].each do |structure| settlement_statuses << (SettlementStatus.from_hash(structure) if structure) end end settlement_statuses = SKIP unless hash.key?('settlementStatuses') # 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. ReportingV3PurchaseRefundDetailsGet200Response.new(offset: offset, limit: limit, page_results: page_results, request_details: request_details, settlements: settlements, authorizations: , fee_and_funding_details: fee_and_funding_details, others: others, settlement_statuses: settlement_statuses, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['offset'] = 'offset' @_hash['limit'] = 'limit' @_hash['page_results'] = 'pageResults' @_hash['request_details'] = 'requestDetails' @_hash['settlements'] = 'settlements' @_hash['authorizations'] = 'authorizations' @_hash['fee_and_funding_details'] = 'feeAndFundingDetails' @_hash['others'] = 'others' @_hash['settlement_statuses'] = 'settlementStatuses' @_hash end |
.nullables ⇒ Object
An array for nullable fields
79 80 81 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 79 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 64 def self.optionals %w[ offset limit page_results request_details settlements authorizations fee_and_funding_details others settlement_statuses ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
256 257 258 259 260 261 262 263 264 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 256 def inspect class_name = self.class.name.split('::').last "<#{class_name} offset: #{@offset.inspect}, limit: #{@limit.inspect}, page_results:"\ " #{@page_results.inspect}, request_details: #{@request_details.inspect}, settlements:"\ " #{@settlements.inspect}, authorizations: #{@authorizations.inspect},"\ " fee_and_funding_details: #{@fee_and_funding_details.inspect}, others: #{@others.inspect},"\ " settlement_statuses: #{@settlement_statuses.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
246 247 248 249 250 251 252 253 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 246 def to_s class_name = self.class.name.split('::').last "<#{class_name} offset: #{@offset}, limit: #{@limit}, page_results: #{@page_results},"\ " request_details: #{@request_details}, settlements: #{@settlements}, authorizations:"\ " #{@authorizations}, fee_and_funding_details: #{@fee_and_funding_details}, others:"\ " #{@others}, settlement_statuses: #{@settlement_statuses}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_purchase_refund_details_get200_response.rb', line 223 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'offset', offset) XmlUtilities.add_as_subelement(doc, root, 'limit', limit) XmlUtilities.add_as_subelement(doc, root, 'pageResults', page_results) XmlUtilities.add_array_as_subelement(doc, root, 'RequestDetail', request_details) XmlUtilities.add_array_as_subelement(doc, root, 'Settlement', settlements) XmlUtilities.add_array_as_subelement(doc, root, 'Authorization', ) XmlUtilities.add_array_as_subelement(doc, root, 'FeeAndFundingDetail', fee_and_funding_details) XmlUtilities.add_array_as_subelement(doc, root, 'Other', others) XmlUtilities.add_array_as_subelement(doc, root, 'SettlementStatus', settlement_statuses) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |