Class: VisaAcceptanceMergedSpec::EWallet5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::EWallet5
- Defined in:
- lib/visa_acceptance_merged_spec/models/e_wallet5.rb
Overview
EWallet5 Model.
Instance Attribute Summary collapse
-
#funding_source ⇒ String
Valid Values: - PAYCO - Kakaopay - NaverPay - SSG Pay - L.Pay - Apple Pay - TOSS Pay - Samsung Pay.
-
#name ⇒ String
Valid Values: - CreditCard - BankTransfer - MobileTransfer - KakaoMoney - NaverPayPoint.
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, funding_source: SKIP, additional_properties: nil) ⇒ EWallet5
constructor
A new instance of EWallet5.
-
#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, funding_source: SKIP, additional_properties: nil) ⇒ EWallet5
Returns a new instance of EWallet5.
54 55 56 57 58 59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 54 def initialize(name: SKIP, funding_source: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @funding_source = funding_source unless funding_source == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#funding_source ⇒ String
Valid Values:
- PAYCO
- Kakaopay
- NaverPay
- SSG Pay
- L.Pay
- Apple Pay
- TOSS Pay
- Samsung Pay
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 31 def funding_source @funding_source end |
#name ⇒ String
Valid Values:
- CreditCard
- BankTransfer
- MobileTransfer
- KakaoMoney
- NaverPayPoint
19 20 21 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 19 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP funding_source = hash.key?('fundingSource') ? hash['fundingSource'] : 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. EWallet5.new(name: name, funding_source: funding_source, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['funding_source'] = 'fundingSource' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 42 def self.optionals %w[ name funding_source ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, funding_source: #{@funding_source.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
85 86 87 88 89 |
# File 'lib/visa_acceptance_merged_spec/models/e_wallet5.rb', line 85 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, funding_source: #{@funding_source}, additional_properties:"\ " #{@additional_properties}>" end |