Class: SEPA::ProfileFeatures
- Inherits:
-
Data
- Object
- Data
- SEPA::ProfileFeatures
- Defined in:
- lib/sepa_rator/profile.rb
Instance Attribute Summary collapse
-
#bic_tag ⇒ Object
readonly
Returns the value of attribute bic_tag.
-
#charset ⇒ Object
readonly
Returns the value of attribute charset.
-
#extras ⇒ Object
readonly
Returns the value of attribute extras.
-
#instr_for_cdtr_agt_code_type ⇒ Object
readonly
Returns the value of attribute instr_for_cdtr_agt_code_type.
-
#instr_for_dbtr_agt_format ⇒ Object
readonly
Returns the value of attribute instr_for_dbtr_agt_format.
-
#min_amount ⇒ Object
readonly
Returns the value of attribute min_amount.
-
#org_bic_tag ⇒ Object
readonly
Returns the value of attribute org_bic_tag.
-
#regulatory_reporting_version ⇒ Object
readonly
Returns the value of attribute regulatory_reporting_version.
-
#requires_bic ⇒ Object
readonly
Returns the value of attribute requires_bic.
-
#requires_country_code_on_address ⇒ Object
readonly
Returns the value of attribute requires_country_code_on_address.
-
#requires_structured_address ⇒ Object
readonly
Returns the value of attribute requires_structured_address.
-
#wrap_date ⇒ Object
readonly
Returns the value of attribute wrap_date.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#bic_tag ⇒ Object (readonly)
Returns the value of attribute bic_tag
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def bic_tag @bic_tag end |
#charset ⇒ Object (readonly)
Returns the value of attribute charset
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def charset @charset end |
#extras ⇒ Object (readonly)
Returns the value of attribute extras
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def extras @extras end |
#instr_for_cdtr_agt_code_type ⇒ Object (readonly)
Returns the value of attribute instr_for_cdtr_agt_code_type
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def instr_for_cdtr_agt_code_type @instr_for_cdtr_agt_code_type end |
#instr_for_dbtr_agt_format ⇒ Object (readonly)
Returns the value of attribute instr_for_dbtr_agt_format
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def instr_for_dbtr_agt_format @instr_for_dbtr_agt_format end |
#min_amount ⇒ Object (readonly)
Returns the value of attribute min_amount
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def min_amount @min_amount end |
#org_bic_tag ⇒ Object (readonly)
Returns the value of attribute org_bic_tag
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def org_bic_tag @org_bic_tag end |
#regulatory_reporting_version ⇒ Object (readonly)
Returns the value of attribute regulatory_reporting_version
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def regulatory_reporting_version @regulatory_reporting_version end |
#requires_bic ⇒ Object (readonly)
Returns the value of attribute requires_bic
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def requires_bic @requires_bic end |
#requires_country_code_on_address ⇒ Object (readonly)
Returns the value of attribute requires_country_code_on_address
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def requires_country_code_on_address @requires_country_code_on_address end |
#requires_structured_address ⇒ Object (readonly)
Returns the value of attribute requires_structured_address
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def requires_structured_address @requires_structured_address end |
#wrap_date ⇒ Object (readonly)
Returns the value of attribute wrap_date
4 5 6 |
# File 'lib/sepa_rator/profile.rb', line 4 def wrap_date @wrap_date end |
Class Method Details
.default ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sepa_rator/profile.rb', line 19 def self.default new( bic_tag: :BICFI, wrap_date: true, requires_bic: false, org_bic_tag: :AnyBIC, instr_for_dbtr_agt_format: :text, instr_for_cdtr_agt_code_type: :instruction3_code, regulatory_reporting_version: :v3, charset: :iso_latin, min_amount: nil, requires_structured_address: false, requires_country_code_on_address: false, extras: {}.freeze ) end |
Instance Method Details
#[](key) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/sepa_rator/profile.rb', line 36 def [](key) return public_send(key) if respond_to?(key) return extras.fetch(key) if extras.key?(key) raise KeyError, "Unknown feature key: #{key.inspect}" end |
#merge(**overrides) ⇒ Object
43 44 45 46 47 |
# File 'lib/sepa_rator/profile.rb', line 43 def merge(**overrides) extras_override = overrides.delete(:extras) || {} merged_extras = extras.merge(extras_override).freeze self.class.new(**to_h, **overrides, extras: merged_extras) end |