Class: CyberSourceMergedSpec::VerifyCustomerAddressRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::VerifyCustomerAddressRequest
- Defined in:
- lib/cyber_source_merged_spec/models/verify_customer_address_request.rb
Overview
VerifyCustomerAddressRequest Model.
Instance Attribute Summary collapse
-
#buyer_information ⇒ BuyerInformation40
TODO: Write general description for this method.
-
#client_reference_information ⇒ ClientReferenceInformation49
TODO: Write general description for this method.
-
#order_information ⇒ OrderInformation41
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(client_reference_information: SKIP, order_information: SKIP, buyer_information: SKIP, additional_properties: nil) ⇒ VerifyCustomerAddressRequest
constructor
A new instance of VerifyCustomerAddressRequest.
-
#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(client_reference_information: SKIP, order_information: SKIP, buyer_information: SKIP, additional_properties: nil) ⇒ VerifyCustomerAddressRequest
Returns a new instance of VerifyCustomerAddressRequest.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 47 def initialize(client_reference_information: SKIP, order_information: SKIP, buyer_information: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless client_reference_information == SKIP @client_reference_information = client_reference_information end @order_information = order_information unless order_information == SKIP @buyer_information = buyer_information unless buyer_information == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#buyer_information ⇒ BuyerInformation40
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 22 def buyer_information @buyer_information end |
#client_reference_information ⇒ ClientReferenceInformation49
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 14 def client_reference_information @client_reference_information end |
#order_information ⇒ OrderInformation41
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 18 def order_information @order_information end |
Class Method Details
.from_element(root) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 88 def self.from_element(root) client_reference_information = XmlUtilities.from_element( root, 'ClientReferenceInformation49', ClientReferenceInformation49 ) order_information = XmlUtilities.from_element(root, 'OrderInformation41', OrderInformation41) buyer_information = XmlUtilities.from_element(root, 'BuyerInformation40', BuyerInformation40) new(client_reference_information: client_reference_information, order_information: order_information, buyer_information: buyer_information, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['clientReferenceInformation'] client_reference_information = ClientReferenceInformation49.from_hash(hash['clientReferenceInformation']) end order_information = OrderInformation41.from_hash(hash['orderInformation']) if hash['orderInformation'] buyer_information = BuyerInformation40.from_hash(hash['buyerInformation']) if hash['buyerInformation'] # 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. VerifyCustomerAddressRequest.new(client_reference_information: client_reference_information, order_information: order_information, buyer_information: buyer_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['client_reference_information'] = 'clientReferenceInformation' @_hash['order_information'] = 'orderInformation' @_hash['buyer_information'] = 'buyerInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 34 def self.optionals %w[ client_reference_information order_information buyer_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
128 129 130 131 132 133 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 128 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information.inspect},"\ " order_information: #{@order_information.inspect}, buyer_information:"\ " #{@buyer_information.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information},"\ " order_information: #{@order_information}, buyer_information: #{@buyer_information},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/verify_customer_address_request.rb', line 104 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'ClientReferenceInformation49', client_reference_information) XmlUtilities.add_as_subelement(doc, root, 'OrderInformation41', order_information) XmlUtilities.add_as_subelement(doc, root, 'BuyerInformation40', buyer_information) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |