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

update RussiaPaymentOrder payload #371

Open
AlexandreZaytsev opened this issue Dec 26, 2021 · 0 comments
Open

update RussiaPaymentOrder payload #371

AlexandreZaytsev opened this issue Dec 26, 2021 · 0 comments

Comments

@AlexandreZaytsev
Copy link

AlexandreZaytsev commented Dec 26, 2021

Raffael Hi
please take a look I suggest changing the RussiaPaymentOrder code to three constructors (three data structures)

RussiaPaymentOrder(
	MandatoryFields mandatoryFields,
	CharacterSets characterSet = CharacterSets.utf_8)
RussiaPaymentOrder(
	MandatoryFields mandatoryFields, 
	OptionalFields optionalFields = null, 
	CharacterSets characterSet = CharacterSets.utf_8)
RussiaPaymentOrder(
	MandatoryFields mandatoryFields,
        OptionalFields optionalFields = null,
        OptionalExtFields optionalExtFields = null,
        CharacterSets characterSet = CharacterSets.utf_8)

the initializer is not quite convenient here - it is the constructors that are needed

they can be arranged separately in the form of classes (like the iban class in SwissQrCode : Payload)

and add non-empty field validation when generating a string - to pass the <300 character condition (like here (ContactData : Payload)
...
unfortunately, I do not yet have enough experience - how it is beautiful to design
ps
by the way - function ValidateInput (...- it turned out beautifully
pps
I made a fork of the pay load generator.cs file - I hope I didn't spoil anything in your project

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