Sha256: 5886a92ea70ef193800d7eed7fd0bfaf9a00af9484ec481c47bee2d83ce36d16
Contents?: true
Size: 553 Bytes
Versions: 36
Compression:
Stored size: 553 Bytes
Contents
require 'quick_travel/adapter' require 'quick_travel/cache' module QuickTravel class PaymentType < Adapter self.api_base = '/payment_types' self.lookup = true def credit_card payment_method == 'credit_card' end def code if credit_card credit_card_brand.underscore.gsub(/\s/, '_') else payment_method end end def as_json(options = nil) super.merge(code: code) end def self.information get_and_validate('/api/payment_types/information.json') end end end
Version data entries
36 entries across 36 versions & 1 rubygems