To improve clarity and onboarding, all client initialization code samples now include relevant code blocks along with import statements. This update makes it easier for developers to understand and use the SDKs, eliminating guesswork around class and function origins in docs and READMEs.
Details
This change improves consistency and readability across SDKs by showing accurate code blocks based on each language's package structure. Developers can now copy working snippets without searching for package names, streamlining integration. This changelog is a further continuation of the client initialization improvements.
Client Initialization Samples
Following are the language specific code samples of a typical Payment Client, e.g., configuring a payment client with environment.
Java
- Before
- After
import com.fintech.sdk.Environment;
import com.fintech.sdk.PaymentClient;
PaymentClient client = new PaymentClient.Builder()
.environment(Environment.SANDBOX)
.build();
import com.fintech.sdk.Environment;
import com.fintech.sdk.PaymentClient;
public class Program {
public static void main(String[] args) {
PaymentClient client = new PaymentClient.Builder()
.environment(Environment.SANDBOX)
.build();
}
}
C#
- Before
- After
using FintechSdk;
var client = new PaymentClient.Builder()
.Environment(FintechSdk.Environment.Sandbox)
.Build();
using FintechSdk;
namespace ConsoleApp;
var client = new PaymentClient.Builder()
.Environment(FintechSdk.Environment.Sandbox)
.Build();
Ruby
- Before
- After
client = FintechSdk::Client.new(
environment: Environment::SANDBOX
)
require 'fintech-sdk'
include FintechSdk
client = Client.new(
environment: Environment::SANDBOX
)