v1/reporting/transactions What C# object used to convert json?
CKdev
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
May-22-2020
09:09 AM
I am calling v1/reporting/transactions and getting a valid JSON string back. I would like to convert this to the correct C# object type but I am unable to find any type that matches? Any idea what this type is? I would be a list of transaction_info objects.
1 REPLY 1
CKdev
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May-23-2020
06:28 AM
I was not aware that Visual Studio had a means of generating C# classes from JSON.
- Using "page_size" of 1 I copied the return JSON to clipboard. This way I only had 1 JSON object to deal with.
- Edit->Paste Special->Paste JSON As Classes. This ended up making all the classes I needed.
- Changed my cast type from string to the new classes generated and everything seems to be working.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Re: Enable the return of billing address in Sandbox Environment
- Question about the ButtonSource field when converting an integration from SOAP/NVP to REST API v1. in REST APIs
- webhook deregistration in REST APIs
- Refunding an order via HATEOAS URL failing with NOT_AUTHORIZED error in Sandbox Environment
- Im am a developer and i am having issues getting google pay to work on my account. in Sandbox Environment