Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
feat: add Booking amendment
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart authored Jul 23, 2020
1 parent 53c2541 commit 436d938
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 0 deletions.
61 changes: 61 additions & 0 deletions api-docs/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6933,13 +6933,40 @@ components:
type: string
description: The requested new cargo ready date
format: date
new_product_descriptions:
description: New product (HS code) information
type: array
items:
$ref: "#/components/schemas/BookingAmendmentHsCode"
new_cargo:
description:
"The requested new cargo, possibly including package details"
$ref: "#/components/schemas/Cargo"
new_metadata:
description: The requested new metadata
$ref: "#/components/schemas/Metadata"
BookingAmendmentHsCode:
type: object
properties:
_object:
type: string
description:
String representing the object’s type. Always
`/booking_amendment_product_description` for this object.
example: /booking_amendment_product_description
description:
type: string
description:
Always required. English description of product in booking.
example: Wristwatches
description_for_export_customs:
type: string
description:
Required if booking if origin address or origin port is in Mainland
China. Chinese description of product in booking.
example: 手表
hs_code:
$ref: "#/components/schemas/HsCode"
BookingHsCode:
type: object
properties:
Expand Down Expand Up @@ -7693,10 +7720,44 @@ components:
Date when cargo is ready for pickup at the origin location.
format: date
example: "2019-06-30"
new_product_descriptions:
description: New product (HS code) information
type: array
items:
$ref: "#/components/schemas/CreateBookingAmendmentHsCode"
new_cargo:
$ref: "#/components/schemas/Cargo"
new_metadata:
$ref: "#/components/schemas/Metadata"
CreateBookingAmendmentHsCode:
type: object
required:
- description
- hs_code
properties:
_object:
type: string
description:
String representing the object’s type. Always
`/bookings/update/product_description` for this object.
example: /bookings/update/product_description
description:
type: string
description:
Always required. English description of product in booking.
example: Wristwatches
description_for_export_customs:
type: string
description:
Required if booking if origin address or origin port is in Mainland
China. Chinese description of product in booking.
example: 手表
hs_code:
type: string
description:
The six digit code under which the product should be classified for
export customs.
example: 9101
CreateBookingHsCode:
type: object
required:
Expand Down
7 changes: 7 additions & 0 deletions src/generated/BookingAmendment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Auto-generated file. Do not change.
*/
import { Address } from './Address'
import { BookingAmendmentHsCode } from './BookingAmendmentHsCode'
import { Cargo } from './Cargo'
import { ContainerCounts } from './ContainerCounts'
import { Metadata } from './Metadata'
Expand Down Expand Up @@ -75,6 +76,12 @@ export type BookingAmendment = {
* @example "1970-01-01"
*/
readonly new_cargo_ready_date?: string
/**
* New product (HS code) information
*
* JSON-schema: array
*/
readonly new_product_descriptions?: BookingAmendmentHsCode[]
/**
* The requested new cargo, possibly including package details
*
Expand Down
37 changes: 37 additions & 0 deletions src/generated/BookingAmendmentHsCode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Auto-generated file. Do not change.
*/
import { HsCode } from './HsCode'
import { Type } from './Type'
import { TypedApiObject } from '../types/TypedApiObject'
export type BookingAmendmentHsCode = {
/**
* String representing the object’s type. Always `/booking_amendment_product_description` for this object.
*/
readonly _object: Type.BookingAmendmentHsCode
/**
* Always required. English description of product in booking.
*
* JSON-schema: string
* @example "Wristwatches"
*/
readonly description?: string
/**
* Required if booking if origin address or origin port is in Mainland China. Chinese description of product in booking.
*
* JSON-schema: string
* @example "手表"
*/
readonly description_for_export_customs?: string
readonly hs_code?: HsCode
}
export type LiftedBookingAmendmentHsCode = TypedApiObject &
BookingAmendmentHsCode
/**
* Lifts an object return from a Flexport API responses into the SDK domain by augmenting them with higher level properties.
*/
export const liftBookingAmendmentHsCode = (
original: BookingAmendmentHsCode,
): LiftedBookingAmendmentHsCode => {
return original
}
7 changes: 7 additions & 0 deletions src/generated/CreateBookingAmendment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import { Cargo } from './Cargo'
import { ContainerCounts } from './ContainerCounts'
import { CreateBookingAmendmentHsCode } from './CreateBookingAmendmentHsCode'
import { Metadata } from './Metadata'
export type CreateBookingAmendment = {
/**
Expand Down Expand Up @@ -67,6 +68,12 @@ export type CreateBookingAmendment = {
* @example "2019-06-30"
*/
readonly new_cargo_ready_date?: string
/**
* New product (HS code) information
*
* JSON-schema: array
*/
readonly new_product_descriptions?: CreateBookingAmendmentHsCode[]
readonly new_cargo?: Cargo
readonly new_metadata?: Metadata
}
Expand Down
42 changes: 42 additions & 0 deletions src/generated/CreateBookingAmendmentHsCode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Auto-generated file. Do not change.
*/
import { Type } from './Type'
import { TypedApiObject } from '../types/TypedApiObject'
export type CreateBookingAmendmentHsCode = {
/**
* String representing the object’s type. Always `/bookings/update/product_description` for this object.
*/
readonly _object: Type.CreateBookingAmendmentHsCode
/**
* Always required. English description of product in booking.
*
* JSON-schema: string
* @example "Wristwatches"
*/
readonly description: string
/**
* Required if booking if origin address or origin port is in Mainland China. Chinese description of product in booking.
*
* JSON-schema: string
* @example "手表"
*/
readonly description_for_export_customs?: string
/**
* The six digit code under which the product should be classified for export customs.
*
* JSON-schema: string
* @example 9101
*/
readonly hs_code: string
}
export type LiftedCreateBookingAmendmentHsCode = TypedApiObject &
CreateBookingAmendmentHsCode
/**
* Lifts an object return from a Flexport API responses into the SDK domain by augmenting them with higher level properties.
*/
export const liftCreateBookingAmendmentHsCode = (
original: CreateBookingAmendmentHsCode,
): LiftedCreateBookingAmendmentHsCode => {
return original
}
2 changes: 2 additions & 0 deletions src/generated/Type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum Type {
AirShipmentLeg = '/air/shipment_leg',
Booking = '/booking',
BookingAmendment = '/booking_amendment',
BookingAmendmentHsCode = '/booking_amendment_product_description',
BookingHsCode = '/bookings/product_descriptions',
BookingLineItem = '/purchase_orders/booking_line_item',
BookingLineItemCollectionRef = '/api/refs/collection',
Expand All @@ -30,6 +31,7 @@ export enum Type {
ContainerLegCollectionRef = '/api/refs/collection',
ContainerRef = '/api/refs/object',
Coordinates = '/coordinates',
CreateBookingAmendmentHsCode = '/bookings/update/product_description',
CreateBookingHsCode = '/bookings/product_descriptions',
CreateCommercialInvoiceLineItem = '/commercial_invoice_line_item/create',
CreditMemo = '/credit_memo',
Expand Down
2 changes: 2 additions & 0 deletions src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './AirShipmentDetail'
export * from './AirShipmentLeg'
export * from './Booking'
export * from './BookingAmendment'
export * from './BookingAmendmentHsCode'
export * from './BookingHsCode'
export * from './BookingLineItem'
export * from './BookingLineItemCollectionRef'
Expand All @@ -30,6 +31,7 @@ export * from './Coordinates'
export * from './CreateAirBooking'
export * from './CreateBooking'
export * from './CreateBookingAmendment'
export * from './CreateBookingAmendmentHsCode'
export * from './CreateBookingHsCode'
export * from './CreateBookingLineItem'
export * from './CreateCarbonCalculation'
Expand Down

0 comments on commit 436d938

Please sign in to comment.