Class: AuctionFunCore::Contracts::AuctionContext::PreAuction::AuctionStartReminderContract

Inherits:
AuctionFunCore::Contracts::ApplicationContract show all
Defined in:
lib/auction_fun_core/contracts/auction_context/pre_auction/auction_start_reminder_contract.rb

Overview

The AuctionStartReminderContract class validates the scheduled reminder for the auction start. It checks if the auction associated with the provided auction ID has not started yet and validates accordingly.

Examples:

Validating auction reminder

contract = AuctionFunCore::Contracts::AuctionContext::PreAuction::AuctionStartReminderContract.new
attributes = { auction_id: 123 }
result = contract.call(attributes)
if result.success?
  puts "Reminder setup is valid."
else
  puts "Failed to validate reminder: #{result.errors.to_h}"
end

Constant Summary collapse

I18N_SCOPE =

Scope for internationalization (i18n) entries specific to errors in this contract.

"contracts.errors.custom.auction_context.pre_auction.auction_start_reminder"

Constants inherited from AuctionFunCore::Contracts::ApplicationContract

AuctionFunCore::Contracts::ApplicationContract::EMAIL_REGEX, AuctionFunCore::Contracts::ApplicationContract::I18N_MACRO_SCOPE

Constants included from Business::Configuration

Business::Configuration::AUCTION_KINDS, Business::Configuration::AUCTION_MAX_TITLE_LENGTH, Business::Configuration::AUCTION_MIN_TITLE_LENGTH, Business::Configuration::AUCTION_STATUSES, Business::Configuration::AUCTION_STOPWATCH_MAX_VALUE, Business::Configuration::AUCTION_STOPWATCH_MIN_VALUE, Business::Configuration::MAX_NAME_LENGTH, Business::Configuration::MAX_PASSWORD_LENGTH, Business::Configuration::MIN_NAME_LENGTH, Business::Configuration::MIN_PASSWORD_LENGTH