Sha256: 0a2c17eaa9b802ff3b74917ce238b064cf46a8fe75da6f342010e3d9d275b5d4
Contents?: true
Size: 1.04 KB
Versions: 15
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true require_relative '../api_resource' module ErpIntegration module Fulfil module Resources class CustomerShipmentReturn < ApiResource self.model_name = 'stock.shipment.out.return' def generate_shipping_label(id) client.put("model/#{model_name}/#{id}/generate_shipping_labels") true # Workaround: Fulfil api does not return a json when status code is 200 (a.k.a. "Ok") # and faraday is having an error when trying to parse it. Let's skip the parse error # and move on. rescue Faraday::ParsingError true end def create_default_package(id) client.put("model/#{model_name}/#{id}/create_default_packages") end def create_package(id, options) client.put("model/#{model_name}/#{id}", options) end def receive!(id) client.put("model/#{model_name}/#{id}/receive") true rescue Faraday::ParsingError true end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems