Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
Update doc link for carrier method templates, added doc and sample ap…
Browse files Browse the repository at this point in the history
…p link to order methods templates
  • Loading branch information
DevMandy committed Dec 9, 2020
1 parent 5e152d0 commit b8359cb
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 34 deletions.
6 changes: 3 additions & 3 deletions templates/carrier/methods/cancel-pickups.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Cancels one or more previously-scheduled pickups
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/cancel-pickups
*
* https://connect.shipengine.com/docs/reference/methods/cancel-pickups
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/freightco/cancel-pickups.js
*/
Expand Down
4 changes: 2 additions & 2 deletions templates/carrier/methods/cancel-pickups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Session } from "./session";
/**
* Cancels one or more previously-scheduled pickups
*
* See an example implementation below
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/carrier/src/methods/cancel-pickups.ts
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/cancel-pickups
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/src/methods/cancel-pickups.ts
Expand Down
4 changes: 2 additions & 2 deletions templates/carrier/methods/cancel-shipments.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* this may include voiding labels, refunding charges, and/or removing the shipment from the day's manifest.
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/cancel-shipments
*
* https://connect.shipengine.com/docs/reference/methods/cancel-shipments
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/cargo-inc/src/cancel-shipments.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/cancel-shipments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Session } from "./session";
* this may include voiding labels, refunding charges, and/or removing the shipment from the day's manifest.
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/cancel-shipments
* https://connect.shipengine.com/docs/reference/methods/cancel-shipments
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/src/methods/cancel-shipments.ts
Expand Down
6 changes: 3 additions & 3 deletions templates/carrier/methods/connect.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use strict";
/**
* Logs in using the username and password entered on the login form
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/connect
*
* https://connect.shipengine.com/docs/reference/methods/connect
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/freightco/connect.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface ConnectionFormData {}
* Logs in using the username and password entered on the login form
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/connect
* https://connect.shipengine.com/docs/reference/methods/connect
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/src/methods/connect.ts
Expand Down
6 changes: 3 additions & 3 deletions templates/carrier/methods/create-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Creates an end-of-day manifest
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/create-manifest
*
* https://connect.shipengine.com/docs/reference/methods/create-manifest
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/cargo-inc/src/create-manifest.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/create-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Session } from "./session";
* Creates an end-of-day manifest
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/create-manifest
* https://connect.shipengine.com/docs/reference/methods/create-manifest
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/src/methods/create-manifest.ts
Expand Down
4 changes: 2 additions & 2 deletions templates/carrier/methods/create-shipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Generates a shipping label and tracking number for a shipment
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/create-shipment
*
* https://connect.shipengine.com/docs/reference/methods/create-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/freightco/carrier/create-shipment.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/create-shipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Session } from "./session";
* Generates a shipping label and tracking number for a shipment
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/create-shipment
* https://connect.shipengine.com/docs/reference/methods/create-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/carrier/src/methods/create-shipment.ts
Expand Down
6 changes: 3 additions & 3 deletions templates/carrier/methods/rate-shipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Generates shipping rates for a shipment
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/rate-shipment
*
* https://connect.shipengine.com/docs/reference/methods/rate-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/freightco/carrier/rate-shipment.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/rate-shipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Session } from "./session";
/**
* Generates shipping rates for a shipment
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/rate-shipment
* https://connect.shipengine.com/docs/reference/methods/rate-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/carrier/src/methods/rate-shipment.ts
Expand Down
6 changes: 3 additions & 3 deletions templates/carrier/methods/schedule-pickup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Schedules a pick-up at a specific time and location
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/schedule-pickup
*
* https://connect.shipengine.com/docs/reference/methods/schedule-pickup
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/freightco/schedule-pickup.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/schedule-pickup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Session } from "./session";
* Schedules a pick-up at a specific time and location
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/schedule-pickup
* https://connect.shipengine.com/docs/reference/methods/schedule-pickup
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/carrier/src/methods/schedule-pickup.ts
Expand Down
6 changes: 3 additions & 3 deletions templates/carrier/methods/track-shipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Returns tracking information for a shipment
*
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/track-shipment
*
* https://connect.shipengine.com/docs/reference/methods/track-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/cargo-inc/src/track-shipment.js
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/carrier/methods/track-shipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Session } from "./session";
* Returns tracking information for a shipment
*
* View documentation here:
* https://shipenginestag:439bd542@shipenginestag.wpengine.com/docs/integration-platform/reference/methods/track-shipment
* https://connect.shipengine.com/docs/reference/methods/track-shipment
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/parcel-post/src/methods/track-shipment.ts
Expand Down
9 changes: 9 additions & 0 deletions templates/order-source/methods/acknowledge-orders.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@

/**
* Called when an order has been imported into a marketplace.
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/acknowledge-orders
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/southwest-products/src/methods/acknowledge-orders.js
*
*/

async function acknowledgeOrders(transaction, notifications) {
throw new Error("NotImplementedError");
// STEP 1: Validation
Expand Down
8 changes: 7 additions & 1 deletion templates/order-source/methods/acknowledge-orders.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { AcknowledgedSalesOrder, SalesOrderNotification, Transaction } from "@shipengine/connect";
import { Session } from "./session";


/**
* Called when an order has been imported into a marketplace.
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/acknowledge-orders
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/iBuy/src/methods/acknowledge-orders.ts
*/

export default async function acknowledgeOrders(
transaction: Transaction<Session>,
notifications: SalesOrderNotification[],
Expand Down
10 changes: 9 additions & 1 deletion templates/order-source/methods/get-sales-order-by-date.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

/**
* Retrieve existing sales orders based on a date range.
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/get-sales-orders-by-date
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/southwest-products/src/methods/get-sales-orders-by-date.js
*
*/

async function getSalesOrdersByDate(transaction, range) {
throw new Error("NotImplementedError");
// STEP 1: Validation
Expand All @@ -11,4 +19,4 @@ async function getSalesOrdersByDate(transaction, range) {
// Step 4: Create the output data that ShipEngine expects
}

module.exports = getSalesOrdersByDate;
module.exports = getSalesOrdersByDate;
7 changes: 7 additions & 0 deletions templates/order-source/methods/get-sales-order-by-date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import { Session } from "./session";

/**
* Retrieve existing sales orders based on a date range.
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/get-sales-orders-by-date
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/iBuy/src/methods/get-sales-orders-by-date.ts
*
*/
export default async function getSalesOrdersByDate(
transaction: Transaction<Session>,
Expand Down
10 changes: 9 additions & 1 deletion templates/order-source/methods/shipment-created.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

/**
* Called when shipment is created
*
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/shipment-created
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/southwest-products/src/methods/shipment-created.js
*
*/
async function shipmentCreated(transaction, shipment) {
throw new Error("NotImplementedError");
Expand All @@ -11,4 +19,4 @@ async function shipmentCreated(transaction, shipment) {
// Step 4: Create the output data that ShipEngine expects
}

module.exports = shipmentCreated;
module.exports = shipmentCreated;
8 changes: 8 additions & 0 deletions templates/order-source/methods/shipment-created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import { Session } from "./session";

/**
* Called when shipment is created
*
*
* View documentation here:
* https://connect.shipengine.com/docs/reference/methods/shipment-created
*
* View sample implementation here:
* https://github.com/ShipEngine/connect-samples/blob/master/southwest-products/src/methods/shipment-created.js
*
*/
export default async function shipmentCreated(
transaction: Transaction<Session>,
Expand Down

0 comments on commit b8359cb

Please sign in to comment.