@@ -106,7 +106,17 @@ extension WooShippingPackagePurchase: Encodable {
106106 try container. encode ( productIDs, forKey: . products)
107107
108108 if let hazmat = package . hazmatCategory {
109- try container. encode ( package . hazmatCategory, forKey: . hazmat)
109+ try container. encode ( hazmat, forKey: . hazmat)
110+ }
111+
112+ if let form = package . customsForm {
113+ try container. encode ( form. contentsType. rawValue, forKey: . contentsType)
114+ try container. encode ( form. contentExplanation, forKey: . contentsExplanation)
115+ try container. encode ( form. restrictionType. rawValue, forKey: . restrictionType)
116+ try container. encode ( form. restrictionComments, forKey: . restrictionComments)
117+ try container. encode ( form. nonDeliveryOption. rawValue, forKey: . nonDeliveryOption)
118+ try container. encode ( form. itn, forKey: . itn)
119+ try container. encode ( form. items, forKey: . items)
110120 }
111121
112122 if selectedRate. signatureRate != nil {
@@ -195,6 +205,13 @@ extension WooShippingPackagePurchase: Encodable {
195205 case saturdayDelivery = " saturday_delivery "
196206 case additionalHandling = " additional_handling "
197207 case hazmat
208+ case contentsType = " contents_type "
209+ case contentsExplanation = " contents_explanation "
210+ case restrictionType = " restriction_type "
211+ case restrictionComments = " restriction_comments "
212+ case nonDeliveryOption = " non_delivery_option "
213+ case itn
214+ case items
198215 }
199216
200217 private enum ParameterKeys {
0 commit comments