Class: VatInfo::Models::VatPayers
- Inherits:
-
Object
- Object
- VatInfo::Models::VatPayers
- Defined in:
- lib/vat_info/models/vat_payers.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
- #create_vat_payers(model, payers) ⇒ Object
-
#initialize(model, params = {}) ⇒ VatPayers
constructor
A new instance of VatPayers.
Constructor Details
#initialize(model, params = {}) ⇒ VatPayers
Returns a new instance of VatPayers.
6 7 8 9 |
# File 'lib/vat_info/models/vat_payers.rb', line 6 def initialize(model, params = {}) @data = {} @data[:platci] = create_vat_payers(model, params) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/vat_info/models/vat_payers.rb', line 4 def data @data end |
Instance Method Details
#create_vat_payers(model, payers) ⇒ Object
11 12 13 |
# File 'lib/vat_info/models/vat_payers.rb', line 11 def create_vat_payers(model, payers) payers.map { |payer| model.new(payer).data } end |