Module: PipeDrive
- Defined in:
- lib/pipe_drive/base.rb,
lib/pipe_drive/deal.rb,
lib/pipe_drive/stage.rb,
lib/pipe_drive/person.rb,
lib/pipe_drive/activity.rb,
lib/pipe_drive/pipeline.rb,
lib/pipe_drive/exception.rb,
lib/pipe_drive/deal_field.rb,
lib/pipe_drive/field_base.rb,
lib/pipe_drive/organization.rb,
lib/pipe_drive/person_field.rb,
lib/pipe_drive/send_request.rb,
lib/pipe_drive_ruby_wrapper.rb,
lib/pipe_drive/resource_base.rb,
lib/pipe_drive/organization_field.rb,
lib/pipe_drive/overall_source_base.rb
Defined Under Namespace
Classes: Activity, Base, Deal, DealField, FieldBase, FieldNotExist, MissingApiToken, NotAllowSearchType, NotProvideAssignType, Organization, OrganizationField, OverallSourceBase, Person, PersonField, Pipeline, RequestError, ResourceBase, SendRequest, Stage, TargetNotFound
Constant Summary
collapse
- API_VERSION =
'v1'
- DEFAULT_PER_PAGE =
10
- STRICT =
true
- RESOURCE_CLASSES =
%w[Organization Person Deal]
- FIELD_CLASSES =
%w[OrganizationField PersonField DealField]
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.api_token ⇒ Object
Returns the value of attribute api_token.
13
14
15
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 13
def api_token
@api_token
end
|
.field_keys ⇒ Object
31
32
33
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 31
def field_keys
@fields_keys = field_infos[:key_map]
end
|
.field_names ⇒ Object
35
36
37
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 35
def field_names
@field_names = field_infos[:name_map]
end
|
.pipeline_ids ⇒ Object
47
48
49
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 47
def pipeline_ids
@pipeline_ids ||= Pipeline.pipeline_ids_map
end
|
.stage_ids ⇒ Object
39
40
41
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 39
def stage_ids
@stage_ids ||= Stage.stage_ids_map
end
|
Class Method Details
.field_infos ⇒ Object
22
23
24
25
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 22
def field_infos
return @field_infos unless @field_infos.nil? || @field_infos.empty?
@field_infos = obtain_field_infos
end
|
.hash_except(hash, except_keys) ⇒ Object
63
64
65
66
67
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 63
def hash_except(hash, except_keys)
all_keys = hash.keys
remain_keys = all_keys - except_keys
hash.slice(*remain_keys)
end
|
.host ⇒ Object
55
56
57
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 55
def host
"https://api.pipedrive.com"
end
|
.requester ⇒ Object
59
60
61
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 59
def requester
SendRequest.new
end
|
.reset_field_infos! ⇒ Object
27
28
29
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 27
def reset_field_infos!
@field_infos = obtain_field_infos
end
|
.reset_pipeline_ids! ⇒ Object
51
52
53
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 51
def reset_pipeline_ids!
@pipeline_ids = Pipeline.pipeline_ids_map
end
|
.reset_stage_ids! ⇒ Object
43
44
45
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 43
def reset_stage_ids!
@stage_ids = Stage.stage_ids_map
end
|
.setup {|_self| ... } ⇒ Object
17
18
19
20
|
# File 'lib/pipe_drive_ruby_wrapper.rb', line 17
def setup
yield self
self
end
|