Skip to main content

suger-sdk-python

CRUD operations on a set of resources, including organizations, products, offers, entitlements, usage record groups for meterting, etc.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: v3.129.0
  • Generator version: 7.20.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.suger.io/support

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/sugerio/suger-sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/sugerio/suger-sdk-python.git)

Then import the package:

import suger_sdk_python

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import suger_sdk_python

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import suger_sdk_python
from suger_sdk_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.suger.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = suger_sdk_python.Configuration(
    host = "https://api.suger.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: APIKeyAuth
configuration.api_key['APIKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with suger_sdk_python.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = suger_sdk_python.APIApi(api_client)
    org_id = 'org_id_example' # str | Organization ID
    api_client_id = 'api_client_id_example' # str | API client ID

    try:
        # get api client
        api_response = api_instance.get_api_client(org_id, api_client_id)
        print("The response of APIApi->get_api_client:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling APIApi->get_api_client: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.suger.cloud

Class Method HTTP request Description
APIApi get_api_client GET /org/{orgId}/apiClient/{apiClientId} get api client
APIApi list_api_clients GET /org/{orgId}/apiClient list api clients
AuditingApi query_auditing_events GET /org/{orgId}/auditingEvent/query query auditing events
BuyerApi close_credit_wallet PATCH /org/{orgId}/buyer/{buyerId}/wallet/{walletId}/close close credit wallet
BuyerApi create_buyer POST /org/{orgId}/buyer create buyer
BuyerApi create_credit_wallet POST /org/{orgId}/buyer/{buyerId}/wallet create credit wallet
BuyerApi delete_buyer_wallet DELETE /org/{orgId}/buyer/{buyerId}/wallet/{walletId} delete buyer wallet
BuyerApi get_buyer GET /org/{orgId}/buyer/{buyerId} get buyer
BuyerApi list_buyer_wallets GET /org/{orgId}/buyer/{buyerId}/wallet list buyer's wallets
BuyerApi list_buyers GET /org/{orgId}/buyer list buyers
BuyerApi query_buyers GET /org/{orgId}/buyer/query query buyers
BuyerApi set_buyer_default_wallet PATCH /org/{orgId}/buyer/{buyerId}/wallet/{walletId}/default set buyer default wallet
BuyerApi update_buyer PATCH /org/{orgId}/buyer/{buyerId} update buyer
BuyerApi update_credit_wallet PATCH /org/{orgId}/buyer/{buyerId}/wallet/{walletId} update credit wallet
ContactApi add_contact_to_buyer POST /org/{orgId}/contact/{contactId}/buyer/{buyerId} add contact to buyer
ContactApi add_contact_to_offer POST /org/{orgId}/contact/{contactId}/offer/{offerId} add contact to offer
ContactApi batch_create_contacts POST /org/{orgId}/contact/batch batch create contacts
ContactApi create_contact POST /org/{orgId}/contact create contact
ContactApi get_contact GET /org/{orgId}/contact/{contactId} get contact
ContactApi list_contacts GET /org/{orgId}/contact list contacts
ContactApi query_contacts GET /org/{orgId}/contact/query query contacts
ContactApi remove_contact_from_buyer DELETE /org/{orgId}/contact/{contactId}/buyer/{buyerId} remove contact from buyer
ContactApi remove_contact_from_offer DELETE /org/{orgId}/contact/{contactId}/offer/{offerId} remove contact from offer
ContactApi update_contact PATCH /org/{orgId}/contact/{contactId} update contact
ContactApi update_contact_tags PATCH /org/{orgId}/contact/{contactId}/tag update contact tags
CosellApi accept_lead POST /org/{orgId}/cosell/lead/{leadId}/accept Accept a co-sell lead invitation
CosellApi azure_invite_partner_collaboration POST /org/{orgId}/cosell/partner/AZURE/referral/{referralId}/invitePartner Invite a partner to collaborate on an Azure referral (Azure only)
CosellApi azure_microsoft_solution_lookup GET /org/{orgId}/cosell/partner/AZURE/microsoftSolutions/lookup/{searchTerm} Search Microsoft first-party products for an Azure co-sell
CosellApi azure_third_party_solution_lookup GET /org/{orgId}/cosell/partner/AZURE/thirdPartySolutions/lookup/{searchTerm} Search third-party solutions for an Azure co-sell
CosellApi batch_create_cosell_referrals POST /org/{orgId}/cosell/referral/batchCreate Batch create co-sell referrals
CosellApi batch_preview_cosell_referrals POST /org/{orgId}/cosell/referral/batchPreview Preview co-sell referrals mapped from CRM records
CosellApi create_cosell_referral POST /org/{orgId}/cosell/referral Create a co-sell referral (outbound)
CosellApi get_cosell_dashboard GET /org/{orgId}/cosell/metric Get co-sell dashboard / insights
CosellApi get_cosell_referral GET /org/{orgId}/cosell/referral/{referralId} Get a co-sell referral by ID
CosellApi get_lead GET /org/{orgId}/cosell/lead/{leadId} Get a co-sell lead by ID
CosellApi get_partner_contacts GET /org/{orgId}/cosell/partner_contact List known partner contacts for a buyer company
CosellApi get_referral_funding_recommendation GET /org/{orgId}/cosell/referral/{referralId}/fundingRecommendation Get a referral's AWS funding recommendation
CosellApi list_cosell_referrals GET /org/{orgId}/cosell/referral List co-sell referrals (inbound + outbound)
CosellApi list_leads GET /org/{orgId}/cosell/lead List co-sell leads
CosellApi predict_referral_quality_score POST /org/{orgId}/cosell/referral/predict-quality-score predict AWS opportunity quality score
CosellApi propose_cosell_referral_update PUT /org/{orgId}/cosell/referral/{referralId}/agentProposal propose an AWS referral update for a person to approve
CosellApi search_partner_connections POST /org/{orgId}/cosell/partner/AWS/searchPartner Search AWS connected partners by name
CosellApi sync_single_referral POST /org/{orgId}/cosell/referral/{referralId}/sync Sync a single co-sell referral with the partner / CRM
CosellApi update_cosell_referral PATCH /org/{orgId}/cosell/referral/{referralId} Update a co-sell referral (incl. status / stage transitions)
CosellApi validate_referral POST /org/{orgId}/cosell/referral/validate Dry-run validate a co-sell referral against partner schema
EntitlementApi add_entitlement_credit POST /org/{orgId}/entitlement/{entitlementId}/addCredit add entitlement credit
EntitlementApi adjust_entitlement_renewal_uplift POST /org/{orgId}/entitlement/{entitlementId}/renewal/adjustUplift Adjust the renewal uplift for an entitlement
EntitlementApi apply_addon_to_entitlement POST /org/{orgId}/entitlement/{entitlementId}/addon apply addon to entitlement
EntitlementApi approve_entitlement POST /org/{orgId}/entitlement/{entitlementId}/approve approve entitlement
EntitlementApi cancel_entitlement POST /org/{orgId}/entitlement/{entitlementId}/cancel cancel entitlement
EntitlementApi create_billing_refund_requests POST /org/{orgId}/entitlement/{entitlementId}/refund create billing refund requests
EntitlementApi create_entitlement POST /org/{orgId}/entitlement create entitlement
EntitlementApi delete_entitlement_term DELETE /org/{orgId}/entitlement/{entitlementId}/entitlementTerm/{entitlementTermId} delete entitlement term
EntitlementApi divide_entitlement_commit POST /org/{orgId}/entitlement/{entitlementId}/divideCommit divide entitlement commit
EntitlementApi get_entitlement GET /org/{orgId}/entitlement/{entitlementId} get entitlement
EntitlementApi get_entitlement_pdf GET /org/{orgId}/entitlement/{entitlementId}/pdf get entitlement agreement PDF
EntitlementApi get_entitlement_renewal_draft_offer GET /org/{orgId}/entitlement/{entitlementId}/renewal/draftOffer Get the draft renewal offer for an entitlement
EntitlementApi get_entitlement_term GET /org/{orgId}/entitlement/{entitlementId}/entitlementTerm/{entitlementTermId} get entitlement term
EntitlementApi list_billing_refund_invoices GET /org/{orgId}/entitlement/{entitlementId}/refund/invoice list refundable invoices
EntitlementApi list_billing_refund_requests GET /org/{orgId}/entitlement/{entitlementId}/refund list billing refund requests
EntitlementApi list_entitlement_cancellation_requests GET /org/{orgId}/entitlement/{entitlementId}/cancel list entitlement cancellation requests
EntitlementApi list_entitlement_terms GET /org/{orgId}/entitlement/{entitlementId}/entitlementTerm list entitlement terms
EntitlementApi list_entitlements GET /org/{orgId}/entitlement list entitlements
EntitlementApi opt_out_entitlement_renewal POST /org/{orgId}/entitlement/{entitlementId}/renewal/optOut Opt out of auto-renewal for an entitlement
EntitlementApi query_entitlements GET /org/{orgId}/entitlement/query query entitlements
EntitlementApi schedule_entitlement_cancellation POST /org/{orgId}/entitlement/{entitlementId}/scheduleCancellation schedule entitlement cancellation
EntitlementApi unschedule_entitlement_cancellation POST /org/{orgId}/entitlement/{entitlementId}/unscheduleCancellation unschedule entitlement cancellation
EntitlementApi update_entitlement_meta_info PATCH /org/{orgId}/entitlement/{entitlementId}/metaInfo update entitlement meta info
EntitlementApi update_entitlement_name PATCH /org/{orgId}/entitlement/{entitlementId}/entitlementName update entitlement name
EntitlementApi update_entitlement_price_model PATCH /org/{orgId}/entitlement/{entitlementId}/priceModel update entitlement price model
EntitlementApi update_entitlement_seat PATCH /org/{orgId}/entitlement/{entitlementId}/seat update seat for the active AZURE subscription
EntitlementApi withdraw_entitlement_cancellation_request POST /org/{orgId}/entitlement/{entitlementId}/cancel/withdraw withdraw entitlement cancellation request
FundingApi attach_funding_application_file POST /org/{orgId}/fundingApplication/{fundingApplicationId}/file attach a file to a funding application draft
FundingApi create_funding_application POST /org/{orgId}/fundingApplication create funding application
FundingApi create_funding_application_draft POST /org/{orgId}/fundingApplication/draft save a funding application draft
FundingApi get_funding_application GET /org/{orgId}/fundingApplication/{fundingApplicationId} get funding application
FundingApi list_funding_applications GET /org/{orgId}/fundingApplication list funding applications
FundingApi list_funding_benefits GET /org/{orgId}/funding/benefit list the organization's funding benefits
FundingApi preview_funding_application_field_mapping POST /org/{orgId}/fundingApplication/fieldMapping/preview preview funding application field mapping
FundingApi submit_funding_application POST /org/{orgId}/fundingApplication/{fundingApplicationId}/submit submit a funding application draft to AWS
FundingApi validate_funding_application_payload POST /org/{orgId}/fundingApplication/validate validate funding application payload
MeteringApi aggregate_usage_record_groups GET /org/{orgId}/usageRecordGroup/aggregate aggregate usageRecordGroups
MeteringApi aggregate_usage_record_reports GET /org/{orgId}/usageRecordReport/aggregate aggregate usageRecordReports
MeteringApi batch_report_usage_record_groups POST /org/{orgId}/batchCreateUsageRecordGroups batch report usageRecordGroups
MeteringApi batch_validate_usage_record_groups POST /org/{orgId}/batchValidateUsageRecordGroups batch validate usageRecordGroups
MeteringApi create_billable_metric POST /org/{orgId}/billableMetric create billable metric
MeteringApi delete_usage_record_group DELETE /org/{orgId}/usageRecordGroup/{usageRecordGroupId} delete usageRecordGroup
MeteringApi get_billable_metric GET /org/{orgId}/billableMetric/{billableMetricId} get billable metric
MeteringApi get_usage_metering_config_info GET /org/{orgId}/usageMeteringConfigInfo get usage metering config info
MeteringApi list_billable_metrics GET /org/{orgId}/billableMetric list billable metrics
MeteringApi list_usage_record_groups GET /org/{orgId}/usageRecordGroup list usageRecordGroups
MeteringApi list_usage_record_reports GET /org/{orgId}/usageRecordReport list usageRecordReports
MeteringApi report_usage_record_group POST /org/{orgId}/entitlement/{entitlementId}/usageRecordGroup report usageRecordGroup
MeteringApi retry_usage_record_group POST /org/{orgId}/usageRecordGroup/{usageRecordGroupId}/retry retry usageRecordGroup
MeteringApi update_billable_metric PATCH /org/{orgId}/billableMetric/{billableMetricId} update billable metric
MeteringApi update_usage_metering_config_info PATCH /org/{orgId}/usageMeteringConfigInfo update usage metering config info
NotificationApi get_notification_config_info GET /org/{orgId}/notificationConfigInfo get notification config info
NotificationApi get_notification_message GET /org/{orgId}/notificationMessage/{notificationMessageId} get notification message
NotificationApi list_notification_events GET /org/{orgId}/notificationEvent list notification events
NotificationApi list_notification_events_by_entity GET /org/{orgId}/notificationEvent/{entityType}/{entityId} list notification events by entity
NotificationApi list_notification_messages GET /org/{orgId}/notificationMessage list notification messages
NotificationApi update_notification_config_info PATCH /org/{orgId}/notificationConfigInfo update notification config info
OfferApi cancel_offer POST /org/{orgId}/offer/{offerId}/cancel cancel offer
OfferApi create_offer POST /org/{orgId}/offer create offer
OfferApi create_or_update_draft_offer POST /org/{orgId}/draftOffer create or update draft offer
OfferApi delete_offer DELETE /org/{orgId}/offer/{offerId} delete offer
OfferApi extend_private_offer_expiry_date POST /org/{orgId}/offer/{offerId}/extendExpiryDate extend offer expiry date
OfferApi get_offer GET /org/{orgId}/offer/{offerId} get offer
OfferApi get_offer_by_external_id GET /org/{orgId}/offerExternalId/{offerExternalId} get offer by external ID
OfferApi get_offer_eula GET /org/{orgId}/offer/{offerId}/eula get offer EULA
OfferApi get_offer_pdf GET /org/{orgId}/offer/{offerId}/pdf get offer PDF
OfferApi get_offer_reseller_eula GET /org/{orgId}/offer/{offerId}/resellerEula get offer reseller EULA
OfferApi list_offers GET /org/{orgId}/offer list offers
OfferApi query_offers GET /org/{orgId}/offer/query query offers
OfferApi send_offer_notifications POST /org/{orgId}/offer/{offerId}/notifyContacts notify offer contacts
OfferApi sync_offer POST /org/{orgId}/offer/{offerId}/sync Sync Offer
OfferApi update_offer_meta_info PATCH /org/{orgId}/offer/{offerId}/metaInfo update offer meta info
OfferApi update_offer_price PATCH /org/{orgId}/offer/{offerId}/price Update offer pricing (unified format)
OfferSetApi create_offer_set POST /org/{orgId}/offerSet Create offer set
OfferSetApi get_offer_set GET /org/{orgId}/offerSet/{offerSetId} Get offer set
OfferSetApi list_offer_sets GET /org/{orgId}/offerSet List offer sets
OperationApi get_operation_v2 GET /org/{orgId}/v2/operation/{operationId} get operation details
OperationApi list_operation_history_v2 GET /org/{orgId}/v2/operation/{operationId}/history get operation history events
OperationApi list_operations_v2 POST /org/{orgId}/v2/operation/list list operations with filters
OrganizationApi get_onboarding_status GET /org/{orgId}/onboarding/status Get the organization's Get Started onboarding status.
OrganizationApi get_organization_licenses_and_services GET /org/{orgId}/services-and-quotas Get the current organization's services and quotas
OrganizationApi list_organizations GET /org List organizations the current user or API client belongs to
OrganizationApi list_users_by_organization GET /org/{orgId}/user List users by organization
OrganizationApi update_onboarding_info PATCH /org/{orgId}/onboarding/info Update the organization's onboarding intent (skip/dismiss).
ProductApi create_or_update_draft_product POST /org/{orgId}/draftProduct create or update draft product
ProductApi create_product POST /org/{orgId}/product create product
ProductApi delete_product DELETE /org/{orgId}/product/{productId} delete product
ProductApi get_product GET /org/{orgId}/product/{productId} get product
ProductApi list_product_metering_dimensions GET /org/{orgId}/product/{productId}/dimension list metering dimensions of product
ProductApi list_products GET /org/{orgId}/product list products
ProductApi list_products_by_partner GET /org/{orgId}/partner/{partner}/product list products by partner
ProductApi publish_product PATCH /org/{orgId}/product/{productId}/publish publish product
ProductApi query_products GET /org/{orgId}/product/query query products
ProductApi update_product PATCH /org/{orgId}/product/{productId} update product
ProductApi update_product_fulfillment_url PATCH /org/{orgId}/product/{productId}/fulfillmentUrl update product fulfillment url
ProductApi update_product_meta_info PATCH /org/{orgId}/product/{productId}/metaInfo update product meta info
ProductApi update_product_price PATCH /org/{orgId}/product/{productId}/price Update product pricing (unified format)
ProductApi update_product_pricing PATCH /org/{orgId}/product/{productId}/pricing update product pricing
ProductApi update_product_targeting PATCH /org/{orgId}/product/{productId}/targeting update product allowlist
ReportApi list_daily_revenue_records GET /org/{orgId}/dailyRevenueRecord list daily revenue records
ReportApi list_usage_metering_daily_records GET /org/{orgId}/partner/{partner}/usageMeteringDailyRecord list usage metering daily records
SupportApi close_support_ticket PATCH /org/{orgId}/support/ticket/{ticketId}/close close support ticket
SupportApi create_org_support_attachment POST /org/{orgId}/support/attachment create a support attachment before the ticket exists
SupportApi create_support_ticket POST /org/{orgId}/support/ticket create support ticket
SupportApi create_support_ticket_attachment POST /org/{orgId}/support/ticket/{ticketId}/attachment create support ticket attachment
SupportApi create_support_ticket_comment POST /org/{orgId}/support/ticket/{ticketId}/comment create support ticket comment
SupportApi download_support_ticket_attachment GET /org/{orgId}/support/ticket/{ticketId}/attachment/{attachmentId} download support ticket attachment
SupportApi download_support_ticket_file GET /org/{orgId}/support/ticket/{ticketId}/attachment/{attachmentId}/file Download a support-ticket file
SupportApi get_support_ticket GET /org/{orgId}/support/ticket/{ticketId} get support ticket
SupportApi list_support_tickets GET /org/{orgId}/support/ticket list support tickets
SupportApi reopen_support_ticket PATCH /org/{orgId}/support/ticket/{ticketId}/reopen reopen support ticket
SupportApi update_support_ticket PATCH /org/{orgId}/support/ticket/{ticketId} update support ticket

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

APIKeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@suger.io

Metadata

Release files for suger-sdk-python 3.129.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suger-sdk-python 3.129.0
File Size Uploaded Provenance Actions
suger_sdk_python-3.129.0.tar.gz 830.9 kB Without provenance Details for suger_sdk_python-3.129.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for suger-sdk-python 3.129.0
File Interpreter ABI Platform Actions
suger_sdk_python-3.129.0-py3-none-any.whl Python 3 none any Details for suger_sdk_python-3.129.0-py3-none-any.whl

Total release size: 2.5 MB

Release files / suger_sdk_python-3.129.0.tar.gz

Download URL suger_sdk_python-3.129.0.tar.gz
Size 830.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6073a84ae856cc4207530a5da997f7b3b6d1f692d42900dd3bbef064e8a23244
BLAKE2b-256 checksum
How to use checksums
7f31052c3e1e0b28c6d515888bbafed91e9e596c647c6ea0194990735a2c1224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / suger_sdk_python-3.129.0-py3-none-any.whl

Download URL suger_sdk_python-3.129.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4819c397fb643b078238219c3b8bca619ec19a3b97d55d82e405ac6504a9ba81
BLAKE2b-256 checksum
How to use checksums
2ef7581fdc7c9990adf53bac1a354667e622162bac88c8d487a9ae858205e33e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for suger-sdk-python 3.129.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page