diff --git a/ballerina/client.bal b/ballerina/client.bal
index 87e1844..f0dbd30 100644
--- a/ballerina/client.bal
+++ b/ballerina/client.bal
@@ -17,6 +17,7 @@
// specific language governing permissions and limitations
// under the License.
+import ballerina/data.jsondata;
import ballerina/http;
import ballerina/mime;
@@ -29,5697 +30,4661 @@ public isolated client class Client {
# + serviceUrl - URL of the target service
# + return - An error if connector initialization failed
public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.stripe.com/v1") returns error? {
- http:ClientConfiguration httpClientConfig = {auth: config.auth, httpVersion: config.httpVersion, timeout: config.timeout, forwarded: config.forwarded, poolConfig: config.poolConfig, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, validation: config.validation};
- do {
- if config.http1Settings is ClientHttp1Settings {
- ClientHttp1Settings settings = check config.http1Settings.ensureType(ClientHttp1Settings);
- httpClientConfig.http1Settings = {...settings};
- }
- if config.http2Settings is http:ClientHttp2Settings {
- httpClientConfig.http2Settings = check config.http2Settings.ensureType(http:ClientHttp2Settings);
- }
- if config.cache is http:CacheConfig {
- httpClientConfig.cache = check config.cache.ensureType(http:CacheConfig);
- }
- if config.responseLimits is http:ResponseLimitConfigs {
- httpClientConfig.responseLimits = check config.responseLimits.ensureType(http:ResponseLimitConfigs);
- }
- if config.secureSocket is http:ClientSecureSocket {
- httpClientConfig.secureSocket = check config.secureSocket.ensureType(http:ClientSecureSocket);
- }
- if config.proxy is http:ProxyConfig {
- httpClientConfig.proxy = check config.proxy.ensureType(http:ProxyConfig);
- }
- }
- http:Client httpEp = check new (serviceUrl, httpClientConfig);
- self.clientEp = httpEp;
- return;
+ http:ClientConfiguration httpClientConfig = {auth: config.auth, httpVersion: config.httpVersion, http1Settings: config.http1Settings, http2Settings: config.http2Settings, timeout: config.timeout, forwarded: config.forwarded, followRedirects: config.followRedirects, poolConfig: config.poolConfig, cache: config.cache, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, cookieConfig: config.cookieConfig, responseLimits: config.responseLimits, secureSocket: config.secureSocket, proxy: config.proxy, socketConfig: config.socketConfig, validation: config.validation, laxDataBinding: config.laxDataBinding};
+ self.clientEp = check new (serviceUrl, httpClientConfig);
}
- #
With Connect, you can delete accounts you manage.
- #
- # Test-mode accounts can be deleted at any time.
- #
- # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero.
- #
- # If you want to delete your own account, use the account information tab in your account settings instead.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete accounts/[string account](map headers = {}) returns Deleted_account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete a specified external account for a given account.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete accounts/[string account]/bank_accounts/[string id](map headers = {}) returns Deleted_external_account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete a specified external account for a given account.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete accounts/[string account]/external_accounts/[string id](map headers = {}) returns Deleted_external_account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/external_accounts/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete accounts/[string account]/people/[string person](map headers = {}) returns Deleted_person|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/people/${getEncodedUri(person)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete accounts/[string account]/persons/[string person](map headers = {}) returns Deleted_person|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/persons/${getEncodedUri(person)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete an apple pay domain.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete apple_pay/domains/[string domain](map headers = {}) returns Deleted_apple_pay_domain|error {
- string resourcePath = string `/apple_pay/domains/${getEncodedUri(domain)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete coupons/[string coupon](map headers = {}) returns Deleted_coupon|error {
- string resourcePath = string `/coupons/${getEncodedUri(coupon)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer](map headers = {}) returns Deleted_customer|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete a specified source for a given customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/bank_accounts/[string id](bank_accounts_id_body_2 payload, map headers = {}) returns inline_response_200_2|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/bank_accounts/${getEncodedUri(id)}`;
- http:Request request = new;
- map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Delete a specified source for a given customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/cards/[string id](cards_id_body_1 payload, map headers = {}) returns inline_response_200_2|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cards/${getEncodedUri(id)}`;
- http:Request request = new;
- map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Removes the currently applied discount on a customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/discount(map headers = {}) returns Deleted_discount|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/discount`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete a specified source for a given customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/sources/[string id](sources_id_body_1 payload, map headers = {}) returns inline_response_200_2|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/sources/${getEncodedUri(id)}`;
- http:Request request = new;
- map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription.
- #
- # Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
- #
- # By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/subscriptions/[string subscription_exposed_id](subscriptions_subscription_exposed_id_body_1 payload, map headers = {}) returns Subscription|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/subscriptions/${getEncodedUri(subscription_exposed_id)}`;
- http:Request request = new;
- map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Removes the currently applied discount on a customer.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/subscriptions/[string subscription_exposed_id]/discount(map headers = {}) returns Deleted_discount|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/subscriptions/${getEncodedUri(subscription_exposed_id)}/discount`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes an existing tax_id object.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete customers/[string customer]/tax_ids/[string id](map headers = {}) returns Deleted_tax_id|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/tax_ids/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Invalidates a short-lived API key for a given resource.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete ephemeral_keys/[string 'key](ephemeral_keys_key_body payload, map headers = {}) returns Ephemeral_key|error {
- string resourcePath = string `/ephemeral_keys/${getEncodedUri('key)}`;
- http:Request request = new;
- map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete invoiceitems/[string invoiceitem](map headers = {}) returns Deleted_invoiceitem|error {
- string resourcePath = string `/invoiceitems/${getEncodedUri(invoiceitem)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete invoices/[string invoice](map headers = {}) returns Deleted_invoice|error {
- string resourcePath = string `/invoices/${getEncodedUri(invoice)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete plans/[string plan](map headers = {}) returns Deleted_plan|error {
- string resourcePath = string `/plans/${getEncodedUri(plan)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete products/[string id](map headers = {}) returns Deleted_product|error {
- string resourcePath = string `/products/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes the feature attachment to a product
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete products/[string product]/features/[string id](map headers = {}) returns Deleted_product_feature|error {
- string resourcePath = string `/products/${getEncodedUri(product)}/features/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a ValueListItem object, removing it from its parent value list.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete radar/value_list_items/[string item](map headers = {}) returns Deleted_radar\.value_list_item|error {
- string resourcePath = string `/radar/value_list_items/${getEncodedUri(item)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete radar/value_lists/[string value_list](map headers = {}) returns Deleted_radar\.value_list|error {
- string resourcePath = string `/radar/value_lists/${getEncodedUri(value_list)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete subscription_items/[string item](subscription_items_item_body_1 payload, map headers = {}) returns Deleted_subscription_item|error {
- string resourcePath = string `/subscription_items/${getEncodedUri(item)}`;
- http:Request request = new;
- string encodedRequestBody = createFormURLEncodedRequestBody(payload);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.
- #
- # Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
- #
- # By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete subscriptions/[string subscription_exposed_id](subscriptions_subscription_exposed_id_body_3 payload, map headers = {}) returns Subscription|error {
- string resourcePath = string `/subscriptions/${getEncodedUri(subscription_exposed_id)}`;
- http:Request request = new;
- map requestBodyEncoding = {"cancellation_details": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- string encodedRequestBody = createFormURLEncodedRequestBody(payload, requestBodyEncoding);
- request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
- return self.clientEp->delete(resourcePath, request, headers);
- }
-
- # Removes the currently applied discount on a subscription.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete subscriptions/[string subscription_exposed_id]/discount(map headers = {}) returns Deleted_discount|error {
- string resourcePath = string `/subscriptions/${getEncodedUri(subscription_exposed_id)}/discount`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes an existing account or customer tax_id object.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete tax_ids/[string id](map headers = {}) returns Deleted_tax_id|error {
- string resourcePath = string `/tax_ids/${getEncodedUri(id)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a Configuration object.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete terminal/configurations/[string configuration](map headers = {}) returns Deleted_terminal\.configuration|error {
- string resourcePath = string `/terminal/configurations/${getEncodedUri(configuration)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a Location object.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete terminal/locations/[string location](map headers = {}) returns Deleted_terminal\.location|error {
- string resourcePath = string `/terminal/locations/${getEncodedUri(location)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a Reader object.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete terminal/readers/[string reader](map headers = {}) returns Deleted_terminal\.reader|error {
- string resourcePath = string `/terminal/readers/${getEncodedUri(reader)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Deletes a test clock.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete test_helpers/test_clocks/[string test_clock](map headers = {}) returns Deleted_test_helpers\.test_clock|error {
- string resourcePath = string `/test_helpers/test_clocks/${getEncodedUri(test_clock)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.
- #
- # + headers - Headers to be sent with the request
- # + return - Successful response.
- resource isolated function delete webhook_endpoints/[string webhook_endpoint](map headers = {}) returns Deleted_webhook_endpoint|error {
- string resourcePath = string `/webhook_endpoints/${getEncodedUri(webhook_endpoint)}`;
- return self.clientEp->delete(resourcePath, headers = headers);
- }
-
- # Retrieves the details of an account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get account(map headers = {}, *GetAccountQueries queries) returns Account|error {
- string resourcePath = string `/account`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts(map headers = {}, *GetAccountsQueries queries) returns AccountList|error {
- string resourcePath = string `/accounts`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of an account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account](map headers = {}, *GetAccountsAccountQueries queries) returns Account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a specified external account for a given account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/bank_accounts/[string id](map headers = {}, *GetAccountsAccountBankAccountsIdQueries queries) returns External_account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/capabilities(map headers = {}, *GetAccountsAccountCapabilitiesQueries queries) returns ListAccountCapability|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/capabilities`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves information about the specified Account Capability.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/capabilities/[string capability](map headers = {}, *GetAccountsAccountCapabilitiesCapabilityQueries queries) returns Capability|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/capabilities/${getEncodedUri(capability)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # List external accounts for an account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/external_accounts(map headers = {}, *GetAccountsAccountExternalAccountsQueries queries) returns ExternalAccountList|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/external_accounts`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a specified external account for a given account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/external_accounts/[string id](map headers = {}, *GetAccountsAccountExternalAccountsIdQueries queries) returns External_account|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/external_accounts/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/people(map headers = {}, *GetAccountsAccountPeopleQueries queries) returns PersonList|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/people`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "relationship": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves an existing person.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/people/[string person](map headers = {}, *GetAccountsAccountPeoplePersonQueries queries) returns Person|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/people/${getEncodedUri(person)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/persons(map headers = {}, *GetAccountsAccountPersonsQueries queries) returns PersonList|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/persons`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "relationship": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves an existing person.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get accounts/[string account]/persons/[string person](map headers = {}, *GetAccountsAccountPersonsPersonQueries queries) returns Person|error {
- string resourcePath = string `/accounts/${getEncodedUri(account)}/persons/${getEncodedUri(person)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # List apple pay domains.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get apple_pay/domains(map headers = {}, *GetApplePayDomainsQueries queries) returns ApplePayDomainList|error {
- string resourcePath = string `/apple_pay/domains`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve an apple pay domain.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get apple_pay/domains/[string domain](map headers = {}, *GetApplePayDomainsDomainQueries queries) returns Apple_pay_domain|error {
- string resourcePath = string `/apple_pay/domains/${getEncodedUri(domain)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get application_fees(map headers = {}, *GetApplicationFeesQueries queries) returns PlatformEarningList|error {
- string resourcePath = string `/application_fees`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get application_fees/[string fee]/refunds/[string id](map headers = {}, *GetApplicationFeesFeeRefundsIdQueries queries) returns Fee_refund|error {
- string resourcePath = string `/application_fees/${getEncodedUri(fee)}/refunds/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get application_fees/[string id](map headers = {}, *GetApplicationFeesIdQueries queries) returns Application_fee|error {
- string resourcePath = string `/application_fees/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get application_fees/[string id]/refunds(map headers = {}, *GetApplicationFeesIdRefundsQueries queries) returns FeeRefundList|error {
- string resourcePath = string `/application_fees/${getEncodedUri(id)}/refunds`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # List all secrets stored on the given scope.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get apps/secrets(map headers = {}, *GetAppsSecretsQueries queries) returns SecretServiceResourceSecretList|error {
- string resourcePath = string `/apps/secrets`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "scope": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Finds a secret in the secret store by name and scope.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get apps/secrets/find(map headers = {}, *GetAppsSecretsFindQueries queries) returns Apps\.secret|error {
- string resourcePath = string `/apps/secrets/find`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "scope": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the current account balance, based on the authentication that was used to make the request.
- # For a sample request, see Accounting for negative balances.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get balance(map headers = {}, *GetBalanceQueries queries) returns Balance|error {
- string resourcePath = string `/balance`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
- #
- # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get balance/history(map headers = {}, *GetBalanceHistoryQueries queries) returns BalanceTransactionsList|error {
- string resourcePath = string `/balance/history`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the balance transaction with the given ID.
- #
- # Note that this endpoint previously used the path /v1/balance/history/:id.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get balance/history/[string id](map headers = {}, *GetBalanceHistoryIdQueries queries) returns Balance_transaction|error {
- string resourcePath = string `/balance/history/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
- #
- # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get balance_transactions(map headers = {}, *GetBalanceTransactionsQueries queries) returns BalanceTransactionsList|error {
- string resourcePath = string `/balance_transactions`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the balance transaction with the given ID.
- #
- # Note that this endpoint previously used the path /v1/balance/history/:id.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get balance_transactions/[string id](map headers = {}, *GetBalanceTransactionsIdQueries queries) returns Balance_transaction|error {
- string resourcePath = string `/balance_transactions/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a list of billing meters.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get billing/meters(map headers = {}, *GetBillingMetersQueries queries) returns BillingMeterResourceBillingMeterList|error {
- string resourcePath = string `/billing/meters`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a billing meter given an ID
- #
- # + id - Unique identifier for the object.
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get billing/meters/[string id](map headers = {}, *GetBillingMetersIdQueries queries) returns Billing\.meter|error {
- string resourcePath = string `/billing/meters/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a list of billing meter event summaries.
- #
- # + id - Unique identifier for the object.
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get billing/meters/[string id]/event_summaries(map headers = {}, *GetBillingMetersIdEventSummariesQueries queries) returns BillingMeterResourceBillingMeterEventSummaryList|error {
- string resourcePath = string `/billing/meters/${getEncodedUri(id)}/event_summaries`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of configurations that describe the functionality of the customer portal.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get billing_portal/configurations(map headers = {}, *GetBillingPortalConfigurationsQueries queries) returns PortalPublicResourceConfigurationList|error {
- string resourcePath = string `/billing_portal/configurations`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a configuration that describes the functionality of the customer portal.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get billing_portal/configurations/[string configuration](map headers = {}, *GetBillingPortalConfigurationsConfigurationQueries queries) returns Billing_portal\.configuration|error {
- string resourcePath = string `/billing_portal/configurations/${getEncodedUri(configuration)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges(map headers = {}, *GetChargesQueries queries) returns ChargeList|error {
- string resourcePath = string `/charges`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges/[string charge](map headers = {}, *GetChargesChargeQueries queries) returns Charge|error {
- string resourcePath = string `/charges/${getEncodedUri(charge)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a dispute for a specified charge.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges/[string charge]/dispute(map headers = {}, *GetChargesChargeDisputeQueries queries) returns Dispute|error {
- string resourcePath = string `/charges/${getEncodedUri(charge)}/dispute`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges/[string charge]/refunds(map headers = {}, *GetChargesChargeRefundsQueries queries) returns RefundList|error {
- string resourcePath = string `/charges/${getEncodedUri(charge)}/refunds`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of an existing refund.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges/[string charge]/refunds/[string refund](map headers = {}, *GetChargesChargeRefundsRefundQueries queries) returns Refund|error {
- string resourcePath = string `/charges/${getEncodedUri(charge)}/refunds/${getEncodedUri(refund)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Search for charges you’ve previously created using Stripe’s Search Query Language.
- # Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating
- # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
- # to an hour behind during outages. Search functionality is not available to merchants in India.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get charges/search(map headers = {}, *GetChargesSearchQueries queries) returns SearchResult|error {
- string resourcePath = string `/charges/search`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of Checkout Sessions.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get checkout/sessions(map headers = {}, *GetCheckoutSessionsQueries queries) returns PaymentPagesCheckoutSessionList|error {
- string resourcePath = string `/checkout/sessions`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "customer_details": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a Session object.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get checkout/sessions/[string session](map headers = {}, *GetCheckoutSessionsSessionQueries queries) returns Checkout\.session|error {
- string resourcePath = string `/checkout/sessions/${getEncodedUri(session)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get checkout/sessions/[string session]/line_items(map headers = {}, *GetCheckoutSessionsSessionLineItemsQueries queries) returns PaymentPagesCheckoutSessionListLineItems|error {
- string resourcePath = string `/checkout/sessions/${getEncodedUri(session)}/line_items`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Lists all Climate order objects. The orders are returned sorted by creation date, with the
- # most recently created orders appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/orders(map headers = {}, *GetClimateOrdersQueries queries) returns ClimateRemovalsOrdersList|error {
- string resourcePath = string `/climate/orders`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of a Climate order object with the given ID.
- #
- # + 'order - Unique identifier of the order.
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/orders/[string 'order](map headers = {}, *GetClimateOrdersOrderQueries queries) returns Climate\.order|error {
- string resourcePath = string `/climate/orders/${getEncodedUri('order)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Lists all available Climate product objects.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/products(map headers = {}, *GetClimateProductsQueries queries) returns ClimateRemovalsProductsList|error {
- string resourcePath = string `/climate/products`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the details of a Climate product with the given ID.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/products/[string product](map headers = {}, *GetClimateProductsProductQueries queries) returns Climate\.product|error {
- string resourcePath = string `/climate/products/${getEncodedUri(product)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Lists all available Climate supplier objects.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/suppliers(map headers = {}, *GetClimateSuppliersQueries queries) returns ClimateRemovalsSuppliersList|error {
- string resourcePath = string `/climate/suppliers`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a Climate supplier object.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get climate/suppliers/[string supplier](map headers = {}, *GetClimateSuppliersSupplierQueries queries) returns Climate\.supplier|error {
- string resourcePath = string `/climate/suppliers/${getEncodedUri(supplier)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves an existing ConfirmationToken object
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get confirmation_tokens/[string confirmation_token](map headers = {}, *GetConfirmationTokensConfirmationTokenQueries queries) returns Confirmation_token|error {
- string resourcePath = string `/confirmation_tokens/${getEncodedUri(confirmation_token)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Lists all Country Spec objects available in the API.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get country_specs(map headers = {}, *GetCountrySpecsQueries queries) returns CountrySpecList|error {
- string resourcePath = string `/country_specs`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a Country Spec for a given Country code.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get country_specs/[string country](map headers = {}, *GetCountrySpecsCountryQueries queries) returns Country_spec|error {
- string resourcePath = string `/country_specs/${getEncodedUri(country)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of your coupons.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get coupons(map headers = {}, *GetCouponsQueries queries) returns CouponsResourceCouponList|error {
- string resourcePath = string `/coupons`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the coupon with the given ID.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get coupons/[string coupon](map headers = {}, *GetCouponsCouponQueries queries) returns Coupon|error {
- string resourcePath = string `/coupons/${getEncodedUri(coupon)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of credit notes.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get credit_notes(map headers = {}, *GetCreditNotesQueries queries) returns CreditNotesList|error {
- string resourcePath = string `/credit_notes`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # When retrieving a credit note, you’ll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get credit_notes/[string credit_note]/lines(map headers = {}, *GetCreditNotesCreditNoteLinesQueries queries) returns CreditNoteLinesList|error {
- string resourcePath = string `/credit_notes/${getEncodedUri(credit_note)}/lines`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the credit note object with the given identifier.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get credit_notes/[string id](map headers = {}, *GetCreditNotesIdQueries queries) returns Credit_note|error {
- string resourcePath = string `/credit_notes/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Get a preview of a credit note without creating it.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get credit_notes/preview(map headers = {}, *GetCreditNotesPreviewQueries queries) returns Credit_note|error {
- string resourcePath = string `/credit_notes/preview`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "lines": {style: DEEPOBJECT, explode: true}, "shipping_cost": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get credit_notes/preview/lines(map headers = {}, *GetCreditNotesPreviewLinesQueries queries) returns CreditNoteLinesList|error {
- string resourcePath = string `/credit_notes/preview/lines`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "lines": {style: DEEPOBJECT, explode: true}, "shipping_cost": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers(map headers = {}, *GetCustomersQueries queries) returns CustomerResourceCustomerList|error {
- string resourcePath = string `/customers`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a Customer object.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer](map headers = {}, *GetCustomersCustomerQueries queries) returns inline_response_200|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of transactions that updated the customer’s balances.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/balance_transactions(map headers = {}, *GetCustomersCustomerBalanceTransactionsQueries queries) returns CustomerBalanceTransactionList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/balance_transactions`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a specific customer balance transaction that updated the customer’s balances.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/balance_transactions/[string 'transaction](map headers = {}, *GetCustomersCustomerBalanceTransactionsTransactionQueries queries) returns Customer_balance_transaction|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/balance_transactions/${getEncodedUri('transaction)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- #
- # # Deprecated
- @deprecated
- resource isolated function get customers/[string customer]/bank_accounts(map headers = {}, *GetCustomersCustomerBankAccountsQueries queries) returns BankAccountList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/bank_accounts`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- #
- # # Deprecated
- @deprecated
- resource isolated function get customers/[string customer]/bank_accounts/[string id](map headers = {}, *GetCustomersCustomerBankAccountsIdQueries queries) returns Bank_account|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/bank_accounts/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can see a list of the cards belonging to a customer.
- # Note that the 10 most recent sources are always available on the Customer object.
- # If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- #
- # # Deprecated
- @deprecated
- resource isolated function get customers/[string customer]/cards(map headers = {}, *GetCustomersCustomerCardsQueries queries) returns CardList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cards`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- #
- # # Deprecated
- @deprecated
- resource isolated function get customers/[string customer]/cards/[string id](map headers = {}, *GetCustomersCustomerCardsIdQueries queries) returns Card|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cards/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a customer’s cash balance.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/cash_balance(map headers = {}, *GetCustomersCustomerCashBalanceQueries queries) returns Cash_balance|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cash_balance`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of transactions that modified the customer’s cash balance.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/cash_balance_transactions(map headers = {}, *GetCustomersCustomerCashBalanceTransactionsQueries queries) returns CustomerCashBalanceTransactionList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cash_balance_transactions`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a specific cash balance transaction, which updated the customer’s cash balance.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/cash_balance_transactions/[string 'transaction](map headers = {}, *GetCustomersCustomerCashBalanceTransactionsTransactionQueries queries) returns Customer_cash_balance_transaction|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/cash_balance_transactions/${getEncodedUri('transaction)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- #
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/discount(map headers = {}, *GetCustomersCustomerDiscountQueries queries) returns Discount|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/discount`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of PaymentMethods for a given Customer
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/payment_methods(map headers = {}, *GetCustomersCustomerPaymentMethodsQueries queries) returns CustomerPaymentMethodResourceList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/payment_methods`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves a PaymentMethod object for a given Customer.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/payment_methods/[string payment_method](map headers = {}, *GetCustomersCustomerPaymentMethodsPaymentMethodQueries queries) returns Payment_method|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/payment_methods/${getEncodedUri(payment_method)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # List sources for a specified customer.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/sources(map headers = {}, *GetCustomersCustomerSourcesQueries queries) returns ApmsSourcesSourceList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/sources`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a specified source for a given customer.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/sources/[string id](map headers = {}, *GetCustomersCustomerSourcesIdQueries queries) returns Payment_source|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/sources/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/subscriptions(map headers = {}, *GetCustomersCustomerSubscriptionsQueries queries) returns SubscriptionList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/subscriptions`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the subscription with the given ID.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/subscriptions/[string subscription_exposed_id](map headers = {}, *GetCustomersCustomerSubscriptionsSubscriptionExposedIdQueries queries) returns Subscription|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/subscriptions/${getEncodedUri(subscription_exposed_id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- #
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/subscriptions/[string subscription_exposed_id]/discount(map headers = {}, *GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscountQueries queries) returns Discount|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/subscriptions/${getEncodedUri(subscription_exposed_id)}/discount`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of tax IDs for a customer.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/tax_ids(map headers = {}, *GetCustomersCustomerTaxIdsQueries queries) returns TaxIDsList|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/tax_ids`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the tax_id object with the given identifier.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/[string customer]/tax_ids/[string id](map headers = {}, *GetCustomersCustomerTaxIdsIdQueries queries) returns Tax_id|error {
- string resourcePath = string `/customers/${getEncodedUri(customer)}/tax_ids/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Search for customers you’ve previously created using Stripe’s Search Query Language.
- # Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating
- # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
- # to an hour behind during outages. Search functionality is not available to merchants in India.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get customers/search(map headers = {}, *GetCustomersSearchQueries queries) returns SearchResult_1|error {
- string resourcePath = string `/customers/search`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Returns a list of your disputes.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get disputes(map headers = {}, *GetDisputesQueries queries) returns DisputeList|error {
- string resourcePath = string `/disputes`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieves the dispute with the given ID.
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get disputes/[string dispute](map headers = {}, *GetDisputesDisputeQueries queries) returns Dispute|error {
- string resourcePath = string `/disputes/${getEncodedUri(dispute)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a list of active entitlements for a customer
- #
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get entitlements/active_entitlements(map headers = {}, *GetEntitlementsActiveEntitlementsQueries queries) returns EntitlementsResourceCustomerEntitlementList|error {
- string resourcePath = string `/entitlements/active_entitlements`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve an active entitlement
- #
- # + id - The ID of the entitlement.
- # + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get entitlements/active_entitlements/[string id](map headers = {}, *GetEntitlementsActiveEntitlementsIdQueries queries) returns Entitlements\.active_entitlement|error {
- string resourcePath = string `/entitlements/active_entitlements/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
- }
-
- # Retrieve a list of features
+ # Retrieves the details of an account.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get entitlements/features(map headers = {}, *GetEntitlementsFeaturesQueries queries) returns EntitlementsResourceFeatureList|error {
- string resourcePath = string `/entitlements/features`;
+ # + return - Successful response
+ resource isolated function get account(map headers = {}, *GetAccountQueries queries) returns Account|error {
+ string resourcePath = string `/account`;
map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Retrieves a feature
+ # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
#
- # + id - The ID of the feature.
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get entitlements/features/[string id](map headers = {}, *GetEntitlementsFeaturesIdQueries queries) returns Entitlements\.feature|error {
- string resourcePath = string `/entitlements/features/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post account_links(AccountLinksBody payload, map headers = {}) returns AccountLink|error {
+ string resourcePath = string `/account_links`;
+ http:Request request = new;
+ map requestBodyEncoding = {"collection_options": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get events(map headers = {}, *GetEventsQueries queries) returns NotificationEventList|error {
- string resourcePath = string `/events`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}, "types": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post account_sessions(AccountSessionsBody payload, map headers = {}) returns AccountSession|error {
+ string resourcePath = string `/account_sessions`;
+ http:Request request = new;
+ map requestBodyEncoding = {"components": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
+ # Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get events/[string id](map headers = {}, *GetEventsIdQueries queries) returns Event|error {
- string resourcePath = string `/events/${getEncodedUri(id)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
+ # + return - Successful response
+ resource isolated function get accounts(map headers = {}, *GetAccountsQueries queries) returns AccountList|error {
+ string resourcePath = string `/accounts`;
+ map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
+ # With Connect, you can create Stripe accounts for your users.
+ # To do this, you’ll first need to register your platform.
+ #
+ # If you’ve already collected information for your connected accounts, you can prefill that information when
+ # creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding.
+ # You can prefill any information on the account.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get exchange_rates(map headers = {}, *GetExchangeRatesQueries queries) returns ExchangeRateList|error {
- string resourcePath = string `/exchange_rates`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post accounts(AccountsBody payload, map headers = {}) returns Account|error {
+ string resourcePath = string `/accounts`;
+ http:Request request = new;
+ map requestBodyEncoding = {"bank_account": {style: DEEPOBJECT, explode: true}, "business_profile": {style: DEEPOBJECT, explode: true}, "capabilities": {style: DEEPOBJECT, explode: true}, "company": {style: DEEPOBJECT, explode: true}, "controller": {style: DEEPOBJECT, explode: true}, "documents": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}, "individual": {style: DEEPOBJECT, explode: true}, "metadata": {style: DEEPOBJECT, explode: true}, "settings": {style: DEEPOBJECT, explode: true}, "tos_acceptance": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # Retrieves the exchange rates from the given currency to every supported currency.
+ # Retrieves the details of an account.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get exchange_rates/[string rate_id](map headers = {}, *GetExchangeRatesRateIdQueries queries) returns Exchange_rate|error {
- string resourcePath = string `/exchange_rates/${getEncodedUri(rate_id)}`;
+ # + return - Successful response
+ resource isolated function get accounts/[string account](map headers = {}, *GetAccountsAccountQueries queries) returns Account|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}`;
map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Returns a list of file links.
+ # Updates a connected account by setting the values of the parameters passed. Any parameters not provided are
+ # left unchanged.
+ #
+ # For accounts where controller.requirement_collection
+ # is application, which includes Custom accounts, you can update any information on the account.
+ #
+ # For accounts where controller.requirement_collection
+ # is stripe, which includes Standard and Express accounts, you can update all information until you create
+ # an Account Link or Account Session to start Connect onboarding,
+ # after which some properties can no longer be updated.
+ #
+ # To update your own account, use the Dashboard. Refer to our
+ # Connect documentation to learn more about updating accounts.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get file_links(map headers = {}, *GetFileLinksQueries queries) returns FileResourceFileLinkList|error {
- string resourcePath = string `/file_links`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post accounts/[string account](AccountsaccountBody payload, map headers = {}) returns Account|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}`;
+ http:Request request = new;
+ map requestBodyEncoding = {"business_profile": {style: DEEPOBJECT, explode: true}, "capabilities": {style: DEEPOBJECT, explode: true}, "company": {style: DEEPOBJECT, explode: true}, "documents": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}, "individual": {style: DEEPOBJECT, explode: true}, "metadata": {style: DEEPOBJECT, explode: true}, "settings": {style: DEEPOBJECT, explode: true}, "tos_acceptance": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # Retrieves the file link with the given ID.
+ # With Connect, you can delete accounts you manage.
+ #
+ # Test-mode accounts can be deleted at any time.
+ #
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all balances are zero.
+ #
+ # If you want to delete your own account, use the account information tab in your account settings instead.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get file_links/[string link](map headers = {}, *GetFileLinksLinkQueries queries) returns File_link|error {
- string resourcePath = string `/file_links/${getEncodedUri(link)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function delete accounts/[string account](map headers = {}) returns DeletedAccount|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}`;
+ return self.clientEp->delete(resourcePath, headers = headers);
}
- # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
+ # Create an external account for a given account.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get files(map headers = {}, *GetFilesQueries queries) returns FileResourceFileList|error {
- string resourcePath = string `/files`;
- map queryParamEncoding = {"created": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post accounts/[string account]/bank_accounts(AccountBankAccountsBody payload, map headers = {}) returns ExternalAccount|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts`;
+ http:Request request = new;
+ map requestBodyEncoding = {"bank_account": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}, "metadata": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.
+ # Retrieve a specified external account for a given account.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get files/[string file](map headers = {}, *GetFilesFileQueries queries) returns File|error {
- string resourcePath = string `/files/${getEncodedUri(file)}`;
+ # + return - Successful response
+ resource isolated function get accounts/[string account]/bank_accounts/[string id](map headers = {}, *GetAccountsAccountBankAccountsIdQueries queries) returns ExternalAccount|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts/${getEncodedUri(id)}`;
map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Returns a list of Financial Connections Account objects.
+ # Updates the metadata, account holder name, account holder type of a bank account belonging to
+ # a connected account and optionally sets it as the default for its currency. Other bank account
+ # details are not editable by design.
+ #
+ # You can only update bank accounts when account.controller.requirement_collection is application, which includes Custom accounts.
+ #
+ # You can re-enable a disabled bank account by performing an update call without providing any
+ # arguments or changes.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get financial_connections/accounts(map headers = {}, *GetFinancialConnectionsAccountsQueries queries) returns BankConnectionsResourceLinkedAccountList|error {
- string resourcePath = string `/financial_connections/accounts`;
- map queryParamEncoding = {"account_holder": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post accounts/[string account]/bank_accounts/[string id](BankAccountsidBody payload, map headers = {}) returns ExternalAccount|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts/${getEncodedUri(id)}`;
+ http:Request request = new;
+ map requestBodyEncoding = {"documents": {style: DEEPOBJECT, explode: true}, "expand": {style: DEEPOBJECT, explode: true}, "metadata": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- # Retrieves the details of an Financial Connections Account.
+ # Delete a specified external account for a given account.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get financial_connections/accounts/[string account](map headers = {}, *GetFinancialConnectionsAccountsAccountQueries queries) returns Financial_connections\.account|error {
- string resourcePath = string `/financial_connections/accounts/${getEncodedUri(account)}`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function delete accounts/[string account]/bank_accounts/[string id](map headers = {}) returns DeletedExternalAccount|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/bank_accounts/${getEncodedUri(id)}`;
+ return self.clientEp->delete(resourcePath, headers = headers);
}
- # Lists all owners for a given Account
+ # Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get financial_connections/accounts/[string account]/owners(map headers = {}, *GetFinancialConnectionsAccountsAccountOwnersQueries queries) returns BankConnectionsResourceOwnerList|error {
- string resourcePath = string `/financial_connections/accounts/${getEncodedUri(account)}/owners`;
+ # + return - Successful response
+ resource isolated function get accounts/[string account]/capabilities(map headers = {}, *GetAccountsAccountCapabilitiesQueries queries) returns ListAccountCapability|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/capabilities`;
map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Retrieves the details of a Financial Connections Session
+ # Retrieves information about the specified Account Capability.
#
# + headers - Headers to be sent with the request
# + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get financial_connections/sessions/[string session](map headers = {}, *GetFinancialConnectionsSessionsSessionQueries queries) returns Financial_connections\.session|error {
- string resourcePath = string `/financial_connections/sessions/${getEncodedUri(session)}`;
+ # + return - Successful response
+ resource isolated function get accounts/[string account]/capabilities/[string capability](map headers = {}, *GetAccountsAccountCapabilitiesCapabilityQueries queries) returns Capability|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/capabilities/${getEncodedUri(capability)}`;
map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
return self.clientEp->get(resourcePath, headers);
}
- # Returns a list of Financial Connections Transaction objects.
+ # Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.
#
# + headers - Headers to be sent with the request
- # + queries - Queries to be sent with the request
- # + return - Successful response.
- resource isolated function get financial_connections/transactions(map headers = {}, *GetFinancialConnectionsTransactionsQueries queries) returns BankConnectionsResourceTransactionList|error {
- string resourcePath = string `/financial_connections/transactions`;
- map queryParamEncoding = {"expand": {style: DEEPOBJECT, explode: true}, "transacted_at": {style: DEEPOBJECT, explode: true}, "transaction_refresh": {style: DEEPOBJECT, explode: true}};
- resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding);
- return self.clientEp->get(resourcePath, headers);
+ # + return - Successful response
+ resource isolated function post accounts/[string account]/capabilities/[string capability](CapabilitiescapabilityBody payload, map headers = {}) returns Capability|error {
+ string resourcePath = string `/accounts/${getEncodedUri(account)}/capabilities/${getEncodedUri(capability)}`;
+ http:Request request = new;
+ map requestBodyEncoding = {"expand": {style: DEEPOBJECT, explode: true}};
+ string encodedRequestBody = createFormURLEncodedRequestBody(check jsondata:toJson(payload).ensureType(), requestBodyEncoding);
+ request.setPayload(encodedRequestBody, "application/x-www-form-urlencoded");
+ return self.clientEp->post(resourcePath, request, headers);
}
- #