@fantastic.dev/better-stripe 0.68.1 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -371,3 +371,18 @@ it("labels a complete empty local period without inferring zero from partial his
371
371
  rerender(<ui.UsageSummary scope={usageScope} {...data} />);
372
372
  expect(screen.getByText("No usage in this period.")).toBeTruthy();
373
373
  });
374
+ it("explains partial-minute native summaries as unsupported instead of promising refresh will resolve them", () => {
375
+ render(
376
+ <ui.UsageSummary
377
+ scope={usageScope}
378
+ summary={usageSnapshot().summary}
379
+ provider={{
380
+ status: "unsupported",
381
+ reason: "minute_alignment_required",
382
+ retryable: false,
383
+ }}
384
+ />,
385
+ );
386
+ expect(screen.getByText(/partial-minute billing boundaries/)).toBeTruthy();
387
+ expect(screen.queryByText(/Refresh after provider ingestion/)).toBeNull();
388
+ });
@@ -179,8 +179,11 @@ export function UsageSummary(props: UsageSummaryProps) {
179
179
  )}
180
180
  {!provider || provider.status !== "available" ? (
181
181
  <p role="status">
182
- Native aggregation {provider?.status ?? "unavailable"}. Refresh after
183
- provider ingestion.
182
+ Native aggregation {provider?.status ?? "unavailable"}.{" "}
183
+ {provider?.status === "unsupported" &&
184
+ provider.reason === "minute_alignment_required"
185
+ ? "Exact summaries do not support partial-minute billing boundaries. Reconcile with the native invoice instead."
186
+ : "Refresh after provider ingestion."}
184
187
  </p>
185
188
  ) : (
186
189
  <>