Class: EasyHubspot::LineItem

Inherits:
Base
  • Object
show all
Defined in:
lib/easy_hubspot/line_item.rb

Overview

class EasyHubspot::LineItem

Constant Summary collapse

LINE_ITEM_ENDPOINT =
'crm/v3/objects/line_items'

Class Method Summary collapse

Methods inherited from Base

email?, headers

Class Method Details

.create_line_item(body) ⇒ Object



17
18
19
# File 'lib/easy_hubspot/line_item.rb', line 17

def create_line_item(body)
  Client.do_post(LINE_ITEM_ENDPOINT, body, headers)
end

.delete_line_item(line_item_id) ⇒ Object



25
26
27
# File 'lib/easy_hubspot/line_item.rb', line 25

def delete_line_item(line_item_id)
  Client.do_delete(line_item_id_endpoint(line_item_id), headers)
end

.get_line_item(line_item_id) ⇒ Object



9
10
11
# File 'lib/easy_hubspot/line_item.rb', line 9

def get_line_item(line_item_id)
  Client.do_get(line_item_id_endpoint(line_item_id), headers)
end

.get_line_itemsObject



13
14
15
# File 'lib/easy_hubspot/line_item.rb', line 13

def get_line_items
  Client.do_get(LINE_ITEM_ENDPOINT, headers)
end

.update_line_item(line_item_id, body) ⇒ Object



21
22
23
# File 'lib/easy_hubspot/line_item.rb', line 21

def update_line_item(line_item_id, body)
  Client.do_patch(line_item_id_endpoint(line_item_id), body, headers)
end