Pennylane API Client
    Preparing search index...

    Variable ProductsApiConst

    ProductsApi: {
        createProduct: (
            body: CreateProductBody,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            CreateProductError,
            PennylaneClient,
        >;
        getProduct: (
            id: number,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            GetProductError,
            PennylaneClient,
        >;
        getProducts: (
            params?: GetProductsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    archived_at: string
                    | null;
                    created_at: string;
                    currency: string;
                    description: string;
                    external_reference: string;
                    id: number;
                    label: string;
                    ledger_account: { id: number } | null;
                    price: string;
                    price_before_tax: string;
                    reference: string | null;
                    unit: string;
                    updated_at: string;
                    vat_rate: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetProductsError,
            PennylaneClient,
        >;
        updateProduct: (
            id: number,
            body: UpdateProductBody,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            UpdateProductError,
            PennylaneClient,
        >;
    } = ...

    Service containing methods for the "products" endpoints.

    Type Declaration

    • createProduct: (
          body: CreateProductBody,
      ) => Effect<
          {
              archived_at: string
              | null;
              created_at: string;
              currency: string;
              description: string;
              external_reference: string;
              id: number;
              label: string;
              ledger_account: { id: number } | null;
              price: string;
              price_before_tax: string;
              reference: string | null;
              unit: string;
              updated_at: string;
              vat_rate: string;
          },
          CreateProductError,
          PennylaneClient,
      >

      Creates a new product.

    • getProduct: (
          id: number,
      ) => Effect<
          {
              archived_at: string
              | null;
              created_at: string;
              currency: string;
              description: string;
              external_reference: string;
              id: number;
              label: string;
              ledger_account: { id: number } | null;
              price: string;
              price_before_tax: string;
              reference: string | null;
              unit: string;
              updated_at: string;
              vat_rate: string;
          },
          GetProductError,
          PennylaneClient,
      >

      Retrieves a single product by its unique identifier.

    • getProducts: (
          params?: GetProductsQueryParams,
      ) => Effect<
          {
              has_more: boolean;
              items: readonly {
                  archived_at: string
                  | null;
                  created_at: string;
                  currency: string;
                  description: string;
                  external_reference: string;
                  id: number;
                  label: string;
                  ledger_account: { id: number } | null;
                  price: string;
                  price_before_tax: string;
                  reference: string | null;
                  unit: string;
                  updated_at: string;
                  vat_rate: string;
              }[];
              next_cursor?: string
              | null;
          },
          GetProductsError,
          PennylaneClient,
      >

      Retrieves a list of products.

    • updateProduct: (
          id: number,
          body: UpdateProductBody,
      ) => Effect<
          {
              archived_at: string
              | null;
              created_at: string;
              currency: string;
              description: string;
              external_reference: string;
              id: number;
              label: string;
              ledger_account: { id: number } | null;
              price: string;
              price_before_tax: string;
              reference: string | null;
              unit: string;
              updated_at: string;
              vat_rate: string;
          },
          UpdateProductError,
          PennylaneClient,
      >

      Updates an existing product.