Class: Yext::Api::Validators::AccountValidator
- Inherits:
-
Validation::Validator
- Object
- Validation::Validator
- Yext::Api::Validators::AccountValidator
- Extended by:
- Validation::Rules
- Includes:
- Validation
- Defined in:
- lib/yext/api/validators/account_validator.rb
Overview
A Validator for account updates to verify that the update is valid.
Instance Method Summary collapse
-
#initialize(obj) ⇒ AccountValidator
constructor
A new instance of AccountValidator.
Constructor Details
#initialize(obj) ⇒ AccountValidator
Returns a new instance of AccountValidator.
11 12 13 14 15 16 17 |
# File 'lib/yext/api/validators/account_validator.rb', line 11 def initialize(obj) # Ensure that the accountId field exists by cloning the Account and setting it. obj = Yext::Api::AdministrativeApi::Account.new(obj.attributes) obj.accountId = obj[:accountId] super(obj) end |