"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from .basesdk import BaseSDK
from .sdkconfiguration import SDKConfiguration
from macropay_sdk.customer_session_sdk import CustomerSessionSDK
from macropay_sdk.downloadables import Downloadables
from macropay_sdk.macropay_benefit_grants import MacropayBenefitGrants
from macropay_sdk.macropay_customer_meters import MacropayCustomerMeters
from macropay_sdk.macropay_customers import MacropayCustomers
from macropay_sdk.macropay_license_keys import MacropayLicenseKeys
from macropay_sdk.macropay_members import MacropayMembers
from macropay_sdk.macropay_orders import MacropayOrders
from macropay_sdk.macropay_organizations import MacropayOrganizations
from macropay_sdk.macropay_subscriptions import MacropaySubscriptions
from macropay_sdk.seats import Seats
from macropay_sdk.wallets import Wallets
from typing import Optional


class CustomerPortal(BaseSDK):
    benefit_grants: MacropayBenefitGrants
    customers: MacropayCustomers
    customer_meters: MacropayCustomerMeters
    seats: Seats
    customer_session: CustomerSessionSDK
    downloadables: Downloadables
    license_keys: MacropayLicenseKeys
    members: MacropayMembers
    orders: MacropayOrders
    organizations: MacropayOrganizations
    subscriptions: MacropaySubscriptions
    wallets: Wallets

    def __init__(
        self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
    ) -> None:
        BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
        self.sdk_configuration = sdk_config
        self._init_sdks()

    def _init_sdks(self):
        self.benefit_grants = MacropayBenefitGrants(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.customers = MacropayCustomers(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.customer_meters = MacropayCustomerMeters(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.seats = Seats(self.sdk_configuration, parent_ref=self.parent_ref)
        self.customer_session = CustomerSessionSDK(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.downloadables = Downloadables(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.license_keys = MacropayLicenseKeys(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.members = MacropayMembers(self.sdk_configuration, parent_ref=self.parent_ref)
        self.orders = MacropayOrders(self.sdk_configuration, parent_ref=self.parent_ref)
        self.organizations = MacropayOrganizations(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.subscriptions = MacropaySubscriptions(
            self.sdk_configuration, parent_ref=self.parent_ref
        )
        self.wallets = Wallets(self.sdk_configuration, parent_ref=self.parent_ref)
