Class: Yext::Api::Validators::AccountValidator

Inherits:
Validation::Validator
  • Object
show all
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

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