Class: CyberSourceMergedSpec::ReportingV3ReportDefinitionsNameGet200Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ReportingV3ReportDefinitionsNameGet200Response
- Defined in:
- lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb
Overview
ReportingV3ReportDefinitionsNameGet200Response Model.
Instance Attribute Summary collapse
-
#attributes ⇒ Array[Attribute]
TODO: Write general description for this method.
-
#default_settings ⇒ ReportDefinitionDefaultSettings
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#report_definition_id ⇒ Integer
TODO: Write general description for this method.
-
#report_defintion_name ⇒ String
TODO: Write general description for this method.
-
#subscription_type ⇒ String
'The subscription type for which report definition is required.
-
#supported_formats ⇒ Array[String]
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
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(type: SKIP, report_definition_id: SKIP, report_defintion_name: SKIP, attributes: SKIP, supported_formats: SKIP, description: SKIP, default_settings: SKIP, subscription_type: SKIP, additional_properties: nil) ⇒ ReportingV3ReportDefinitionsNameGet200Response
constructor
A new instance of ReportingV3ReportDefinitionsNameGet200Response.
-
#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(type: SKIP, report_definition_id: SKIP, report_defintion_name: SKIP, attributes: SKIP, supported_formats: SKIP, description: SKIP, default_settings: SKIP, subscription_type: SKIP, additional_properties: nil) ⇒ ReportingV3ReportDefinitionsNameGet200Response
Returns a new instance of ReportingV3ReportDefinitionsNameGet200Response.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 82 def initialize(type: SKIP, report_definition_id: SKIP, report_defintion_name: SKIP, attributes: SKIP, supported_formats: SKIP, description: SKIP, default_settings: SKIP, subscription_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @report_definition_id = report_definition_id unless report_definition_id == SKIP @report_defintion_name = report_defintion_name unless report_defintion_name == SKIP @attributes = attributes unless attributes == SKIP @supported_formats = supported_formats unless supported_formats == SKIP @description = description unless description == SKIP @default_settings = default_settings unless default_settings == SKIP @subscription_type = subscription_type unless subscription_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#attributes ⇒ Array[Attribute]
TODO: Write general description for this method
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 26 def attributes @attributes end |
#default_settings ⇒ ReportDefinitionDefaultSettings
TODO: Write general description for this method
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 38 def default_settings @default_settings end |
#description ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 34 def description @description end |
#report_definition_id ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 18 def report_definition_id @report_definition_id end |
#report_defintion_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 22 def report_defintion_name @report_defintion_name end |
#subscription_type ⇒ String
'The subscription type for which report definition is required. By default the type will be CUSTOM.' Valid Values:
- 'CLASSIC'
- 'CUSTOM'
- 'STANDARD'
47 48 49 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 47 def subscription_type @subscription_type end |
#supported_formats ⇒ Array[String]
TODO: Write general description for this method
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 30 def supported_formats @supported_formats end |
#type ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 14 def type @type end |
Class Method Details
.from_element(root) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 148 def self.from_element(root) type = XmlUtilities.from_element(root, 'type', String) report_definition_id = XmlUtilities.from_element(root, 'reportDefinitionId', Integer) report_defintion_name = XmlUtilities.from_element(root, 'reportDefintionName', String) attributes = XmlUtilities.from_element_to_array(root, 'Attribute', Attribute) supported_formats = XmlUtilities.from_element_to_array(root, 'supportedFormats', String) description = XmlUtilities.from_element(root, 'description', String) default_settings = XmlUtilities.from_element( root, 'reportDefinitionDefaultSettings', ReportDefinitionDefaultSettings ) subscription_type = XmlUtilities.from_element(root, 'subscriptionType', String) new(type: type, report_definition_id: report_definition_id, report_defintion_name: report_defintion_name, attributes: attributes, supported_formats: supported_formats, description: description, default_settings: default_settings, subscription_type: subscription_type, additional_properties: additional_properties) end |
.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 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 102 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP report_definition_id = hash.key?('reportDefinitionId') ? hash['reportDefinitionId'] : SKIP report_defintion_name = hash.key?('reportDefintionName') ? hash['reportDefintionName'] : SKIP # Parameter is an array, so we need to iterate through it attributes = nil unless hash['attributes'].nil? attributes = [] hash['attributes'].each do |structure| attributes << (Attribute.from_hash(structure) if structure) end end attributes = SKIP unless hash.key?('attributes') supported_formats = hash.key?('supportedFormats') ? hash['supportedFormats'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP default_settings = ReportDefinitionDefaultSettings.from_hash(hash['defaultSettings']) if hash['defaultSettings'] subscription_type = hash.key?('subscriptionType') ? hash['subscriptionType'] : 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. ReportingV3ReportDefinitionsNameGet200Response.new(type: type, report_definition_id: report_definition_id, report_defintion_name: report_defintion_name, attributes: attributes, supported_formats: supported_formats, description: description, default_settings: default_settings, subscription_type: subscription_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['report_definition_id'] = 'reportDefinitionId' @_hash['report_defintion_name'] = 'reportDefintionName' @_hash['attributes'] = 'attributes' @_hash['supported_formats'] = 'supportedFormats' @_hash['description'] = 'description' @_hash['default_settings'] = 'defaultSettings' @_hash['subscription_type'] = 'subscriptionType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
78 79 80 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 78 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 64 def self.optionals %w[ type report_definition_id report_defintion_name attributes supported_formats description default_settings subscription_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
214 215 216 217 218 219 220 221 222 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 214 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, report_definition_id:"\ " #{@report_definition_id.inspect}, report_defintion_name:"\ " #{@report_defintion_name.inspect}, attributes: #{@attributes.inspect}, supported_formats:"\ " #{@supported_formats.inspect}, description: #{@description.inspect}, default_settings:"\ " #{@default_settings.inspect}, subscription_type: #{@subscription_type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
204 205 206 207 208 209 210 211 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 204 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, report_definition_id: #{@report_definition_id},"\ " report_defintion_name: #{@report_defintion_name}, attributes: #{@attributes},"\ " supported_formats: #{@supported_formats}, description: #{@description}, default_settings:"\ " #{@default_settings}, subscription_type: #{@subscription_type}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/cyber_source_merged_spec/models/reporting_v3_report_definitions_name_get200_response.rb', line 180 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'reportDefinitionId', report_definition_id) XmlUtilities.add_as_subelement(doc, root, 'reportDefintionName', report_defintion_name) XmlUtilities.add_array_as_subelement(doc, root, 'Attribute', attributes) XmlUtilities.add_array_as_subelement(doc, root, 'supportedFormats', supported_formats) XmlUtilities.add_as_subelement(doc, root, 'description', description) XmlUtilities.add_as_subelement(doc, root, 'reportDefinitionDefaultSettings', default_settings) XmlUtilities.add_as_subelement(doc, root, 'subscriptionType', subscription_type) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |