Discrepancy between SDK models and API models
JustinAren opened this issue · 2 comments
Hi team,
There seems to be a discrepancy between the SDK models and the API models. I found several models in the SDK where some fields are not available which are available in the API.
For example:
- https://developers.klarna.com/api/#payments-api__session__authorization_token: In the GET /payments/v1/sessions/{session_id} response an authentication_token field is present, but in the PaymentCreditSession object (the return object of the klarnaApi.Payment.GetCreditSession) this is not available.
- https://developers.klarna.com/api/#order-management-api__create-a-refund__reference: In the POST /ordermanagement/v1/orders/{order_id}/refunds request input a reference field is present, but in the OrderManagementRefund object (the input object of the klarnaApi.OrderManagement.CreateRefund action) this is not available. Also, in the response headers there should be a Refund-Id header, but I have no access to this in the SDK.
- https://developers.klarna.com/api/#order-management-api__create-capture__reference: In the POST /ordermanagement/v1/orders/{order_id}/captures request input a reference field is present, but in the OrderManagementCreateCapture object (the input object of the klarnaApi.OrderManagement.CreateCaptureaction) this is not available. Also, in the response headers there should be a Capture-Id header, but I have no access to this in the SDK.
I may be missing some more examples. Could you please look into this?
Many thanks in advance.
Hi @JustinAren
Thanks for pointing this out. Yes, we know about this issue and currently we are working on migrating to the auto-generated models architecture. Such models will simplify a process of adding new fields and updating the models.
We already migrated the Klarna Payment and Order management APIs.
These changes are still not released, but we plan to release them in a short time.
Best wishes!
All the changes are available in the latest v3.1.10 release:
https://www.nuget.org/packages/Klarna.Rest.Core/3.1.10
The SDK Ref can be found here: https://klarna.github.io/kco_rest_dotnet/v3.1.10/api/index.html