Skip to content

feat(loyalty): the loyalty config API carries an optional spend conversion table (ENG-13206) - #77

Open
richardelms-stash wants to merge 1 commit into
mainfrom
eng-13206
Open

richardelms-stash wants to merge 1 commit into
mainfrom
eng-13206

Conversation

@richardelms-stash

@richardelms-stash richardelms-stash commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

https://linear.app/stashgg/issue/ENG-13206/the-public-api-messages-for-spendconversion-and-its-derived-rates

Intent

A partner's tool needs a published wire shape for sending its price row with its loyalty configuration and for reading back what Stash stored: the row itself, the rate derived for each currency, and when the table last changed. Leaving the row out of an update keeps what is stored, and sending an empty one removes it.

flowchart LR
  Tool["Partner tool"] -->|"PUT price row"| Api["Loyalty config API"]
  Api -->|"GET row, rates, updatedAt"| Tool
Loading

Beast Intent v0.2.0


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Note

💥 Blast Radius — Low Risk

Intent: Let a partner's tool submit a loyalty price row and read back the stored row, derived rates and last-change time.

The shared contract is additive: omitting spend_conversion leaves the stored table unchanged.

Overview
UpdateLoyaltyConfig accepts an optional row; configuration responses expose that row, rates_per_usd and updated_at.

Shop reach: Shops with a stored conversion table, count unknown; their configuration responses can include the new field. Writes target the shop named by shop_id.

Data/proto: A tool sends spend_conversion.tiers[].prices → the shop's stored row → rates_per_usd and updated_at in configuration responses. With a table stored, purchases in currencies missing from the row earn no points.

Scope is server/ingress/loyalty/v1/service.proto and two excluded generated files; existing fields remain unchanged.

Not reviewed: 2 generated file(s) — marked linguist-generated in .gitattributes: docs/gen/redoc.ingress.v1.html, docs/gen/swagger.ingress.v1.json.

Ripley Review v0.1.0 · 11ff1c3 · Report Issue

@richardelms-stash
richardelms-stash marked this pull request as ready for review October 28, 2026 15:19
Comment thread server/ingress/loyalty/v1/service.proto Resolved
Comment thread server/ingress/loyalty/v1/service.proto Resolved
Comment thread server/ingress/loyalty/v1/service.proto Resolved
…rsion table (ENG-13206)

UpdateLoyaltyConfigRequest accepts spendConversion, one price row in
every currency the partner sells in, from which earning converts a
non-USD purchase to its US dollar equivalent. GetLoyaltyConfig and
UpdateLoyaltyConfig report the stored row, the rate derived per currency
and when it last changed. Omitting it leaves the stored table; an empty
tiers list removes it. Additive: new fields 7, 5 and 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants