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

Strong types Currency / Country #25

Open
four-bytes-robby opened this issue Aug 15, 2019 · 0 comments
Open

Strong types Currency / Country #25

four-bytes-robby opened this issue Aug 15, 2019 · 0 comments

Comments

@four-bytes-robby
Copy link

When sending a request (eg. Authorize -> WithCurrencyCode) we need a strongly typed property (Enum which too general and not as good as Amazon.Regions.currencyCode).

Why does IPN Notifications not return a strongly typed enum (like GetCurrencyCode of GetAmazonOrderReferenceDetailsResponse)? So we have to convert it to enum. This should be part of a flawless interface.

Another example: GetNotificationType of IpnHandler returns a string instead of AmazonPay.NotificationType.

It would make programming more secure and readable if this could already be handled and maybe you can add an "Unknown" type for NotificationTypes (or CurrencyCode) that are not known in this version of the package.

Also I would suggest to rename types according to the (MS) casing guidline. E.g. Amazon.Regions.currencyCode should become Amazon.Regions.CurrencyCode.

I also would like to know why you are using Get functions instead of readonly properties.
In my opinion GetAuthorizationId could be easily changed to a property AuthorizationId - if it is empty return an empty string, nothing is also fine.

Thank you for your consideration!

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

No branches or pull requests

1 participant