Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/unify oneofs #68

Merged
merged 10 commits into from
May 6, 2024
Merged

Refactor/unify oneofs #68

merged 10 commits into from
May 6, 2024

Conversation

Dovchik
Copy link
Contributor

@Dovchik Dovchik commented Apr 29, 2024

Unify oneof to be interface typed in a project where it makes sense

Refactor verification to specific methods

Split VerificationReport and VerificationStatus response types

Before merge should be merged: https://github.com/sinch/doppelganger/pull/22

@Dovchik Dovchik marked this pull request as ready for review April 29, 2024 15:40
src/Sinch/SMS/Inbounds/SmsInbound.cs Outdated Show resolved Hide resolved
src/Sinch/SMS/Inbounds/BinaryInbound.cs Outdated Show resolved Hide resolved
CurrencyId = "EUR"
},
BillableDuration = 40
Type = IdentityType.Number,

Choose a reason for hiding this comment

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

Not related to this PR, just a thought about Identity.
Currently only number is supported.
What do you think about creating something like a dedicated NumberIdentity class to simplify interface with this type ?
e.g. for StartVerification request:

var identity = new NumberIdentity("+123456789");
var request = .... <identity>

It will simplify type usage, hide the protocol dedicated value and in case of new identity type will be supported, it won't cause any breaking change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, makes sense, I'll add that too after release

@Dovchik Dovchik requested a review from JPPortier May 6, 2024 10:09
@Dovchik Dovchik merged commit b737280 into main May 6, 2024
3 checks passed
@Dovchik Dovchik deleted the refactor/unify-oneofs branch May 6, 2024 16:33
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