Skip to content

[Feature]: Capital APIs #398

@luhn

Description

@luhn

Feature summary

Add support for Capital v1 APIs

Problem statement

I'm using the Capital v1 API, specifically GET grants, but unfortunately the SDK does not provide methods for these endpoints.

The SDK currently implements GrantAccountsApi and GrantOffersApi, but these are legacy APIs. https://docs.adyen.com/api-explorer/balanceplatform/2/get/grantOffers

Proposed solution

Implement Capital v1 API: https://docs.adyen.com/api-explorer/capital/1/overview

Alternatives considered

Currently implementing my own:

class GrantsApi(AdyenServiceBase):
    def __init__(self, client=None):
        super().__init__(client=client)
        self.service = "capital"
        self.baseUrl = "https://balanceplatform-api-test.adyen.com/capital/v1"

    def get_all_grants_of_account_holder(self, idempotency_key=None, **kwargs):
        endpoint = f"{self.baseUrl}/grants"
        method = "GET"
        return self.client.call_adyen_api(
            None,
            self.service,
            method,
            endpoint,
            idempotency_key,
            **kwargs,
        )

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions