wcCustomerInfo method
Get the users WooCommerce information using the userToken
.
Returns a WCCustomerInfoResponse future. Throws an Exception if fails.
Implementation
Future<WCCustomerInfoResponse> wcCustomerInfo({String? userToken}) async {
// send http request
final json = await _http(
method: "POST",
url: _urlForRouteType(WPRouteType.WCCustomerInfo),
userToken: userToken,
shouldAuthRequest: true);
// return response
return _jsonHasBadStatus(json)
? this._throwExceptionForStatusCode(json)
: WCCustomerInfoResponse.fromJson(json);
}