Sha256: 41c5fb28847dac605cb735b8aba97b6e4991c1777c7128de83c4f538c77dbda9

Contents?: true

Size: 1.27 KB

Versions: 1

Compression:

Stored size: 1.27 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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erp_integration-0.59.0 lib/erp_integration/fulfil/resources/customer_shipment.rb