Mercedes.Agency.Orchestration.API

<back to all web services

UpdateCarConfiguratorRequest

CarConfigurator
Requires Authentication
The following routes are available for this service:
PUT/v1/configuratorRemoves a back order from a car configuratorThis endpoint calls Agency API when a ConfigurationCode is removed from a back order.
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


class KeyInformation
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :b_m7_n_s_t
    # @return [String]
    attr_accessor :configuration_date
    # @return [String]
    attr_accessor :model_year
    # @return [String]
    attr_accessor :half_year
    # @return [String]
    attr_accessor :type_class
    # @return [TrueClass]
    attr_accessor :is_private_van

    def self.properties
        {
            b_m7_n_s_t: { name: 'bM7NST' },
            configuration_date: { name: 'configurationDate' },
            model_year: { name: 'modelYear' },
            half_year: { name: 'halfYear' },
            type_class: { name: 'typeClass' },
            is_private_van: { name: 'isPrivateVan' },
        }
    end

end

class EquipmentCache
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :code
    # @return [String]
    attr_accessor :description
    # @return [String]
    attr_accessor :standard_flag
    # @return [BigDecimal]
    attr_accessor :price
    # @return [String]
    attr_accessor :category
    # @return [String]
    attr_accessor :importance

    def self.properties
        {
            code: { name: 'code' },
            description: { name: 'description' },
            standard_flag: { name: 'standardFlag' },
            price: { name: 'price' },
            category: { name: 'category' },
            importance: { name: 'importance' },
        }
    end

end

class OrderingOptions
    include ServiceStack::DTO

    # @return [List]
    attr_accessor :interior
    # @return [List]
    attr_accessor :exterior
    # @return [List]
    attr_accessor :options
    # @return [List]
    attr_accessor :wheel_options
    # @return [List]
    attr_accessor :trim_options
    # @return [List]
    attr_accessor :equipment_option_codes
    # @return [List]
    attr_accessor :option_codes

    def self.properties
        {
            interior: { name: 'interior' },
            exterior: { name: 'exterior' },
            options: { name: 'options' },
            wheel_options: { name: 'wheelOptions', type: [EquipmentCache] },
            trim_options: { name: 'trimOptions', type: [EquipmentCache] },
            equipment_option_codes: { name: 'equipmentOptionCodes', type: [EquipmentCache] },
            option_codes: { name: 'optionCodes', type: [EquipmentCache] },
        }
    end

end

class ResponseStatus
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :error_code
    # @return [String]
    attr_accessor :message

    def self.properties
        {
            error_code: { name: 'errorCode' },
            message: { name: 'message' },
        }
    end

end

class CarConfiguratorResponse
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :name
    # @return [KeyInformation]
    attr_accessor :key_information
    # @return [OrderingOptions]
    attr_accessor :ordering_options
    # @return [ResponseStatus]
    attr_accessor :response_status
    # @return [String]
    attr_accessor :configurator_code

    def self.properties
        {
            name: { name: 'name' },
            key_information: { name: 'keyInformation', type: KeyInformation },
            ordering_options: { name: 'orderingOptions', type: OrderingOptions },
            response_status: { name: 'responseStatus', type: ResponseStatus },
            configurator_code: { name: 'configuratorCode' },
        }
    end

end

class UpdateCarConfiguratorRequest
    include ServiceStack::DTO

    # @ApiMember(Description: "Configurator code", IsRequired: "true")
    # @return [String]
    attr_accessor :configurator_code

    # @ApiMember(Description: "BackOrder Guid")
    # @return [String]
    attr_accessor :guid

    # @ApiMember(Description: "GasId of the user making the request")
    # @return [String]
    attr_accessor :gas_id

    def self.properties
        {
            configurator_code: { name: 'configuratorCode' },
            guid: { name: 'guid' },
            gas_id: { name: 'gasId' },
        }
    end

    def response_type() = CarConfiguratorResponse
    def get_type_name() = 'UpdateCarConfiguratorRequest'
end

Ruby UpdateCarConfiguratorRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/configurator HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConfiguratorCode: String,
	Guid: 00000000000000000000000000000000,
	GasId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Name: String,
	KeyInformation: 
	{
		BM7NST: String,
		ConfigurationDate: String,
		ModelYear: String,
		HalfYear: String,
		TypeClass: String,
		IsPrivateVan: False
	},
	OrderingOptions: 
	{
		Interior: 
		[
			String
		],
		Exterior: 
		[
			String
		],
		Options: 
		[
			String
		],
		WheelOptions: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		TrimOptions: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		EquipmentOptionCodes: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		],
		OptionCodes: 
		[
			{
				Code: String,
				Description: String,
				StandardFlag: String,
				Price: 0,
				Category: String,
				Importance: String
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String
	},
	ConfiguratorCode: String
}