BokaMera.API.Host

<back to all web services

UpdateVossInvoiceConfigurations

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
GET/voss/invoiceConfigurationsinit voss invoice
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


enum IntermediaryPlacementEnum : string
{
    case None = 'None';
    case IncludeIn21StColumn = 'IncludeIn21StColumn';
    case IncludeIn7ThColumn = 'IncludeIn7ThColumn';
}

enum AccrualCodeFormatEnum : string
{
    case Default = 'Default';
    case Dutch = 'Dutch';
}

enum UnitEnum : string
{
    case Day = 'Day';
    case Month = 'Month';
    case Year = 'Year';
}

// @DataContract(Name="TimeLengthRequestDto")
class TimeLengthRequestDto implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="unit", IsRequired=true)
        /** @var UnitEnum|null */
        public ?UnitEnum $unit=null,

        // @DataMember(Name="value", IsRequired=true)
        /** @var int */
        public int $value=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['unit'])) $this->unit = JsonConverters::from('UnitEnum', $o['unit']);
        if (isset($o['value'])) $this->value = $o['value'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->unit)) $o['unit'] = JsonConverters::to('UnitEnum', $this->unit);
        if (isset($this->value)) $o['value'] = $this->value;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract(Name="UpdateInvoiceConfigurationsRequest")
