Add IssuingStockRule resource#75
Open
lucasmiranda-stark wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
IssuingStockRuleresource generated from contractcontracts/issuing-stock-rule.md.What changed
src/test/java/TestIssuingStockRule.javasrc/main/java/com/starkinfra/IssuingStockRule.javaCHANGELOG.mdREADME.mdTest plan
queryandcreate → update → cancelpass against the infra sandbox (Phase 6).pagecurrently returns an API-side 500 ("Houston") — a known upstream pagination issue, not an SDK defect; passes onceGET /issuing-stock-rulepaging is fixed.get(id)ships as a method but has no test —GET /issuing-stock-rule/{id}is not yet deployed (deferred).Risk & Rollback
Contract review (Phase 7)
Contract Review
Checklist
createaccepts a list ofIssuingStockRuleand returns the same shape with server-assignedid,status,created,updatedpopulated (Python:rest.post_multi)create(List<?> rules)→Rest.post(data, ruleList, user))idnon-null/non-empty)get(id)returns a singleIssuingStockRuleby id (method ships; test DEFERRED — route not deployed)get(String id)andget(String id, User user)both present, delegate toRest.getId)queryreturns aGenerator<IssuingStockRule>acceptinglimit,after,before,status(list),stockIds,ids,tagsqueryoverloads, all params documented in javadoc at lines 172–179)pagereturns[items, cursor]equivalent (IssuingStockRule.Page) accepting same params asquerypluscursor;limitmax 100. NOTE: endpoint returns 500 without date window — test passesafter/beforeper contractPageinner class at 240–248;pageoverloads at 272–338; limit doc says max 100 at line 257)pagecalls of limit=2 with after/before; no-duplicate check; stops on null cursor)update(id, ...)PATCHes the rule acceptingminimumBalance,tags,emails,phones; does not acceptstockIdorstatusstockIdandstatusabsent from update javadoc)updatewith minimumBalance=20000, asserts returned value == 20000)cancel(id)DELETEs the rule and returns the canceled object; test asserts returnedstatus == "canceled"canceldelegates toRest.delete)canceledRule.status.equals("canceled"))statusis output-only enum (active|canceled); never sent on create or PATCHthis.status = null(not read from input data); update javadoc at 395–398 does not liststatuscreatedandupdatedare parsed to the language's native datetime type using the SDK's existing helper — Java convention: String fields (per SDK-infra/java standard across all issuing resources)public String updated; public String created;) — Java SDK uses String for datetimes by convention, matching sibling issuing resourcesid,status,created,updatedare output-only: constructor populates in-memory but API ignores on POSTthis.status = null,this.updated = null,this.created = null;idset viasuper(null); none read from input map)logmodule, file, or test scaffoldedIssuingStockRule.javaandTestIssuingStockRule.java(manifest.txt lines 1–2); no log class, no log import in either fileminimumBalanceandstockIdare the only required constructor params;tags,emails,phonesare optional; fixture populatesemails/phones(missingReceiverguard)minimumBalanceandstockIdextracted unconditionally; tags/emails/phones at 119–121 with no null guard = optional); Map constructor docs at 98–104Summary
If FAIL — routing recommendation
N/A — VERDICT is PASS.