forked from tjmehta/rest-api-sdk-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
replace.js
33 lines (28 loc) · 796 Bytes
/
replace.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Copyright 2015 PayPal */
"use strict";
var paypal = require('../../../');
require('../../configure');
var webProfileId = "XP-3NWU-L5YK-X5EC-6KJM";
var web_profile_update_attributes = [
{
"op": "add",
"path": "/presentation/brand_name",
"value": "new_brand_name"
}
];
paypal.webProfile.get(webProfileId, function (error, webProfile) {
if (error) {
console.log(error);
throw error;
} else {
console.log(JSON.stringify(webProfile));
paypal.webProfile.replace(webProfileId, web_profile_update_attributes, function (error, response) {
if (error) {
console.log(error);
throw error;
} else {
console.log(response);
}
});
}
});