Class: CyberSourceMergedSpec::RiskV1UpdatePost201Response
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::RiskV1UpdatePost201Response
- Defined in:
- lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb
Overview
RiskV1UpdatePost201Response Model.
Instance Attribute Summary collapse
-
#client_reference_informaton ⇒ ClientReferenceInformaton
TODO: Write general description for this method.
-
#id ⇒ String
An unique identification number generated by Cybersource to identify the submitted request.
-
#links ⇒ Links1
TODO: Write general description for this method.
-
#status ⇒ String
The status for risk update 201 calls.
-
#submit_time_utc ⇒ String
Time of request in UTC.
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(links: SKIP, client_reference_informaton: SKIP, id: SKIP, status: SKIP, submit_time_utc: SKIP, additional_properties: nil) ⇒ RiskV1UpdatePost201Response
constructor
A new instance of RiskV1UpdatePost201Response.
-
#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(links: SKIP, client_reference_informaton: SKIP, id: SKIP, status: SKIP, submit_time_utc: SKIP, additional_properties: nil) ⇒ RiskV1UpdatePost201Response
Returns a new instance of RiskV1UpdatePost201Response.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 69 def initialize(links: SKIP, client_reference_informaton: SKIP, id: SKIP, status: SKIP, submit_time_utc: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @links = links unless links == SKIP unless client_reference_informaton == SKIP @client_reference_informaton = client_reference_informaton end @id = id unless id == SKIP @status = status unless status == SKIP @submit_time_utc = submit_time_utc unless submit_time_utc == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_reference_informaton ⇒ ClientReferenceInformaton
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 18 def client_reference_informaton @client_reference_informaton end |
#id ⇒ String
An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 26 def id @id end |
#links ⇒ Links1
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 14 def links @links end |
#status ⇒ String
The status for risk update 201 calls. Possible values are:
- INVALID_REQUEST
- COMPLETED
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 32 def status @status 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 Cybersource for all services.
40 41 42 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 40 def submit_time_utc @submit_time_utc end |
Class Method Details
.from_element(root) ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 116 def self.from_element(root) links = XmlUtilities.from_element(root, 'Links1', Links1) client_reference_informaton = XmlUtilities.from_element( root, 'ClientReferenceInformaton', ClientReferenceInformaton ) id = XmlUtilities.from_element(root, 'id', String) status = XmlUtilities.from_element(root, 'status', String) submit_time_utc = XmlUtilities.from_element(root, 'submitTimeUtc', String) new(links: links, client_reference_informaton: client_reference_informaton, id: id, status: status, submit_time_utc: submit_time_utc, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 87 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. links = Links1.from_hash(hash['_links']) if hash['_links'] if hash['clientReferenceInformaton'] client_reference_informaton = ClientReferenceInformaton.from_hash(hash['clientReferenceInformaton']) end id = hash.key?('id') ? hash['id'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP 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. RiskV1UpdatePost201Response.new(links: links, client_reference_informaton: client_reference_informaton, id: id, status: status, submit_time_utc: submit_time_utc, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['links'] = '_links' @_hash['client_reference_informaton'] = 'clientReferenceInformaton' @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['submit_time_utc'] = 'submitTimeUtc' @_hash end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 65 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 54 def self.optionals %w[ links client_reference_informaton id status submit_time_utc ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
158 159 160 161 162 163 164 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 158 def inspect class_name = self.class.name.split('::').last "<#{class_name} links: #{@links.inspect}, client_reference_informaton:"\ " #{@client_reference_informaton.inspect}, id: #{@id.inspect}, status: #{@status.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.
150 151 152 153 154 155 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 150 def to_s class_name = self.class.name.split('::').last "<#{class_name} links: #{@links}, client_reference_informaton:"\ " #{@client_reference_informaton}, id: #{@id}, status: #{@status}, submit_time_utc:"\ " #{@submit_time_utc}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/cyber_source_merged_spec/models/risk_v1_update_post201_response.rb', line 133 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'Links1', links) XmlUtilities.add_as_subelement(doc, root, 'ClientReferenceInformaton', client_reference_informaton) XmlUtilities.add_as_subelement(doc, root, 'id', id) XmlUtilities.add_as_subelement(doc, root, 'status', status) XmlUtilities.add_as_subelement(doc, root, 'submitTimeUtc', submit_time_utc) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |