bunq / sdk_java Goto Github PK
View Code? Open in Web Editor NEWJava SDK for bunq API
License: MIT License
Java SDK for bunq API
License: MIT License
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\lenvovo\.gradle\caches\modules-2\files-2.1\com.github.bunq\sdk_java\b5c97e4\e70d9e73b467b9e46cd315e2d40182b175385b38\sdk_java-b5c97e4.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing com/bunq/sdk/security/SecurityUtils.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\lenvovo\.gradle\caches\modules-2\files-2.1\com.github.bunq\sdk_java\b5c97e4\e70d9e73b467b9e46cd315e2d40182b175385b38\sdk_java-b5c97e4.jar
no logs
Currently com.bunq.sdk.model.generated.object.Geolocation
has three BigDecimal
fields. However, there seems to be a mismatch. If you take a look at com.bunq.sdk.json.BigDecimalTypeAdapter
it reads a BigDecimal
from type String
. Yet the api returns a value of type number.
I did not make the pull request myself because I don't know which fix you'd like me to make. I see a few options:
String
. However, this is probably extremely impactful as it is a breaking api change.com.bunq.sdk.json.BigDecimalTypeAdapter
so it becomes
if (input.peek() == JsonToken.NULL) {
input.nextNull();
return null;
} else {
return new BigDecimal(input.nextString());
}
Geolocation
use Double
s instead of BigInteger
sMy personal preference would go to option 2 since in my opinion it is a more resilient solution. I am willing to make the pull request myself. Just give me your decision.
BunqResponse
object which, besides the response model, includes the response headers and paginationThe purpose of this issue is to introduce https://zappr.opensource.zalan.do so that quality control on pull requests can be assured.
The following configuration should be used:
autobranch:
pattern: 'bunq/sdk_java#{number}-{title}'
length: 100
commit:
message:
patterns:
- '([A-Za-z0-9 ]+)\. (\(bunq\/sdk_java#[0-9]+\))'
specification:
title:
minimum-length:
enabled: true
length: 8
body:
minimum-length:
enabled: true
length: 8
contains-url: true
contains-issue-number: true
template:
differs-from-body: true
pull-request:
labels:
additional: true
required:
- Reviewed by André
- Can be merged
no logs
no logs
createFromJsonString
No logs
The dependency "org.apache.httpcomponents.httpclient" is removed from API level 23+
Maybe a other HttpClient can be used, like "OkHttp"?
I get this error when executing ApiContext.create:
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar:classes2.dex) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146) at com.bunq.sdk.http.ApiClient.buildHttpClient(ApiClient.java:120) at com.bunq.sdk.http.ApiClient.<init>(ApiClient.java:113) at com.bunq.sdk.model.core.Installation.create(Installation.java:43) at com.bunq.sdk.context.ApiContext.initializeInstallation(ApiContext.java:173) at com.bunq.sdk.context.ApiContext.initialize(ApiContext.java:163) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:127) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:109) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:101)
Reference bunq/sdk_php#122
Tested
check box and says which issue the PR will close.no logs
Reference: bunq/sdk_php#120
.gitattributes
file which lists generated code as generated..gitattributes
file.TokenQrRequestIdeal
using the SDK.TokenQrRequestIdeal
object is returned.RequestResponse
object, but the SDK tries to cast it to a TokenQrRequestIdeal
, resulting in an error.This issue is meant to keep track of the example scripts included in the SDK.
ApiContext
Attachments
Callbacks
Cards
Card payments
Cash registers
Chat
Connects
Export statements
Invoices
Monetary accounts
Payment
Request for payment / Request inquiry
User
Currently the java client API is purely based on static access and is based on a SingleTon ApiContext
Static functions don't give a lot of flexibility in usage, i would like the ApiClient to with it's own private final context and providing access to the different API's using that context.
Would you guys consider providing a BunqApiClient having methods-per-concept?
for example:
https://github.com/stil4m/mollie-api/blob/master/src/main/java/nl/stil4m/mollie/Client.java
current static API can be retained for backwards compatibility via these concepts
It would enable better integration in inversion-of-control / dependency injection (spring beans..) scenario's
ApiContext
ApiContext
BunqModel
to_json
no logs
no logs
There is a typo in the bunq\Model\Generated\Endpoint\SchedulePayment
class. It has the constant const OBJECT_TYPE = 'SchedulePayment';
while the API returns an object of type ScheduledPayment
. When I change the constant to this, it works fine.
PHP Notice: Undefined index: SchedulePayment in /Users/mathijs/Code/bunqapibouwsel/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php on line 115
reference bunq/sdk_php#126
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected NULL but was NUMBER at path $.object.Payment.geolocation.latitude
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:63)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:952)
at com.google.gson.Gson.fromJson(Gson.java:925)
at com.bunq.sdk.model.core.BunqModel.fromJsonList(BunqModel.java:104)
at com.bunq.sdk.model.generated.endpoint.DraftPayment.list(DraftPayment.java:151)
at com.bunq.sdk.model.generated.endpoint.DraftPayment.list(DraftPayment.java:141)
at com.bunq.sdk.model.generated.endpoint.DraftPayment.list(DraftPayment.java:137)
ApiContext
toJson
and fromJson
methods allowing to save context to or load from JSON are presenttoJson
nor fromJson
Currently the bunq java sdk uses dependencies like:
Guava: Really big lib which is only used for nullability annotations.
Alternative for nullability annotations: https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
Commons-io: Currently using a really out-dated commons-io.
Alternative use newer: https://mvnrepository.com/artifact/commons-io/commons-io
Appache httpclient: Just doesn't really work well with android
Alternative: Okhttp
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\lenvovo\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\22.0\3564ef3803de51fb0530a8377ec6100b33b0d073\guava-22.0.jar
no logs
no logs
no logs
Payment.list(
apiContext,
userId,
monetaryAccountId
).getValue().get(0).getCounterpartyAlias()
MonetaryAccountReference
reference is returned.null
is returnedno logs
MasterCardAction
endpoint.no logs
Since there aren't any published artifacts yet, this is a future issue but since the code lives inside the main project, this would be the case if published currently.
no logs
no logs
X-Bunq-Server-Response-Id
header.logs
id
field that holds the id of this request token.id
field is missing$callbackModel = NotificationUrl::fromJson($CallbackJson);
$callbackModel->getReferencedObject();
if (!$callbackModel isntanceof CallbackModelImExcpeting) {
throw new Exception();
}
no logs
See references issue for info.
ensureSesiosActive()
apiContext.ensureSessionActive();
apiContext.save();
Which means you will be saving an unchanged context on each call
/home/jitpack/build/src/main/java/com/bunq/sdk/security/SecurityUtils.java:43: error: package org.jcp.xml.dsig.internal does not exist
import org.jcp.xml.dsig.internal.MacOutputStream;
^
/home/jitpack/build/src/main/java/com/bunq/sdk/context/ApiContext.java:14: error: package com.sun.istack.internal does not exist
import com.sun.istack.internal.Nullable;
id
, created
or updated
from CardGeneratedCvc2
no logs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.