{"action":"closed","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/239","repository_url":"https://api.github.com/repos/paypal/PayPal-node-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/239/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/239/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/239","id":207049901,"number":239,"title":"billingPlan.update rejects some forms of valid RFC 6902 patches","user":{"login":"MichaelLeeHobbs","id":6986471,"avatar_url":"https://avatars1.githubusercontent.com/u/6986471?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelLeeHobbs","html_url":"https://github.com/MichaelLeeHobbs","followers_url":"https://api.github.com/users/MichaelLeeHobbs/followers","following_url":"https://api.github.com/users/MichaelLeeHobbs/following{/other_user}","gists_url":"https://api.github.com/users/MichaelLeeHobbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelLeeHobbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelLeeHobbs/subscriptions","organizations_url":"https://api.github.com/users/MichaelLeeHobbs/orgs","repos_url":"https://api.github.com/users/MichaelLeeHobbs/repos","events_url":"https://api.github.com/users/MichaelLeeHobbs/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelLeeHobbs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-12T13:24:46Z","updated_at":"2017-03-27T15:21:25Z","closed_at":"2017-03-27T15:21:25Z","body":"### General Information\r\n\r\n- Mode (Sandbox/Live): Sandbox\r\n- PayPal-Debug-ID(s) (from any logs): 7b824f74bd455\r\n- Version of node.js used: 6.2.2\r\n- SDK Version: 1.7.1\r\n- References: RFC 6902 - https://tools.ietf.org/html/rfc6902 and PayPal Common JSON Patch https://developer.paypal.com/docs/api/payments.billing-plans#definition-common_json_patch:v1\r\n- Other Relevant Libraries used: https://github.com/Starcounter-Jack/JSON-Patch\r\n\r\n### Issue Description\r\n\r\nbillingPlan.update does not correctly process some forms of valid RFC 6902 patches. The major issue is we attempt to use a popular library to generate JSON patches based on local changes in the document and then submit the patches to PayPal. Library generates them in the non-working form.\r\n\r\nworking\r\n          patch = \r\n```json\r\n[\r\n  {\r\n    \"op\": \"replace\",\r\n    \"path\": \"/\",\r\n    \"value\": {\r\n      \"state\": \"ACTIVE\"\r\n    }\r\n  }\r\n]\r\n```\r\nnot working\r\n          patch = \r\n```json\r\n[\r\n  {\r\n    \"op\": \"replace\",\r\n    \"path\": \"/state\",\r\n    \"value\": \"ACTIVE\"\r\n  }\r\n]\r\n```"}}
{"actor":{"display_login":"pp-randy"}}