Billhighway Cloud API

<back to all web services

SalesForceCreateApplyCredit

The following routes are available for this service:
POST/api/SalesForce/CreateApplyCredit
import 'package:servicestack/servicestack.dart';

class SalesForceCreateApplyCreditReply implements IConvertible
{
    int? ErrorCode;
    String? ErrorMessage;

    SalesForceCreateApplyCreditReply({this.ErrorCode,this.ErrorMessage});
    SalesForceCreateApplyCreditReply.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ErrorCode = json['ErrorCode'];
        ErrorMessage = json['ErrorMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ErrorCode': ErrorCode,
        'ErrorMessage': ErrorMessage
    };

    getTypeName() => "SalesForceCreateApplyCreditReply";
    TypeContext? context = _ctx;
}

class SalesForceCreditInvoiceDetails implements IConvertible
{
    int? Invoice;
    double? AmountPaid;
    String? Region;
    String? CostCenter;

    SalesForceCreditInvoiceDetails({this.Invoice,this.AmountPaid,this.Region,this.CostCenter});
    SalesForceCreditInvoiceDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Invoice = json['Invoice'];
        AmountPaid = JsonConverters.toDouble(json['AmountPaid']);
        Region = json['Region'];
        CostCenter = json['CostCenter'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Invoice': Invoice,
        'AmountPaid': AmountPaid,
        'Region': Region,
        'CostCenter': CostCenter
    };

    getTypeName() => "SalesForceCreditInvoiceDetails";
    TypeContext? context = _ctx;
}

class SalesForceCreateApplyCredit implements IConvertible
{
    String? ClassName;
    String? UniqueId;
    DateTime? CreatedDateTime;
    int? ClientId;
    String? GroupId;
    String? UserId;
    int? BhUserId;
    int? CreditId;
    String? CurrencyType;
    String? CreditType;
    String? Notes;
    List<SalesForceCreditInvoiceDetails>? InvoiceDetails;

    SalesForceCreateApplyCredit({this.ClassName,this.UniqueId,this.CreatedDateTime,this.ClientId,this.GroupId,this.UserId,this.BhUserId,this.CreditId,this.CurrencyType,this.CreditType,this.Notes,this.InvoiceDetails});
    SalesForceCreateApplyCredit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ClassName = json['ClassName'];
        UniqueId = json['UniqueId'];
        CreatedDateTime = JsonConverters.fromJson(json['CreatedDateTime'],'DateTime',context!);
        ClientId = json['ClientId'];
        GroupId = json['GroupId'];
        UserId = json['UserId'];
        BhUserId = json['BhUserId'];
        CreditId = json['CreditId'];
        CurrencyType = json['CurrencyType'];
        CreditType = json['CreditType'];
        Notes = json['Notes'];
        InvoiceDetails = JsonConverters.fromJson(json['InvoiceDetails'],'List<SalesForceCreditInvoiceDetails>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ClassName': ClassName,
        'UniqueId': UniqueId,
        'CreatedDateTime': JsonConverters.toJson(CreatedDateTime,'DateTime',context!),
        'ClientId': ClientId,
        'GroupId': GroupId,
        'UserId': UserId,
        'BhUserId': BhUserId,
        'CreditId': CreditId,
        'CurrencyType': CurrencyType,
        'CreditType': CreditType,
        'Notes': Notes,
        'InvoiceDetails': JsonConverters.toJson(InvoiceDetails,'List<SalesForceCreditInvoiceDetails>',context!)
    };

    getTypeName() => "SalesForceCreateApplyCredit";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'SalesForceCreateApplyCreditReply': TypeInfo(TypeOf.Class, create:() => SalesForceCreateApplyCreditReply()),
    'SalesForceCreditInvoiceDetails': TypeInfo(TypeOf.Class, create:() => SalesForceCreditInvoiceDetails()),
    'SalesForceCreateApplyCredit': TypeInfo(TypeOf.Class, create:() => SalesForceCreateApplyCredit()),
    'List<SalesForceCreditInvoiceDetails>': TypeInfo(TypeOf.Class, create:() => <SalesForceCreditInvoiceDetails>[]),
});

Dart SalesForceCreateApplyCredit DTOs

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

HTTP + XML

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

POST /api/SalesForce/CreateApplyCredit HTTP/1.1 
Host: devapi.billhighway.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SalesForceCreateApplyCredit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <BhUserId>0</BhUserId>
  <ClassName>String</ClassName>
  <ClientId>0</ClientId>
  <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
  <CreditId>0</CreditId>
  <CreditType>String</CreditType>
  <CurrencyType>String</CurrencyType>
  <GroupId>String</GroupId>
  <InvoiceDetails>
    <SalesForceCreditInvoiceDetails>
      <AmountPaid>0</AmountPaid>
      <CostCenter>String</CostCenter>
      <Invoice>0</Invoice>
      <Region>String</Region>
    </SalesForceCreditInvoiceDetails>
  </InvoiceDetails>
  <Notes>String</Notes>
  <UniqueId>String</UniqueId>
  <UserId>String</UserId>
</SalesForceCreateApplyCredit>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SalesForceCreateApplyCreditReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>String</ErrorMessage>
</SalesForceCreateApplyCreditReply>