-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/support service plan #47
Conversation
@@ -0,0 +1,33 @@ | |||
namespace Sinch.SMS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this will be an added value from SDK user's perspective : defining a dedicated type for supported region in case of service plan id usage
This mean if for test or any other reason user switch from projectId
<-> servicePlanId
usage the region as also to be changed. Not because wanting to changed to the region but because type is different.
e.g.: Still addressing us
region in both cases but have to change SmsHostingRegion.Us
<-> SmsServicePlanIdHostingRegion.Us
Even if supported regions are not equals, a dynamic validation against unexpected values should be enough.
And even in this case: it should be a warning and not an error. So in case of server going forward to support new region, SDK's user do not need to move to a new (but not yet ready release) SDK updated version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep dedicated type for regions as sets of supported are different. For any 'I don't want checks' users it's a record so new SmsServicePlainIdHostingRegion('cn')
should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the SDK user's point of view, a region is just a region: the EU, the USA, ... are no different targets when approached by service plan or project.
What is the added value of complexity for SDK's user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The supported set of regions are different, and different enums reflects just that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be discussed within the team. Item added in the parking lot
src/Sinch/SinchClient.cs
Outdated
httpSnakeCase); | ||
} | ||
|
||
private static Uri GetSmsBaseAddress(SmsServicePlanIdHostingRegion smsServicePlanIdHostingRegion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to previous comment about different types for same region usage: method signature based onto region type is used to trigger servicePlanId
vs projectId
URL.
This should be related to servicePlanId
usage not onto region type usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm renaming the method to better reflect underlying functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed during the standup meeting, we'll address the regions handling after it's discussed in details within the team
Add support for Service plan id of sms api. Which can be set via SinchOptions