digitaluapi

<back to all web services

OnceOffPaymentRequests

Requires Authentication
Required role:Client
The following routes are available for this service:
POST/onceoffpaymentOnce of Payments
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 OnceOffPaymentResponse:
    public_access_guid: Optional[str] = None
    invoice_number: Optional[str] = None
    status_codes_id: int = 0
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OnceOffPaymentRequests:
    # @Validate(Validator="NotNull")
    segment: Optional[str] = None

    # @Validate(Validator="NotNull")
    first_name: Optional[str] = None

    # @Validate(Validator="NotNull")
    last_name: Optional[str] = None

    address: Optional[str] = None
    city: Optional[str] = None
    region: Optional[str] = None
    suburb: Optional[str] = None
    postal_code: Optional[str] = None
    mobile_number: Optional[str] = None
    email: Optional[str] = None
    id_number: Optional[str] = None
    passport_number: Optional[str] = None
    # @Validate(Validator="NotNull")
    invoice_number: Optional[str] = None

    debt_date: datetime.datetime = datetime.datetime(1, 1, 1)
    # @Validate(Validator="NotNull")
    amount_outstanding: float = 0.0

    # @Validate(Validator="NotNull")
    currencies_id: int = 0

    # @Validate(Validator="NotNull")
    channels_id: int = 0

    debt_meta: Optional[Dict[str, str]] = None
    customers_meta: Optional[Dict[str, str]] = None
    url_to_document: Optional[str] = None
    customer_unique_identifier: Optional[str] = None

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

POST /onceoffpayment HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Segment: String,
	FirstName: String,
	LastName: String,
	Address: String,
	City: String,
	Region: String,
	Suburb: String,
	PostalCode: String,
	MobileNumber: String,
	Email: String,
	IdNumber: String,
	PassportNumber: String,
	InvoiceNumber: String,
	DebtDate: 0001-01-01,
	AmountOutstanding: 0,
	CurrenciesId: 0,
	ChannelsId: 0,
	DebtMeta: 
	{
		String: String
	},
	CustomersMeta: 
	{
		String: String
	},
	UrlToDocument: String,
	CustomerUniqueIdentifier: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	PublicAccessGuid: 00000000000000000000000000000000,
	InvoiceNumber: String,
	StatusCodesId: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}