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.orderreturns.process({
        // The ID of the account that manages the order. This cannot be a multi-client account.
        merchantId: 'placeholder-value',
        // The ID of the return.
        returnId: 'placeholder-value',
    
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "fullChargeReturnShippingCost": false,
          //   "operationId": "my_operationId",
          //   "refundShippingFee": {},
          //   "returnItems": []
          // }
        },
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "executionStatus": "my_executionStatus",
      //   "kind": "my_kind"
      // }
    }
    
    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.orderreturns.list({
        // Obtains order returns that match the acknowledgement status. When set to true, obtains order returns that have been acknowledged. When false, obtains order returns that have not been acknowledged. When not provided, obtains order returns regardless of their acknowledgement status. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged order returns are returned.
        acknowledged: 'placeholder-value',
        // Obtains order returns created before this date (inclusively), in ISO 8601 format.
        createdEndDate: 'placeholder-value',
        // Obtains order returns created after this date (inclusively), in ISO 8601 format.
        createdStartDate: 'placeholder-value',
        // Obtains order returns with the specified order ids. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.
        googleOrderIds: 'placeholder-value',
        // The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.
        maxResults: 'placeholder-value',
        // The ID of the account that manages the order. This cannot be a multi-client account.
        merchantId: 'placeholder-value',
        // Return the results in the specified order.
        orderBy: 'placeholder-value',
        // The token returned by the previous request.
        pageToken: 'placeholder-value',
        // Obtains order returns that match any shipment state provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment states.
        shipmentStates: 'placeholder-value',
        // Obtains order returns that match any shipment status provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment statuses.
        shipmentStatus: 'placeholder-value',
        // Obtains order returns with the specified tracking numbers. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.
        shipmentTrackingNumbers: 'placeholder-value',
        // Obtains order returns that match any shipment type provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment types.
        shipmentTypes: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "resources": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • const {google} = require('googleapis');
    const content = google.content('v2.1');
    Docs
  • const {google} = require('googleapis');
    const content = google.content('v2');
    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.freelistingsprogram.requestreview({
        // Required. The ID of the account.
        merchantId: 'placeholder-value',
    
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "regionCode": "my_regionCode"
          // }
        },
      });
      console.log(res.data);
    }
    
    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