From 0aae0e10766a736c37b86224b569597a0410cd3f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:57:49 -0600 Subject: [PATCH] feat: adds CommercialInvoiceSignature and CommercialInvoiceLetterhead shipment options --- CHANGELOG.md | 4 ++ shipment_options.go | 112 ++++++++++++++++++++++---------------------- version.go | 2 +- 3 files changed, 62 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fe1293..8c567c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v3.1.0 (2023-09-29) + +- Adds `CommercialInvoiceSignature` and `CommercialInvoiceLetterhead` shipment options + ## v3.0.1 (2023-09-05) - Fix endpoint for creating a FedEx Smartpost carrier account diff --git a/shipment_options.go b/shipment_options.go index 40893d8..1a60aff 100644 --- a/shipment_options.go +++ b/shipment_options.go @@ -3,61 +3,63 @@ package easypost // ShipmentOptions represents the various options that can be applied to a // shipment at creation. type ShipmentOptions struct { - AdditionalHandling bool `json:"additional_handling,omitempty"` - AddressValidationLevel string `json:"address_validation_level,omitempty"` - Alcohol bool `json:"alcohol,omitempty"` - BillingRef string `json:"billing_ref,omitempty"` - BillReceiverAccount string `json:"bill_receiver_account,omitempty"` - BillReceiverPostalCode string `json:"bill_receiver_postal_code,omitempty"` - BillThirdPartyAccount string `json:"bill_third_party_account,omitempty"` - BillThirdPartyCountry string `json:"bill_third_party_country,omitempty"` - BillThirdPartyPostalCode string `json:"bill_third_party_postal_code,omitempty"` - ByDrone bool `json:"by_drone,omitempty"` - CarbonNeutral bool `json:"carbon_neutral,omitempty"` - CertifiedMail bool `json:"certified_mail,omitempty"` - CODAmount string `json:"cod_amount,omitempty"` - CODMethod string `json:"cod_method,omitempty"` - CODAddressID string `json:"cod_address_id,omitempty"` - Currency string `json:"currency,omitempty"` - DeliveryConfirmation string `json:"delivery_confirmation,omitempty"` - DeliveryMaxDatetime *DateTime `json:"delivery_max_datetime,omitempty"` - DutyPayment *Payment `json:"duty_payment,omitempty"` - DutyPaymentAccount string `json:"duty_payment_account,omitempty"` - DropoffType string `json:"dropoff_type,omitempty"` - DryIce bool `json:"dry_ice,omitempty"` - DryIceMedical bool `json:"dry_ice_medical,omitempty,string"` - DryIceWeight float64 `json:"dry_ice_weight,omitempty,string"` - Endorsement string `json:"endorsement,omitempty"` - EndShipperID string `json:"end_shipper_id,omitempty"` - FreightCharge float64 `json:"freight_charge,omitempty"` - HandlingInstructions string `json:"handling_instructions,omitempty"` - Hazmat string `json:"hazmat,omitempty"` - HoldForPickup bool `json:"hold_for_pickup,omitempty"` - Incoterm string `json:"incoterm,omitempty"` - InvoiceNumber string `json:"invoice_number,omitempty"` - LabelDate *DateTime `json:"label_date,omitempty"` - LabelFormat string `json:"label_format,omitempty"` - LabelSize string `json:"label_size,omitempty"` - Machinable bool `json:"machinable,omitempty"` - Payment *Payment `json:"payment,omitempty"` - PickupMinDatetime *DateTime `json:"pickup_min_datetime,omitempty"` - PrintCustom1 string `json:"print_custom_1,omitempty"` - PrintCustom2 string `json:"print_custom_2,omitempty"` - PrintCustom3 string `json:"print_custom_3,omitempty"` - PrintCustom1BarCode bool `json:"print_custom_1_barcode,omitempty"` - PrintCustom2BarCode bool `json:"print_custom_2_barcode,omitempty"` - PrintCustom3BarCode bool `json:"print_custom_3_barcode,omitempty"` - PrintCustom1Code string `json:"print_custom_1_code,omitempty"` - PrintCustom2Code string `json:"print_custom_2_code,omitempty"` - PrintCustom3Code string `json:"print_custom_3_code,omitempty"` - RegisteredMail bool `json:"registered_mail,omitempty"` - RegisteredMailAmount float64 `json:"registered_mail_amount,omitempty"` - ReturnReceipt bool `json:"return_receipt,omitempty"` - SaturdayDelivery bool `json:"saturday_delivery,omitempty"` - SpecialRatesEligibility string `json:"special_rates_eligibility,omitempty"` - SmartpostHub string `json:"smartpost_hub,omitempty"` - SmartpostManifest string `json:"smartpost_manifest,omitempty"` - SuppressETD bool `json:"suppress_etd,omitempty"` + AdditionalHandling bool `json:"additional_handling,omitempty"` + AddressValidationLevel string `json:"address_validation_level,omitempty"` + Alcohol bool `json:"alcohol,omitempty"` + BillingRef string `json:"billing_ref,omitempty"` + BillReceiverAccount string `json:"bill_receiver_account,omitempty"` + BillReceiverPostalCode string `json:"bill_receiver_postal_code,omitempty"` + BillThirdPartyAccount string `json:"bill_third_party_account,omitempty"` + BillThirdPartyCountry string `json:"bill_third_party_country,omitempty"` + BillThirdPartyPostalCode string `json:"bill_third_party_postal_code,omitempty"` + ByDrone bool `json:"by_drone,omitempty"` + CarbonNeutral bool `json:"carbon_neutral,omitempty"` + CertifiedMail bool `json:"certified_mail,omitempty"` + CODAmount string `json:"cod_amount,omitempty"` + CODMethod string `json:"cod_method,omitempty"` + CODAddressID string `json:"cod_address_id,omitempty"` + CommercialInvoiceSignature string `json:"commercial_invoice_signature,omitempty"` + CommercialInvoiceLetterhead string `json:"commercial_invoice_letterhead,omitempty"` + Currency string `json:"currency,omitempty"` + DeliveryConfirmation string `json:"delivery_confirmation,omitempty"` + DeliveryMaxDatetime *DateTime `json:"delivery_max_datetime,omitempty"` + DutyPayment *Payment `json:"duty_payment,omitempty"` + DutyPaymentAccount string `json:"duty_payment_account,omitempty"` + DropoffType string `json:"dropoff_type,omitempty"` + DryIce bool `json:"dry_ice,omitempty"` + DryIceMedical bool `json:"dry_ice_medical,omitempty,string"` + DryIceWeight float64 `json:"dry_ice_weight,omitempty,string"` + Endorsement string `json:"endorsement,omitempty"` + EndShipperID string `json:"end_shipper_id,omitempty"` + FreightCharge float64 `json:"freight_charge,omitempty"` + HandlingInstructions string `json:"handling_instructions,omitempty"` + Hazmat string `json:"hazmat,omitempty"` + HoldForPickup bool `json:"hold_for_pickup,omitempty"` + Incoterm string `json:"incoterm,omitempty"` + InvoiceNumber string `json:"invoice_number,omitempty"` + LabelDate *DateTime `json:"label_date,omitempty"` + LabelFormat string `json:"label_format,omitempty"` + LabelSize string `json:"label_size,omitempty"` + Machinable bool `json:"machinable,omitempty"` + Payment *Payment `json:"payment,omitempty"` + PickupMinDatetime *DateTime `json:"pickup_min_datetime,omitempty"` + PrintCustom1 string `json:"print_custom_1,omitempty"` + PrintCustom2 string `json:"print_custom_2,omitempty"` + PrintCustom3 string `json:"print_custom_3,omitempty"` + PrintCustom1BarCode bool `json:"print_custom_1_barcode,omitempty"` + PrintCustom2BarCode bool `json:"print_custom_2_barcode,omitempty"` + PrintCustom3BarCode bool `json:"print_custom_3_barcode,omitempty"` + PrintCustom1Code string `json:"print_custom_1_code,omitempty"` + PrintCustom2Code string `json:"print_custom_2_code,omitempty"` + PrintCustom3Code string `json:"print_custom_3_code,omitempty"` + RegisteredMail bool `json:"registered_mail,omitempty"` + RegisteredMailAmount float64 `json:"registered_mail_amount,omitempty"` + ReturnReceipt bool `json:"return_receipt,omitempty"` + SaturdayDelivery bool `json:"saturday_delivery,omitempty"` + SpecialRatesEligibility string `json:"special_rates_eligibility,omitempty"` + SmartpostHub string `json:"smartpost_hub,omitempty"` + SmartpostManifest string `json:"smartpost_manifest,omitempty"` + SuppressETD bool `json:"suppress_etd,omitempty"` } // Payment provides information on how a shipment is billed. diff --git a/version.go b/version.go index bd39dc3..f13c30a 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package easypost -const Version = "3.0.1" +const Version = "3.1.0"