Bridge

<back to all web services

SendDealRecap

Deal Recaps
The following routes are available for this service:
GET/Send-Deal-Recap
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 SendDealRecap:
    guid: Optional[str] = None
    from_entity_contact_id: int = 0
    chat_guid: Optional[str] = None
    to_buyer_contact_id: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPortListViewModel:
    id: int = 0
    guid: Optional[str] = None
    name: Optional[str] = None
    code: Optional[str] = None
    latitude: float = 0.0
    longitude: float = 0.0
    country_id: int = 0
    country_name: Optional[str] = None


@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 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 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 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 GetCurrenciesViewModel:
    id: int = 0
    code: Optional[str] = None
    description: Optional[str] = None
    symbol: Optional[str] = None
    index: int = 0
    deleted: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DealRecapEnquiryGradesViewModel:
    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
    volume_unit_id: Optional[int] = None
    unit_price: Optional[float] = None
    currency_id: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class APISendDealRecapViewModel:
    enquiry_id: int = 0
    enquiry_guid: Optional[str] = None
    chat_guid: Optional[str] = None
    imo_number: int = 0
    vessel_id: int = 0
    vessel_name: Optional[str] = None
    buyer_account_name: Optional[str] = None
    date_from: Optional[datetime.datetime] = None
    date_to: Optional[datetime.datetime] = None
    port_id: Optional[int] = None
    delivery_method_id: Optional[int] = None
    buyer_seller_account_id: Optional[int] = None
    requested_terms_type: Optional[str] = None
    credit_term_days: Optional[int] = None
    recap_comments: Optional[str] = None
    agent: Optional[str] = None
    additional_costs: Optional[str] = None
    from_entity_contact_id: int = 0
    document_title: Optional[str] = None
    recap_can_be_sent: bool = False
    get_port_list: Optional[List[GetPortListViewModel]] = None
    get_delivery_methods: Optional[List[GetDeliveryMethodsViewModel]] = None
    get_products: Optional[List[GetProductsViewModel]] = None
    get_buyer_seller_accounts: Optional[List[EntityAccountsViewModel]] = None
    get_versions: Optional[List[GetVersionsViewModel]] = None
    get_grades: Optional[List[GetGradesViewModel]] = None
    get_units: Optional[List[GetUnitsViewModel]] = None
    get_currencies: Optional[List[GetCurrenciesViewModel]] = None
    deal_recap_enquiry_grades: Optional[List[DealRecapEnquiryGradesViewModel]] = None

Python SendDealRecap 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 /Send-Deal-Recap HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	EnquiryId: 0,
	EnquiryGuid: 00000000000000000000000000000000,
	ChatGuid: 00000000000000000000000000000000,
	IMONumber: 0,
	VesselId: 0,
	VesselName: String,
	BuyerAccountName: String,
	DateFrom: 0001-01-01,
	DateTo: 0001-01-01,
	PortId: 0,
	DeliveryMethodId: 0,
	BuyerSellerAccountId: 0,
	RequestedTermsType: String,
	CreditTermDays: 0,
	RecapComments: String,
	Agent: String,
	AdditionalCosts: String,
	FromEntityContactId: 0,
	DocumentTitle: String,
	RecapCanBeSent: False,
	GetPortList: 
	[
		{
			Id: 0,
			Guid: 00000000000000000000000000000000,
			Name: String,
			Code: String,
			Latitude: 0,
			Longitude: 0,
			CountryId: 0,
			CountryName: String
		}
	],
	GetDeliveryMethods: 
	[
		{
			Id: 0,
			Name: String
		}
	],
	GetProducts: 
	[
		{
			Id: 0,
			Index: 0,
			Name: String,
			Deleted: False,
			ETSMultiplication: 0
		}
	],
	GetBuyerSellerAccounts: 
	[
		{
			Id: 0,
			Type: String,
			Name: String,
			LinkedVesselId: 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
		}
	],
	GetCurrencies: 
	[
		{
			Id: 0,
			Code: String,
			Description: String,
			Symbol: String,
			Index: 0,
			Deleted: False
		}
	],
	DealRecapEnquiryGrades: 
	[
		{
			Id: 0,
			Deleted: False,
			ProductId: 0,
			VersionId: 0,
			GradeId: 0,
			SpecificationComments: String,
			VolumeFrom: 0,
			VolumeTo: 0,
			UnitId: 0,
			VolumeUnitId: 0,
			UnitPrice: 0,
			CurrencyId: 0
		}
	]
}