Package io.bayonet.clients
Class EcommerceClient
java.lang.Object
io.bayonet.Bayonet
io.bayonet.clients.EcommerceClient
public class EcommerceClient extends Bayonet
Created by imranarshad on 11/27/17
Client implementation for connecting to the Bayonet Ecommerce API endpoints
-
Field Summary
-
Constructor Summary
Constructors Constructor Description EcommerceClient(java.lang.String api_key, java.lang.String api_version)Constructor to set up the client configuration -
Method Summary
Modifier and Type Method Description voidconsult(EcommerceConsultRequest params)Handler for sending consulting API callsvoidfeedbackHistorical(EcommerceFeedbackHistoricalRequest params)Handler for sending feedback-historical API callsjava.lang.StringgetBayonetTrackingId()java.lang.StringgetDecision()java.lang.IntegergetHttpResponseCode()Gettersjava.lang.IntegergetReasonCode()java.lang.StringgetReasonMessage()RulesTriggeredgetRulesTriggered()voidupdateTransaction(EcommerceUpdateTransactionRequest params)Handler for sending update-transaction API calls - this endpoint is used to report changes in the status of a transaction, eg.
-
Constructor Details
-
EcommerceClient
public EcommerceClient(java.lang.String api_key, java.lang.String api_version)Constructor to set up the client configuration- Parameters:
api_key- client api keyapi_version- Bayonet api version to connect to
-
-
Method Details
-
consult
Handler for sending consulting API calls- Parameters:
params- POST request parameters to be sent in the JSON payload- Throws:
BayonetException- if the API returns an error
-
feedbackHistorical
Handler for sending feedback-historical API calls- Parameters:
params- POST request parameters to be sent in the JSON payload- Throws:
BayonetException- if the API returns an error
-
updateTransaction
Handler for sending update-transaction API calls - this endpoint is used to report changes in the status of a transaction, eg. a successful transaction gets cancelled at a later point in time- Parameters:
params- POST request parameters to be sent in the JSON payload- Throws:
BayonetException- if the API returns an error
-
getHttpResponseCode
public java.lang.Integer getHttpResponseCode()Getters -
getReasonCode
public java.lang.Integer getReasonCode() -
getReasonMessage
public java.lang.String getReasonMessage() -
getBayonetTrackingId
public java.lang.String getBayonetTrackingId() -
getRulesTriggered
-
getDecision
public java.lang.String getDecision()
-