lib/mymoip/payments/credit_card_payment.rb
Method to_json
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def to_json(formatter = MyMoip::Formatter)
raise InvalidCreditCard, 'No credit card provided.' if credit_card.nil?
raise InvalidCreditCard if credit_card.invalid?
json = {