• Home
  • API Documentation
Show / Hide Table of Contents
  • Yort.AfterPay.InStore
    • AfterPayApiError
      • ErrorCode
      • ErrorId
      • HttpStatusCode
      • Message
    • AfterPayApiException
      • AfterPayApiException
      • ErrorCode
      • ErrorId
      • HttpStatusCode
    • AfterPayCallContext
      • OperatorId
    • AfterPayClient
      • AfterPayClient
      • CreateOrder
      • DisposeManagedResources
      • Ping
      • PreapprovalEnquiry
      • RefundOrder
      • RegisterDevice
      • ReverseOrder
      • ReverseRefund
      • SendInvite
    • AfterPayConfiguration
      • AfterPayConfiguration
      • DefaultCurrency
      • DeviceId
      • DeviceKey
      • Environment
      • HttpClient
      • MerchantId
      • MinimumRetries
      • ProductName
      • ProductVendor
      • ProductVersion
      • RetryDelaySeconds
      • SystemClock
    • AfterPayConstants
      • JsonMediaType
      • ProductionRootUrl
      • SandboxRootUrl
    • AfterPayCreateOrderRequest
      • Amount
      • MerchantReference
      • OrderItems
      • PreapprovalCode
      • RequestedAt
      • RequestId
    • AfterPayCreateRefundRequest
      • Amount
      • MerchantReference
      • OrderId
      • OrderMerchantReference
      • RequestedAt
      • RequestId
    • AfterPayCurrencies
      • AustralianDollars
      • NewZealandDollars
    • AfterPayDeviceRegistration
      • DeviceId
      • Key
    • AfterPayDeviceRegistrationRequest
      • Attributes
      • Name
      • Secret
    • AfterPayEnvironment
      • Production
      • Sandbox
    • AfterPayInviteRequest
      • ExpectedAmount
      • MobileNumber
      • NormalizePhoneNumber
    • AfterPayMoney
      • AfterPayMoney
      • Amount
      • Currency
      • Equality
      • Equals
      • GetHashCode
      • Inequality
      • ToString
    • AfterPayMoneyJsonConverter
      • CanConvert
      • ReadJson
      • WriteJson
    • AfterPayOrder
      • Amount
      • MerchantReference
      • OrderedAt
      • OrderId
      • OrderItems
      • PreapprovalCode
      • RequestedAt
      • RequestId
    • AfterPayOrderItem
      • Name
      • Price
      • Quantity
      • Sku
    • AfterPayOrderReversal
      • RequestedAt
      • ReversedAt
      • ReverseId
      • ReversingRequestId
    • AfterPayPreapprovalRequest
      • PreapprovalCode
    • AfterPayPreapprovalResponse
      • Amount
      • ExpiresAt
      • Minimum
    • AfterPayRefund
      • Amount
      • MerchantReference
      • OrderId
      • OrderMerchantReference
      • RefundedAt
      • RefundId
      • RequestedAt
      • RequestId
    • AfterPayRefundReversal
      • RequestedAt
      • ReversedAt
      • ReverseId
      • ReversingRequestId
    • AfterPayReverseOrderRequest
      • RequestedAt
      • ReversingRequestId
    • AfterPayReverseRefundRequest
      • RequestedAt
      • ReversingRequestId
    • AfterPaySystemClock
      • DefaultInstance
      • Now
    • AfterPayToken
      • ExpiresAt
      • ExpiresIn
      • IsExpired
      • IssuedAt
      • Token
    • AfterPayTokenRequest
      • Key
    • IAfterPayClient
      • CreateOrder
      • Ping
      • PreapprovalEnquiry
      • RefundOrder
      • RegisterDevice
      • ReverseOrder
      • ReverseRefund
      • SendInvite
    • IAfterPaySystemClock
      • Now

Class AfterPayClient

The main class used to access the AfterPay API, holding relevant configuration and providing methods for each REST API end point.

Inheritance
System.Object
AfterPayClient
Implements
IAfterPayClient
Namespace: Yort.AfterPay.InStore
Assembly: cs.temp.dll.dll
Syntax
public sealed class AfterPayClient : Trashy.DisposableManagedOnlyBase, IAfterPayClient
Remarks

Disposing objects of this type will dispose the internal only if it was created internally. If the was provided by HttpClient then it will not be disposed as it may have been shared with other AfterPayClient instances.

Constructors

Name Description
AfterPayClient(AfterPayConfiguration)

Constructs a new instance using the configuration provided.

Methods

Name Description
CreateOrder(AfterPayCreateOrderRequest, AfterPayCallContext)

Creates a new AfterPay order, which is basically a request for payment using a pre-approval code.

DisposeManagedResources()

Disposes the internal but only if it was created by this class, will not dispose it if it was passed via HttpClient.

Ping()

Sends a ping request to the AfterPay API to confirm a connection can be made.

PreapprovalEnquiry(AfterPayPreapprovalRequest, AfterPayCallContext)

Requests information about a pre-approval code generated by a customer.

RefundOrder(AfterPayCreateRefundRequest, AfterPayCallContext)

Creates a refund against a previously created order.

RegisterDevice(AfterPayDeviceRegistrationRequest)

Performs one time registration of a new point of sale device (API client) with the AfterPay API.

ReverseOrder(AfterPayReverseOrderRequest, AfterPayCallContext)

Requests an order previously placed be reversed.

ReverseRefund(AfterPayReverseRefundRequest, AfterPayCallContext)

Creates a refund reversal against a previously created refund.

SendInvite(AfterPayInviteRequest, AfterPayCallContext)

Sends an invitational SMS message to a customer's mobile phone. If no exception is thrown the request was successful.

Back to top Copyright (c) 2017 Troy Willmot