Sha256: 3d5d776e79f92a62b0a6d2c5f97b11d1f56b8ac0ddad2771810cb92365b9b7b4

Contents?: true

Size: 664 Bytes

Versions: 20

Compression:

Stored size: 664 Bytes

Contents

require 'activefacts/api'

module Tax

  class Name < String
    value_type
  end

  class Person
    identified_by :name
    one_to_one :name
  end

  class Australian < Person
  end

  class TaxPayer < Person
  end

  class TFN < Int
    value_type
  end

  class AustralianTaxPayer < Australian
    supertypes TaxPayer
    identified_by :tfn
    one_to_one :tfn, :class => TFN  # Capitalisation rules!
  end

  class YearNr < Int
    value_type
  end

  class Year
    identified_by :year_nr
    one_to_one :year_nr
  end

  class AustralianTaxReturn
    identified_by :australian_tax_payer, :year
    has_one :australian_tax_payer
    has_one :year
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
activefacts-api-1.8.1 spec/fixtures/tax.rb
activefacts-api-1.8.0 spec/fixtures/tax.rb
activefacts-api-1.7.1 spec/fixtures/tax.rb
activefacts-api-1.7.0 spec/fixtures/tax.rb
activefacts-api-1.6.0 spec/fixtures/tax.rb
activefacts-api-1.5.0 spec/fixtures/tax.rb
activefacts-api-1.4.0 spec/fixtures/tax.rb
activefacts-api-1.3.1 spec/fixtures/tax.rb
activefacts-api-1.3.0 spec/fixtures/tax.rb
activefacts-api-1.1.0 spec/fixtures/tax.rb
activefacts-api-1.0.0 spec/fixtures/tax.rb
activefacts-api-0.9.9 spec/fixtures/tax.rb
activefacts-api-0.9.8 spec/fixtures/tax.rb
activefacts-api-0.9.7 spec/fixtures/tax.rb
activefacts-api-0.9.6 spec/fixtures/tax.rb
activefacts-api-0.9.5 spec/fixtures/tax.rb
activefacts-api-0.9.4 spec/fixtures/tax.rb
activefacts-api-0.9.3 spec/fixtures/tax.rb
activefacts-api-0.9.2 spec/fixtures/tax.rb
activefacts-api-0.9.1 spec/fixtures/tax.rb