Class: FacturX::PaymentMeans

Inherits:
Object
  • Object
show all
Defined in:
lib/factur_x/payment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_code: Codes::PaymentMeansType::CREDIT_TRANSFER, information: nil, iban: nil, account_name: nil, account_id: nil, bic: nil, debtor_iban: nil, card_id: nil, cardholder_name: nil) ⇒ PaymentMeans

Returns a new instance of PaymentMeans.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/factur_x/payment.rb', line 10

def initialize(type_code: Codes::PaymentMeansType::CREDIT_TRANSFER, information: nil,
               iban: nil, account_name: nil, account_id: nil, bic: nil,
               debtor_iban: nil, card_id: nil, cardholder_name: nil)
  @type_code = type_code
  @information = information
  @iban = iban
  @account_name = 
  @account_id = 
  @bic = bic
  @debtor_iban = debtor_iban
  @card_id = card_id
  @cardholder_name = cardholder_name
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def 
  @account_id
end

#account_nameObject (readonly)

Returns the value of attribute account_name.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def 
  @account_name
end

#bicObject (readonly)

Returns the value of attribute bic.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def bic
  @bic
end

#card_idObject (readonly)

Returns the value of attribute card_id.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def card_id
  @card_id
end

#cardholder_nameObject (readonly)

Returns the value of attribute cardholder_name.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def cardholder_name
  @cardholder_name
end

#debtor_ibanObject (readonly)

Returns the value of attribute debtor_iban.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def debtor_iban
  @debtor_iban
end

#ibanObject (readonly)

Returns the value of attribute iban.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def iban
  @iban
end

#informationObject (readonly)

Returns the value of attribute information.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def information
  @information
end

#type_codeObject (readonly)

Returns the value of attribute type_code.



7
8
9
# File 'lib/factur_x/payment.rb', line 7

def type_code
  @type_code
end

Instance Method Details

#card?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/factur_x/payment.rb', line 28

def card?
  !card_id.nil?
end

#creditor_account?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/factur_x/payment.rb', line 24

def creditor_account?
  !(iban ||  || ).nil?
end