6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/fidor_api/transfer/generic.rb', line 6
def self.included(base)
base.extend ModelAttribute
base.extend AmountAttributes
base.validates *required_attributes, presence: true
base.validates :beneficiary_unique_name, presence: true, if: -> { create_beneficiary && !beneficiary_reference_passed? }
base.attribute :id, :string
base.attribute :account_id, :string
base.attribute :external_uid, :string
base.attribute :subject, :string
base.attribute :currency, :string
base.attribute :exchange_rate, :string
base.attribute :subject, :string
base.attribute :state, :string
base.amount_attribute :amount
base.attribute :beneficiary_unique_name, :string
base.attribute :contact_name, :string
base.attribute :contact_address_line_1, :string
base.attribute :contact_address_line_2, :string
base.attribute :contact_city, :string
base.attribute :contact_country, :string
base.attribute :bank_name, :string
base.attribute :bank_address_line_1, :string
base.attribute :bank_address_line_2, :string
base.attribute :bank_city, :string
base.attribute :bank_country, :string
base.attribute :create_beneficiary, :boolean
base.attribute :beneficiary_id, :string
base.attribute :created_at, :time
base.attribute :updated_at, :time
end
|