Class: FidorApi::Model::ScheduledTransfer
- Includes:
- BeneficiaryHelper
- Defined in:
- lib/fidor_api/model/scheduled_transfer.rb
Constant Summary
Constants included from BeneficiaryHelper
BeneficiaryHelper::SUPPORTED_ROUTING_TYPES
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from BeneficiaryHelper
#define_methods_for, #parse_errors
Methods inherited from Base
#as_json, inherited, #parse_errors, resource_name
Instance Method Details
#beneficiary=(value) ⇒ Object
21 22 23 24 |
# File 'lib/fidor_api/model/scheduled_transfer.rb', line 21 def beneficiary=(value) write_attribute(:beneficiary, value) define_methods_for(SUPPORTED_ROUTING_TYPES[beneficiary['routing_type']]) end |
#routing_type ⇒ Object
26 27 28 29 |
# File 'lib/fidor_api/model/scheduled_transfer.rb', line 26 def routing_type @beneficiary ||= {} @beneficiary.dig('routing_type') end |
#routing_type=(type) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/fidor_api/model/scheduled_transfer.rb', line 31 def routing_type=(type) raise Errors::NotSupported unless SUPPORTED_ROUTING_TYPES.key?(type) @beneficiary ||= {} @beneficiary['routing_type'] = type define_methods_for(SUPPORTED_ROUTING_TYPES[type]) end |