Class: CyberSourceMergedSpec::ReportingV3ReportsIdGet200Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ReportingV3ReportsIdGet200Response
- Defined in:
- lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb
Overview
Report Log
Instance Attribute Summary collapse
-
#group_id ⇒ String
Id for selected group.
-
#organization_id ⇒ String
CyberSource merchant id.
-
#report_definition_id ⇒ String
Report definition Id.
-
#report_end_time ⇒ DateTime
Report End Time Value.
-
#report_fields ⇒ Array[String]
List of Integer Values.
-
#report_filters ⇒ Hash[String, Object]
List of filters to apply.
-
#report_frequency ⇒ String
Report Frequency Value Valid values: - DAILY - WEEKLY - MONTHLY - ADHOC.
-
#report_id ⇒ String
Report ID Value.
-
#report_mime_type ⇒ String
Report Format Valid values: - application/xml - text/csv.
-
#report_name ⇒ String
Report Name.
-
#report_preferences ⇒ ReportPreferences
Report Preferences.
-
#report_start_time ⇒ DateTime
Report Start Time Value.
-
#report_status ⇒ String
Report Status Value Valid values: - COMPLETED - PENDING - QUEUED - RUNNING - ERROR - NO_DATA - RERUN.
-
#timezone ⇒ String
Time Zone Value.
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(organization_id: SKIP, report_id: SKIP, report_definition_id: SKIP, report_name: SKIP, report_mime_type: SKIP, report_frequency: SKIP, report_fields: SKIP, report_status: SKIP, report_start_time: SKIP, report_end_time: SKIP, timezone: SKIP, report_filters: SKIP, report_preferences: SKIP, group_id: SKIP, additional_properties: nil) ⇒ ReportingV3ReportsIdGet200Response
constructor
A new instance of ReportingV3ReportsIdGet200Response.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_report_end_time ⇒ Object
- #to_custom_report_start_time ⇒ Object
-
#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(organization_id: SKIP, report_id: SKIP, report_definition_id: SKIP, report_name: SKIP, report_mime_type: SKIP, report_frequency: SKIP, report_fields: SKIP, report_status: SKIP, report_start_time: SKIP, report_end_time: SKIP, timezone: SKIP, report_filters: SKIP, report_preferences: SKIP, group_id: SKIP, additional_properties: nil) ⇒ ReportingV3ReportsIdGet200Response
Returns a new instance of ReportingV3ReportsIdGet200Response.
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 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 130 def initialize(organization_id: SKIP, report_id: SKIP, report_definition_id: SKIP, report_name: SKIP, report_mime_type: SKIP, report_frequency: SKIP, report_fields: SKIP, report_status: SKIP, report_start_time: SKIP, report_end_time: SKIP, timezone: SKIP, report_filters: SKIP, report_preferences: SKIP, group_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @organization_id = organization_id unless organization_id == SKIP @report_id = report_id unless report_id == SKIP @report_definition_id = report_definition_id unless report_definition_id == SKIP @report_name = report_name unless report_name == SKIP @report_mime_type = report_mime_type unless report_mime_type == SKIP @report_frequency = report_frequency unless report_frequency == SKIP @report_fields = report_fields unless report_fields == SKIP @report_status = report_status unless report_status == SKIP @report_start_time = report_start_time unless report_start_time == SKIP @report_end_time = report_end_time unless report_end_time == SKIP @timezone = timezone unless timezone == SKIP @report_filters = report_filters unless report_filters == SKIP @report_preferences = report_preferences unless report_preferences == SKIP @group_id = group_id unless group_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#group_id ⇒ String
Id for selected group.
83 84 85 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 83 def group_id @group_id end |
#organization_id ⇒ String
CyberSource merchant id
15 16 17 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 15 def organization_id @organization_id end |
#report_definition_id ⇒ String
Report definition Id
23 24 25 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 23 def report_definition_id @report_definition_id end |
#report_end_time ⇒ DateTime
Report End Time Value
67 68 69 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 67 def report_end_time @report_end_time end |
#report_fields ⇒ Array[String]
List of Integer Values
47 48 49 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 47 def report_fields @report_fields end |
#report_filters ⇒ Hash[String, Object]
List of filters to apply
75 76 77 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 75 def report_filters @report_filters end |
#report_frequency ⇒ String
Report Frequency Value Valid values:
- DAILY
- WEEKLY
- MONTHLY
- ADHOC
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 43 def report_frequency @report_frequency end |
#report_id ⇒ String
Report ID Value
19 20 21 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 19 def report_id @report_id end |
#report_mime_type ⇒ String
Report Format Valid values:
- application/xml
- text/csv
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 34 def report_mime_type @report_mime_type end |
#report_name ⇒ String
Report Name
27 28 29 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 27 def report_name @report_name end |
#report_preferences ⇒ ReportPreferences
Report Preferences
79 80 81 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 79 def report_preferences @report_preferences end |
#report_start_time ⇒ DateTime
Report Start Time Value
63 64 65 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 63 def report_start_time @report_start_time end |
#report_status ⇒ String
Report Status Value Valid values:
- COMPLETED
- PENDING
- QUEUED
- RUNNING
- ERROR
- NO_DATA
- RERUN
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 59 def report_status @report_status end |
#timezone ⇒ String
Time Zone Value
71 72 73 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 71 def timezone @timezone end |
Class Method Details
.from_element(root) ⇒ Object
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 224 def self.from_element(root) organization_id = XmlUtilities.from_element(root, 'organizationId', String) report_id = XmlUtilities.from_element(root, 'reportId', String) report_definition_id = XmlUtilities.from_element(root, 'reportDefinitionId', String) report_name = XmlUtilities.from_element(root, 'reportName', String) report_mime_type = XmlUtilities.from_element(root, 'reportMimeType', String) report_frequency = XmlUtilities.from_element(root, 'reportFrequency', String) report_fields = XmlUtilities.from_element_to_array(root, 'reportFields', String) report_status = XmlUtilities.from_element(root, 'reportStatus', String) report_start_time = XmlUtilities.from_element(root, 'reportStartTime', String, datetime_format: 'rfc3339') report_end_time = XmlUtilities.from_element(root, 'reportEndTime', String, datetime_format: 'rfc3339') timezone = XmlUtilities.from_element(root, 'timezone', String) report_filters = XmlUtilities.from_element_to_hash(root, 'reportFilters', Hash) report_preferences = XmlUtilities.from_element(root, 'ReportPreferences', ReportPreferences) group_id = XmlUtilities.from_element(root, 'groupId', String) new(organization_id: organization_id, report_id: report_id, report_definition_id: report_definition_id, report_name: report_name, report_mime_type: report_mime_type, report_frequency: report_frequency, report_fields: report_fields, report_status: report_status, report_start_time: report_start_time, report_end_time: report_end_time, timezone: timezone, report_filters: report_filters, report_preferences: report_preferences, group_id: group_id, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 159 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. organization_id = hash.key?('organizationId') ? hash['organizationId'] : SKIP report_id = hash.key?('reportId') ? hash['reportId'] : SKIP report_definition_id = hash.key?('reportDefinitionId') ? hash['reportDefinitionId'] : SKIP report_name = hash.key?('reportName') ? hash['reportName'] : SKIP report_mime_type = hash.key?('reportMimeType') ? hash['reportMimeType'] : SKIP report_frequency = hash.key?('reportFrequency') ? hash['reportFrequency'] : SKIP report_fields = hash.key?('reportFields') ? hash['reportFields'] : SKIP report_status = hash.key?('reportStatus') ? hash['reportStatus'] : SKIP report_start_time = if hash.key?('reportStartTime') (DateTimeHelper.from_rfc3339(hash['reportStartTime']) if hash['reportStartTime']) else SKIP end report_end_time = if hash.key?('reportEndTime') (DateTimeHelper.from_rfc3339(hash['reportEndTime']) if hash['reportEndTime']) else SKIP end timezone = hash.key?('timezone') ? hash['timezone'] : SKIP report_filters = hash.key?('reportFilters') ? hash['reportFilters'] : SKIP report_preferences = ReportPreferences.from_hash(hash['reportPreferences']) if hash['reportPreferences'] group_id = hash.key?('groupId') ? hash['groupId'] : 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. ReportingV3ReportsIdGet200Response.new(organization_id: organization_id, report_id: report_id, report_definition_id: report_definition_id, report_name: report_name, report_mime_type: report_mime_type, report_frequency: report_frequency, report_fields: report_fields, report_status: report_status, report_start_time: report_start_time, report_end_time: report_end_time, timezone: timezone, report_filters: report_filters, report_preferences: report_preferences, group_id: group_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 86 def self.names @_hash = {} if @_hash.nil? @_hash['organization_id'] = 'organizationId' @_hash['report_id'] = 'reportId' @_hash['report_definition_id'] = 'reportDefinitionId' @_hash['report_name'] = 'reportName' @_hash['report_mime_type'] = 'reportMimeType' @_hash['report_frequency'] = 'reportFrequency' @_hash['report_fields'] = 'reportFields' @_hash['report_status'] = 'reportStatus' @_hash['report_start_time'] = 'reportStartTime' @_hash['report_end_time'] = 'reportEndTime' @_hash['timezone'] = 'timezone' @_hash['report_filters'] = 'reportFilters' @_hash['report_preferences'] = 'reportPreferences' @_hash['group_id'] = 'groupId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
126 127 128 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 126 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 106 def self.optionals %w[ organization_id report_id report_definition_id report_name report_mime_type report_frequency report_fields report_status report_start_time report_end_time timezone report_filters report_preferences group_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 315 def inspect class_name = self.class.name.split('::').last "<#{class_name} organization_id: #{@organization_id.inspect}, report_id:"\ " #{@report_id.inspect}, report_definition_id: #{@report_definition_id.inspect},"\ " report_name: #{@report_name.inspect}, report_mime_type: #{@report_mime_type.inspect},"\ " report_frequency: #{@report_frequency.inspect}, report_fields: #{@report_fields.inspect},"\ " report_status: #{@report_status.inspect}, report_start_time:"\ " #{@report_start_time.inspect}, report_end_time: #{@report_end_time.inspect}, timezone:"\ " #{@timezone.inspect}, report_filters: #{@report_filters.inspect}, report_preferences:"\ " #{@report_preferences.inspect}, group_id: #{@group_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_report_end_time ⇒ Object
220 221 222 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 220 def to_custom_report_end_time DateTimeHelper.to_rfc3339(report_end_time) end |
#to_custom_report_start_time ⇒ Object
216 217 218 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 216 def to_custom_report_start_time DateTimeHelper.to_rfc3339(report_start_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
303 304 305 306 307 308 309 310 311 312 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 303 def to_s class_name = self.class.name.split('::').last "<#{class_name} organization_id: #{@organization_id}, report_id: #{@report_id},"\ " report_definition_id: #{@report_definition_id}, report_name: #{@report_name},"\ " report_mime_type: #{@report_mime_type}, report_frequency: #{@report_frequency},"\ " report_fields: #{@report_fields}, report_status: #{@report_status}, report_start_time:"\ " #{@report_start_time}, report_end_time: #{@report_end_time}, timezone: #{@timezone},"\ " report_filters: #{@report_filters}, report_preferences: #{@report_preferences}, group_id:"\ " #{@group_id}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_reports_id_get200_response.rb', line 268 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'organizationId', organization_id) XmlUtilities.add_as_subelement(doc, root, 'reportId', report_id) XmlUtilities.add_as_subelement(doc, root, 'reportDefinitionId', report_definition_id) XmlUtilities.add_as_subelement(doc, root, 'reportName', report_name) XmlUtilities.add_as_subelement(doc, root, 'reportMimeType', report_mime_type) XmlUtilities.add_as_subelement(doc, root, 'reportFrequency', report_frequency) XmlUtilities.add_array_as_subelement(doc, root, 'reportFields', report_fields) XmlUtilities.add_as_subelement(doc, root, 'reportStatus', report_status) XmlUtilities.add_as_subelement(doc, root, 'reportStartTime', report_start_time, datetime_format: 'rfc3339') XmlUtilities.add_as_subelement(doc, root, 'reportEndTime', report_end_time, datetime_format: 'rfc3339') XmlUtilities.add_as_subelement(doc, root, 'timezone', timezone) XmlUtilities.add_hash_as_subelement(doc, root, 'reportFilters', report_filters) XmlUtilities.add_as_subelement(doc, root, 'ReportPreferences', report_preferences) XmlUtilities.add_as_subelement(doc, root, 'groupId', group_id) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |