class Hubspot::DealPipeline
HubSpot
Deals API
{developers.hubspot.com/docs/methods/deal-pipelines/overview}
Constants
- PIPELINES_PATH
- PIPELINE_PATH
Attributes
active[R]
display_order[R]
label[R]
pipeline_id[R]
stages[R]
Public Class Methods
all()
click to toggle source
# File lib/hubspot/deal_pipeline.rb, line 33 def all response = Hubspot::Connection.get_json(PIPELINES_PATH, {}) response.map { |p| new(p) } end
create!(post_data={})
click to toggle source
Creates a DealPipeline
{developers.hubspot.com/docs/methods/deal-pipelines/create-deal-pipeline} @return [Hubspot::PipeLine] Company
record
# File lib/hubspot/deal_pipeline.rb, line 41 def create!(post_data={}) response = Hubspot::Connection.post_json(PIPELINES_PATH, params: {}, body: post_data) new(response) end
find(pipeline_id)
click to toggle source
# File lib/hubspot/deal_pipeline.rb, line 28 def find(pipeline_id) response = Hubspot::Connection.get_json(PIPELINE_PATH, { pipeline_id: pipeline_id }) new(response) end
new(response_hash)
click to toggle source
# File lib/hubspot/deal_pipeline.rb, line 19 def initialize(response_hash) @active = response_hash["active"] @display_order = response_hash["displayOrder"] @label = response_hash["label"] @pipeline_id = response_hash["pipelineId"] @stages = response_hash["stages"] end
Public Instance Methods
[](stage)
click to toggle source
# File lib/hubspot/deal_pipeline.rb, line 54 def [](stage) @stages[stage] end
destroy!()
click to toggle source
Destroys deal_pipeline {developers.hubspot.com/docs/methods/companies/delete_company} @return [TrueClass] true
# File lib/hubspot/deal_pipeline.rb, line 50 def destroy! Hubspot::Connection.delete_json(PIPELINE_PATH, pipeline_id: @pipeline_id) end