1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-11 22:24:21 +01:00
fab-manager/lib/payment/item.rb

38 lines
466 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Payments module
module Payment; end
# Generic payment object
class Payment::Item
attr_reader :klass
def initialize(klass, id = nil, *args)
@klass = klass
@id = id
@args = args
end
def class
klass
end
def payment_mean?
false
end
2021-06-04 18:26:20 +02:00
def subscription?
false
end
def order?
false
end
def gateway
klass[/^(PayZen|Stripe)::/, 1]
end
def retrieve(_id = nil, *_args); end
end