Add IssuingStockRule resource#56
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
tests/issuingStockRule.phpsrc/issuingStockRule/issuingStockRule.phptests/test.phpCHANGELOG.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 (list-based,Rest::postnotpostSingle)Rest::post)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:61-64get(id)returns a singleIssuingStockRuleby id (method ships; test DEFERRED — route not deployed, returnsrouteNotFound)queryreturns iterable ofIssuingStockRule, acceptinglimit,after,before,status(list),stockIds,ids,tagsquery@ sdk-infra/php/tests/issuingStockRule.php:12-20pagereturns[items, cursor]tuple, accepts same params as query pluscursor;limitmax 100 (API-side 500 when no date window — test passesafter/before)page@ sdk-infra/php/tests/issuingStockRule.php:24-43 (usesafter/before; API-side 500 is a Houston issue, not an impl gap)update(id, ...)PATCHes the rule acceptingminimumBalance,tags,emails,phones; does NOT acceptstockIdorstatusRest::patchId;stockId/statusabsent from update signature)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:66-69 (assertsminimumBalance == 20000)cancel(id)DELETEs the rule and returns the canceled object; test assertsstatus == "canceled"Rest::deleteId)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:71-74 (asserts$rule->status != "canceled"guard)statusis output-only enumactive|canceled; never sent on create or PATCHcheckParam; absent fromupdatesignature)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:71-74 (cancel assertsstatus == "canceled")created,updated) parsed to native datetime type via SDK helper (Checks::checkDateTime)Checks::checkDateTimeon both fields)Checks::checkDateTimeis the SDK's standard helper; no explicit datetime-type assertion required by contract (mirrors Python convention)id,status,created,updatedare output-only: constructor accepts them (populates in-memory) but they are not sent by the POST bodycheckParam;Rest::postserialisation excludes output-only fields per SDK convention)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:61-64 (creates without passing these fields; asserts$rule->idis non-null after response)logmodule, file, or test scaffoldedsdk-infra/php/src/issuingStockRule/contains onlyissuingStockRule.php(nolog.php)minimumBalanceandstockIdare only required constructor params;tags/emails/phonesoptional; fixture populatesemails+phonesto satisfy APImissingReceiverrule; test cancels existing active rule(s) beforecreateminimumBalance,stockIdrequired; others optional)postPatchAndCancel@ sdk-infra/php/tests/issuingStockRule.php:45-61 (frees stock first) +example()@ sdk-infra/php/tests/issuingStockRule.php:77-87 (fixture hasemails+phones)limit/after/before; page withafter/beforefilters and 2 pages; no get test; create→update→cancel with real id from a freed stockquery@ sdk-infra/php/tests/issuingStockRule.php:12-20;page@ :24-43;postPatchAndCancel@ :45-75; no get test present (correct per contract)Summary
If FAIL — routing recommendation
N/A — VERDICT is PASS.