Class: CyberSourceMergedSpec::ClientReferenceInformation48
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ClientReferenceInformation48
- Defined in:
- lib/cyber_source_merged_spec/models/client_reference_information48.rb
Overview
ClientReferenceInformation48 Model.
Instance Attribute Summary collapse
-
#code ⇒ String
Merchant-generated order reference or tracking number.
-
#comments ⇒ String
Brief description of the order or any comment you wish to add to the order.
-
#partner ⇒ Partner16
Brief description of the order or any comment you wish to add to the order.
-
#paused_request_id ⇒ String
Used to resume a transaction that was paused for an order modification rule to allow for payer authentication to complete.
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(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation48
constructor
A new instance of ClientReferenceInformation48.
-
#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(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation48
Returns a new instance of ClientReferenceInformation48.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 75 def initialize(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code unless code == SKIP @paused_request_id = paused_request_id unless paused_request_id == SKIP @comments = comments unless comments == SKIP @partner = partner unless partner == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#code ⇒ String
Merchant-generated order reference or tracking number. It is recommended that you send a unique value for each transaction so that you can perform meaningful searches for the transaction.
Used by
Authorization Required field.
PIN Debit
Requests for PIN debit reversals need to use the same merchant reference number that was used in the transaction that is being reversed. Required field for all PIN Debit requests (purchase, credit, and reversal).
FDC Nashville Global
Certain circumstances can cause the processor to truncate this value to 15 or 17 characters for Level II and Level III processing, which can cause a discrepancy between the value you submit and the value included in some processor reports.
31 32 33 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 31 def code @code end |
#comments ⇒ String
Brief description of the order or any comment you wish to add to the order.
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 43 def comments @comments end |
#partner ⇒ Partner16
Brief description of the order or any comment you wish to add to the order.
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 48 def partner @partner end |
#paused_request_id ⇒ String
Used to resume a transaction that was paused for an order modification rule to allow for payer authentication to complete. To resume and continue with the authorization/decision service flow, call the services and include the request id from the prior decision call.
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 38 def paused_request_id @paused_request_id end |
Class Method Details
.from_element(root) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 113 def self.from_element(root) code = XmlUtilities.from_element(root, 'code', String) paused_request_id = XmlUtilities.from_element(root, 'pausedRequestId', String) comments = XmlUtilities.from_element(root, 'comments', String) partner = XmlUtilities.from_element(root, 'Partner16', Partner16) new(code: code, paused_request_id: paused_request_id, comments: comments, partner: partner, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : SKIP paused_request_id = hash.key?('pausedRequestId') ? hash['pausedRequestId'] : SKIP comments = hash.key?('comments') ? hash['comments'] : SKIP partner = Partner16.from_hash(hash['partner']) if hash['partner'] # 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. ClientReferenceInformation48.new(code: code, paused_request_id: paused_request_id, comments: comments, partner: partner, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['paused_request_id'] = 'pausedRequestId' @_hash['comments'] = 'comments' @_hash['partner'] = 'partner' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 71 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 61 def self.optionals %w[ code paused_request_id comments partner ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
149 150 151 152 153 154 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 149 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, paused_request_id: #{@paused_request_id.inspect},"\ " comments: #{@comments.inspect}, partner: #{@partner.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
142 143 144 145 146 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 142 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, paused_request_id: #{@paused_request_id}, comments:"\ " #{@comments}, partner: #{@partner}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information48.rb', line 127 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'code', code) XmlUtilities.add_as_subelement(doc, root, 'pausedRequestId', paused_request_id) XmlUtilities.add_as_subelement(doc, root, 'comments', comments) XmlUtilities.add_as_subelement(doc, root, 'Partner16', partner) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |