Class: VisaAcceptanceMergedSpec::AgreementInformation10
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::AgreementInformation10
- Defined in:
- lib/visa_acceptance_merged_spec/models/agreement_information10.rb
Overview
AgreementInformation10 Model.
Instance Attribute Summary collapse
-
#description ⇒ String
Description of the billing agreement.
-
#indicator ⇒ String
Indicates whether the transaction is a billing agreement.
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(indicator: SKIP, description: SKIP, additional_properties: nil) ⇒ AgreementInformation10
constructor
A new instance of AgreementInformation10.
-
#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(indicator: SKIP, description: SKIP, additional_properties: nil) ⇒ AgreementInformation10
Returns a new instance of AgreementInformation10.
44 45 46 47 48 49 50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 44 def initialize(indicator: SKIP, description: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @indicator = indicator unless indicator == SKIP @description = description unless description == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#description ⇒ String
Description of the billing agreement
21 22 23 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 21 def description @description end |
#indicator ⇒ String
Indicates whether the transaction is a billing agreement. Possible values
- true
- false (default)
17 18 19 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 17 def indicator @indicator end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. indicator = hash.key?('indicator') ? hash['indicator'] : SKIP description = hash.key?('description') ? hash['description'] : 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. AgreementInformation10.new(indicator: indicator, description: description, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
24 25 26 27 28 29 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 24 def self.names @_hash = {} if @_hash.nil? @_hash['indicator'] = 'indicator' @_hash['description'] = 'description' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
32 33 34 35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 32 def self.optionals %w[ indicator description ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
83 84 85 86 87 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 83 def inspect class_name = self.class.name.split('::').last "<#{class_name} indicator: #{@indicator.inspect}, description: #{@description.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
76 77 78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/agreement_information10.rb', line 76 def to_s class_name = self.class.name.split('::').last "<#{class_name} indicator: #{@indicator}, description: #{@description},"\ " additional_properties: #{@additional_properties}>" end |