Sha256: 054a66e9702e2d3f352870fbd16f21809be24fde374e7e60315edb1b39d078b1
Contents?: true
Size: 788 Bytes
Versions: 9
Compression:
Stored size: 788 Bytes
Contents
module RockRMS class Client module PaymentMethod def list_payment_methods(options = {}) res = get(payment_method_path, options) RockRMS::PaymentMethod.format(res) end def create_payment_method(payment_type:, foreign_key: nil) options = { 'CurrencyTypeValueId' => cast_payment_type(payment_type), 'ForeignKey' => foreign_key } post(payment_method_path, options) end private def cast_payment_type(payment_type) case payment_type when 'card' 156 when 'bank account', 'ach' 157 end end def payment_method_path(id = nil) id ? "FinancialPaymentDetails/#{id}" : 'FinancialPaymentDetails' end end end end
Version data entries
9 entries across 9 versions & 1 rubygems