Sha256: 18f44e3ae3916b9cb55bf9a5d0e9771e022cb5e0f5374b760df33f13661b4ee1
Contents?: true
Size: 578 Bytes
Versions: 5
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true module Yext module Api module Validators # A Validator for account updates to verify that the update is valid. class AccountValidator < Validation::Validator include Validation 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 rule :accountId, :not_empty end end end end
Version data entries
5 entries across 5 versions & 1 rubygems