public class WebpayAdminCamelClient extends Object
| Constructor and Description |
|---|
WebpayAdminCamelClient()
Creates an empty svea client.
|
| Modifier and Type | Method and Description |
|---|---|
com.svea.webpay.common.auth.SveaCredential |
addCredentials(String accountNo,
String username,
String password)
Adds credentials from camel headers.
|
List<org.notima.generic.businessobjects.Payment<com.svea.webpay.common.reconciliation.PaymentReportDetail>> |
convertPaymentGroupToPayments(com.svea.webpay.common.reconciliation.PaymentReportGroup group,
Boolean retriesOnly,
Boolean feesOnPaymentLevel)
Converts a SveaPayment Group to Business Object Payments
|
WebpayAdminCamelClient |
createClientFromFile()
Creates a client using the file path set in setJsonFile.
|
static WebpayAdminCamelClient |
createClientFromIdentity(String username,
String password)
Creates a client from identity username and password.
|
static WebpayAdminCamelClient |
createClientFromJsonBody(String orgNo,
String body)
Create a new instance of a svea client using the body as configuration.
|
String |
createJsonConfigFromServices(String username,
String password)
Creates / compares configuration based on login (identity account)
|
com.svea.webpayadminservice.client.CreateOrderResponse2 |
createOrder(String accountNo,
org.notima.generic.businessobjects.Order src)
Creates and order from an OrderInvoice object.
|
com.svea.businessobjects.pmtadmin.SveaPmtAdminBusinessObjectFactory |
createSveaPmtAdminBusinessObjectFactory(String serverName,
String merchantId,
String secretWord)
Creates a SveaPmtAdminBusinessObjectFactory
|
String |
deliverCheckoutOrder(String checkoutOrderNo)
Delivers checkout order
|
com.svea.webpayadminservice.client.DeliveryResponse |
deliverOrder(String accountNo,
String orderType,
String orderNo)
Delivers an order (non-checkout).
|
String |
getCardMerchantId() |
com.svea.webpay.common.auth.SveaCredential |
getCheckoutCredential() |
com.svea.webpay.common.auth.SveaCredential |
getCredentialFromAccountNo(String accountNo) |
List<com.svea.webpay.common.auth.SveaCredential> |
getCredentials()
Gets credentials for this client.
|
String |
getFromDate() |
String |
getJsonFile() |
org.notima.generic.businessobjects.Order |
getOrder(String accountNo,
String orderId)
Returns order data given Svea's order id.
|
org.notima.generic.businessobjects.Order |
getOrderByCheckoutOrderId(String checkoutOrderId)
Returns order data given checkout order id
|
org.notima.generic.businessobjects.Order |
getOrderByClientOrderId(String accountNo,
String clientOrderId)
Returns order data given client's order id
|
String |
getOrgNo() |
List<String> |
getReconcileDates(String reconcileDate,
String lastReconcileDate)
Gets a list of dates generated from lastReconcileDate
Saturdays and sundays are excluded.
|
com.svea.webpay.common.reconciliation.PaymentReport |
getReport()
Returns the report
|
String |
getReportAsJson()
Returns the complete report in JSON.
|
String |
getTodayMinusDaysStr(Integer days)
Generates a date minus given number of days.
|
boolean |
hasRetryEntries(com.svea.webpay.common.reconciliation.PaymentReport report)
Returns true if the payment report has retry-entries.
|
com.svea.webpay.common.reconciliation.PaymentReportDetail |
markForRetry(com.svea.webpay.common.reconciliation.PaymentReportDetail paymentDetail,
Boolean retry)
Marks given entry for retry
|
static void |
overrideOptions(WebpayAdminCamelClient client,
String accountNo,
String includeKickbacks,
String skipTaxId,
String skipEmail,
String enrichFromInvoice)
Sets / overrides options on given credential.
|
com.svea.webpay.common.reconciliation.PaymentReport |
readPayments(String orgNo,
String clientName,
String fromDateStr,
String untilDateStr)
Reads payments from given client.
|
static void |
removeAllCredentialsBut(WebpayAdminCamelClient client,
String accountNo)
Removes all credentials but the given one
|
static void |
removeCredential(WebpayAdminCamelClient client,
String accountNo)
Removes credential with given accountNo.
|
org.notima.generic.businessobjects.Payment |
removeNativeReference(org.notima.generic.businessobjects.Payment detail)
Removes reference to native payment (if this object is sent to a context)
where the native reference isn't known.
|
void |
setCredentialsFromJsonBody(String body)
Sets credentials from body in json format
|
WebpayAdminCamelClient |
setFromJsonBody(String json)
Sets client credentials from jsonConfig.
|
void |
setJsonFile(String jsonFile) |
WebpayAdminCamelClient |
setOrgNo(String orgNo)
Sets orgNo and resets report and credentials.
|
public WebpayAdminCamelClient()
public static WebpayAdminCamelClient createClientFromJsonBody(@Header(value="orgNo") String orgNo, String body)
orgNo - Org Number. If not null and the orgnumber isn't in the configuration orgNo is used.body - Expected format is json-format of ListOfSveaCredentialspublic static WebpayAdminCamelClient createClientFromIdentity(@Header(value="identityUser") String username, @Header(value="identityPass") String password) throws Exception
username - password - Exceptionpublic WebpayAdminCamelClient createClientFromFile() throws Exception
Exceptionpublic WebpayAdminCamelClient setFromJsonBody(@Header(value="jsonConfig") String json)
json - public WebpayAdminCamelClient setOrgNo(@Header(value="orgNo") String orgNo)
orgNo - public String getOrgNo()
public void setCredentialsFromJsonBody(String body)
body - public List<com.svea.webpay.common.auth.SveaCredential> getCredentials()
public static void removeAllCredentialsBut(@Header(value="client")
WebpayAdminCamelClient client,
@Header(value="credAccountNo")
String accountNo)
public static void removeCredential(@Header(value="client")
WebpayAdminCamelClient client,
@Header(value="credAccountNo")
String accountNo)
accountNo - AccountNo to removepublic static void overrideOptions(@Header(value="client")
WebpayAdminCamelClient client,
@Header(value="credAccountNo")
String accountNo,
@Header(value="includeKickbacks")
String includeKickbacks,
@Header(value="skipTaxId")
String skipTaxId,
@Header(value="skipEmail")
String skipEmail,
@Header(value="enrichFromInvoice")
String enrichFromInvoice)
client - accountNo - includeKickbacks - skipTaxId - skipEmail - enrichFromInvoice - public com.svea.webpay.common.auth.SveaCredential addCredentials(@Header(value="accountNo")
String accountNo,
@Header(value="username")
String username,
@Header(value="password")
String password)
public org.notima.generic.businessobjects.Order getOrder(@Header(value="accountNo")
String accountNo,
@Header(value="orderId")
String orderId)
throws Exception
accountNo - - Client IDorderId - Exceptionpublic org.notima.generic.businessobjects.Order getOrderByClientOrderId(@Header(value="accountNo")
String accountNo,
@Header(value="clientOrderId")
String clientOrderId)
throws Exception
Exceptionpublic org.notima.generic.businessobjects.Order getOrderByCheckoutOrderId(@Header(value="checkoutOrderId")
String checkoutOrderId)
throws Exception
Exceptionpublic com.svea.webpayadminservice.client.CreateOrderResponse2 createOrder(@Header(value="accountNo")
String accountNo,
org.notima.generic.businessobjects.Order src)
throws Exception
src - Exceptionpublic com.svea.webpay.common.auth.SveaCredential getCredentialFromAccountNo(@Header(value="accountNo")
String accountNo)
accountNo - public String createJsonConfigFromServices(@Header(value="clientUsername") String username, @Header(value="clientPassword") String password) throws Exception
Exceptionpublic com.svea.webpay.common.auth.SveaCredential getCheckoutCredential()
public String getCardMerchantId()
public String deliverCheckoutOrder(String checkoutOrderNo) throws Exception
checkoutOrderNo - The checkout order to deliver.Exceptionpublic com.svea.webpayadminservice.client.DeliveryResponse deliverOrder(@Header(value="accountNo")
String accountNo,
@Header(value="orderType")
String orderType,
@Header(value="orderNo")
String orderNo)
throws Exception
accountNo - orderNo - Exceptionpublic String getTodayMinusDaysStr(@Header(value="days") Integer days)
days - public List<String> getReconcileDates(@Header(value="reconcileDate") String reconcileDate, @Header(value="lastReconcileDate") String lastReconcileDate) throws Exception
reconcileDate - If set, only this date is returned.lastReconcileDate - If set and reconcileDate is null, all dates from lastReconcileDate until yesterday are returned.Exceptionpublic com.svea.webpay.common.reconciliation.PaymentReport readPayments(@Header(value="orgNo")
String orgNo,
@Header(value="clientName")
String clientName,
@Header(value="fromDate")
String fromDateStr,
@Header(value="untilDate")
String untilDateStr)
throws Exception
orgNo - The org number of the recipientclientName - The client name of the recipientfromDateStr - Read payments from this dateuntilDateStr - Read payments until this dateExceptionpublic String getFromDate()
public String getReportAsJson()
public com.svea.webpay.common.reconciliation.PaymentReport getReport()
public List<org.notima.generic.businessobjects.Payment<com.svea.webpay.common.reconciliation.PaymentReportDetail>> convertPaymentGroupToPayments(com.svea.webpay.common.reconciliation.PaymentReportGroup group, @Header(value="processRetryPaymentsOnly") Boolean retriesOnly, @Header(value="feesOnPaymentLevel") Boolean feesOnPaymentLevel) throws ParseException
group - The group to be convertedretriesOnly - Only include payments marked for retryfeesOnPaymentLevel - Book fees on payment level (instead of total for the payment type).ParseExceptionpublic org.notima.generic.businessobjects.Payment removeNativeReference(org.notima.generic.businessobjects.Payment detail)
detail - public com.svea.webpay.common.reconciliation.PaymentReportDetail markForRetry(@Header(value="paymentDetail")
com.svea.webpay.common.reconciliation.PaymentReportDetail paymentDetail,
@Header(value="retry")
Boolean retry)
paymentDetail - retry - public boolean hasRetryEntries(@Header(value="paymentReport")
com.svea.webpay.common.reconciliation.PaymentReport report)
public com.svea.businessobjects.pmtadmin.SveaPmtAdminBusinessObjectFactory createSveaPmtAdminBusinessObjectFactory(@Header(value="serverName")
String serverName,
@Header(value="merchantId")
String merchantId,
@Header(value="secretWord")
String secretWord)
serverName - merchantId - secretWord - public String getJsonFile()
public void setJsonFile(String jsonFile)
Copyright © 2017–2020 Notima System Integration AB. All rights reserved.