Update October 17, 2024 (#108)

This commit is contained in:
Kirill
2024-10-31 15:47:35 +03:00
committed by GitHub
parent 3430ead143
commit 1706575a34
4 changed files with 85 additions and 134 deletions

View File

@@ -106,6 +106,9 @@ type FBSPosting struct {
// Analytics data
AnalyticsData FBSPostingAnalyticsData `json:"analytics_data"`
// Available actions and shipment information
AvailableActions []string `json:"available_actions"`
// Shipment barcodes
Barcodes FBSBarcode `json:"barcodes"`
@@ -912,6 +915,9 @@ type GetShipmentDataByIdentifierResult struct {
// Analytics data
AnalyticsData GetShipmentDataByIdentifierResultAnalyticsData `json:"analytics_data"`
// Available actions and shipment information
AvailableActions []string `json:"available_actions"`
// Shipment barcodes
Barcodes FBSBarcode `json:"barcodes"`
@@ -3051,3 +3057,32 @@ func (c FBS) GetCancellationReasons(ctx context.Context) (*GetCancellationReason
return resp, nil
}
type SetShippingDateParams struct {
// New shipping date
NewCutoffDate time.Time `json:"new_cutoff_date"`
// Shipment number
PostingNumber string `json:"posting_number"`
}
type SetShippingDateResponse struct {
core.CommonResponse
// true if the new date is set
Result bool `json:"result"`
}
func (c FBS) SetShippingDate(ctx context.Context, params *SetShippingDateParams) (*SetShippingDateResponse, error) {
url := "/v1/posting/cutoff/set"
resp := &SetShippingDateResponse{}
response, err := c.client.Request(ctx, http.MethodPost, url, params, resp, nil)
if err != nil {
return nil, err
}
response.CopyCommonResponse(&resp.CommonResponse)
return resp, nil
}