BokaMera.API.Host

<back to all web services

CompanyBillingInformation

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin
The following routes are available for this service:
GET/billing/companyGet billing details for the company.Get billing details for the company.
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.API.ServiceModel.Db;

namespace BokaMera.API.ServiceModel.Db
{
    public partial class BaseModel
    {
    }

    public partial class BillingInformation
        : BaseModel, IBaseModelCreated, IBaseModelUpdated
    {
        public virtual BillingMethod BillingMethod { get; set; }
        [Required]
        public virtual int BillingMethodId { get; set; }

        [Required]
        public virtual string Name { get; set; }

        public virtual string? FirstName { get; set; }
        public virtual string? LastName { get; set; }
        public virtual string? PhoneNumber { get; set; }
        public virtual string? Attention { get; set; }
        public virtual string? Street1 { get; set; }
        public virtual string? Street2 { get; set; }
        public virtual string? ZipCode { get; set; }
        public virtual string? City { get; set; }
        public virtual string? Email { get; set; }
        public virtual string? CreditCard { get; set; }
        public virtual string? CreditCardHolder { get; set; }
        public virtual string? CreditCardNumber { get; set; }
        public virtual short? ValidToYear { get; set; }
        public virtual short? ValidToMonth { get; set; }
        public virtual string? CSV { get; set; }
        [Required]
        public virtual DateTime UpdatedDate { get; set; }

        [Required]
        public virtual DateTime CreatedDate { get; set; }

        [Required]
        public virtual string CountryId { get; set; }

        [Required]
        public virtual int PaymentTermsDays { get; set; }

        public virtual string? VatRegistrationNumber { get; set; }
        public virtual int LicensePlanId { get; set; }
        public virtual string? GLN { get; set; }
        public virtual string? ReferenceLine1 { get; set; }
        public virtual string? ReferenceLine2 { get; set; }
        public virtual DateTimeOffset? ModifiedDate { get; set; }
        [Required]
        public virtual Guid Id { get; set; }
    }

    public partial class BillingMethod
        : BaseModel
    {
        public virtual List<BillingMethodCountriesRelation> BillingMethodCountriesRelation { get; set; } = [];
        [Required]
        public virtual string Name { get; set; }

        [Required]
        public virtual string Description { get; set; }

        public virtual DateTimeOffset? ModifiedDate { get; set; }
        public virtual int Id { get; set; }
    }

    public partial class BillingMethodCountriesRelation
        : BaseModel
    {
        [Required]
        public virtual int BillingMethodId { get; set; }

        [Required]
        public virtual string CountryId { get; set; }

        public virtual DateTimeOffset? ModifiedDate { get; set; }
    }

}

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class AccessKeyTypeResponse
    {
        public virtual int Id { get; set; }
        public virtual string KeyType { get; set; }
        public virtual string Description { get; set; }
    }

    public partial class BillingMethodQueryResponse
    {
        ///<summary>
        ///The billing method id
        ///</summary>
        [ApiMember(Description="The billing method id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The billing method name
        ///</summary>
        [ApiMember(Description="The billing method name")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The billing method description
        ///</summary>
        [ApiMember(Description="The billing method description")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The billing method is valid for the following countries
        ///</summary>
        [ApiMember(Description="The billing method is valid for the following countries")]
        public virtual List<string> Countries { get; set; } = [];
    }

    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    [ValidateRequest("IsAuthenticated")]
    public partial class CompanyBillingInformation
        : QueryDb<BillingInformation, BillingMethodQueryResponse>
    {
        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")]
        public virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///If you want to include the billing methods to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the billing methods to select from", ParameterType="query")]
        public virtual bool IncludeBillingMethodOptions { get; set; }
    }

}

namespace ServiceStack
{
    [DataContract]
    public partial class QueryBase
    {
        [DataMember(Order=1)]
        public virtual int? Skip { get; set; }

        [DataMember(Order=2)]
        public virtual int? Take { get; set; }

        [DataMember(Order=3)]
        public virtual string? OrderBy { get; set; }

        [DataMember(Order=4)]
        public virtual string? OrderByDesc { get; set; }

        [DataMember(Order=5)]
        public virtual string? Include { get; set; }

        [DataMember(Order=6)]
        public virtual string? Fields { get; set; }

        [DataMember(Order=7)]
        public virtual Dictionary<string, string>? Meta { get; set; }
    }

    public partial class QueryDb<From, Into>
        : QueryBase
    {
    }

    [DataContract]
    public partial class QueryResponse<T>
    {
        [DataMember(Order=1)]
        public virtual int Offset { get; set; }

        [DataMember(Order=2)]
        public virtual int Total { get; set; }

        [DataMember(Order=3)]
        public virtual List<AccessKeyTypeResponse> Results { get; set; } = [];

        [DataMember(Order=4)]
        public virtual Dictionary<string, string>? Meta { get; set; }

        [DataMember(Order=5)]
        public virtual ResponseStatus? ResponseStatus { get; set; }
    }

}

C# CompanyBillingInformation 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 /billing/company HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Offset: 0,
	Total: 0,
	Results: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			Countries: 
			[
				String
			]
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}