Class: CyberSourceMergedSpec::BuyerInformation44
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::BuyerInformation44
- Defined in:
- lib/cyber_source_merged_spec/models/buyer_information44.rb
Overview
BuyerInformation44 Model.
Instance Attribute Summary collapse
-
#hashed_password ⇒ String
The merchant's password that CyberSource hashes and stores as a hashed password.
-
#merchant_customer_id ⇒ String
Your identifier for the customer.
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(merchant_customer_id: SKIP, hashed_password: SKIP, additional_properties: nil) ⇒ BuyerInformation44
constructor
A new instance of BuyerInformation44.
-
#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(merchant_customer_id: SKIP, hashed_password: SKIP, additional_properties: nil) ⇒ BuyerInformation44
Returns a new instance of BuyerInformation44.
61 62 63 64 65 66 67 68 69 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 61 def initialize(merchant_customer_id: SKIP, hashed_password: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP @hashed_password = hashed_password unless hashed_password == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#hashed_password ⇒ String
The merchant's password that CyberSource hashes and stores as a hashed password.
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 38 def hashed_password @hashed_password end |
#merchant_customer_id ⇒ String
Your identifier for the customer. When a subscription or customer profile is being created, the maximum length for this field for most processors is 30. Otherwise, the maximum length is 100.
Comercio Latino
For recurring payments in Mexico, the value is the customer’s contract number. Note Before you request the authorization, you must inform the issuer of the customer contract numbers that will be used for recurring transactions.
Worldpay VAP
For a follow-on credit with Worldpay VAP, CyberSource checks the following locations, in the order given, for a customer account ID value and uses the first value it finds:
customer_account_idvalue in the follow-on credit request- Customer account ID value that was used for the capture that is being credited
- Customer account ID value that was used for the original authorization If a customer account ID value cannot be found in any of these locations, then no value is used.
33 34 35 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 33 def merchant_customer_id @merchant_customer_id end |
Class Method Details
.from_element(root) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 94 def self.from_element(root) merchant_customer_id = XmlUtilities.from_element(root, 'merchantCustomerId', String) hashed_password = XmlUtilities.from_element(root, 'hashedPassword', String) new(merchant_customer_id: merchant_customer_id, hashed_password: hashed_password, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. merchant_customer_id = hash.key?('merchantCustomerId') ? hash['merchantCustomerId'] : SKIP hashed_password = hash.key?('hashedPassword') ? hash['hashedPassword'] : 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. BuyerInformation44.new(merchant_customer_id: merchant_customer_id, hashed_password: hashed_password, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['merchant_customer_id'] = 'merchantCustomerId' @_hash['hashed_password'] = 'hashedPassword' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 49 def self.optionals %w[ merchant_customer_id hashed_password ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} merchant_customer_id: #{@merchant_customer_id.inspect}, hashed_password:"\ " #{@hashed_password.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} merchant_customer_id: #{@merchant_customer_id}, hashed_password:"\ " #{@hashed_password}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/buyer_information44.rb', line 106 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'merchantCustomerId', merchant_customer_id) XmlUtilities.add_as_subelement(doc, root, 'hashedPassword', hashed_password) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |