Update October 17, 2024 (#108)
This commit is contained in:
		
							
								
								
									
										35
									
								
								ozon/fbs.go
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								ozon/fbs.go
									
									
									
									
									
								
							@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user