Bridge

<back to all web services

EnquiryEdit

Enquiries
The following routes are available for this service:
GET/Enquiries/Edit
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EnquiryEdit:
    enquiry_guid: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetProductsViewModel:
    id: int = 0
    index: int = 0
    name: Optional[str] = None
    deleted: bool = False
    ets_multiplication: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVersionsViewModel:
    id: int = 0
    index: int = 0
    name: Optional[str] = None
    deleted: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetGradesViewModel:
    id: int = 0
    index: int = 0
    name: Optional[str] = None
    deleted: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetUnitsViewModel:
    id: int = 0
    code: Optional[str] = None
    deleted: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDeliveryMethodsViewModel:
    id: int = 0
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EntityAccountsViewModel:
    id: int = 0
    type: Optional[str] = None
    name: Optional[str] = None
    linked_vessel_id: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EnquiryGradesEditViewModel:
    id: Optional[int] = None
    deleted: bool = False
    product_id: Optional[int] = None
    version_id: Optional[int] = None
    grade_id: Optional[int] = None
    specification_comments: Optional[str] = None
    volume_from: Optional[int] = None
    volume_to: Optional[int] = None
    unit_id: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class APIEditEnquiryViewModel:
    id: int = 0
    guid: Optional[str] = None
    date_from: Optional[datetime.datetime] = None
    date_to: Optional[datetime.datetime] = None
    agent: Optional[str] = None
    general_comments: Optional[str] = None
    delivery_method_id: Optional[int] = None
    account_id: Optional[int] = None
    requested_terms_type: Optional[str] = None
    credit_term_days: Optional[int] = None
    vessel_id: int = 0
    vessel_name: Optional[str] = None
    imo_number: int = 0
    imo_number_or_m_m_s_i: Optional[str] = None
    get_products: Optional[List[GetProductsViewModel]] = None
    get_versions: Optional[List[GetVersionsViewModel]] = None
    get_grades: Optional[List[GetGradesViewModel]] = None
    get_units: Optional[List[GetUnitsViewModel]] = None
    get_delivery_methods: Optional[List[GetDeliveryMethodsViewModel]] = None
    get_entity_accounts: Optional[List[EntityAccountsViewModel]] = None
    enquiry_grades_edit: Optional[List[EnquiryGradesEditViewModel]] = None

Python EnquiryEdit 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.

GET /Enquiries/Edit HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	Guid: 00000000000000000000000000000000,
	DateFrom: 0001-01-01,
	DateTo: 0001-01-01,
	Agent: String,
	GeneralComments: String,
	DeliveryMethodId: 0,
	AccountId: 0,
	RequestedTermsType: String,
	CreditTermDays: 0,
	VesselId: 0,
	VesselName: String,
	IMONumber: 0,
	IMONumberOrMMSI: String,
	GetProducts: 
	[
		{
			Id: 0,
			Index: 0,
			Name: String,
			Deleted: False,
			ETSMultiplication: 0
		}
	],
	GetVersions: 
	[
		{
			Id: 0,
			Index: 0,
			Name: String,
			Deleted: False
		}
	],
	GetGrades: 
	[
		{
			Id: 0,
			Index: 0,
			Name: String,
			Deleted: False
		}
	],
	GetUnits: 
	[
		{
			Id: 0,
			Code: String,
			Deleted: False
		}
	],
	GetDeliveryMethods: 
	[
		{
			Id: 0,
			Name: String
		}
	],
	GetEntityAccounts: 
	[
		{
			Id: 0,
			Type: String,
			Name: String,
			LinkedVesselId: 0
		}
	],
	EnquiryGradesEdit: 
	[
		{
			Id: 0,
			Deleted: False,
			ProductId: 0,
			VersionId: 0,
			GradeId: 0,
			SpecificationComments: String,
			VolumeFrom: 0,
			VolumeTo: 0,
			UnitId: 0
		}
	]
}