require 'brokermint/version'
require 'brokermint/configuration'
require 'resource_kit'
require 'kartograph'

module Brokermint
  autoload :Client, 'brokermint/client'

  autoload :CommentMapping, 'brokermint/mappings/comment_mapping'
  autoload :ContactMapping, 'brokermint/mappings/contact_mapping'
  autoload :CustomAttributeMapping, 'brokermint/mappings/custom_attribute_mapping'
  autoload :CustomTransactionAttributeMapping, 'brokermint/mappings/custom_transaction_attribute_mapping'
  autoload :IncomingTransactionMapping, 'brokermint/mappings/incoming_transaction_mapping'
  autoload :ReportFilterMapping, 'brokermint/mappings/report_filter_mapping'
  autoload :ReportFilterOptionMapping, 'brokermint/mappings/report_filter_option_mapping'
  autoload :ReportMapping, 'brokermint/mappings/report_mapping'
  autoload :RepresenterMapping, 'brokermint/mappings/representer_mapping'
  autoload :TransactionAttributeMapping, 'brokermint/mappings/transaction_attribute_mapping'
  autoload :TransactionBackupMapping, 'brokermint/mappings/transaction_backup_mapping'
  autoload :TransactionChecklistMapping, 'brokermint/mappings/transaction_checklist_mapping'
  autoload :TransactionCommissionMapping, 'brokermint/mappings/transaction_commission_mapping'
  autoload :TransactionCommissionPayeeMapping, 'brokermint/mappings/transaction_commission_payee_mapping'
  autoload :TransactionCommissionTierMapping, 'brokermint/mappings/transaction_commission_tier_mapping'
  autoload :TransactionDocumentMapping, 'brokermint/mappings/transaction_document_mapping'
  autoload :TransactionMapping, 'brokermint/mappings/transaction_mapping'
  autoload :TransactionNoteMapping, 'brokermint/mappings/transaction_note_mapping'
  autoload :TransactionParticipantMapping, 'brokermint/mappings/transaction_participant_mapping'
  autoload :TransactionTaskMapping, 'brokermint/mappings/transaction_task_mapping'
  autoload :UserMapping, 'brokermint/mappings/user_mapping'

  autoload :BaseModel, 'brokermint/models/base_model'
  autoload :Comment, 'brokermint/models/comment'
  autoload :Contact, 'brokermint/models/contact'
  autoload :CustomAttribute, 'brokermint/models/custom_attribute'
  autoload :CustomTransactionAttribute, 'brokermint/models/custom_transaction_attribute'
  autoload :IncomingTransaction, 'brokermint/models/incoming_transaction'
  autoload :Report, 'brokermint/models/report'
  autoload :ReportFilter, 'brokermint/models/report_filter'
  autoload :ReportFilterOption, 'brokermint/models/report_filter_option'
  autoload :Representer, 'brokermint/models/representer'
  autoload :Transaction, 'brokermint/models/transaction'
  autoload :TransactionAttribute, 'brokermint/models/transaction_attribute'
  autoload :TransactionBackup, 'brokermint/models/transaction_backup'
  autoload :TransactionChecklist, 'brokermint/models/transaction_checklist'
  autoload :TransactionCommission, 'brokermint/models/transaction_commission'
  autoload :TransactionCommissionPayee, 'brokermint/models/transaction_commission_payee'
  autoload :TransactionCommissionTier, 'brokermint/models/transaction_commission_tier'
  autoload :TransactionDocument, 'brokermint/models/transaction_document'
  autoload :TransactionNote, 'brokermint/models/transaction_note'
  autoload :TransactionParticipant, 'brokermint/models/transaction_participant'
  autoload :TransactionTask, 'brokermint/models/transaction_task'
  autoload :User, 'brokermint/models/user'

  autoload :ContactResource, 'brokermint/resources/contact_resource'
  autoload :IncomingTransactionResource, 'brokermint/resources/incoming_transaction_resource'
  autoload :ReportResource, 'brokermint/resources/report_resource'
  autoload :TransactionBackupResource, 'brokermint/resources/transaction_backup_resource'
  autoload :TransactionChecklistResource, 'brokermint/resources/transaction_checklist_resource'
  autoload :TransactionCommissionResource, 'brokermint/resources/transaction_commission_resource'
  autoload :TransactionDocumentResource, 'brokermint/resources/transaction_document_resource'
  autoload :TransactionNoteResource, 'brokermint/resources/transaction_note_resource'
  autoload :TransactionParticipantResource, 'brokermint/resources/transaction_participant_resource'
  autoload :TransactionResource, 'brokermint/resources/transaction_resource'
  autoload :TransactionTaskResource, 'brokermint/resources/transaction_task_resource'
  autoload :UserResource, 'brokermint/resources/user_resource'

  autoload :ErrorHandlingResourcable, 'brokermint/error_handling_resourcable'
  # autoload :PaginatedResource, 'brokermint/paginated_resource'

  autoload :ErrorMapping, 'brokermint/mappings/error_mapping'
  Error = Class.new(StandardError)
  UnauthorizedError = Class.new(Brokermint::Error)
  ForbiddenError = Class.new(Brokermint::Error)
  NotFoundError = Class.new(Brokermint::Error)
end
