class Micropayment::Debit

Constants

URL

Public Class Methods

addressGet(options={}) click to toggle source

“ermittelt die Adresse des Kunden”

# File lib/services/debit.rb, line 98
def addressGet(options={})
  assert_valid_keys(options, :customerId)
  assert_keys_exists(options, :customerId)
  execute(:addressGet, options)
end
addressSet(options={}) click to toggle source

“erzeugt oder ändert Adressdaten eines Kunden”

# File lib/services/debit.rb, line 91
def addressSet(options={})
  assert_valid_keys(options, :customerId, :firstName, :surName, :street, :zip, :city, :country)
  assert_keys_exists(options, :customerId, :firstName, :surName, :street, :zip, :city)
  execute(:addressSet, options)
end
assert_keys_exists(*opts) click to toggle source
# File lib/services/debit.rb, line 18
def assert_keys_exists(*opts)
  Micropayment.assert_keys_exists *opts
end
assert_valid_keys(*opts) click to toggle source
# File lib/services/debit.rb, line 14
def assert_valid_keys(*opts)
  Micropayment.assert_valid_keys *opts
end
bankCheck(options={}) click to toggle source

“prüft Bankleitzahl und ermittelt Banknamen”

# File lib/services/debit.rb, line 70
def bankCheck(options={})
  assert_valid_keys(options, :country, :bankCode)
  assert_keys_exists(options, :bankCode)
  execute(:bankCheck, options)
end
bankaccountBar(options={}) click to toggle source

“Sperrt Bankverbindung oder gibt sie frei”

# File lib/services/debit.rb, line 84
def bankaccountBar(options={})
  assert_valid_keys(options, :country, :bankCode, :accountNumber, :barStatus)
  assert_keys_exists(options, :bankCode, :accountNumber, :barStatus)
  execute(:bankaccountBar, options)
end
bankaccountCheck(options={}) click to toggle source

“prüft Bankverbindung und ermittelt Banknamen”

# File lib/services/debit.rb, line 77
def bankaccountCheck(options={})
  assert_valid_keys(options, :country, :bankCode, :accountNumber)
  assert_keys_exists(options, :bankCode, :accountNumber)
  execute(:bankaccountCheck, options)
end
bankaccountGet(options={}) click to toggle source

“ermittelt die Bankverbindung des Kunden”

# File lib/services/debit.rb, line 63
def bankaccountGet(options={})
  assert_valid_keys(options, :customerId)
  assert_keys_exists(options, :customerId)
  execute(:bankaccountGet, options)
end
bankaccountSet(options={}) click to toggle source

“erzeugt oder ändert Bankverbindung eines Kunden”

# File lib/services/debit.rb, line 56
def bankaccountSet(options={})
  assert_valid_keys(options, :customerId, :bankCode, :accountNumber, :accountHolder, :country)
  assert_keys_exists(options, :customerId, :bankCode, :accountNumber, :accountHolder)
  execute(:bankaccountSet, options)
end
contactDataGet(options={}) click to toggle source

“ermittelt die Kontaktdaten des Kunden”

# File lib/services/debit.rb, line 112
def contactDataGet(options={})
  assert_valid_keys(options, :customerId)
  assert_keys_exists(options, :customerId)
  execute(:contactDataGet, options)
end
contactDataSet(options={}) click to toggle source

“erzeugt oder ändert Kontaktdaten eines Kunden”

# File lib/services/debit.rb, line 105
def contactDataSet(options={})
  assert_valid_keys(options, :customerId, :email, :phone, :mobile)
  assert_keys_exists(options, :customerId)
  execute(:contactDataSet, options)
end
customerCreate(options={}) click to toggle source

“legt neuen Kunden an”

# File lib/services/debit.rb, line 29
def customerCreate(options={})
  assert_valid_keys(options, :customerId, :freeParams)
  assert_keys_exists(options, :customerId)
  execute(:customerCreate, options)
end
customerGet(options={}) click to toggle source

“ermittelt alle freien Parameter des Kunden”

# File lib/services/debit.rb, line 43
def customerGet(options={})
  assert_valid_keys(options, :customerId)
  assert_keys_exists(options, :customerId)
  execute(:customerGet, options)
end
customerList(options={}) click to toggle source

“ermittelt alle Kunden”

# File lib/services/debit.rb, line 50
def customerList(options={})
  assert_valid_keys(options, :from, :count)
  execute(:customerList, options)
end
customerSet(options={}) click to toggle source

“ordnet weitere freie Parameter dem Kunden zu, oder ändert sie”

# File lib/services/debit.rb, line 36
def customerSet(options={})
  assert_valid_keys(options, :customerId, :freeParams)
  assert_keys_exists(options, :customerId)
  execute(:customerSet, options)
end
execute(method, data={}) click to toggle source
# File lib/services/debit.rb, line 10
def execute(method, data={})
  API.call(URL, method, data)
end
reset_test() click to toggle source

“löscht alle Kunden und Transaktionen in der Testumgebung”

# File lib/services/debit.rb, line 24
def reset_test
  execute(:resetTest, :testMode => 1)
end
sessionApprove(options={}) click to toggle source

“bestätigt den Lastschrifteinzug eines Vorgangs”

> “löst die Benachrichtigung sessionStatus mit dem Status ”APPROVED“ aus”

# File lib/services/debit.rb, line 142
def sessionApprove(options={})
  assert_valid_keys(options, :sessionId)
  assert_keys_exists(options, :sessionId)
  execute(:sessionApprove, options)
