class Dispatch::ExternalIDs::ThirdParty

Public Class Methods

fetch(client:, entity:, id:, access_token: nil) click to toggle source
# File lib/dispatch/external_ids.rb, line 30
def self.fetch(client:, entity:, id:, access_token: nil)
  query = {
    filter: {
      client: client,
      dispatch_type: entity,
      dispatch_id: id,
    },
    access_token: access_token
  }

  res = get('/v1/records.json', { query: query })
  res['records'] if res.code == 200
end