// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orderreports.listtransactions({
// The Google-provided ID of the disbursement (found in Wallet).
disbursementId: 'placeholder-value',
// The maximum number of disbursements to return in the response, used for paging.
maxResults: 'placeholder-value',
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The token returned by the previous request.
pageToken: 'placeholder-value',
// The last date in which transaction occurred. In ISO 8601 format. Default: current date.
transactionEndDate: 'placeholder-value',
// The first date in which transaction occurred. In ISO 8601 format.
transactionStartDate: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken",
// "transactions": []
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orderreports.listdisbursements({
// The last date which disbursements occurred. In ISO 8601 format. Default: current date.
disbursementEndDate: 'placeholder-value',
// The first date which disbursements occurred. In ISO 8601 format.
disbursementStartDate: 'placeholder-value',
// The maximum number of disbursements to return in the response, used for paging.
maxResults: 'placeholder-value',
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The token returned by the previous request.
pageToken: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "disbursements": [],
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const content = google.content('v2');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/content'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await content.orderreports.listdisbursements({
// The last date which disbursements occurred. In ISO 8601 format. Default: current date.
disbursementEndDate: 'placeholder-value',
// The first date which disbursements occurred. In ISO 8601 format.
disbursementStartDate: 'placeholder-value',
// The maximum number of disbursements to return in the response, used for paging.
maxResults: 'placeholder-value',
// The ID of the account that manages the order. This cannot be a multi-client account.
merchantId: 'placeholder-value',
// The token returned by the previous request.
pageToken: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "disbursements": [],
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
const {google} = require('googleapis');
const content = google.content('v2.1');
const {google} = require('googleapis');
const content = google.content('v2');