Sha256: cfb43492fdaee218e41f20a8fcc8cc5ace4058b5558593b01f18fd6faf66d173

Contents?: true

Size: 589 Bytes

Versions: 4

Compression:

Stored size: 589 Bytes

Contents

module BaseCrm
  class Lead < ApiClient::Resource::Base

    include BaseCrm::Resource
    include BaseCrm::Noteable
    include BaseCrm::Taskable
    include BaseCrm::CustomFieldable

    namespace "lead"

    prefix    "api/v1"

    always do
      endpoint BaseCrm.config.endpoints.leads
    end

    def noteable_type
      "Lead"
    end

    def taskable_type
      "Lead"
    end

    def self.build(result_or_array)
      if result_or_array.has_key?('items')
        build_many(result_or_array['items'])
      else
        build_one(result_or_array)
      end
    end

  end
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
basecrm-0.1.0 lib/base_crm/lead.rb
basecrm-0.0.3 lib/base_crm/lead.rb
basecrm-0.0.2 lib/base_crm/lead.rb
basecrm-0.0.1 lib/base_crm/lead.rb