module Ravelin
Constants
- VERSION
Attributes
faraday_adapter[RW]
faraday_timeout[RW]
Public Class Methods
camelize(key)
click to toggle source
# File lib/ravelin.rb, line 56 def camelize(key) return '3ds' if key == :three_d_secure key.to_s.gsub(/_(.)/) { Regexp.last_match(1).upcase } end
convert_ids_to_strings(key, value)
click to toggle source
# File lib/ravelin.rb, line 75 def convert_ids_to_strings(key, value) key.to_s.match(/_id\Z/) && value.is_a?(Integer) ? value.to_s : value end
datetime_to_epoch(val)
click to toggle source
# File lib/ravelin.rb, line 62 def datetime_to_epoch(val) case val when Date val.to_datetime.to_time.to_i when DateTime val.to_time.to_i when Time val.to_i else val.to_i end end