diff options
Diffstat (limited to 'print.go')
| -rw-r--r-- | print.go | 37 |
1 files changed, 22 insertions, 15 deletions
@@ -188,20 +188,22 @@ type EstimatedShippingDates struct { type PrintableNormalization struct { Cover NormalizationJob `json:"cover"` Interior NormalizationJob `json:"interior"` + Mfg PkgId `json:"pod_package_id"` } // NormalizationJob represents the normalization process of an interior // or cover source file. type NormalizationJob struct { - JobId uint `json:"job_id"` - NormalizedFile NormalizedFile `json:"normalized_file"` - SrcMd5Sum string `json:"source_md5_sum"` // md5 hash of the source file. - SrcUrl string `json:"source_url"` // URL of the source file. + JobId uint `json:"job_id"` + Src File `json:"source_file"` + Norm File `json:"normalized_file"` + SrcMd5Sum string `json:"source_md5sum"` // md5 hash of the source file. + SrcUrl string `json:"source_url"` // URL of the source file. + NPages uint `json:"page_count"` } -// NormalizedFile represents a file on the server that was created by -// normalizing a cover or interior source file. -type NormalizedFile struct { +// File represents a file on the server. +type File struct { Id uint64 `json:"file_id"` Name string `json:"filename"` } @@ -212,14 +214,14 @@ type LineItemStatus struct { } type LineItemStatusMessages struct { - Delay time.Duration // Expected delay due to the error, if present. - Error string `json:"error"` - Info string `json:"info"` - PrintableNormalization PrintableNormalization `json:"printable_normalization"` - Timestamp time.Time `json:"timestamp"` // Timestamp of the last status change. - TrackingUrls []string - TrackingId string `json:"tracking_id"` // Tracking ID for this line item's shipment. - Carrier string `json:"carrier_name"` // Name of the carrier handling the shipment. + Delay time.Duration // Expected delay due to the error, if present. + Error string `json:"error"` + Info string `json:"info"` + Norm PrintableNormalizationMessages `json:"printable_normalization"` + Timestamp time.Time `json:"timestamp"` // Timestamp of the last status change. + TrackingUrls []string + TrackingId string `json:"tracking_id"` // Tracking ID for this line item's shipment. + Carrier string `json:"carrier_name"` // Name of the carrier handling the shipment. } func (msgs *LineItemStatusMessages) UnmarshalJSON(data []byte) error { @@ -254,6 +256,11 @@ func (msgs *LineItemStatusMessages) UnmarshalJSON(data []byte) error { return nil } +type PrintableNormalizationMessages struct { + Cover []string `json:"cover"` + Interior []string `json:"interior"` +} + type PrintJobStatus struct { Changed time.Time `json:"changed"` // time of the last status change Msg string `json:"message"` |