diff --git a/lib/physical/shipment.rb b/lib/physical/shipment.rb index cff8473..52ce5e1 100644 --- a/lib/physical/shipment.rb +++ b/lib/physical/shipment.rb @@ -19,11 +19,8 @@ def initialize(id: nil, origin: nil, destination: nil, service_code: nil, pallet @structures = structures @packages = packages @options = options - - return unless pallets.any? - - warn "[DEPRECATION] `pallets` is deprecated. Please use `structures` instead." @pallets = pallets + warn "[DEPRECATION] `pallets` is deprecated. Please use `structures` instead." if pallets.any? end end end diff --git a/lib/physical/spec_support/factories/shipment_factory.rb b/lib/physical/spec_support/factories/shipment_factory.rb index 657d02d..2ccf9bc 100644 --- a/lib/physical/spec_support/factories/shipment_factory.rb +++ b/lib/physical/spec_support/factories/shipment_factory.rb @@ -4,7 +4,6 @@ factory :physical_shipment, class: "Physical::Shipment" do origin { FactoryBot.build(:physical_location) } destination { FactoryBot.build(:physical_location) } - pallets { build_list(:physical_pallet, 1) } # deprecated, will be removed packages { build_list(:physical_package, 2) } service_code { "usps_priority_mail" } initialize_with { new(**attributes) }