chargebee / chargebee-java Goto Github PK
View Code? Open in Web Editor NEWJava library for the Chargebee API.
Home Page: https://apidocs.chargebee.com/docs/api?lang=java
License: MIT License
Java library for the Chargebee API.
Home Page: https://apidocs.chargebee.com/docs/api?lang=java
License: MIT License
Suggest adding proxy support in class HttpUtil method createConnection.
The EventType Enum is missing an entry for SUBSCRIPTION_REACTIVATED_WITH_BACKDATING
as described here
This is causing 'Severe' errors like described here
SEVERE: The property event_type has unexpected value subscription_reactivated_with_backdating
while testing the API I've found that I cannot use "GBP" as a currency code and I cannot specify "United States" as a country (seems "US" is the expected value). The fields are both strings with no indication of how the format of the values should be. Perhaps it would be better to be able to use .billingAddressCountry(CountryCode.US)
and .preferredCurrencyCode(CurrencyCode.USD)
.
The com.chargebee.internal.ClazzUtil
class uses reflection to pick which class to return. This causes problems when using Graalvm to get a native build. Please consider changing that code to use a switch statement on the model type instead so that it works when compiling to a native binary.
When I include this library as maven dependency in my project, Result and ListResult class method jsonResponse returns type is shows as com.chargebee.org.json.JSONObject instead of org.json.JSONObject?
In neither 2.9.0 nor 2.10.0, enum com.chargebee.models.enums.EventType is missing a corresponding type for "subscription_activated_with_backdating" thus caused EventType _UNKNOWN
We realized that some events (for example "Customer deleted") contains subscriptions
field (collection of customer subscriptions).
However, the type com.chargebee.models.Event.content()
which is the representation of event content does not provide a method to access this field.
The desired solution would be to make subscriptions
method available in ResultBase
this possible:
Event event = // the instance of event
var subscriptions = event.content().subscriptions(); // This is not available
var subscription = event.content().subscription(); // This is availabale
it would be great if we could add this method.
Currently, we access the list of subscriptions via parsing the JSONObject:
var subscriptions = this.optJSONObject("content").optJSONArray("subscriptions");
The subscriptions
field is mentioned in the documentation for customer_deleted
event here
Hi,
I want to use this library as Java API for Chargebee for a commercial product but when checking the dependencies of this library I found out that you are relying on org.json
which is under "The JSON License".
That license is considered legally dangerous by quite some people in the opensource ecosystem due to the vague clause of "The Software shall be used for Good, not Evil." and in my case prevents me from using this library for interfacing with Chargebee for compliance reasons.
Similar issues also arose for other projects: fabric8io/docker-maven-plugin#1016
Could you consider replacing that dependency with an alternative to make compliance less of an issue please?
Recently we're seeing
The property event_type has unexpected value payment_source_expiring
while processing webhook calls. The SEVERE log entry comes from the internal Resource class.
I noticed that the EventType doesn't have an entry for payment_source_expiring.
Is the java client out of date?
Does it make sense that this is logged as a SEVERE error? It does not stop processing as an event type of unknown is returned.
can I use this within an Android App?
Thank!
Dealing with the Chargebee API Excpetions is quite painful. Even though they are descendants of the RuntimeException
and should not need to be checked, their constructor has a throws Exception
annotation, defeating the purpose!
chargebee-java/src/main/java/com/chargebee/APIException.java
Lines 36 to 47 in 211ede4
Could you please remove that throws Exception
declaration?
And consequently also remove all the other unnecessary throws Exception
declarations from your request
methods?
Rather than distributing built jars in the repo please instead setup a maven repo. Github itself supports distribution of maven build artifacts:
create
just instantiates a CreateRequest
.
The throws IOException
declaration requires me to unnecessarily wrap the call in a try...catch
block.
Unless I'm overlooking something, the code should work fine without the throws
Hello, I just want to report that the methods Estimate.createInvoice
and Estimate.CreateInvoiceRequest
are not present.
This is the Link to documentation: https://apidocs.chargebee.com/docs/api/estimates#create_invoice_estimate
I Checked it on the last tag 2.7.3 in the Estimate class.
The pom specifies Java 5 which is out of support and with recent versions of Maven will result in:
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
Personally I feel 8 is the lowest anyone should support these days with Java 11 and above being ideal.
The model is looking for the key customer_type
however the actual key is cf_customer_type
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.