module Yext::Api::Concerns::AccountRelations

Because the Account is listed in the API documentation in two locations, there are two different but somewhat identical Account objects.

This module includes the shared code between the two.

Public Instance Methods

accountId=(value) click to toggle source

Yext field names don't match the Ruby naming standard, this is the field name they use. Because I use `account_id` in the route, I need that attribute defined. Because Yext uses accountId, when it is set, I need to set `account_id` so they will match.

Calls superclass method
# File lib/yext/api/concerns/account_relations.rb, line 56
def accountId=(value)
  super
  attributes[:account_id] ||= value
end

Private Instance Methods

association?(klass) click to toggle source
# File lib/yext/api/concerns/account_relations.rb, line 70
def association?(klass)
  associations.key?(Yext::Api::Concerns::AccountChild.association_name(klass).to_sym)
end
save_account_id() click to toggle source

rubocop:enable Naming/MethodName

# File lib/yext/api/concerns/account_relations.rb, line 65
def save_account_id
  attributes[:account_id] = accountId
end