Giter Site home page Giter Site logo

combostrikehq / king_dtaus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salesking/king_dtaus

0.0 7.0 2.0 510 KB

DTAUS & DTAZV with Ruby, finally simplifies the handling of german bank transfer format: datenträgeraustauschverfahren

Home Page: http://dev.blog.salesking.eu/opensource/kingdtaus-gem-dta-gutschriften-und-lastschriften-in-ruby-erzeugen/

License: MIT License

Ruby 100.00%

king_dtaus's Introduction

DTAUS & DTAZV always comes together

Build Status

DTAUS & DTAZV are formats for German bank transfers and is short for "Datenträgeraustausch". The format itself totally sucks because it was established in the last century, to be used on floppy disks. Still almost all German banks use it (they only seem innovative at robbing), and it is therefore supported in common banking programs too.

This gem saves you all the trouble when generating DTAUS- or DTAZV-text.

We love building payment applications.

Install

gem install king_dtaus

Features

  • Create DTAUS debit transfer (Lastschrift)
  • Create DTAUS credit transfer (Gutschrift)
  • Create DTAZV debit transfer
  • 100% test coverage to ensure software quality
  • works with ruby 1.8 / 1.9 / 2.0

Version Info

Version 2 has breaking changes!

  • account attributes now passed in as hash
  • renamed account.client_xy => owner_xy
  • renamed account.account_number => bank_account_number
  • added iban/bic to account
  • DTAZV added

If you want to stay with v1 just pin it in your Gemfile:

gem "king_dtaus", "<2"

TODOs

  • some more edge-case tests needed, we need your feedback here!

Resources

Examples

Here are some examples how to create a DTA- or DTAZV-File. Also check out the spec/dtazv_test.rb to have a running example of an export.

DTA

# create a new dtaus object
dta = KingDta::Dtaus.new('LK')

# set sender account
dta.account = KingDta::Account.new(
                    :bank_account_number => "123456789",
                    :bank_number => "69069096",
                    :owner_name => "Return to Sender",
                    :bank_name => "Money Burner Bank")

# following should be done in a loop to add multiple bookings
# create receiving account
receiver = KingDta::Account.new(
                    :bank_account_number => "987456123",
                    :bank_number => "99099096",
                    :owner_name => "Gimme More Lt.",
                    :bank_name => "Banking Bandits")
# create booking
booking = KingDta::Booking.new(receiver, 100.00 )

# set booking text if you want to
booking.text = "Thanks for your purchase"

# add booking
dta.add( booking )
# end loop

# create datausstring and do with it whatever fits your workflow
my_str = dta.create

DTAZV

@dtazv = KingDta::Dtazv.new()

# sender account
@dtazv.account = KingDta::Account.new(
      :bank_account_number => "123456789",
      :bank_number => "40050100",
      :bank_name => "Greedy Fuckers Bank",
      :owner_name => "Sender name"
)

# receiver account
receiver = KingDta::Account.new(
      :bank_account_number => "987654321",
      :bank_iban => "PLsome-long-Iban",
      :bank_bic => "BicCode",
      :owner_name => "receivers name"
)

# add bookings, probably in a loop
booking = KingDta::Booking.new(receiver, 220.25)
@dtazv.add(booking)

# get output as string
@dtazv.create

also make sure to read the code and the specs

Credits

Bugfixes and enhancements by

Copyright (c) 2009-2011 Georg Leciejewski (SalesKing), Jan Kus (Railslove), released under the MIT license

king_dtaus's People

Contributors

koos avatar schorsch avatar iblue avatar ledermann avatar alto avatar guigs avatar dziemba avatar krudolph avatar jethroo avatar

Watchers

Jörg Sädtler avatar Harald Wartig avatar Helge Rausch avatar Roman avatar James Cloos avatar  avatar Dustin Mierig avatar

Forkers

kamil89 tolingo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.