Class: NotSoEasyHubspot::Deal

Inherits:
Base
  • Object
show all
Defined in:
lib/not_so_easy_hubspot/deal.rb

Overview

class NotSoEasyHubspot::deal

Constant Summary collapse

DEAL_ENDPOINT =
'crm/v3/objects/deals'

Class Method Summary collapse

Methods inherited from Base

email?, headers

Class Method Details

.create_deal(body) ⇒ Object



17
18
19
# File 'lib/not_so_easy_hubspot/deal.rb', line 17

def create_deal(body)
  Client.do_post(DEAL_ENDPOINT, body, headers)
end

.delete_deal(deal_id) ⇒ Object



25
26
27
# File 'lib/not_so_easy_hubspot/deal.rb', line 25

def delete_deal(deal_id)
  Client.do_delete(deal_id_endpoint(deal_id), headers)
end

.get_deal(deal_id) ⇒ Object



9
10
11
# File 'lib/not_so_easy_hubspot/deal.rb', line 9

def get_deal(deal_id)
  Client.do_get(deal_id_endpoint(deal_id), headers)
end

.get_dealsObject



13
14
15
# File 'lib/not_so_easy_hubspot/deal.rb', line 13

def get_deals
  Client.do_get(DEAL_ENDPOINT, headers)
end

.update_deal(deal_id, body) ⇒ Object



21
22
23
# File 'lib/not_so_easy_hubspot/deal.rb', line 21

def update_deal(deal_id, body)
  Client.do_patch(deal_id_endpoint(deal_id), body, headers)
end