Class: VisaAcceptanceMergedSpec::BuyerInformation11
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::BuyerInformation11
- Defined in:
- lib/visa_acceptance_merged_spec/models/buyer_information11.rb
Overview
BuyerInformation11 Model.
Instance Attribute Summary collapse
-
#merchant_customer_id ⇒ String
Your identifier for the customer.
Class Method Summary collapse
-
.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, additional_properties: nil) ⇒ BuyerInformation11
constructor
A new instance of BuyerInformation11.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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, additional_properties: nil) ⇒ BuyerInformation11
Returns a new instance of BuyerInformation11.
54 55 56 57 58 59 60 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 54 def initialize(merchant_customer_id: 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 @additional_properties = additional_properties end |
Instance Attribute Details
#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, Visa Acceptance 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/visa_acceptance_merged_spec/models/buyer_information11.rb', line 33 def merchant_customer_id @merchant_customer_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. merchant_customer_id = hash.key?('merchantCustomerId') ? hash['merchantCustomerId'] : 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. BuyerInformation11.new(merchant_customer_id: merchant_customer_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['merchant_customer_id'] = 'merchantCustomerId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 43 def self.optionals %w[ merchant_customer_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} merchant_customer_id: #{@merchant_customer_id.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/visa_acceptance_merged_spec/models/buyer_information11.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} merchant_customer_id: #{@merchant_customer_id}, additional_properties:"\ " #{@additional_properties}>" end |