end
sessionChargeTest(options={}) click to toggle source

“simuliert die Abbuchung für alle bestätigten Vorgänge”

> “erzeugt für jede bestätigte Session eine neue Transaktion mit dem Typ ‘BOOKING’ und löst die Benachrichtigung transactionCreate aus”

> “löst die Benachrichtigung sessionStatus mit dem Status ‘CHARGED’ aus”

# File lib/services/debit.rb, line 158
def sessionChargeTest(options={})
  execute(:sessionChargeTest, :testMode => 1)
end
sessionCreate(options={}) click to toggle source

“erzeugt einen neuen Bezahlvorgang”

> “löst die Benachrichtigung sessionStatus mit dem Status ”INIT“ bzw. ”REINIT“ aus”

# File lib/services/debit.rb, line 120
def sessionCreate(options={})
  assert_valid_keys(options, :customerId, :sessionId, :project, :projectCampaign, :account, :webmasterCampaign, :amount, :currency, :title, :payText, :ip, :freeParams)
  assert_keys_exists(options, :customerId, :project)
  execute(:sessionCreate, options)
end
sessionGet(options={}) click to toggle source

“ermittelt Daten eines Bezahlvorgangs”

# File lib/services/debit.rb, line 134
def sessionGet(options={})
  assert_valid_keys(options, :sessionId)
  assert_keys_exists(options, :sessionId)
  execute(:sessionGet, options)
end
sessionList(options={}) click to toggle source

“übermittelt alle Bezahlvorgänge eines Kunden”

# File lib/services/debit.rb, line 149
def sessionList(options={})
  assert_valid_keys(options, :customerId)
  assert_keys_exists(options, :customerId)
  execute(:sessionList, options)
end
sessionRechargeTest(options={}) click to toggle source

“simuliert die komplette Nachzahlung eines stornierten Vorgangs”

> “erzeugt eine neue Transaktion mit dem Typ ”BACKPAY“ und löst die Benachrichtigung transactionCreate aus”

> “löst die Benachrichtigung sessionStatus mit dem Status ”RECHARGED“ aus, wenn der gesamte offene Betrag beglichen wurde”

# File lib/services/debit.rb, line 174
def sessionRechargeTest(options={})
  assert_valid_keys(options, :sessionId, :amount)
  assert_keys_exists(options, :sessionId)
  execute(:sessionRechargeTest, options.merge(:testMode => 1))
end
sessionRefund(options={}) click to toggle source

“Veranlasst eine (Teil-)Gutschrift und überweist sie zurück”

> “erzeugt eine neue Transaktion mit dem Typ ”REFUND“ und löst die Benachrichtigung transactionCreate aus”

# File lib/services/debit.rb, line 182
def sessionRefund(options={})
  assert_valid_keys(options, :sessionId, :bankCode, :accountNumber, :accountHolder, :amount, :payText)
  assert_keys_exists(options, :sessionId)
  execute(:sessionRefund, options)
end
sessionRefundReverseTest(options={}) click to toggle source

“simuliert Stornierung der letzten Gutschrift,”

> “erzeugt eine neue Transaktion mit dem Typ ”REFUNDREVERSAL“ und löst die Benachrichtigung transactionCreate aus”

# File lib/services/debit.rb, line 190
def sessionRefundReverseTest(options={})
  assert_valid_keys(options, :sessionId)
  assert_keys_exists(options, :sessionId)
  execute(:sessionRefundReverseTest, options.merge(:testMode => 1))
end
sessionReverseTest(options={}) click to toggle source

“simuliert Stornierung eines einzelnen Vorgangs”

> “erzeugt eine neue Transaktion mit dem Typ ”REVERSAL“ und löst die Benachrichtigung transactionCreate aus”

> “löst die Benachrichtigung sessionStatus mit dem Status ”REVERSED“ aus”

# File lib/services/debit.rb, line 165
def sessionReverseTest(options={})
  assert_valid_keys(options, :sessionId)
  assert_keys_exists(options, :sessionId)
  execute(:sessionReverseTest, options.merge(:testMode => 1))
end
sessionSet(options={}) click to toggle source

“ordnet weitere freie Parameter der Session zu, oder ändert sie”

# File lib/services/debit.rb, line 127
def sessionSet(options={})
  assert_valid_keys(options, :sessionId, :freeParams)
  assert_keys_exists(options, :sessionId)
  execute(:sessionSet, options)
end
transactionCreate(options={}) click to toggle source

“erstellt eine Transaktion vom Typ ”EXTERNAL“”

> “löst die Benachrichtigung transactionCreate aus”

# File lib/services/debit.rb, line 198
def transactionCreate(options={})
  assert_valid_keys(options, :sessionId, :date, :amount, :description)
  assert_keys_exists(options, :sessionId, :amount)
  execute(:transactionCreate, options)
end
transactionGet(options={}) click to toggle source

“ermittelt Daten einer Transaktion”

# File lib/services/debit.rb, line 212
def transactionGet(options={})
  assert_valid_keys(options, :transactionId)
  assert_keys_exists(options, :transactionId)
  execute(:transactionGet, options)
end
transactionList(options={}) click to toggle source

“ermittelt alle Transaktionen für einen Bezahlvorgang”

# File lib/services/debit.rb, line 205
def transactionList(options={})
  assert_valid_keys(options, :sessionId)
  assert_keys_exists(options, :sessionId)
  execute(:transactionList, options)
end