class UpdateInvoiceConfigurationsRequest implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="intermediaryPlacement", IsRequired=true)
        /** @var IntermediaryPlacementEnum|null */
        public ?IntermediaryPlacementEnum $intermediaryPlacement=null,

        // @DataMember(Name="accrualCodeFormat", IsRequired=true)
        /** @var AccrualCodeFormatEnum|null */
        public ?AccrualCodeFormatEnum $accrualCodeFormat=null,

        // @DataMember(Name="dateFormat", IsRequired=true)
        /** @var string */
        public string $dateFormat='',

        // @DataMember(Name="delimiter", IsRequired=true)
        /** @var string */
        public string $delimiter='',

        // @DataMember(Name="decimalSeparator", IsRequired=true)
        /** @var string */
        public string $decimalSeparator='',

        // @DataMember(Name="orderCreatorCode", IsRequired=true)
        /** @var string */
        public string $orderCreatorCode='',

        // @DataMember(Name="salesPersonId", IsRequired=true)
        /** @var string */
        public string $salesPersonId='',

        // @DataMember(Name="salesDepartmentId", IsRequired=true)
        /** @var string */
        public string $salesDepartmentId='',

        // @DataMember(Name="includeBillingPeriodDates")
        /** @var bool|null */
        public ?bool $includeBillingPeriodDates=null,

        // @DataMember(Name="trackInvoicePayments")
        /** @var bool|null */
        public ?bool $trackInvoicePayments=null,

        // @DataMember(Name="includeInvoicedCustomerDetails")
        /** @var bool|null */
        public ?bool $includeInvoicedCustomerDetails=null,

        // @DataMember(Name="billingPeriodTextFormat", IsRequired=true)
        /** @var string */
        public string $billingPeriodTextFormat='',

        // @DataMember(Name="customerFooterText")
        /** @var string */
        public string $customerFooterText='',

        // @DataMember(Name="addEmptyLineBeforeCustomerFooter")
        /** @var bool|null */
        public ?bool $addEmptyLineBeforeCustomerFooter=null,

        // @DataMember(Name="includeOnlyDefaultSalesPersonAndDepartment")
        /** @var bool|null */
        public ?bool $includeOnlyDefaultSalesPersonAndDepartment=null,

        // @DataMember(Name="includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer")
        /** @var bool|null */
        public ?bool $includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer=null,

        // @DataMember(Name="transactionGroup", IsRequired=true)
        /** @var string */
        public string $transactionGroup='',

        // @DataMember(Name="invoiceArbitraryNumber", IsRequired=true)
        /** @var string */
        public string $invoiceArbitraryNumber='',

        // @DataMember(Name="deliveryMethod", IsRequired=true)
        /** @var string */
        public string $deliveryMethod='',

        // @DataMember(Name="deliveryConditions", IsRequired=true)
        /** @var string */
        public string $deliveryConditions='',

        // @DataMember(Name="orderType", IsRequired=true)
        /** @var string */
        public string $orderType='',

        // @DataMember(Name="invoiceStatus", IsRequired=true)
        /** @var string */
        public string $invoiceStatus='',

        // @DataMember(Name="useProductGroupRevenueRecognition")
        /** @var bool|null */
        public ?bool $useProductGroupRevenueRecognition=null,

        // @DataMember(Name="productGroupLineExcludePrint", IsRequired=true)
        /** @var string */
        public string $productGroupLineExcludePrint='',

        // @DataMember(Name="productGroupLineEditPreferences", IsRequired=true)
        /** @var string */
        public string $productGroupLineEditPreferences='',

        // @DataMember(Name="productLineExcludePrint", IsRequired=true)
        /** @var string */
        public string $productLineExcludePrint='',

        // @DataMember(Name="useDiscountedPrices")
        /** @var bool|null */
        public ?bool $useDiscountedPrices=null,

        // @DataMember(Name="terminateUnpaidSubscriptions")
        /** @var bool|null */
        public ?bool $terminateUnpaidSubscriptions=null,

        // @DataMember(Name="allowedUnpaidAmountLimit", EmitDefaultValue=false)
        /** @var float */
        public float $allowedUnpaidAmountLimit=0.0,

        // @DataMember(Name="allowedPaymentOverdue")
        /** @var TimeLengthRequestDto|null */
        public ?TimeLengthRequestDto $allowedPaymentOverdue=null,

        // @DataMember(Name="unpaidSubscriptionTerminationReasonId")
        /** @var string|null */
        public ?string $unpaidSubscriptionTerminationReasonId=null,

        // @DataMember(Name="unpaidSubscriptionTerminationComment")
        /** @var string */
        public string $unpaidSubscriptionTerminationComment='',

        // @DataMember(Name="creditInvoiceNumberReferenceTextFormat")
        /** @var string */
        public string $creditInvoiceNumberReferenceTextFormat=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['intermediaryPlacement'])) $this->intermediaryPlacement = JsonConverters::from('IntermediaryPlacementEnum', $o['intermediaryPlacement']);
        if (isset($o['accrualCodeFormat'])) $this->accrualCodeFormat = JsonConverters::from('AccrualCodeFormatEnum', $o['accrualCodeFormat']);
        if (isset($o['dateFormat'])) $this->dateFormat = $o['dateFormat'];
        if (isset($o['delimiter'])) $this->delimiter = $o['delimiter'];
        if (isset($o['decimalSeparator'])) $this->decimalSeparator = $o['decimalSeparator'];
        if (isset($o['orderCreatorCode'])) $this->orderCreatorCode = $o['orderCreatorCode'];
        if (isset($o['salesPersonId'])) $this->salesPersonId = $o['salesPersonId'];
        if (isset($o['salesDepartmentId'])) $this->salesDepartmentId = $o['salesDepartmentId'];
        if (isset($o['includeBillingPeriodDates'])) $this->includeBillingPeriodDates = $o['includeBillingPeriodDates'];
        if (isset($o['trackInvoicePayments'])) $this->trackInvoicePayments = $o['trackInvoicePayments'];
        if (isset($o['includeInvoicedCustomerDetails'])) $this->includeInvoicedCustomerDetails = $o['includeInvoicedCustomerDetails'];
        if (isset($o['billingPeriodTextFormat'])) $this->billingPeriodTextFormat = $o['billingPeriodTextFormat'];
        if (isset($o['customerFooterText'])) $this->customerFooterText = $o['customerFooterText'];
        if (isset($o['addEmptyLineBeforeCustomerFooter'])) $this->addEmptyLineBeforeCustomerFooter = $o['addEmptyLineBeforeCustomerFooter'];
        if (isset($o['includeOnlyDefaultSalesPersonAndDepartment'])) $this->includeOnlyDefaultSalesPersonAndDepartment = $o['includeOnlyDefaultSalesPersonAndDepartment'];
        if (isset($o['includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer'])) $this->includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer = $o['includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer'];
        if (isset($o['transactionGroup'])) $this->transactionGroup = $o['transactionGroup'];
        if (isset($o['invoiceArbitraryNumber'])) $this->invoiceArbitraryNumber = $o['invoiceArbitraryNumber'];
        if (isset($o['deliveryMethod'])) $this->deliveryMethod = $o['deliveryMethod'];
        if (isset($o['deliveryConditions'])) $this->deliveryConditions = $o['deliveryConditions'];
        if (isset($o['orderType'])) $this->orderType = $o['orderType'];
        if (isset($o['invoiceStatus'])) $this->invoiceStatus = $o['invoiceStatus'];
        if (isset($o['useProductGroupRevenueRecognition'])) $this->useProductGroupRevenueRecognition = $o['useProductGroupRevenueRecognition'];
        if (isset($o['productGroupLineExcludePrint'])) $this->productGroupLineExcludePrint = $o['productGroupLineExcludePrint'];
        if (isset($o['productGroupLineEditPreferences'])) $this->productGroupLineEditPreferences = $o['productGroupLineEditPreferences'];
        if (isset($o['productLineExcludePrint'])) $this->productLineExcludePrint = $o['productLineExcludePrint'];
        if (isset($o['useDiscountedPrices'])) $this->useDiscountedPrices = $o['useDiscountedPrices'];
        if (isset($o['terminateUnpaidSubscriptions'])) $this->terminateUnpaidSubscriptions = $o['terminateUnpaidSubscriptions'];
        if (isset($o['allowedUnpaidAmountLimit'])) $this->allowedUnpaidAmountLimit = $o['allowedUnpaidAmountLimit'];
        if (isset($o['allowedPaymentOverdue'])) $this->allowedPaymentOverdue = JsonConverters::from('TimeLengthRequestDto', $o['allowedPaymentOverdue']);
        if (isset($o['unpaidSubscriptionTerminationReasonId'])) $this->unpaidSubscriptionTerminationReasonId = $o['unpaidSubscriptionTerminationReasonId'];
        if (isset($o['unpaidSubscriptionTerminationComment'])) $this->unpaidSubscriptionTerminationComment = $o['unpaidSubscriptionTerminationComment'];
        if (isset($o['creditInvoiceNumberReferenceTextFormat'])) $this->creditInvoiceNumberReferenceTextFormat = $o['creditInvoiceNumberReferenceTextFormat'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->intermediaryPlacement)) $o['intermediaryPlacement'] = JsonConverters::to('IntermediaryPlacementEnum', $this->intermediaryPlacement);
        if (isset($this->accrualCodeFormat)) $o['accrualCodeFormat'] = JsonConverters::to('AccrualCodeFormatEnum', $this->accrualCodeFormat);
        if (isset($this->dateFormat)) $o['dateFormat'] = $this->dateFormat;
        if (isset($this->delimiter)) $o['delimiter'] = $this->delimiter;
        if (isset($this->decimalSeparator)) $o['decimalSeparator'] = $this->decimalSeparator;
        if (isset($this->orderCreatorCode)) $o['orderCreatorCode'] = $this->orderCreatorCode;
        if (isset($this->salesPersonId)) $o['salesPersonId'] = $this->salesPersonId;
        if (isset($this->salesDepartmentId)) $o['salesDepartmentId'] = $this->salesDepartmentId;
        if (isset($this->includeBillingPeriodDates)) $o['includeBillingPeriodDates'] = $this->includeBillingPeriodDates;
        if (isset($this->trackInvoicePayments)) $o['trackInvoicePayments'] = $this->trackInvoicePayments;
        if (isset($this->includeInvoicedCustomerDetails)) $o['includeInvoicedCustomerDetails'] = $this->includeInvoicedCustomerDetails;
        if (isset($this->billingPeriodTextFormat)) $o['billingPeriodTextFormat'] = $this->billingPeriodTextFormat;
        if (isset($this->customerFooterText)) $o['customerFooterText'] = $this->customerFooterText;
        if (isset($this->addEmptyLineBeforeCustomerFooter)) $o['addEmptyLineBeforeCustomerFooter'] = $this->addEmptyLineBeforeCustomerFooter;
        if (isset($this->includeOnlyDefaultSalesPersonAndDepartment)) $o['includeOnlyDefaultSalesPersonAndDepartment'] = $this->includeOnlyDefaultSalesPersonAndDepartment;
        if (isset($this->includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer)) $o['includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer'] = $this->includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer;
        if (isset($this->transactionGroup)) $o['transactionGroup'] = $this->transactionGroup;
        if (isset($this->invoiceArbitraryNumber)) $o['invoiceArbitraryNumber'] = $this->invoiceArbitraryNumber;
        if (isset($this->deliveryMethod)) $o['deliveryMethod'] = $this->deliveryMethod;
        if (isset($this->deliveryConditions)) $o['deliveryConditions'] = $this->deliveryConditions;
        if (isset($this->orderType)) $o['orderType'] = $this->orderType;
        if (isset($this->invoiceStatus)) $o['invoiceStatus'] = $this->invoiceStatus;
        if (isset($this->useProductGroupRevenueRecognition)) $o['useProductGroupRevenueRecognition'] = $this->useProductGroupRevenueRecognition;
        if (isset($this->productGroupLineExcludePrint)) $o['productGroupLineExcludePrint'] = $this->productGroupLineExcludePrint;
        if (isset($this->productGroupLineEditPreferences)) $o['productGroupLineEditPreferences'] = $this->productGroupLineEditPreferences;
        if (isset($this->productLineExcludePrint)) $o['productLineExcludePrint'] = $this->productLineExcludePrint;
        if (isset($this->useDiscountedPrices)) $o['useDiscountedPrices'] = $this->useDiscountedPrices;
        if (isset($this->terminateUnpaidSubscriptions)) $o['terminateUnpaidSubscriptions'] = $this->terminateUnpaidSubscriptions;
        if (isset($this->allowedUnpaidAmountLimit)) $o['allowedUnpaidAmountLimit'] = $this->allowedUnpaidAmountLimit;
        if (isset($this->allowedPaymentOverdue)) $o['allowedPaymentOverdue'] = JsonConverters::to('TimeLengthRequestDto', $this->allowedPaymentOverdue);
        if (isset($this->unpaidSubscriptionTerminationReasonId)) $o['unpaidSubscriptionTerminationReasonId'] = $this->unpaidSubscriptionTerminationReasonId;
        if (isset($this->unpaidSubscriptionTerminationComment)) $o['unpaidSubscriptionTerminationComment'] = $this->unpaidSubscriptionTerminationComment;
        if (isset($this->creditInvoiceNumberReferenceTextFormat)) $o['creditInvoiceNumberReferenceTextFormat'] = $this->creditInvoiceNumberReferenceTextFormat;
        return empty($o) ? new class(){} : $o;
    }
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class UpdateVossInvoiceConfigurations extends UpdateInvoiceConfigurationsRequest implements JsonSerializable
{
    /**
     * @param IntermediaryPlacementEnum|null $intermediaryPlacement
     * @param AccrualCodeFormatEnum|null $accrualCodeFormat
     * @param string $dateFormat
     * @param string $delimiter
     * @param string $decimalSeparator
     * @param string $orderCreatorCode
     * @param string $salesPersonId
     * @param string $salesDepartmentId
     * @param bool|null $includeBillingPeriodDates
     * @param bool|null $trackInvoicePayments
     * @param bool|null $includeInvoicedCustomerDetails
     * @param string $billingPeriodTextFormat
     * @param string $customerFooterText
     * @param bool|null $addEmptyLineBeforeCustomerFooter
     * @param bool|null $includeOnlyDefaultSalesPersonAndDepartment
     * @param bool|null $includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer
     * @param string $transactionGroup
     * @param string $invoiceArbitraryNumber
     * @param string $deliveryMethod
     * @param string $deliveryConditions
     * @param string $orderType
     * @param string $invoiceStatus
     * @param bool|null $useProductGroupRevenueRecognition
     * @param string $productGroupLineExcludePrint
     * @param string $productGroupLineEditPreferences
     * @param string $productLineExcludePrint
     * @param bool|null $useDiscountedPrices
     * @param bool|null $terminateUnpaidSubscriptions
     * @param float $allowedUnpaidAmountLimit
     * @param TimeLengthRequestDto|null $allowedPaymentOverdue
     * @param string|null $unpaidSubscriptionTerminationReasonId
     * @param string $unpaidSubscriptionTerminationComment
     * @param string $creditInvoiceNumberReferenceTextFormat
     */
    public function __construct(
        ?IntermediaryPlacementEnum $intermediaryPlacement=null,
        ?AccrualCodeFormatEnum $accrualCodeFormat=null,
        string $dateFormat='',
        string $delimiter='',
        string $decimalSeparator='',
        string $orderCreatorCode='',
        string $salesPersonId='',
        string $salesDepartmentId='',
        ?bool $includeBillingPeriodDates=null,
        ?bool $trackInvoicePayments=null,
        ?bool $includeInvoicedCustomerDetails=null,
        string $billingPeriodTextFormat='',
        string $customerFooterText='',
        ?bool $addEmptyLineBeforeCustomerFooter=null,
        ?bool $includeOnlyDefaultSalesPersonAndDepartment=null,
        ?bool $includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer=null,
        string $transactionGroup='',
        string $invoiceArbitraryNumber='',
        string $deliveryMethod='',
        string $deliveryConditions='',
        string $orderType='',
        string $invoiceStatus='',
        ?bool $useProductGroupRevenueRecognition=null,
        string $productGroupLineExcludePrint='',
        string $productGroupLineEditPreferences='',
        string $productLineExcludePrint='',
        ?bool $useDiscountedPrices=null,
        ?bool $terminateUnpaidSubscriptions=null,
        float $allowedUnpaidAmountLimit=0.0,
        ?TimeLengthRequestDto $allowedPaymentOverdue=null,
        ?string $unpaidSubscriptionTerminationReasonId=null,
        string $unpaidSubscriptionTerminationComment='',
        string $creditInvoiceNumberReferenceTextFormat=''
    ) {
        parent::__construct($intermediaryPlacement,$accrualCodeFormat,$dateFormat,$delimiter,$decimalSeparator,$orderCreatorCode,$salesPersonId,$salesDepartmentId,$includeBillingPeriodDates,$trackInvoicePayments,$includeInvoicedCustomerDetails,$billingPeriodTextFormat,$customerFooterText,$addEmptyLineBeforeCustomerFooter,$includeOnlyDefaultSalesPersonAndDepartment,$includeSubscriptionCustomerDetailsIfPayedByAnotherCustomer,$transactionGroup,$invoiceArbitraryNumber,$deliveryMethod,$deliveryConditions,$orderType,$invoiceStatus,$useProductGroupRevenueRecognition,$productGroupLineExcludePrint,$productGroupLineEditPreferences,$productLineExcludePrint,$useDiscountedPrices,$terminateUnpaidSubscriptions,$allowedUnpaidAmountLimit,$allowedPaymentOverdue,$unpaidSubscriptionTerminationReasonId,$unpaidSubscriptionTerminationComment,$creditInvoiceNumberReferenceTextFormat);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

PHP UpdateVossInvoiceConfigurations DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /voss/invoiceConfigurations HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{}