Class: Pike13::API::V2::Desk::PackProduct

Inherits:
Base
  • Object
show all
Defined in:
lib/pike13/api/v2/desk/pack_product.rb

Class Method Summary collapse

Methods inherited from Base

client, configure

Class Method Details

.allObject

GET /desk/pack_products



10
11
12
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 10

def all
  client.get("desk/pack_products")
end

.create(attributes) ⇒ Object

POST /desk/pack_products



20
21
22
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 20

def create(attributes)
  client.post("desk/pack_products", { pack_product: attributes })
end

.create_pack(pack_product_id, attributes) ⇒ Object

POST /desk/pack_products/:pack_product_id/packs



35
36
37
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 35

def create_pack(pack_product_id, attributes)
  client.post("desk/pack_products/#{pack_product_id}/packs", { pack: attributes })
end

.destroy(id) ⇒ Object

DELETE /desk/pack_products/:id



30
31
32
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 30

def destroy(id)
  client.delete("desk/pack_products/#{id}")
end

.find(id) ⇒ Object

GET /desk/pack_products/:id



15
16
17
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 15

def find(id)
  client.get("desk/pack_products/#{id}")
end

.update(id, attributes) ⇒ Object

PUT /desk/pack_products/:id



25
26
27
# File 'lib/pike13/api/v2/desk/pack_product.rb', line 25

def update(id, attributes)
  client.put("desk/pack_products/#{id}", { pack_product: attributes })
end