Skip to content

Add orders_nanpa example#45

Merged
Fivell merged 1 commit intomainfrom
feat/orders-nanpa-example
Mar 15, 2026
Merged

Add orders_nanpa example#45
Fivell merged 1 commit intomainfrom
feat/orders-nanpa-example

Conversation

@Fivell
Copy link
Member

@Fivell Fivell commented Mar 13, 2026

Summary

  • Adds OrdersNanpaExample showing how to order a DID number by NPA/NXX prefix
  • Fixes pre-existing compile errors in other examples (BalanceExample, VoiceInTrunkGroupsExample, DidTrunkAssignmentExample, IdentityAddressProofsExample)
  • Updates examples/README.md with new example entry

Test plan

  • Run DIDWW_API_KEY=... ./gradlew runExample -PexampleClass=com.didww.examples.OrdersNanpaExample against sandbox
  • Verify all examples compile without errors

@sonarqubecloud
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Java example demonstrating how to order a DID by NANPA NPA/NXX prefix, while also updating several existing examples to align with the current SDK resource construction patterns (removing now-nonexistent *.build(id) usage) so the examples compile cleanly.

Changes:

  • Added OrdersNanpaExample to demonstrate ordering by NANPA prefix via nanpa_prefix_id.
  • Updated multiple examples to use SDK resources directly (and withId(...) where applicable) instead of removed build(...) helpers.
  • Documented the new example in examples/README.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
examples/src/main/java/com/didww/examples/VoiceInTrunkGroupsExample.java Updates trunk-group relationship assignment to use the created trunk objects directly.
examples/src/main/java/com/didww/examples/OrdersNanpaExample.java New example: look up a NANPA prefix and place a DID order using the resolved SKU + nanpa_prefix_id.
examples/src/main/java/com/didww/examples/IdentityAddressProofsExample.java Replaces removed build(...) helpers with direct resources / withId(...) for proof file relationships.
examples/src/main/java/com/didww/examples/DidTrunkAssignmentExample.java Uses new <Resource>().withId(...) for patch/update payloads and relationships.
examples/src/main/java/com/didww/examples/BalanceExample.java Fixes type mismatch by formatting BigDecimal balances directly.
examples/README.md Adds an entry for OrdersNanpaExample.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Fivell Fivell merged commit 56117ae into main Mar 15, 2026
9 checks passed
@Fivell Fivell deleted the feat/orders-nanpa-example branch March 15, 2026 08:36
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