Exception: ActionKitRest::Response::InvalidAkidError
- Inherits:
-
ValidationError
- Object
- StandardError
- ValidationError
- ActionKitRest::Response::InvalidAkidError
- Defined in:
- lib/action_kit_rest/response/validation_error.rb
Constant Summary collapse
- MATCHING_ERRORS =
['Unable to associate this mailing ID with account.', 'לא הצלחנו לקשר בין מספר הזיהוי של רשימת הדיוור הזו לבין החשבון.', 'لم ننجح في مطابقة العنوان الالكتروني مع الحساب.'].freeze
Instance Attribute Summary
Attributes inherited from ValidationError
Class Method Summary collapse
Methods inherited from ValidationError
Constructor Details
This class inherits a constructor from ActionKitRest::Response::ValidationError
Class Method Details
.matches?(errors) ⇒ Boolean
30 31 32 33 34 35 36 37 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 30 def self.matches?(errors) return false unless errors&.keys == ['mailing_id'] mailing_id_errors = errors['mailing_id'] return false unless mailing_id_errors.size == 1 MATCHING_ERRORS.include?(mailing_id_errors.first) end |