Class AsyncStatementsClient
- java.lang.Object
-
- com.chrt.api.resources.billing.statements.AsyncStatementsClient
-
public class AsyncStatementsClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description AsyncStatementsClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<Statement1>attachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId)Attaches a CLOSED, unbundled BillingLedgerPeriod to a STAGED Statement.java.util.concurrent.CompletableFuture<Statement1>attachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId, RequestOptions requestOptions)Attaches a CLOSED, unbundled BillingLedgerPeriod to a STAGED Statement.java.util.concurrent.CompletableFuture<Statement1>attachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId)Attaches a FINALIZED, unbundled LineItemGroup to a STAGED Statement.java.util.concurrent.CompletableFuture<Statement1>attachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId, RequestOptions requestOptions)Attaches a FINALIZED, unbundled LineItemGroup to a STAGED Statement.java.util.concurrent.CompletableFuture<Statement1>createV1(StatementCreateClientReq request)Creates an empty STAGED Statement carrying payment parties + settlement_type.java.util.concurrent.CompletableFuture<Statement1>createV1(StatementCreateClientReq request, RequestOptions requestOptions)Creates an empty STAGED Statement carrying payment parties + settlement_type.java.util.concurrent.CompletableFuture<java.lang.Boolean>deleteV1(java.lang.String statementId)Deletes a STAGED Statement that has no attached LineItemGroups or BillingLedgerPeriods.java.util.concurrent.CompletableFuture<java.lang.Boolean>deleteV1(java.lang.String statementId, RequestOptions requestOptions)Deletes a STAGED Statement that has no attached LineItemGroups or BillingLedgerPeriods.java.util.concurrent.CompletableFuture<Statement1>detachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId)Detaches a BillingLedgerPeriod from a STAGED Statement, freeing it for re-bundling.java.util.concurrent.CompletableFuture<Statement1>detachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId, RequestOptions requestOptions)Detaches a BillingLedgerPeriod from a STAGED Statement, freeing it for re-bundling.java.util.concurrent.CompletableFuture<Statement1>detachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId)Detaches a LineItemGroup from a STAGED Statement and recomputes order denormalization.java.util.concurrent.CompletableFuture<Statement1>detachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId, RequestOptions requestOptions)Detaches a LineItemGroup from a STAGED Statement and recomputes order denormalization.java.util.concurrent.CompletableFuture<StatementsExpandedListRes>expandedListV1()Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<StatementsExpandedListRes>expandedListV1(StatementsExpandedListV1Request request)Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<StatementsExpandedListRes>expandedListV1(StatementsExpandedListV1Request request, RequestOptions requestOptions)Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<StatementExpandedRes>expandedRetrieveV1(StatementExpandedRetrieveReq request)Retrieves a statement with its associated LineItemGroups expanded.java.util.concurrent.CompletableFuture<StatementExpandedRes>expandedRetrieveV1(StatementExpandedRetrieveReq request, RequestOptions requestOptions)Retrieves a statement with its associated LineItemGroups expanded.java.util.concurrent.CompletableFuture<Statement1>getByLigIdV1(java.lang.String lineItemGroupId)Gets a statement by its associated LineItemGroup ID.java.util.concurrent.CompletableFuture<Statement1>getByLigIdV1(java.lang.String lineItemGroupId, RequestOptions requestOptions)Gets a statement by its associated LineItemGroup ID.java.util.concurrent.CompletableFuture<Statement1>getV1(java.lang.String statementId)Gets a statement by ID.java.util.concurrent.CompletableFuture<Statement1>getV1(java.lang.String statementId, RequestOptions requestOptions)Gets a statement by ID.java.util.concurrent.CompletableFuture<StatementsListRes>listV1()Lists statements with filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<StatementsListRes>listV1(StatementsListV1Request request)Lists statements with filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<StatementsListRes>listV1(StatementsListV1Request request, RequestOptions requestOptions)Lists statements with filtering, sorting, and pagination.java.util.concurrent.CompletableFuture<Statement1>markPaidOffChrtV1(java.lang.String statementId)Off-chrt manual transition: OPEN → PAID.java.util.concurrent.CompletableFuture<Statement1>markPaidOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)Off-chrt manual transition: OPEN → PAID.java.util.concurrent.CompletableFuture<Statement1>markUncollectibleOffChrtV1(java.lang.String statementId)Off-chrt manual write-off: OPEN → UNCOLLECTIBLE.java.util.concurrent.CompletableFuture<Statement1>markUncollectibleOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)Off-chrt manual write-off: OPEN → UNCOLLECTIBLE.java.util.concurrent.CompletableFuture<Statement1>openInvoiceV1(java.lang.String statementId)Stripe-Connect transition: STAGED → OPEN.java.util.concurrent.CompletableFuture<Statement1>openInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)Stripe-Connect transition: STAGED → OPEN.java.util.concurrent.CompletableFuture<Statement1>openOffChrtV1(java.lang.String statementId)Off-chrt manual transition: STAGED → OPEN.java.util.concurrent.CompletableFuture<Statement1>openOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)Off-chrt manual transition: STAGED → OPEN.java.util.concurrent.CompletableFuture<Statement1>syncInvoiceV1(java.lang.String statementId)Stripe-Connect manual reconciliation: pulls the live Stripe invoice status and updates the Statement (and cascaded LIG statuses) accordingly.java.util.concurrent.CompletableFuture<Statement1>syncInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)Stripe-Connect manual reconciliation: pulls the live Stripe invoice status and updates the Statement (and cascaded LIG statuses) accordingly.java.util.concurrent.CompletableFuture<Statement1>updateSettlementTypeV1(java.lang.String statementId, StatementUpdateSettlementTypeReq request)Flips a STAGED Statement's settlement_type between STRIPE_CONNECT and OFF_CHRT and cascades the new value onto every attached LineItemGroup.java.util.concurrent.CompletableFuture<Statement1>updateSettlementTypeV1(java.lang.String statementId, StatementUpdateSettlementTypeReq request, RequestOptions requestOptions)Flips a STAGED Statement's settlement_type between STRIPE_CONNECT and OFF_CHRT and cascades the new value onto every attached LineItemGroup.java.util.concurrent.CompletableFuture<Statement1>voidInvoiceV1(java.lang.String statementId)Stripe-Connect transition: OPEN → STAGED.java.util.concurrent.CompletableFuture<Statement1>voidInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)Stripe-Connect transition: OPEN → STAGED.AsyncRawStatementsClientwithRawResponse()Get responses with HTTP metadata like headers
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
AsyncStatementsClient
public AsyncStatementsClient(ClientOptions clientOptions)
-
-
Method Detail
-
withRawResponse
public AsyncRawStatementsClient withRawResponse()
Get responses with HTTP metadata like headers
-
getV1
public java.util.concurrent.CompletableFuture<Statement1> getV1(java.lang.String statementId)
Gets a statement by ID. | authz_personas=[statement_org_operators, statement_driver] | () -> (Statement1)
-
getV1
public java.util.concurrent.CompletableFuture<Statement1> getV1(java.lang.String statementId, RequestOptions requestOptions)
Gets a statement by ID. | authz_personas=[statement_org_operators, statement_driver] | () -> (Statement1)
-
getByLigIdV1
public java.util.concurrent.CompletableFuture<Statement1> getByLigIdV1(java.lang.String lineItemGroupId)
Gets a statement by its associated LineItemGroup ID. | authz_personas=[statement_org_operators, statement_driver] | () -> (Statement1)
-
getByLigIdV1
public java.util.concurrent.CompletableFuture<Statement1> getByLigIdV1(java.lang.String lineItemGroupId, RequestOptions requestOptions)
Gets a statement by its associated LineItemGroup ID. | authz_personas=[statement_org_operators, statement_driver] | () -> (Statement1)
-
expandedRetrieveV1
public java.util.concurrent.CompletableFuture<StatementExpandedRes> expandedRetrieveV1(StatementExpandedRetrieveReq request)
Retrieves a statement with its associated LineItemGroups expanded. | authz_personas=[statement_org_operators, statement_driver] | (StatementExpandedRetrieveReq) -> (StatementExpandedRes)
-
expandedRetrieveV1
public java.util.concurrent.CompletableFuture<StatementExpandedRes> expandedRetrieveV1(StatementExpandedRetrieveReq request, RequestOptions requestOptions)
Retrieves a statement with its associated LineItemGroups expanded. | authz_personas=[statement_org_operators, statement_driver] | (StatementExpandedRetrieveReq) -> (StatementExpandedRes)
-
listV1
public java.util.concurrent.CompletableFuture<StatementsListRes> listV1()
Lists statements with filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsListRes)
-
listV1
public java.util.concurrent.CompletableFuture<StatementsListRes> listV1(StatementsListV1Request request)
Lists statements with filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsListRes)
-
listV1
public java.util.concurrent.CompletableFuture<StatementsListRes> listV1(StatementsListV1Request request, RequestOptions requestOptions)
Lists statements with filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsListRes)
-
expandedListV1
public java.util.concurrent.CompletableFuture<StatementsExpandedListRes> expandedListV1()
Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsExpandedListRes)
-
expandedListV1
public java.util.concurrent.CompletableFuture<StatementsExpandedListRes> expandedListV1(StatementsExpandedListV1Request request)
Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsExpandedListRes)
-
expandedListV1
public java.util.concurrent.CompletableFuture<StatementsExpandedListRes> expandedListV1(StatementsExpandedListV1Request request, RequestOptions requestOptions)
Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsExpandedListRes)
-
createV1
public java.util.concurrent.CompletableFuture<Statement1> createV1(StatementCreateClientReq request)
Creates an empty STAGED Statement carrying payment parties + settlement_type. Items are attached via the attach_* routes. | authz: allowed_org_types=[provider], min_org_role=operator | (StatementCreateClientReq) -> (Statement1)
-
createV1
public java.util.concurrent.CompletableFuture<Statement1> createV1(StatementCreateClientReq request, RequestOptions requestOptions)
Creates an empty STAGED Statement carrying payment parties + settlement_type. Items are attached via the attach_* routes. | authz: allowed_org_types=[provider], min_org_role=operator | (StatementCreateClientReq) -> (Statement1)
-
attachLineItemGroupV1
public java.util.concurrent.CompletableFuture<Statement1> attachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId)
Attaches a FINALIZED, unbundled LineItemGroup to a STAGED Statement. Parties must match; the Statement's settlement_type is written onto the LIG (or matched if previously stamped). | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
attachLineItemGroupV1
public java.util.concurrent.CompletableFuture<Statement1> attachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId, RequestOptions requestOptions)
Attaches a FINALIZED, unbundled LineItemGroup to a STAGED Statement. Parties must match; the Statement's settlement_type is written onto the LIG (or matched if previously stamped). | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
detachLineItemGroupV1
public java.util.concurrent.CompletableFuture<Statement1> detachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId)
Detaches a LineItemGroup from a STAGED Statement and recomputes order denormalization. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
detachLineItemGroupV1
public java.util.concurrent.CompletableFuture<Statement1> detachLineItemGroupV1(java.lang.String statementId, java.lang.String lineItemGroupId, RequestOptions requestOptions)
Detaches a LineItemGroup from a STAGED Statement and recomputes order denormalization. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
attachBillingLedgerPeriodV1
public java.util.concurrent.CompletableFuture<Statement1> attachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId)
Attaches a CLOSED, unbundled BillingLedgerPeriod to a STAGED Statement. Parties must match. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
attachBillingLedgerPeriodV1
public java.util.concurrent.CompletableFuture<Statement1> attachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId, RequestOptions requestOptions)
Attaches a CLOSED, unbundled BillingLedgerPeriod to a STAGED Statement. Parties must match. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
detachBillingLedgerPeriodV1
public java.util.concurrent.CompletableFuture<Statement1> detachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId)
Detaches a BillingLedgerPeriod from a STAGED Statement, freeing it for re-bundling. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
detachBillingLedgerPeriodV1
public java.util.concurrent.CompletableFuture<Statement1> detachBillingLedgerPeriodV1(java.lang.String statementId, java.lang.String billingLedgerPeriodId, RequestOptions requestOptions)
Detaches a BillingLedgerPeriod from a STAGED Statement, freeing it for re-bundling. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
openOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> openOffChrtV1(java.lang.String statementId)
Off-chrt manual transition: STAGED → OPEN. Cascades attached LineItemGroups FINALIZED → OPEN. Stripe-Connect statements take a separate Stripe-invoice path. Requires settlement_type=OFF_CHRT and at least one bundled LIG or period. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
openOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> openOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)
Off-chrt manual transition: STAGED → OPEN. Cascades attached LineItemGroups FINALIZED → OPEN. Stripe-Connect statements take a separate Stripe-invoice path. Requires settlement_type=OFF_CHRT and at least one bundled LIG or period. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
markPaidOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> markPaidOffChrtV1(java.lang.String statementId)
Off-chrt manual transition: OPEN → PAID. Cascades attached LineItemGroups OPEN → PAID. Stripe-Connect statements transition via Stripe webhook + sync, not this route. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
markPaidOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> markPaidOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)
Off-chrt manual transition: OPEN → PAID. Cascades attached LineItemGroups OPEN → PAID. Stripe-Connect statements transition via Stripe webhook + sync, not this route. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
markUncollectibleOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> markUncollectibleOffChrtV1(java.lang.String statementId)
Off-chrt manual write-off: OPEN → UNCOLLECTIBLE. Cascades attached LineItemGroups OPEN → UNCOLLECTIBLE. Stripe-Connect statements transition via Stripe webhook + sync_invoice/v1, not this route. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
markUncollectibleOffChrtV1
public java.util.concurrent.CompletableFuture<Statement1> markUncollectibleOffChrtV1(java.lang.String statementId, RequestOptions requestOptions)
Off-chrt manual write-off: OPEN → UNCOLLECTIBLE. Cascades attached LineItemGroups OPEN → UNCOLLECTIBLE. Stripe-Connect statements transition via Stripe webhook + sync_invoice/v1, not this route. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
openInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> openInvoiceV1(java.lang.String statementId)
Stripe-Connect transition: STAGED → OPEN. Creates and finalizes a Stripe invoice for the Statement; cascades attached LineItemGroups FINALIZED → OPEN. Requires settlement_type=STRIPE_CONNECT and at least one bundled FINALIZED LIG. Off-chrt statements take open_off_chrt/v1 instead. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
openInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> openInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)
Stripe-Connect transition: STAGED → OPEN. Creates and finalizes a Stripe invoice for the Statement; cascades attached LineItemGroups FINALIZED → OPEN. Requires settlement_type=STRIPE_CONNECT and at least one bundled FINALIZED LIG. Off-chrt statements take open_off_chrt/v1 instead. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
syncInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> syncInvoiceV1(java.lang.String statementId)
Stripe-Connect manual reconciliation: pulls the live Stripe invoice status and updates the Statement (and cascaded LIG statuses) accordingly. Same backend as the Stripe webhook handler — idempotent, no-op when already in sync. Handles PAID, UNCOLLECTIBLE, and VOID/DELETED transitions. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
syncInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> syncInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)
Stripe-Connect manual reconciliation: pulls the live Stripe invoice status and updates the Statement (and cascaded LIG statuses) accordingly. Same backend as the Stripe webhook handler — idempotent, no-op when already in sync. Handles PAID, UNCOLLECTIBLE, and VOID/DELETED transitions. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
voidInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> voidInvoiceV1(java.lang.String statementId)
Stripe-Connect transition: OPEN → STAGED. Voids the Stripe invoice, clears stripe_* fields on the Statement, and cascades attached LineItemGroups OPEN → FINALIZED so they remain re-bundleable into a new Statement. Reversible — the Statement can be re-opened with a fresh open_invoice/v1. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
voidInvoiceV1
public java.util.concurrent.CompletableFuture<Statement1> voidInvoiceV1(java.lang.String statementId, RequestOptions requestOptions)
Stripe-Connect transition: OPEN → STAGED. Voids the Stripe invoice, clears stripe_* fields on the Statement, and cascades attached LineItemGroups OPEN → FINALIZED so they remain re-bundleable into a new Statement. Reversible — the Statement can be re-opened with a fresh open_invoice/v1. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (Statement1)
-
updateSettlementTypeV1
public java.util.concurrent.CompletableFuture<Statement1> updateSettlementTypeV1(java.lang.String statementId, StatementUpdateSettlementTypeReq request)
Flips a STAGED Statement's settlement_type between STRIPE_CONNECT and OFF_CHRT and cascades the new value onto every attached LineItemGroup. Rejects if the new value matches the current value. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | (StatementUpdateSettlementTypeReq) -> (Statement1)
-
updateSettlementTypeV1
public java.util.concurrent.CompletableFuture<Statement1> updateSettlementTypeV1(java.lang.String statementId, StatementUpdateSettlementTypeReq request, RequestOptions requestOptions)
Flips a STAGED Statement's settlement_type between STRIPE_CONNECT and OFF_CHRT and cascades the new value onto every attached LineItemGroup. Rejects if the new value matches the current value. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | (StatementUpdateSettlementTypeReq) -> (Statement1)
-
deleteV1
public java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteV1(java.lang.String statementId)
Deletes a STAGED Statement that has no attached LineItemGroups or BillingLedgerPeriods. Detach all children first via the detach_* routes. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (bool)
-
deleteV1
public java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteV1(java.lang.String statementId, RequestOptions requestOptions)Deletes a STAGED Statement that has no attached LineItemGroups or BillingLedgerPeriods. Detach all children first via the detach_* routes. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[statement_owner_operators] | () -> (bool)
-
-