Sha256: d608cb09e2d02439b66c8d20ae54a657fe749fc3a498390163dd529f2aaecf44

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require_relative '../api_resource'

module ErpIntegration
  module Fulfil
    module Resources
      class CustomerShipment < ApiResource
        self.model_name = 'stock.shipment.out'

        # Change the warehouse of a CustomerShipment in Fulfil
        #
        # @param id [Integer, String] The ID of the Customer Shipment
        def change_warehouse(id, options)
          client.put("model/stock.shipment.out/#{id}/change_warehouse", options)
        end

        # Split a CustomerShipment in Fulfil
        #
        # @param id [Integer, String] The ID of the Customer Shipment
        # @param options [Hash] The attributes needed for the split.
        def split(id, options)
          client.put("model/stock.shipment.out/#{id}/split", options)
        end

        # Mark a CustomerShipment as packed in Fulfil
        #
        # @param id [Integer, String] The ID of the Customer Shipment
        def mark_as_packed!(id)
          client.put("model/stock.shipment.out/#{id}/pack")
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
erp_integration-0.58.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.57.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.56.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.55.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.54.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.53.1 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.53.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.52.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.50.0 lib/erp_integration/fulfil/resources/customer_shipment.rb
erp_integration-0.49.0 lib/erp_integration/fulfil/resources/customer_shipment.rb