PurchaseOrderPayment Constructor (String, Guid)
Initializes a new instance of the PurchaseOrderPayment class using the specified billing address ID and payment method name.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub New ( _
billingAddressId As String, _
paymentMethodId As Guid _
)
'Usage
Dim billingAddressId As String
Dim paymentMethodId As Guid
Dim instance As New PurchaseOrderPayment(billingAddressId, _
paymentMethodId)
public PurchaseOrderPayment(
string billingAddressId,
Guid paymentMethodId
)
public:
PurchaseOrderPayment(
String^ billingAddressId,
Guid paymentMethodId
)
public function PurchaseOrderPayment(
billingAddressId : String,
paymentMethodId : Guid
)
Parameters
- billingAddressId
Type: System..::.String
The OrderAddress ID for billing.
- paymentMethodId
Type: System..::.Guid
The ID of a payment method used for this payment.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The length of the billingAddressId string is greater than the maximum allowable length specified in the orders storage mapping file. |
Remarks
The default maximum length for billingAddressId is 50 characters, as defined in the corresponding table column constraint specified in the default orders storage mapping file, OrderObjectMappings.xml. The specified payment method name should meet the criteria for PaymentMethodId.
A purchase order payment usually represents a business-to-business style of transaction. A PurchaseOrderPayment is derived from the abstract Payment class and represents a payment mechanism.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.