Comments (11)
Yes, it will be bumped to v4 (#92), I'm gonna merge it today.
from adyen-go-api-library.
Hi @namanhkapur
Thanks for your request. I think it should be straight forward to include the models (we even have our own library to do so), I think the reason why we did not include it, was because there is no real API
just events and currently the models are bound to the APIs. Although, your case is valid and I believe it makes sense to include them.
I can do so investigation in the next 2 weeks, but if you can tackle this, it would be great. A good starting point is the library I've mentioned above. If you need go
templates, they are included in this repo.
Let me know if you need any help.
Best Regards,
from adyen-go-api-library.
I had a look at the adyen-openapi-generator library -- seems like it'd be hard to automatically generate the models in this case as there is no API to pull from. Is that right?
Is there a fast way to use the library to do so. How would you envision the process?
from adyen-go-api-library.
You can still generate, although if you look at the OpenAPI spec for the Notifications, the paths are not valid (but needed if we want to have an OpenAPI schema).
So my suggestion is, generate the models as if it was a real API, get rid of the generated API file (keep only the models) and then we can create something similar to the solution you proposed.
from adyen-go-api-library.
Ah makes sense -- okay I seem to have been able to create all the notification model files. Do you suggest I open a PR with only the model files? They can live in src/platformsnotificationevents
from adyen-go-api-library.
Sure! But keep it as a draft, so we can work on some helpers to unmarshal the notification JSON responses.
from adyen-go-api-library.
Just providing models would be sufficient IMO, and thanks to @namanhkapur for taking this up. In go, ideal way to do JSON unmarshal is indeed like @namanhkapur suggested below, so we don't have to do any helper as we won't be adding any value there. Go can unmarshall json to a struct as long as they match in structure.
if err := json.Unmarshal(reqBody, ¬ification); err != nil {
return err
}
from adyen-go-api-library.
Great, we can merge the PR then as soon as your comments are addressed
from adyen-go-api-library.
Thanks for contributing @namanhkapur, I'll merge yours and other changes to the master branch asap.
from adyen-go-api-library.
Thank you @namanhkapur
We would like to send you some swag as token of appreciation. If you like that can you send a postal address to "[email protected]"
from adyen-go-api-library.
Thanks for all of your help -- really appreciate the support! To get the newly merged master, should we upgrade to the latest version (v4) when it's released? Also, I sent my address 😄
from adyen-go-api-library.
Related Issues (20)
- Checkout modification support HOT 1
- [PW-8057] PaymentResponse does not work on the FraudResult field HOT 1
- Support for Cloud Terminal API ? HOT 5
- Support for Checkout API v68 HOT 1
- Requests to Adyen resulted in EOF error HOT 1
- StorePaymentMethod in PaymentRequest struct HOT 3
- Schema described in API documentation does not match model files HOT 2
- Support for Checkout API v69
- Remove unused models HOT 1
- [PW-7072] Checkout API supported version HOT 7
- [PW-7090] {paymentPspReference} is being harcoded in the checkout API modifications file
- [PW-7542] CaptureDelayHours value 0 is ignored HOT 3
- Dependency Dashboard
- Deprecate classic Adyen For Platforms
- Mask X-Api-Key Prefix On Debug Printout HOT 1
- Checkout API missing PaymentResponseAction in PaymentDetailsResponse model HOT 4
- Panic In Response Handling For 504 Gateway Timeout HOT 1
- Bancontact payment method on last lib versions HOT 6
- Dump Request/Response On HTTP Response Code >= 300
- Major version go module mismatch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adyen-go-api-library.