Class: CyberSourceMergedSpec::RetrieveOrDeletePaymentTokenResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::RetrieveOrDeletePaymentTokenResponse
- Defined in:
- lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb
Overview
RetrieveOrDeletePaymentTokenResponse Model.
Instance Attribute Summary collapse
-
#id ⇒ String
An unique identification number generated by Cybersource to identify the submitted request.
-
#order_information ⇒ OrderInformation32
The status of the request.
-
#payment_information ⇒ PaymentInformation30
The status of the request.
-
#status ⇒ String
The status of the request.
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(id: SKIP, status: SKIP, payment_information: SKIP, order_information: SKIP, additional_properties: nil) ⇒ RetrieveOrDeletePaymentTokenResponse
constructor
A new instance of RetrieveOrDeletePaymentTokenResponse.
-
#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(id: SKIP, status: SKIP, payment_information: SKIP, order_information: SKIP, additional_properties: nil) ⇒ RetrieveOrDeletePaymentTokenResponse
Returns a new instance of RetrieveOrDeletePaymentTokenResponse.
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 63 def initialize(id: SKIP, status: SKIP, payment_information: SKIP, order_information: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @status = status unless status == SKIP @payment_information = payment_information unless payment_information == SKIP @order_information = order_information unless order_information == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#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.
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 18 def id @id end |
#order_information ⇒ OrderInformation32
The status of the request. Possible values:
- COMPLETED
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 36 def order_information @order_information end |
#payment_information ⇒ PaymentInformation30
The status of the request. Possible values:
- COMPLETED
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 30 def payment_information @payment_information end |
#status ⇒ String
The status of the request. Possible values:
- COMPLETED
24 25 26 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 24 def status @status end |
Class Method Details
.from_element(root) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 102 def self.from_element(root) id = XmlUtilities.from_element(root, 'id', String) status = XmlUtilities.from_element(root, 'status', String) payment_information = XmlUtilities.from_element(root, 'PaymentInformation30', PaymentInformation30) order_information = XmlUtilities.from_element(root, 'OrderInformation32', OrderInformation32) new(id: id, status: status, payment_information: payment_information, order_information: order_information, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP payment_information = PaymentInformation30.from_hash(hash['paymentInformation']) if hash['paymentInformation'] order_information = OrderInformation32.from_hash(hash['orderInformation']) if hash['orderInformation'] # 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. RetrieveOrDeletePaymentTokenResponse.new(id: id, status: status, payment_information: payment_information, order_information: order_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['payment_information'] = 'paymentInformation' @_hash['order_information'] = 'orderInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 49 def self.optionals %w[ id status payment_information order_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
142 143 144 145 146 147 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 142 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, status: #{@status.inspect}, payment_information:"\ " #{@payment_information.inspect}, order_information: #{@order_information.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
134 135 136 137 138 139 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 134 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, status: #{@status}, payment_information:"\ " #{@payment_information}, order_information: #{@order_information}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/cyber_source_merged_spec/models/retrieve_or_delete_payment_token_response.rb', line 118 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'id', id) XmlUtilities.add_as_subelement(doc, root, 'status', status) XmlUtilities.add_as_subelement(doc, root, 'PaymentInformation30', payment_information) XmlUtilities.add_as_subelement(doc, root, 'OrderInformation32', order_information) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |