-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathCustomerPortalService.java
More file actions
34 lines (28 loc) · 1.01 KB
/
CustomerPortalService.java
File metadata and controls
34 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.easypost.service;
import java.util.Map;
import com.easypost.exception.EasyPostException;
import com.easypost.http.Requestor;
import com.easypost.http.Requestor.RequestMethod;
import com.easypost.model.CustomerPortalAccountLink;
public class CustomerPortalService {
private final EasyPostClient client;
/**
* CustomerPortalService constructor.
*
* @param client The client object.
*/
CustomerPortalService(EasyPostClient client) {
this.client = client;
}
/**
* Create a CustomerPortalAccountLink from the API.
*
* @param params Map of parameters.
* @return CustomerPortalAccountLink object
* @throws EasyPostException when the request fails.
*/
public CustomerPortalAccountLink createAccountLink(final Map<String, Object> params) throws EasyPostException {
String endpoint = "customer_portal/account_link";
return Requestor.request(RequestMethod.POST, endpoint, params, CustomerPortalAccountLink.class, client);
}
}