<commit_before># The +AdyenNotification+ class handles notifications sent by Adyen to your servers.
#
# Because notifications contain important payment status information, you should store
# these notifications in your database. For this reason, +AdyenNotification+ inherits
# from +ActiveRecord::Base+, and a migration is included to simply create a suitable table
# to store the notifications in.
#
# Adyen can either send notifications to you via HTTP POST requests, or SOAP requests.
# Because SOAP is not really well supported in Rails and setting up a SOAP server is
# not trivial, only handling HTTP POST notifications is currently supported.
#
# @example
#    @notification = AdyenNotification.log(request)
#    if @notification.successful_authorisation?
#      @invoice = Invoice.find(@notification.merchant_reference)
#      @invoice.set_paid!
#    end
class AdyenNotification < ActiveRecord::Base
  AUTO_CAPTURE_ONLY_METHODS = [
    "ideal",
    "c_cash",
    "directEbanking",
    "trustly",
    "giropay",
    "bcmc"
  ].freeze

  AUTHORISATION = "AUTHORISATION".freeze
  CANCELLATION = "CANCELLATION".freeze
  REFUND = "REFUND".freeze
  CANCEL_OR_REFUND = "CANCEL_OR_REFUND".freeze
  CAPTURE = "CAPTURE".freeze
  CAPTURE_FAILED = "CAPTURE_FAILED".freeze
  REFUND_FAILED = "REFUND_FAILED".freeze
  REFUNDED_REVERSED = "REFUNDED_REVERSED".freeze
<commit_msg>Add installment payment methods as auto captured<commit_after># The +AdyenNotification+ class handles notifications sent by Adyen to your servers.
#
# Because notifications contain important payment status information, you should store
# these notifications in your database. For this reason, +AdyenNotification+ inherits
# from +ActiveRecord::Base+, and a migration is included to simply create a suitable table
# to store the notifications in.
#
# Adyen can either send notifications to you via HTTP POST requests, or SOAP requests.
# Because SOAP is not really well supported in Rails and setting up a SOAP server is
# not trivial, only handling HTTP POST notifications is currently supported.
#
# @example
#    @notification = AdyenNotification.log(request)
#    if @notification.successful_authorisation?
#      @invoice = Invoice.find(@notification.merchant_reference)
#      @invoice.set_paid!
#    end
class AdyenNotification < ActiveRecord::Base
  AUTO_CAPTURE_ONLY_METHODS = [
    "ideal",
    "c_cash",
    "directEbanking",
    "trustly",
    "giropay",
    "bcmc",
    "cofinoga_3xcb",
    "cofinoga_4xcb"
  ].freeze

  AUTHORISATION = "AUTHORISATION".freeze
  CANCELLATION = "CANCELLATION".freeze
  REFUND = "REFUND".freeze
  CANCEL_OR_REFUND = "CANCEL_OR_REFUND".freeze
  CAPTURE = "CAPTURE".freeze
  CAPTURE_FAILED = "CAPTURE_FAILED".freeze
  REFUND_FAILED = "REFUND_FAILED".freeze
  REFUNDED_REVERSED = "REFUNDED_REVERSED".freeze

{'fraction_non_alphanumeric': 0.08235711750088746, 'fraction_numerical': 0.0007099751508697196, 'mean_word_length': 4.716024340770791, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4489974', 'n_tokens_mistral': 910, 'n_tokens_neox': 888, 'n_words': 260}