Class: VisaAcceptanceMergedSpec::PaymentType3
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PaymentType3
- Defined in:
- lib/visa_acceptance_merged_spec/models/payment_type3.rb
Overview
PaymentType3 Model.
Instance Attribute Summary collapse
-
#method ⇒ Method2
In case the APM supports multiple modes of initiation (e.g. Alipay via QR Code or Barcode).
-
#name ⇒ String
A Payment Type is an agreed means for a payee to receive legal tender from a payer.
-
#sub_type_name ⇒ String
In case the APM supports multiple modes of initiation (e.g. Alipay via QR Code or Barcode).
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(name: SKIP, sub_type_name: SKIP, method: SKIP, additional_properties: nil) ⇒ PaymentType3
constructor
A new instance of PaymentType3.
-
#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(name: SKIP, sub_type_name: SKIP, method: SKIP, additional_properties: nil) ⇒ PaymentType3
Returns a new instance of PaymentType3.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 59 def initialize(name: SKIP, sub_type_name: SKIP, method: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @sub_type_name = sub_type_name unless sub_type_name == SKIP @method = method unless method == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#method ⇒ Method2
In case the APM supports multiple modes of initiation (e.g. Alipay via QR Code or Barcode)
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 34 def method @method end |
#name ⇒ String
A Payment Type is an agreed means for a payee to receive legal tender from a payer. The way one pays for a commercial financial transaction. Examples: Card, Bank Transfer, Digital, Direct Debit. Possible values:
CARD(use this for a PIN debit transaction)CHECK(use this for all eCheck payment transactions - ECP Debit, ECP Follow-on Credit, ECP StandAlone Credit)bankTransfer(use for Online Bank Transafer for methods such as P24, iDeal, Estonia Bank, KCP)localCard(KCP Local card via Altpay)carrierBilling(KCP Carrier Billing via Altpay)
24 25 26 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 24 def name @name end |
#sub_type_name ⇒ String
In case the APM supports multiple modes of initiation (e.g. Alipay via QR Code or Barcode)
29 30 31 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 29 def sub_type_name @sub_type_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP sub_type_name = hash.key?('subTypeName') ? hash['subTypeName'] : SKIP method = Method2.from_hash(hash['method']) if hash['method'] # 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. PaymentType3.new(name: name, sub_type_name: sub_type_name, method: method, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['sub_type_name'] = 'subTypeName' @_hash['method'] = 'method' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 46 def self.optionals %w[ name sub_type_name method ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, sub_type_name: #{@sub_type_name.inspect}, method:"\ " #{@method.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/visa_acceptance_merged_spec/models/payment_type3.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, sub_type_name: #{@sub_type_name}, method: #{@method},"\ " additional_properties: #{@additional_properties}>" end |