Code Duplication    Length = 6-7 lines in 2 locations

lib/authorize_net/key_value_transaction.rb 2 locations

@@ 159-165 (lines=7) @@
156
    #
157
    #   response = transaction.refund(10.0, '123456789', '1212')
158
    #
159
    def refund(amount, transaction, credit_card)
160
      handle_payment_argument(credit_card)
161
      handle_transaction_argument(transaction)
162
      set_fields(amount: amount)
163
      self.type = Type::CREDIT
164
      run
165
    end
166
167
    # Sets up and submits a refund (CREDIT) transaction for a transaction that was not originally
168
    # submitted via the payment gateway. Note that this is a special feature which requires your
@@ 253-258 (lines=6) @@
250
    #
251
    #   response = transaction.prior_auth_capture('123456789')
252
    #
253
    def prior_auth_capture(transaction, amount = nil)
254
      handle_transaction_argument(transaction)
255
      set_fields(amount: amount)
256
      self.type = Type::PRIOR_AUTHORIZATION_AND_CAPTURE
257
      run
258
    end
259
260
    #:enddoc:
261
    protected