How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • // 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.settlementreports.list({
        // The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.
        maxResults: 'placeholder-value',
        // The Merchant Center account to list settlements for.
        merchantId: 'placeholder-value',
        // The token returned by the previous request.
        pageToken: 'placeholder-value',
        // Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.
        transferEndDate: 'placeholder-value',
        // Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.
        transferStartDate: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "resources": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // 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.settlementreports.get({
        // The Merchant Center account of the settlement report.
        merchantId: 'placeholder-value',
        // The Google-provided ID of the settlement.
        settlementId: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "endDate": "my_endDate",
      //   "kind": "my_kind",
      //   "previousBalance": {},
      //   "settlementId": "my_settlementId",
      //   "startDate": "my_startDate",
      //   "transferAmount": {},
      //   "transferDate": "my_transferDate",
      //   "transferIds": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // 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.settlementtransactions.list({
        // The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.
        maxResults: 'placeholder-value',
        // The Merchant Center account to list transactions for.
        merchantId: 'placeholder-value',
        // The token returned by the previous request.
        pageToken: 'placeholder-value',
        // The Google-provided ID of the settlement.
        settlementId: 'placeholder-value',
        // The list of transactions to return. If not set, all transactions will be returned.
        transactionIds: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "resources": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // 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.repricingrules.list({
        // [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (e.g. "US"), used as a filter on repricing rules.
        countryCode: 'placeholder-value',
        // The two-letter ISO 639-1 language code associated with the repricing rule, used as a filter.
        languageCode: 'placeholder-value',
        // Required. The id of the merchant who owns the repricing rule.
        merchantId: 'placeholder-value',
        // The maximum number of repricing rules to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
        pageSize: 'placeholder-value',
        // A page token, received from a previous `ListRepricingRules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRepricingRules` must match the call that provided the page token.
        pageToken: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "nextPageToken": "my_nextPageToken",
      //   "repricingRules": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // 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.returnpolicy.list({
        // The Merchant Center account to list return policies for.
        merchantId: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "resources": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples