Class: VisaAcceptanceMergedSpec::MerchantInformation1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::MerchantInformation1
- Defined in:
- lib/visa_acceptance_merged_spec/models/merchant_information1.rb
Overview
MerchantInformation1 Model.
Instance Attribute Summary collapse
-
#merchant_descriptor ⇒ MerchantDescriptor1
Use this field only if you are requesting payment with Payer Authentication serice together.
-
#merchant_name ⇒ String
Use this field only if you are requesting payment with Payer Authentication serice together.
-
#return_url ⇒ String
URL for displaying payment results to the consumer (notifications) after the transaction is processed.
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_name: SKIP, merchant_descriptor: SKIP, return_url: SKIP, additional_properties: nil) ⇒ MerchantInformation1
constructor
A new instance of MerchantInformation1.
-
#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_name: SKIP, merchant_descriptor: SKIP, return_url: SKIP, additional_properties: nil) ⇒ MerchantInformation1
Returns a new instance of MerchantInformation1.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 57 def initialize(merchant_name: SKIP, merchant_descriptor: SKIP, return_url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @merchant_name = merchant_name unless merchant_name == SKIP @merchant_descriptor = merchant_descriptor unless merchant_descriptor == SKIP @return_url = return_url unless return_url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#merchant_descriptor ⇒ MerchantDescriptor1
Use this field only if you are requesting payment with Payer Authentication serice together. Your company’s name as you want it to appear to the customer in the issuing bank’s authentication form. This value overrides the value specified by your merchant bank.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 26 def merchant_descriptor @merchant_descriptor end |
#merchant_name ⇒ String
Use this field only if you are requesting payment with Payer Authentication serice together. Your company’s name as you want it to appear to the customer in the issuing bank’s authentication form. This value overrides the value specified by your merchant bank.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 18 def merchant_name @merchant_name end |
#return_url ⇒ String
URL for displaying payment results to the consumer (notifications) after the transaction is processed. Usually this URL belongs to merchant and its behavior is defined by merchant
32 33 34 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 32 def return_url @return_url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. merchant_name = hash.key?('merchantName') ? hash['merchantName'] : SKIP merchant_descriptor = MerchantDescriptor1.from_hash(hash['merchantDescriptor']) if hash['merchantDescriptor'] return_url = hash.key?('returnUrl') ? hash['returnUrl'] : 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. MerchantInformation1.new(merchant_name: merchant_name, merchant_descriptor: merchant_descriptor, return_url: return_url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['merchant_name'] = 'merchantName' @_hash['merchant_descriptor'] = 'merchantDescriptor' @_hash['return_url'] = 'returnUrl' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 44 def self.optionals %w[ merchant_name merchant_descriptor return_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 106 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} merchant_name: #{@merchant_name.inspect}, merchant_descriptor:"\ " #{@merchant_descriptor.inspect}, return_url: #{@return_url.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
93 94 95 96 97 98 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_information1.rb', line 93 def to_s class_name = self.class.name.split('::').last "<#{class_name} merchant_name: #{@merchant_name}, merchant_descriptor:"\ " #{@merchant_descriptor}, return_url: #{@return_url}, additional_properties:"\ " #{@additional_properties}>" end |