<commit_before># frozen_string_literal: true

module PlentyClient
  module Order
    module Shipping
      class Information
        include PlentyClient::Endpoint
        include PlentyClient::Request

        BASE_ORDERS_SHIPPING_INFORMATION_PATH = '/orders/{orderId}/shipping'

        LIST_ORDERS_SHIPPING_INFORMATION  = '/shipping_information'
        DELETE_ORDER_SHIPPING_INFORMATION = '/shipping_information'
        CREATE_ORDER_SHIPPING_INFORMATION = '/shipping_information'
        UPDATE_ORDER_SHIPPING_STATUS      = '/shipping_information/status'
        UPDATE_ORDER_SHIPPING_DATA        = '/shipping_information/additional_data'

        class << self
          def list(order_id, headers = {}, &block)
            get(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{LIST_ORDERS_SHIPPING_INFORMATION}",
                               order: order_id), headers, &block)
          end

          def create(order_id, body = {})
            post(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{CREATE_ORDER_SHIPPING_INFORMATION}",
                                order: order_id), body)
          end

          def update_status(order_id, body = {})
            put(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{UPDATE_ORDER_SHIPPING_STATUS}",
                               order: order_id), body)
          end

          def update_data(order_id, body = {})
            put(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{UPDATE_ORDER_SHIPPING_DATA}",
                               order: order_id), body)
          end

          def destroy(order_id, body = {})
            delete(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{DELETE_ORDER_SHIPPING_INFORMATION}",
                                  order: order_id), body)
          end
        end
      end
    end
  end
end
<commit_msg>Update methods for updating shipping information<commit_after># frozen_string_literal: true

module PlentyClient
  module Order
    module Shipping
      class Information
        include PlentyClient::Endpoint
        include PlentyClient::Request

        BASE_ORDERS_SHIPPING_INFORMATION_PATH = '/orders/{orderId}/shipping'

        LIST_ORDERS_SHIPPING_INFORMATION  = '/shipping_information'
        DELETE_ORDER_SHIPPING_INFORMATION = '/shipping_information'
        CREATE_ORDER_SHIPPING_INFORMATION = '/shipping_information'
        UPDATE_ORDER_SHIPPING_STATUS      = '/shipping_information/status'
        UPDATE_ORDER_SHIPPING_DATA        = '/shipping_information/additional_data'

        class << self
          def list(order_id, headers = {}, &block)
            get(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{LIST_ORDERS_SHIPPING_INFORMATION}",
                               order: order_id), headers, &block)
          end

          def create(order_id, body = {})
            post(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{CREATE_ORDER_SHIPPING_INFORMATION}",
                                order: order_id), body)
          end

          def update_status(body = {})
            put(UPDATE_ORDER_SHIPPING_STATUS, body)
          end

          def update_data(body = {})
            put(UPDATE_ORDER_SHIPPING_DATA, body)
          end

          def destroy(order_id, body = {})
            delete(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{DELETE_ORDER_SHIPPING_INFORMATION}",
                                  order: order_id), body)
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.07786302926967889, 'fraction_numerical': 0.0, 'mean_word_length': 2.4108527131782944, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '363250', 'n_tokens_mistral': 1056, 'n_tokens_neox': 979, 'n_words': 151}