View Source ExPipedrive.Products (ex_pipedrive v0.1.0)

Pipedrive products resource.

v2-first helpers (get/2, create/2, update/3, delete/2, list_page/2, stream/2) talk to /api/v2/products via ExPipedrive.Resource.

Product variations (/api/v2/products/:id/variations) are deferred to a follow-up — use ExPipedrive.Raw.request/4 if you need them sooner.

Summary

Functions

Creates a product via POST /api/v2/products.

Deletes a product via DELETE /api/v2/products/:id.

Fetches a product by id via GET /api/v2/products/:id.

Lists one page of products via API v2 cursor pagination.

Lazily streams products across all v2 cursor pages until next_cursor is nil.

Updates a product via PATCH /api/v2/products/:id.

Functions

Creates a product via POST /api/v2/products.

Accepts a map (preferred) or %Product{}. Returns {:ok, %Product{}}.

Link to this function

delete(client, product_id)

View Source

Deletes a product via DELETE /api/v2/products/:id.

Fetches a product by id via GET /api/v2/products/:id.

Link to this function

list_page(client, opts \\ [])

View Source

Lists one page of products via API v2 cursor pagination.

Options: :cursor, :limit (clamped to 500), :owner_id, :ids, :filter_id, :sort_by, :sort_direction, :updated_since, :custom_fields.

Link to this function

list_products_page(client, opts \\ [])

View Source
Link to this function

stream(client, opts \\ [])

View Source

Lazily streams products across all v2 cursor pages until next_cursor is nil.

Link to this function

stream_products(client, opts \\ [])

View Source
Link to this function

update(client, product_id, attrs)

View Source

Updates a product via PATCH /api/v2/products/:id.