Class: VisaAcceptanceMergedSpec::DirectDebitSepa
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::DirectDebitSepa
- Defined in:
- lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb
Overview
DirectDebitSepa Model.
Instance Attribute Summary collapse
-
#reference ⇒ String
Mandate reference as returned on the first transaction in the sequence.
-
#signature_date ⇒ String
Date of the initial transaction, format is YYYY-MM-DD.
-
#type ⇒ String
Sequence type of the direct debit, defaults to “oneOff”.
-
#url ⇒ String
Valid URL pointing to the SEPA mandate, needs to be accessible by our risk and compliance department.
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(reference: SKIP, signature_date: SKIP, url: SKIP, type: SKIP, additional_properties: nil) ⇒ DirectDebitSepa
constructor
A new instance of DirectDebitSepa.
-
#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(reference: SKIP, signature_date: SKIP, url: SKIP, type: SKIP, additional_properties: nil) ⇒ DirectDebitSepa
Returns a new instance of DirectDebitSepa.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 60 def initialize(reference: SKIP, signature_date: SKIP, url: SKIP, type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @reference = reference unless reference == SKIP @signature_date = signature_date unless signature_date == SKIP @url = url unless url == SKIP @type = type unless type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#reference ⇒ String
Mandate reference as returned on the first transaction in the sequence
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 15 def reference @reference end |
#signature_date ⇒ String
Date of the initial transaction, format is YYYY-MM-DD. Date can be taken from the finaltimestamp of the SUCCEEDED notification for the first transaction in the sequence.
21 22 23 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 21 def signature_date @signature_date end |
#type ⇒ String
Sequence type of the direct debit, defaults to “oneOff”. Valid values: oneOff The direct debit is executed once. first First direct debit in a series of recurring ones.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 33 def type @type end |
#url ⇒ String
Valid URL pointing to the SEPA mandate, needs to be accessible by our risk and compliance department.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 26 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. reference = hash.key?('reference') ? hash['reference'] : SKIP signature_date = hash.key?('signatureDate') ? hash['signatureDate'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP type = hash.key?('type') ? hash['type'] : 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. DirectDebitSepa.new(reference: reference, signature_date: signature_date, url: url, type: type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['reference'] = 'reference' @_hash['signature_date'] = 'signatureDate' @_hash['url'] = 'url' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 53 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 46 def self.optionals %w[ reference signature_date url type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
105 106 107 108 109 110 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 105 def inspect class_name = self.class.name.split('::').last "<#{class_name} reference: #{@reference.inspect}, signature_date:"\ " #{@signature_date.inspect}, url: #{@url.inspect}, type: #{@type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
98 99 100 101 102 |
# File 'lib/visa_acceptance_merged_spec/models/direct_debit_sepa.rb', line 98 def to_s class_name = self.class.name.split('::').last "<#{class_name} reference: #{@reference}, signature_date: #{@signature_date}, url: #{@url},"\ " type: #{@type}, additional_properties: #{@additional_properties}>" end |