Comments (12)
I've added an initial implementation for sub account support to the "feature/subaccount" branch.
Usage is like this:
IRestConnection connection = new RestConnection(this.client, getEndPoint());
connection.setSubAccountId("1234");
Anything that connection is used for will set the X-MSYS-SUBACCOUNT
header and the request.
from java-sparkpost.
I have this problem also. I would like to send the email out with the SubAccount but have no way to add the header X-MSYS-SUBACCOUNT using the Sparkpost Java Integration. Is there an estimate on when this enhancement will be available?
I believe if there was a method on the connection class to set a header that would be a great fix. I would suggest something like the following:
IRestConnection connection = new RestConnection(this.client, getEndPoint());
connection.addHeader("X-MSYS-SUBACCOUNT","XXXXXXXXXXXX");
from java-sparkpost.
Sub accounts should work with this library. Can you give me an example so I can make an example for you?
from java-sparkpost.
Let's say how to create a new subaccount.
from java-sparkpost.
Oh, I see what you mean now. Yes, that does need added. I would be happy to merge a pull request if you are interested in working on it.
Otherwise I will work on it in a week or so.
from java-sparkpost.
I might do a pull request but I make no promises. If there is none in a week go ahead with the implementation. Thanks.
from java-sparkpost.
Further, is it possible to add X-MSYS-SUBACCOUNT header in any way? Looking at the RestConnection implementation there seems to be no way to manipulate HttpURLConnection so my guess is a no.
If you can give me that example for calling the API as a subaccount I'd appreciate it.
from java-sparkpost.
I thought that was on a branch but I don't see it. I will add that ability.
from java-sparkpost.
any progress on this issue?
from java-sparkpost.
I am going to start implementing this now. My goal is to not break backward compatibility (somehow).
from java-sparkpost.
would be nice to see this update on maven
from java-sparkpost.
This is released in version 0.22
from java-sparkpost.
Related Issues (20)
- Log4j critical vulnerability!! HOT 4
- SuppressionList update endpoints throw com.google.gson.JsonSyntaxException
- RestConnection does not honor Client base URL
- Upgrade to Log4J 2.17.1
- Webhook events no longer derive from AbstractWebhookEvent, making getting type more difficult
- Webhook fields initial_pixel and open_tracking are presented as int, rather than boolean in event classes, making deserialization harder
- GSON error when calling insertOrUpdate or insertOrUpdateBulk
- Add 'template_id' key in X-MSYS-API Custom Header
- SparkPost/Java
- Unable to use Java SDK to map the Webhook Event
- Support for EventsAPI
- Webhook active property missing from model HOT 2
- Webhook properties are out of date HOT 1
- attach pdf HOT 2
- Webhook resource is missing /validate endpoint
- SparkPost Java API Suppression list limitations HOT 1
- event webhook - handle ping events
- Message Event API ending point changed - please update HOT 1
- TransimisionBase should allow other types than String for Metadata value HOT 2
- Subaccount CRUDs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-sparkpost.