Skip to content

Conversation

@Twigz
Copy link
Collaborator

@Twigz Twigz commented Feb 2, 2026

Summary

Updates OnrampCallbacks and OnrampConfiguration models to be Builder based instead of constructor based (similar to how PaymentMethodMessagingElement internally works).

Motivation

API review comments requested this change. While the nature of OnrampCallbacks is still in flux in the review, if they do end up sticking around, this change was requested.

Testing

  • Added tests
  • Modified tests
  • Manually verified

@Twigz Twigz requested review from a team as code owners February 2, 2026 20:17
fun build(): State {
return State(
authenticateUserCallback = requireNotNull(authenticateUserCallback) {
"authenticateUserCallback must not be null"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are all of these truly required? Is there zero use case for a merchant not to supply them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A merchant should supply all of them, yes.

@Twigz Twigz requested a review from a team as a code owner February 2, 2026 20:59
authorizeCallback = viewModel::onAuthorizeResult
)
val callbacks = OnrampCallbacks()
.authenticateUserCallback(callback = viewModel::onAuthenticateUserResult)
Copy link
Collaborator

Choose a reason for hiding this comment

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

(not for this PR) Given the view model is the one that owns the coordinator, and is the implementor of all of these callbacks, I think it does shine a light on the fact that these should likely just move to the coordinator constructor.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed          │         uncompressed         
          ├───────────┬───────────┬──────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
      dex │   2.2 MiB │   2.2 MiB │  0 B │   4.5 MiB │   4.5 MiB │  0 B 
     arsc │   1.1 MiB │   1.1 MiB │  0 B │   1.1 MiB │   1.1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │  0 B │     8 KiB │     8 KiB │  0 B 
      res │ 303.5 KiB │ 303.5 KiB │  0 B │ 457.7 KiB │ 457.7 KiB │  0 B 
   native │   7.9 MiB │   7.9 MiB │  0 B │  19.3 MiB │  19.3 MiB │  0 B 
    asset │   6.6 KiB │   6.6 KiB │  0 B │   6.3 KiB │   6.3 KiB │  0 B 
    other │ 107.5 KiB │ 107.5 KiB │ +2 B │ 214.9 KiB │ 214.9 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │  11.5 MiB │  11.5 MiB │ +2 B │  25.5 MiB │  25.5 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 21291 │ 21291 │ 0 (+0 -0) 
   types │  6505 │  6505 │ 0 (+0 -0) 
 classes │  5216 │  5216 │ 0 (+0 -0) 
 methods │ 31840 │ 31840 │ 0 (+0 -0) 
  fields │ 18204 │ 18204 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  163 │  163 │  0   
 entries │ 3719 │ 3719 │  0
APK
   compressed    │   uncompressed   │                        
──────────┬──────┼───────────┬──────┤                        
 size     │ diff │ size      │ diff │ path                   
──────────┼──────┼───────────┼──────┼────────────────────────
 29.5 KiB │ +4 B │  65.4 KiB │  0 B │ ∆ META-INF/CERT.SF     
  1.2 KiB │ -1 B │   1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA    
   26 KiB │ -1 B │  65.3 KiB │  0 B │ ∆ META-INF/MANIFEST.MF 
──────────┼──────┼───────────┼──────┼────────────────────────
 56.6 KiB │ +2 B │ 131.9 KiB │  0 B │ (total)

@Twigz
Copy link
Collaborator Author

Twigz commented Feb 3, 2026

@jaynewstrom-stripe Had to trigger a re-run due to the actions issues yesterday/this morning so I added some missing docs, otherwise nothing changed.

@Twigz Twigz merged commit cf0f51f into master Feb 4, 2026
19 checks passed
@Twigz Twigz deleted the twigz/onramp-builder-changes branch February 4, 2026 20:31
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