(billingV1() )
GetBalance
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetBalanceResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
GetBalanceResponse res = sdk .billingV1 ().getBalance ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .number ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetBalanceResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*
GetInvoices
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetInvoicesResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
GetInvoicesResponse res = sdk .billingV1 ().getInvoices ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .classes ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetInvoicesResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*
GetPaymentMethod
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetPaymentMethodResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
GetPaymentMethodResponse res = sdk .billingV1 ().getPaymentMethod ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .paymentMethod ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetPaymentMethodResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 429, 500
application/json
models/errors/SDKError
4XX, 5XX
*/*
GetUpcomingInvoiceItems
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetUpcomingInvoiceItemsResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
GetUpcomingInvoiceItemsResponse res = sdk .billingV1 ().getUpcomingInvoiceItems ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .invoiceItemPage ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetUpcomingInvoiceItemsResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*
GetUpcomingInvoiceTotal
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .GetUpcomingInvoiceTotalResponse ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
GetUpcomingInvoiceTotalResponse res = sdk .billingV1 ().getUpcomingInvoiceTotal ()
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .object ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
GetUpcomingInvoiceTotalResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*
initStripeCustomerPortalUrl
InitStripeCustomerPortalUrl
package hello .world ;
import dev .hathora .cloud_sdk .HathoraCloud ;
import dev .hathora .cloud_sdk .models .errors .ApiError ;
import dev .hathora .cloud_sdk .models .operations .InitStripeCustomerPortalUrlResponse ;
import dev .hathora .cloud_sdk .models .shared .CustomerPortalUrl ;
import dev .hathora .cloud_sdk .models .shared .Security ;
import java .lang .Exception ;
public class Application {
public static void main (String [] args ) throws ApiError , Exception {
HathoraCloud sdk = HathoraCloud .builder ()
.security (Security .builder ()
.hathoraDevToken ("<YOUR_BEARER_TOKEN_HERE>" )
.build ())
.appId ("app-af469a92-5b45-4565-b3c4-b79878de67d2" )
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.build ();
InitStripeCustomerPortalUrlResponse res = sdk .billingV1 ().initStripeCustomerPortalUrl ()
.customerPortalUrl (CustomerPortalUrl .builder ()
.returnUrl ("<value>" )
.build ())
.orgId ("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" )
.call ();
if (res .string ().isPresent ()) {
// handle response
}
}
}
Parameter
Type
Required
Description
Example
customerPortalUrl
CustomerPortalUrl
✔️
N/A
orgId
Optional<String>
➖
N/A
org-6f706e83-0ec1-437a-9a46-7d4281eb2f39
InitStripeCustomerPortalUrlResponse
Error Type
Status Code
Content Type
models/errors/ApiError
401, 404, 422, 429
application/json
models/errors/SDKError
4XX, 5XX
*/*