Class: EasyHubspot::Product

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

Overview

class EasyHubspot::Product

Constant Summary collapse

PRODUCT_ENDPOINT =
'crm/v3/objects/products'

Class Method Summary collapse

Methods inherited from Base

email?, headers

Class Method Details

.create_product(body) ⇒ Object



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

def create_product(body)
  Client.do_post(PRODUCT_ENDPOINT, body, headers)
end

.delete_product(product_id) ⇒ Object



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

def delete_product(product_id)
  Client.do_delete(product_id_endpoint(product_id), headers)
end

.get_product(product_id) ⇒ Object



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

def get_product(product_id)
  Client.do_get(product_id_endpoint(product_id), headers)
end

.get_productsObject



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

def get_products
  Client.do_get(PRODUCT_ENDPOINT, headers)
end

.update_product(product_id, body) ⇒ Object



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

def update_product(product_id, body)
  Client.do_patch(product_id_endpoint(product_id), body, headers)
end