Class ProductBuilder

java.lang.Object
app.ductape.sdk.products.builder.ProductBuilder

@Beta(since="0.1.0", reason="Fluent DSL surface evolving to cover full TS productsBuilder.") public final class ProductBuilder extends Object
Sprint 3 — Fluent ProductBuilder entry point. Mirrors the TypeScript SDK's ProductsService fluent DSL but expressed as Java step-typed chains.

Usage:


 ProductBuilder builder = ductape.products().builder("my-product");
 builder
     .app("payments-app")
         .withAccessTag("billing")
         .withAction("charge", action -> action.withMethod("POST").withPath("/charge"))
         .register();
 builder
     .database("primary")
         .withTrigger("on-user-create", t -> t.withTable("users").withEvent("INSERT"))
         .withMigration("v1", m -> m.withDescription("initial schema"))
         .register();
 Map<String, Object> definition = builder.build();
 

Chains are mutator-style: every withXxx returns this to support fluent accumulation. The terminal register() call performs the network round-trip via the underlying ProductsService; the snapshot build() call on this root yields the full immutable definition map for tests / diffs / JSON snapshots.

This class is currently Beta — its surface is locked by the ProductBuilderParityTest but signature evolution may occur until 1.0.0.