-
public class FetchConvFeeRequest extends V2ApiBaseRepresents a request to fetch conversion fee details from the PayU API. This class com.payu.india.Tasks.FetchConvFeeTask contains payment-related information such as the PayU ID, merchant key, transaction amount, source of the transaction, timestamp, and request ID. It also supports dynamic attributes for both common and variable dynamic data.
The class uses the Builder design pattern to facilitate the creation of a `FetchConvFeeRequest` instance, ensuring that all necessary fields are set before the object is constructed.
Example usage:
This class provides the following functionalities:FetchConvFeeRequest request = new FetchConvFeeRequest.Builder() .setPayuId("examplePayuId") .setMerchantKey("exampleMerchantKey") .setAmount(100.50) .setSource("website") .setTimeStamp("2025-03-24T10:00:00Z") .setRequestId("request123") .setCommonDynamicAttributes(new CommonDynamicAttributes(...)) .setVariableDynamicAttributesList(new ArrayList<>()) .build();- Building a request object with required fields using the Builder pattern.
- Converting the request object into a JSON format string using getJson.
- Handling common and variable dynamic attributes as part of the request.
Methods:
- getJson - Converts the request into a JSON format string to be sent to the PayU API.
Related classes:
- Builder - The builder class used to construct the `FetchConvFeeRequest`.
- CommonDynamicAttributes - Represents common dynamic attributes in the request.
- VariableDynamicAttributes - Represents variable dynamic attributes in the request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classFetchConvFeeRequest.BuilderThe Builder class is used to construct a FetchConvFeeRequest with the necessary attributes.It provides setter methods for all required fields and a build method to create the final object.
-
Constructor Summary
Constructors Constructor Description FetchConvFeeRequest(FetchConvFeeRequest.Builder builder)Constructs a new FetchConvFeeRequest using the provided builder.
-
Method Summary
Modifier and Type Method Description StringgetJson()Converts this FetchConvFeeRequest into a JSON string representation. -
-
Constructor Detail
-
FetchConvFeeRequest
FetchConvFeeRequest(FetchConvFeeRequest.Builder builder)
Constructs a new FetchConvFeeRequest using the provided builder.- Parameters:
builder- The builder that provides the necessary attributes for creating the request.
-
-
Method Detail
-
getJson
String getJson()
Converts this FetchConvFeeRequest into a JSON string representation.
-
-
-
-