lib/client_success/open_api/contacts.rb
# Generates a path for a contact. Most Contact paths
# are nested under a Client. However, some are top level.
# Returns the appropriate path configuration based on
# what is passed, since top-level path is only used
# when there is a contact id.
#
# @option [Integer or String] client_id
# @option [Integer or String] contact_id
# @return [String]
#
Generates a path for a contact. Most Contact paths
are nested under a Client. However, some are top level.
Returns the appropriate path configuration based on
what is passed, since top-level path is only used
when there is a contact id.
Generates a path for a contact . Most Contact paths are nested under a Client . However some are top level . Returns the appropriate path configuration based on what is passed since top - level path is only used when there is a contact id .
def contact_path_for(client_id: nil, contact_id: nil)
        path = if client_id
                 "#{Clients::CLIENT_API_PATH}/#{client_id}#{CONTACT_API_PATH}"
               else
                 CONTACT_API_PATH
               end
        path += "/#{contact_id}" if contact_id
        path
      end
def contact_path_for ( client_id : nil , contact_id : nil ) path = if client_id "#{Clients::CLIENT_API_PATH}/#{client_id}#{CONTACT_API_PATH}" else CONTACT_API_PATH end path += "/#{contact_id}" if contact_id path end
Generates a path for a contact.
Generates a path for a contact .
None
String
client_id
contact_id
None