blink-api-client 1.0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blink_api_client/__init__.py +8 -0
- blink_api_client/api/__init__.py +1 -0
- blink_api_client/api/affiliates/__init__.py +1 -0
- blink_api_client/api/affiliates/get_affiliates.py +214 -0
- blink_api_client/api/affiliates/get_affiliates_id.py +187 -0
- blink_api_client/api/affiliates/get_affiliates_id_conversions.py +223 -0
- blink_api_client/api/affiliates/get_affiliates_members.py +81 -0
- blink_api_client/api/affiliates/get_affiliates_members_membership_id_finances.py +98 -0
- blink_api_client/api/affiliates/get_affiliates_members_membership_id_links.py +98 -0
- blink_api_client/api/affiliates/get_affiliates_members_membership_id_metrics.py +98 -0
- blink_api_client/api/affiliates/get_affiliates_members_membership_id_orders.py +98 -0
- blink_api_client/api/affiliates/get_affiliates_programs.py +81 -0
- blink_api_client/api/affiliates/get_v1_affiliate_program.py +136 -0
- blink_api_client/api/affiliates/get_v1_affiliates_id_links.py +163 -0
- blink_api_client/api/affiliates/get_v1_affiliates_id_payouts.py +167 -0
- blink_api_client/api/affiliates/patch_affiliates_id.py +213 -0
- blink_api_client/api/affiliates/post_affiliates.py +189 -0
- blink_api_client/api/affiliates/post_affiliates_invite.py +189 -0
- blink_api_client/api/affiliates/post_affiliates_links.py +192 -0
- blink_api_client/api/affiliates/post_affiliates_members_membership_id_links.py +98 -0
- blink_api_client/api/affiliates/post_v1_affiliates_id_payout_setup.py +188 -0
- blink_api_client/api/affiliates/post_v1_affiliates_register.py +172 -0
- blink_api_client/api/affiliates/post_v1_affiliates_sso.py +168 -0
- blink_api_client/api/audience/__init__.py +1 -0
- blink_api_client/api/audience/delete_audience_id.py +179 -0
- blink_api_client/api/audience/delete_audience_tags.py +81 -0
- blink_api_client/api/audience/get_audience.py +95 -0
- blink_api_client/api/audience/get_audience_broadcasts.py +81 -0
- blink_api_client/api/audience/get_audience_id.py +187 -0
- blink_api_client/api/audience/get_audience_tags.py +81 -0
- blink_api_client/api/audience/patch_audience_id.py +209 -0
- blink_api_client/api/audience/post_audience_broadcasts.py +120 -0
- blink_api_client/api/audience/post_audience_tags.py +91 -0
- blink_api_client/api/bumps/__init__.py +1 -0
- blink_api_client/api/bumps/get_bumps_id.py +98 -0
- blink_api_client/api/cart_recovery/__init__.py +1 -0
- blink_api_client/api/cart_recovery/delete_cart_recovery_id.py +98 -0
- blink_api_client/api/cart_recovery/get_cart_recovery.py +238 -0
- blink_api_client/api/cart_recovery/get_cart_recovery_id.py +183 -0
- blink_api_client/api/cart_recovery/get_cart_recovery_id_link.py +98 -0
- blink_api_client/api/cart_recovery/post_cart_recovery_id_recover.py +193 -0
- blink_api_client/api/cart_recovery/post_cart_recovery_trigger.py +125 -0
- blink_api_client/api/categories/__init__.py +1 -0
- blink_api_client/api/categories/get_v1_categories.py +136 -0
- blink_api_client/api/checkouts/__init__.py +1 -0
- blink_api_client/api/checkouts/delete_bumps_id.py +104 -0
- blink_api_client/api/checkouts/delete_checkout_links_id.py +104 -0
- blink_api_client/api/checkouts/get_checkout_links.py +91 -0
- blink_api_client/api/checkouts/get_checkout_links_id.py +104 -0
- blink_api_client/api/checkouts/get_checkouts.py +214 -0
- blink_api_client/api/checkouts/get_checkouts_id.py +187 -0
- blink_api_client/api/checkouts/patch_bumps_id.py +104 -0
- blink_api_client/api/checkouts/patch_checkout_links_id.py +104 -0
- blink_api_client/api/checkouts/post_checkout_links.py +95 -0
- blink_api_client/api/checkouts/post_checkouts.py +205 -0
- blink_api_client/api/customer_portal/__init__.py +1 -0
- blink_api_client/api/customer_portal/get_portal_orders.py +97 -0
- blink_api_client/api/customer_portal/get_portal_orders_id_deliverables.py +112 -0
- blink_api_client/api/customer_portal/get_portal_subscriptions.py +91 -0
- blink_api_client/api/customer_portal/post_portal_sessions.py +93 -0
- blink_api_client/api/customers/__init__.py +1 -0
- blink_api_client/api/customers/get_customers.py +221 -0
- blink_api_client/api/customers/get_customers_id.py +175 -0
- blink_api_client/api/customers/get_customers_id_entitlements.py +167 -0
- blink_api_client/api/customers/get_customers_id_meter_balance.py +183 -0
- blink_api_client/api/customers/get_customers_id_orders.py +219 -0
- blink_api_client/api/customers/get_customers_id_subscriptions.py +175 -0
- blink_api_client/api/customers/patch_customers_id.py +201 -0
- blink_api_client/api/customers/post_customers.py +185 -0
- blink_api_client/api/customers/post_customers_id_portal_session.py +175 -0
- blink_api_client/api/deliverables/__init__.py +1 -0
- blink_api_client/api/deliverables/delete_deliverables_id.py +179 -0
- blink_api_client/api/deliverables/get_deliverables.py +208 -0
- blink_api_client/api/deliverables/get_deliverables_id.py +183 -0
- blink_api_client/api/deliverables/get_deliverables_id_download.py +224 -0
- blink_api_client/api/deliverables/post_deliverables.py +192 -0
- blink_api_client/api/deliverables/post_deliverables_presigned.py +200 -0
- blink_api_client/api/discounts/__init__.py +1 -0
- blink_api_client/api/discounts/delete_discounts_id.py +175 -0
- blink_api_client/api/discounts/get_discounts.py +218 -0
- blink_api_client/api/discounts/get_discounts_id.py +171 -0
- blink_api_client/api/discounts/patch_discounts_id.py +201 -0
- blink_api_client/api/discounts/post_discounts.py +181 -0
- blink_api_client/api/disputes/__init__.py +1 -0
- blink_api_client/api/disputes/get_disputes.py +196 -0
- blink_api_client/api/emails/__init__.py +1 -0
- blink_api_client/api/emails/post_emails_broadcast.py +177 -0
- blink_api_client/api/events/__init__.py +1 -0
- blink_api_client/api/events/get_events.py +81 -0
- blink_api_client/api/events/post_events.py +181 -0
- blink_api_client/api/geo_pricing/__init__.py +1 -0
- blink_api_client/api/geo_pricing/get_geo_pricing.py +91 -0
- blink_api_client/api/geo_pricing/post_geo_pricing.py +120 -0
- blink_api_client/api/invoices/__init__.py +1 -0
- blink_api_client/api/invoices/get_invoices.py +91 -0
- blink_api_client/api/invoices/get_invoices_id.py +108 -0
- blink_api_client/api/invoices/get_invoices_id_pdf.py +114 -0
- blink_api_client/api/invoices/get_subscription_invoices.py +245 -0
- blink_api_client/api/license_keys/__init__.py +1 -0
- blink_api_client/api/license_keys/get_license_keys.py +237 -0
- blink_api_client/api/license_keys/get_license_keys_id.py +175 -0
- blink_api_client/api/license_keys/patch_license_keys_id.py +201 -0
- blink_api_client/api/license_keys/post_license_keys.py +128 -0
- blink_api_client/api/license_keys/post_license_keys_activate.py +201 -0
- blink_api_client/api/license_keys/post_license_keys_id_revoke.py +179 -0
- blink_api_client/api/license_keys/post_license_keys_import.py +116 -0
- blink_api_client/api/license_keys/post_license_keys_validate.py +193 -0
- blink_api_client/api/meters/__init__.py +1 -0
- blink_api_client/api/meters/get_balances.py +95 -0
- blink_api_client/api/meters/get_meters.py +199 -0
- blink_api_client/api/meters/get_meters_id.py +183 -0
- blink_api_client/api/meters/get_usage_records.py +81 -0
- blink_api_client/api/meters/patch_meters_id.py +205 -0
- blink_api_client/api/meters/post_meters.py +193 -0
- blink_api_client/api/meters/post_usage_records.py +120 -0
- blink_api_client/api/metrics/__init__.py +1 -0
- blink_api_client/api/metrics/get_metrics.py +212 -0
- blink_api_client/api/orders/__init__.py +1 -0
- blink_api_client/api/orders/get_orders.py +128 -0
- blink_api_client/api/orders/get_orders_id.py +108 -0
- blink_api_client/api/orders/get_orders_id_deliverables.py +114 -0
- blink_api_client/api/orders/post_orders_id_deliverables_resend.py +110 -0
- blink_api_client/api/orders/post_orders_id_refund.py +130 -0
- blink_api_client/api/organizations/__init__.py +1 -0
- blink_api_client/api/organizations/delete_organizations_id.py +98 -0
- blink_api_client/api/organizations/delete_organizations_id_members_member_id.py +112 -0
- blink_api_client/api/organizations/get_organizations.py +203 -0
- blink_api_client/api/organizations/get_organizations_id.py +104 -0
- blink_api_client/api/organizations/get_organizations_id_members.py +104 -0
- blink_api_client/api/organizations/patch_organizations_id.py +104 -0
- blink_api_client/api/organizations/post_organizations.py +193 -0
- blink_api_client/api/organizations/post_organizations_id_members.py +98 -0
- blink_api_client/api/payees/__init__.py +1 -0
- blink_api_client/api/payees/get_v1_payees_id.py +163 -0
- blink_api_client/api/payees/post_v1_payees.py +172 -0
- blink_api_client/api/payouts/__init__.py +1 -0
- blink_api_client/api/payouts/get_payouts.py +188 -0
- blink_api_client/api/payouts/get_v1_payouts_id.py +171 -0
- blink_api_client/api/products/__init__.py +1 -0
- blink_api_client/api/products/delete_products_id.py +195 -0
- blink_api_client/api/products/delete_products_id_variants_variant_id.py +201 -0
- blink_api_client/api/products/get_bumps.py +207 -0
- blink_api_client/api/products/get_products.py +261 -0
- blink_api_client/api/products/get_products_id.py +195 -0
- blink_api_client/api/products/get_products_id_variants.py +191 -0
- blink_api_client/api/products/get_products_id_variants_variant_id.py +205 -0
- blink_api_client/api/products/patch_products_id.py +221 -0
- blink_api_client/api/products/patch_products_id_variants_variant_id.py +231 -0
- blink_api_client/api/products/post_bumps.py +185 -0
- blink_api_client/api/products/post_products.py +209 -0
- blink_api_client/api/products/post_products_id_variants.py +221 -0
- blink_api_client/api/refunds/__init__.py +1 -0
- blink_api_client/api/refunds/get_refunds.py +204 -0
- blink_api_client/api/splits/__init__.py +1 -0
- blink_api_client/api/splits/delete_splits_id.py +102 -0
- blink_api_client/api/splits/get_splits.py +116 -0
- blink_api_client/api/splits/get_splits_id.py +102 -0
- blink_api_client/api/splits/patch_splits_id.py +119 -0
- blink_api_client/api/splits/post_splits.py +107 -0
- blink_api_client/api/subscriptions/__init__.py +1 -0
- blink_api_client/api/subscriptions/get_subscription_invoices_id.py +104 -0
- blink_api_client/api/subscriptions/get_subscriptions.py +245 -0
- blink_api_client/api/subscriptions/get_subscriptions_id.py +208 -0
- blink_api_client/api/subscriptions/get_subscriptions_id_preview_swap.py +142 -0
- blink_api_client/api/subscriptions/patch_subscription_invoices_id.py +98 -0
- blink_api_client/api/subscriptions/patch_subscriptions_id.py +219 -0
- blink_api_client/api/subscriptions/post_subscriptions.py +117 -0
- blink_api_client/api/taxes/__init__.py +1 -0
- blink_api_client/api/taxes/post_taxes_calculate.py +122 -0
- blink_api_client/api/taxes/post_taxes_validate_vat.py +116 -0
- blink_api_client/api/webhooks/__init__.py +1 -0
- blink_api_client/api/webhooks/delete_webhooks_id.py +104 -0
- blink_api_client/api/webhooks/get_webhooks.py +91 -0
- blink_api_client/api/webhooks/get_webhooks_id.py +104 -0
- blink_api_client/api/webhooks/patch_webhooks_id.py +104 -0
- blink_api_client/api/webhooks/post_webhooks.py +122 -0
- blink_api_client/client.py +268 -0
- blink_api_client/errors.py +16 -0
- blink_api_client/models/__init__.py +545 -0
- blink_api_client/models/abandoned_cart.py +74 -0
- blink_api_client/models/abandoned_cart_data.py +163 -0
- blink_api_client/models/abandoned_cart_data_product.py +70 -0
- blink_api_client/models/abandoned_carts_list.py +97 -0
- blink_api_client/models/abandoned_carts_list_meta.py +88 -0
- blink_api_client/models/affiliate_conversions.py +97 -0
- blink_api_client/models/affiliate_conversions_data_item.py +167 -0
- blink_api_client/models/affiliate_conversions_data_item_customer.py +79 -0
- blink_api_client/models/affiliate_conversions_data_item_product.py +70 -0
- blink_api_client/models/affiliate_conversions_meta.py +88 -0
- blink_api_client/models/affiliate_detail_response.py +74 -0
- blink_api_client/models/affiliate_detail_response_data.py +147 -0
- blink_api_client/models/affiliate_detail_response_data_affiliate.py +88 -0
- blink_api_client/models/affiliate_detail_response_data_stats.py +88 -0
- blink_api_client/models/affiliate_invite_request.py +61 -0
- blink_api_client/models/affiliate_invite_response.py +70 -0
- blink_api_client/models/affiliate_link_request.py +69 -0
- blink_api_client/models/affiliate_link_response.py +74 -0
- blink_api_client/models/affiliate_link_response_data.py +97 -0
- blink_api_client/models/affiliate_membership_response.py +74 -0
- blink_api_client/models/affiliate_membership_response_data.py +70 -0
- blink_api_client/models/affiliate_membership_update_request.py +71 -0
- blink_api_client/models/affiliate_membership_update_request_action.py +10 -0
- blink_api_client/models/affiliate_update_request.py +61 -0
- blink_api_client/models/affiliates_list_response.py +97 -0
- blink_api_client/models/affiliates_list_response_data_item.py +140 -0
- blink_api_client/models/affiliates_list_response_data_item_affiliate.py +88 -0
- blink_api_client/models/affiliates_list_response_data_item_program.py +61 -0
- blink_api_client/models/affiliates_list_response_meta.py +88 -0
- blink_api_client/models/audience_detail_response.py +74 -0
- blink_api_client/models/audience_detail_response_data.py +123 -0
- blink_api_client/models/audience_unsubscribe_response.py +74 -0
- blink_api_client/models/audience_unsubscribe_response_data.py +70 -0
- blink_api_client/models/audience_update_request.py +70 -0
- blink_api_client/models/bump_create_request.py +98 -0
- blink_api_client/models/bump_response.py +74 -0
- blink_api_client/models/bump_response_data.py +150 -0
- blink_api_client/models/bumps_list_response.py +97 -0
- blink_api_client/models/bumps_list_response_data_item.py +179 -0
- blink_api_client/models/bumps_list_response_data_item_deliverables_item.py +106 -0
- blink_api_client/models/bumps_list_response_meta.py +88 -0
- blink_api_client/models/category.py +77 -0
- blink_api_client/models/checkout_create_request.py +216 -0
- blink_api_client/models/checkout_create_request_metadata.py +45 -0
- blink_api_client/models/checkout_create_request_options.py +189 -0
- blink_api_client/models/checkout_create_request_options_custom_fields_item.py +45 -0
- blink_api_client/models/checkout_create_request_options_layout.py +11 -0
- blink_api_client/models/checkout_create_request_splits_item.py +45 -0
- blink_api_client/models/checkout_session_response.py +74 -0
- blink_api_client/models/checkout_session_response_data.py +166 -0
- blink_api_client/models/checkouts_list_response.py +97 -0
- blink_api_client/models/checkouts_list_response_meta.py +88 -0
- blink_api_client/models/customer_create_request.py +72 -0
- blink_api_client/models/customer_detail_response.py +74 -0
- blink_api_client/models/customer_detail_response_data.py +154 -0
- blink_api_client/models/customer_detail_response_data_metadata.py +45 -0
- blink_api_client/models/customer_meter_balance_response.py +99 -0
- blink_api_client/models/customer_meter_balance_response_data_item.py +172 -0
- blink_api_client/models/customer_meter_balance_response_data_item_meter.py +88 -0
- blink_api_client/models/customer_meter_balance_response_meta.py +61 -0
- blink_api_client/models/customer_orders_response.py +97 -0
- blink_api_client/models/customer_orders_response_data_item.py +194 -0
- blink_api_client/models/customer_orders_response_data_item_metadata.py +79 -0
- blink_api_client/models/customer_orders_response_data_item_metadata_custom_data.py +47 -0
- blink_api_client/models/customer_orders_response_data_item_product.py +70 -0
- blink_api_client/models/customer_orders_response_meta.py +88 -0
- blink_api_client/models/customer_subscriptions_response.py +99 -0
- blink_api_client/models/customer_subscriptions_response_data_item.py +154 -0
- blink_api_client/models/customer_subscriptions_response_data_item_product.py +70 -0
- blink_api_client/models/customer_subscriptions_response_meta.py +61 -0
- blink_api_client/models/customer_update_request.py +79 -0
- blink_api_client/models/customers_list_response.py +97 -0
- blink_api_client/models/customers_list_response_data_item.py +156 -0
- blink_api_client/models/customers_list_response_data_item_metadata.py +45 -0
- blink_api_client/models/customers_list_response_meta.py +88 -0
- blink_api_client/models/discount_create_request.py +150 -0
- blink_api_client/models/discount_create_request_discount_type.py +9 -0
- blink_api_client/models/discount_delete_response.py +74 -0
- blink_api_client/models/discount_delete_response_data.py +70 -0
- blink_api_client/models/discount_detail_response.py +74 -0
- blink_api_client/models/discount_detail_response_data.py +159 -0
- blink_api_client/models/discount_update_request.py +150 -0
- blink_api_client/models/discounts_list_response.py +97 -0
- blink_api_client/models/discounts_list_response_meta.py +88 -0
- blink_api_client/models/disputes_list_response.py +97 -0
- blink_api_client/models/disputes_list_response_data_item.py +45 -0
- blink_api_client/models/disputes_list_response_meta.py +61 -0
- blink_api_client/models/email_broadcast_request.py +89 -0
- blink_api_client/models/email_broadcast_response.py +81 -0
- blink_api_client/models/event_track_request.py +103 -0
- blink_api_client/models/event_track_request_event_data.py +45 -0
- blink_api_client/models/event_track_response.py +70 -0
- blink_api_client/models/file_delete_response.py +74 -0
- blink_api_client/models/file_delete_response_data.py +70 -0
- blink_api_client/models/file_detail_response.py +74 -0
- blink_api_client/models/file_detail_response_data.py +123 -0
- blink_api_client/models/file_download_response.py +74 -0
- blink_api_client/models/file_download_response_data.py +105 -0
- blink_api_client/models/file_list_response.py +97 -0
- blink_api_client/models/file_list_response_data_item.py +141 -0
- blink_api_client/models/file_list_response_meta.py +61 -0
- blink_api_client/models/get_cart_recovery_status.py +10 -0
- blink_api_client/models/get_customers_id_entitlements_response_200.py +96 -0
- blink_api_client/models/get_customers_id_entitlements_response_200_data.py +47 -0
- blink_api_client/models/get_customers_id_entitlements_response_200_meta.py +61 -0
- blink_api_client/models/get_v1_affiliate_program_response_200.py +76 -0
- blink_api_client/models/get_v1_affiliate_program_response_200_data.py +106 -0
- blink_api_client/models/get_v1_affiliates_id_links_response_200.py +81 -0
- blink_api_client/models/get_v1_affiliates_id_links_response_200_data_item.py +114 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200.py +76 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200_data.py +158 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200_data_account_status.py +10 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200_data_available_item.py +70 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200_data_pending_item.py +70 -0
- blink_api_client/models/get_v1_affiliates_id_payouts_response_200_data_recent_transfers_item.py +88 -0
- blink_api_client/models/get_v1_categories_response_200.py +97 -0
- blink_api_client/models/get_v1_categories_response_200_meta.py +88 -0
- blink_api_client/models/get_v1_payees_id_response_200.py +74 -0
- blink_api_client/models/get_v1_payees_id_response_200_data.py +79 -0
- blink_api_client/models/get_v1_payouts_id_response_200.py +74 -0
- blink_api_client/models/get_v1_payouts_id_response_200_data.py +47 -0
- blink_api_client/models/license_key_activate_request.py +61 -0
- blink_api_client/models/license_key_activate_response.py +83 -0
- blink_api_client/models/license_key_activate_response_meta.py +79 -0
- blink_api_client/models/license_key_detail.py +182 -0
- blink_api_client/models/license_key_detail_response.py +74 -0
- blink_api_client/models/license_key_detail_response_data.py +176 -0
- blink_api_client/models/license_key_detail_response_data_customer.py +79 -0
- blink_api_client/models/license_key_detail_response_data_order.py +87 -0
- blink_api_client/models/license_key_detail_response_data_product.py +70 -0
- blink_api_client/models/license_key_revoke_response.py +74 -0
- blink_api_client/models/license_key_revoke_response_data.py +70 -0
- blink_api_client/models/license_key_update_request.py +87 -0
- blink_api_client/models/license_key_validate_request.py +61 -0
- blink_api_client/models/license_key_validate_response.py +83 -0
- blink_api_client/models/license_key_validate_response_meta.py +105 -0
- blink_api_client/models/license_keys_list_response.py +97 -0
- blink_api_client/models/license_keys_list_response_meta.py +61 -0
- blink_api_client/models/meter_create_request.py +88 -0
- blink_api_client/models/meter_detail.py +139 -0
- blink_api_client/models/meter_detail_response.py +74 -0
- blink_api_client/models/meter_detail_response_data.py +139 -0
- blink_api_client/models/meter_update_request.py +70 -0
- blink_api_client/models/meters_list_response.py +97 -0
- blink_api_client/models/meters_list_response_meta.py +88 -0
- blink_api_client/models/metrics_response.py +74 -0
- blink_api_client/models/metrics_response_data.py +128 -0
- blink_api_client/models/metrics_response_data_customers.py +61 -0
- blink_api_client/models/metrics_response_data_orders.py +79 -0
- blink_api_client/models/metrics_response_data_period.py +85 -0
- blink_api_client/models/metrics_response_data_subscriptions.py +79 -0
- blink_api_client/models/organization_create_request.py +80 -0
- blink_api_client/models/organization_detail_response.py +74 -0
- blink_api_client/models/organization_detail_response_data.py +105 -0
- blink_api_client/models/organizations_list_response.py +97 -0
- blink_api_client/models/organizations_list_response_data_item.py +105 -0
- blink_api_client/models/organizations_list_response_meta.py +88 -0
- blink_api_client/models/patch_splits_id_body.py +108 -0
- blink_api_client/models/patch_splits_id_body_recipients_item.py +96 -0
- blink_api_client/models/patch_splits_id_body_recipients_item_share_type.py +9 -0
- blink_api_client/models/payouts_list_response.py +97 -0
- blink_api_client/models/payouts_list_response_data_item.py +45 -0
- blink_api_client/models/payouts_list_response_meta.py +61 -0
- blink_api_client/models/portal_session_response.py +74 -0
- blink_api_client/models/portal_session_response_data.py +88 -0
- blink_api_client/models/post_affiliates_links_body.py +69 -0
- blink_api_client/models/post_affiliates_links_response_201.py +74 -0
- blink_api_client/models/post_affiliates_links_response_201_data.py +70 -0
- blink_api_client/models/post_audience_broadcasts_body.py +79 -0
- blink_api_client/models/post_deliverables_files_body.py +93 -0
- blink_api_client/models/post_deliverables_json_body.py +125 -0
- blink_api_client/models/post_deliverables_presigned_body.py +72 -0
- blink_api_client/models/post_deliverables_presigned_response_200.py +70 -0
- blink_api_client/models/post_deliverables_response_200.py +92 -0
- blink_api_client/models/post_deliverables_response_200_data.py +79 -0
- blink_api_client/models/post_deliverables_response_200_meta.py +61 -0
- blink_api_client/models/post_geo_pricing_body.py +79 -0
- blink_api_client/models/post_license_keys_import_body.py +75 -0
- blink_api_client/models/post_license_keys_import_body_keys_item.py +106 -0
- blink_api_client/models/post_license_keys_response_200.py +92 -0
- blink_api_client/models/post_license_keys_response_200_data.py +89 -0
- blink_api_client/models/post_license_keys_response_200_meta.py +61 -0
- blink_api_client/models/post_orders_id_refund_body.py +70 -0
- blink_api_client/models/post_splits_body.py +104 -0
- blink_api_client/models/post_splits_body_recipients_item.py +96 -0
- blink_api_client/models/post_splits_body_recipients_item_share_type.py +9 -0
- blink_api_client/models/post_subscriptions_body.py +97 -0
- blink_api_client/models/post_subscriptions_body_status.py +12 -0
- blink_api_client/models/post_taxes_calculate_body.py +79 -0
- blink_api_client/models/post_taxes_validate_vat_body.py +70 -0
- blink_api_client/models/post_usage_records_body.py +96 -0
- blink_api_client/models/post_usage_records_body_action.py +9 -0
- blink_api_client/models/post_v1_affiliates_id_payout_setup_body.py +72 -0
- blink_api_client/models/post_v1_affiliates_id_payout_setup_response_200.py +78 -0
- blink_api_client/models/post_v1_affiliates_id_payout_setup_response_200_data.py +61 -0
- blink_api_client/models/post_v1_affiliates_register_body.py +80 -0
- blink_api_client/models/post_v1_affiliates_register_response_201.py +76 -0
- blink_api_client/models/post_v1_affiliates_register_response_201_data.py +78 -0
- blink_api_client/models/post_v1_affiliates_register_response_201_data_status.py +9 -0
- blink_api_client/models/post_v1_affiliates_sso_body.py +72 -0
- blink_api_client/models/post_v1_affiliates_sso_response_200.py +76 -0
- blink_api_client/models/post_v1_affiliates_sso_response_200_data.py +61 -0
- blink_api_client/models/post_v1_payees_body.py +69 -0
- blink_api_client/models/post_v1_payees_response_201.py +74 -0
- blink_api_client/models/post_v1_payees_response_201_data.py +79 -0
- blink_api_client/models/post_webhooks_body.py +72 -0
- blink_api_client/models/product_archive_response.py +74 -0
- blink_api_client/models/product_archive_response_data.py +70 -0
- blink_api_client/models/product_create_request.py +208 -0
- blink_api_client/models/product_create_request_metered_prices_item.py +70 -0
- blink_api_client/models/product_create_request_pricing_model.py +14 -0
- blink_api_client/models/product_create_request_subscription_interval.py +11 -0
- blink_api_client/models/product_detail_response.py +74 -0
- blink_api_client/models/product_detail_response_data.py +238 -0
- blink_api_client/models/product_detail_response_data_deliverables_item.py +88 -0
- blink_api_client/models/product_detail_response_data_pricing_model.py +14 -0
- blink_api_client/models/product_detail_response_data_subscription_interval.py +11 -0
- blink_api_client/models/product_detail_response_data_variants_item.py +151 -0
- blink_api_client/models/product_detail_response_data_variants_item_subscription_interval.py +11 -0
- blink_api_client/models/product_update_request.py +153 -0
- blink_api_client/models/product_update_request_metered_prices_item.py +70 -0
- blink_api_client/models/product_update_request_subscription_interval.py +11 -0
- blink_api_client/models/product_variant_create_request.py +89 -0
- blink_api_client/models/product_variant_delete_response.py +74 -0
- blink_api_client/models/product_variant_delete_response_data.py +70 -0
- blink_api_client/models/product_variant_detail_response.py +74 -0
- blink_api_client/models/product_variant_detail_response_data.py +114 -0
- blink_api_client/models/product_variant_update_request.py +88 -0
- blink_api_client/models/product_variants_list_response.py +99 -0
- blink_api_client/models/product_variants_list_response_data_item.py +142 -0
- blink_api_client/models/product_variants_list_response_data_item_subscription_interval.py +11 -0
- blink_api_client/models/product_variants_list_response_meta.py +61 -0
- blink_api_client/models/products_list_response.py +97 -0
- blink_api_client/models/products_list_response_data_item.py +258 -0
- blink_api_client/models/products_list_response_data_item_images_item.py +79 -0
- blink_api_client/models/products_list_response_data_item_pricing_model.py +14 -0
- blink_api_client/models/products_list_response_data_item_subscription_interval.py +11 -0
- blink_api_client/models/products_list_response_data_item_variants_item.py +88 -0
- blink_api_client/models/products_list_response_meta.py +88 -0
- blink_api_client/models/recovery_response.py +74 -0
- blink_api_client/models/recovery_response_data.py +97 -0
- blink_api_client/models/recovery_trigger_request.py +61 -0
- blink_api_client/models/refunds_list_response.py +97 -0
- blink_api_client/models/refunds_list_response_data_item.py +45 -0
- blink_api_client/models/refunds_list_response_meta.py +61 -0
- blink_api_client/models/subscription_detail_response.py +74 -0
- blink_api_client/models/subscription_detail_response_data.py +237 -0
- blink_api_client/models/subscription_detail_response_data_metadata.py +45 -0
- blink_api_client/models/subscription_detail_response_data_product.py +108 -0
- blink_api_client/models/subscription_detail_response_data_product_pricing_model.py +14 -0
- blink_api_client/models/subscription_detail_response_data_product_subscription_interval.py +11 -0
- blink_api_client/models/subscription_detail_response_data_variant.py +98 -0
- blink_api_client/models/subscription_detail_response_data_variant_subscription_interval.py +11 -0
- blink_api_client/models/subscription_invoices_response.py +99 -0
- blink_api_client/models/subscription_invoices_response_data_item.py +45 -0
- blink_api_client/models/subscription_invoices_response_meta.py +61 -0
- blink_api_client/models/subscription_update_request.py +82 -0
- blink_api_client/models/subscription_update_request_action.py +11 -0
- blink_api_client/models/subscriptions_list_response.py +97 -0
- blink_api_client/models/subscriptions_list_response_data_item.py +188 -0
- blink_api_client/models/subscriptions_list_response_data_item_metadata.py +45 -0
- blink_api_client/models/subscriptions_list_response_meta.py +61 -0
- blink_api_client/py.typed +1 -0
- blink_api_client/types.py +54 -0
- blink_api_client/webhooks.py +65 -0
- blink_api_client-1.0.11.dist-info/METADATA +139 -0
- blink_api_client-1.0.11.dist-info/RECORD +447 -0
- blink_api_client-1.0.11.dist-info/WHEEL +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.affiliates_list_response import AffiliatesListResponse
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
status: str | Unset = UNSET,
|
|
15
|
+
limit: int | Unset = 10,
|
|
16
|
+
page: int | Unset = 1,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
|
|
19
|
+
params: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
params["status"] = status
|
|
22
|
+
|
|
23
|
+
params["limit"] = limit
|
|
24
|
+
|
|
25
|
+
params["page"] = page
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "get",
|
|
31
|
+
"url": "/affiliates",
|
|
32
|
+
"params": params,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return _kwargs
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _parse_response(
|
|
39
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
40
|
+
) -> AffiliatesListResponse | Any | None:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = AffiliatesListResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
|
|
46
|
+
if response.status_code == 401:
|
|
47
|
+
response_401 = cast(Any, None)
|
|
48
|
+
return response_401
|
|
49
|
+
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
58
|
+
) -> Response[AffiliatesListResponse | Any]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient | Client,
|
|
70
|
+
status: str | Unset = UNSET,
|
|
71
|
+
limit: int | Unset = 10,
|
|
72
|
+
page: int | Unset = 1,
|
|
73
|
+
) -> Response[AffiliatesListResponse | Any]:
|
|
74
|
+
"""List affiliates
|
|
75
|
+
|
|
76
|
+
Retrieves a list of affiliates for a store, with optional filtering by status and pagination
|
|
77
|
+
support.
|
|
78
|
+
|
|
79
|
+
**Usage:** Analyze and manage affiliates for promotional strategies.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
status (str | Unset):
|
|
83
|
+
limit (int | Unset): Default: 10.
|
|
84
|
+
page (int | Unset): Default: 1.
|
|
85
|
+
|
|
86
|
+
Raises:
|
|
87
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
88
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
Response[AffiliatesListResponse | Any]
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
kwargs = _get_kwargs(
|
|
95
|
+
status=status,
|
|
96
|
+
limit=limit,
|
|
97
|
+
page=page,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
response = client.get_httpx_client().request(
|
|
101
|
+
**kwargs,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
return _build_response(client=client, response=response)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def sync(
|
|
108
|
+
*,
|
|
109
|
+
client: AuthenticatedClient | Client,
|
|
110
|
+
status: str | Unset = UNSET,
|
|
111
|
+
limit: int | Unset = 10,
|
|
112
|
+
page: int | Unset = 1,
|
|
113
|
+
) -> AffiliatesListResponse | Any | None:
|
|
114
|
+
"""List affiliates
|
|
115
|
+
|
|
116
|
+
Retrieves a list of affiliates for a store, with optional filtering by status and pagination
|
|
117
|
+
support.
|
|
118
|
+
|
|
119
|
+
**Usage:** Analyze and manage affiliates for promotional strategies.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
status (str | Unset):
|
|
123
|
+
limit (int | Unset): Default: 10.
|
|
124
|
+
page (int | Unset): Default: 1.
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
AffiliatesListResponse | Any
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
client=client,
|
|
136
|
+
status=status,
|
|
137
|
+
limit=limit,
|
|
138
|
+
page=page,
|
|
139
|
+
).parsed
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
async def asyncio_detailed(
|
|
143
|
+
*,
|
|
144
|
+
client: AuthenticatedClient | Client,
|
|
145
|
+
status: str | Unset = UNSET,
|
|
146
|
+
limit: int | Unset = 10,
|
|
147
|
+
page: int | Unset = 1,
|
|
148
|
+
) -> Response[AffiliatesListResponse | Any]:
|
|
149
|
+
"""List affiliates
|
|
150
|
+
|
|
151
|
+
Retrieves a list of affiliates for a store, with optional filtering by status and pagination
|
|
152
|
+
support.
|
|
153
|
+
|
|
154
|
+
**Usage:** Analyze and manage affiliates for promotional strategies.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
status (str | Unset):
|
|
158
|
+
limit (int | Unset): Default: 10.
|
|
159
|
+
page (int | Unset): Default: 1.
|
|
160
|
+
|
|
161
|
+
Raises:
|
|
162
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
163
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
Response[AffiliatesListResponse | Any]
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
kwargs = _get_kwargs(
|
|
170
|
+
status=status,
|
|
171
|
+
limit=limit,
|
|
172
|
+
page=page,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
176
|
+
|
|
177
|
+
return _build_response(client=client, response=response)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
async def asyncio(
|
|
181
|
+
*,
|
|
182
|
+
client: AuthenticatedClient | Client,
|
|
183
|
+
status: str | Unset = UNSET,
|
|
184
|
+
limit: int | Unset = 10,
|
|
185
|
+
page: int | Unset = 1,
|
|
186
|
+
) -> AffiliatesListResponse | Any | None:
|
|
187
|
+
"""List affiliates
|
|
188
|
+
|
|
189
|
+
Retrieves a list of affiliates for a store, with optional filtering by status and pagination
|
|
190
|
+
support.
|
|
191
|
+
|
|
192
|
+
**Usage:** Analyze and manage affiliates for promotional strategies.
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
status (str | Unset):
|
|
196
|
+
limit (int | Unset): Default: 10.
|
|
197
|
+
page (int | Unset): Default: 1.
|
|
198
|
+
|
|
199
|
+
Raises:
|
|
200
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
201
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
202
|
+
|
|
203
|
+
Returns:
|
|
204
|
+
AffiliatesListResponse | Any
|
|
205
|
+
"""
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
await asyncio_detailed(
|
|
209
|
+
client=client,
|
|
210
|
+
status=status,
|
|
211
|
+
limit=limit,
|
|
212
|
+
page=page,
|
|
213
|
+
)
|
|
214
|
+
).parsed
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.affiliate_detail_response import AffiliateDetailResponse
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
|
|
17
|
+
_kwargs: dict[str, Any] = {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/affiliates/{id}".format(
|
|
20
|
+
id=quote(str(id), safe=""),
|
|
21
|
+
),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _kwargs
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _parse_response(
|
|
28
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
29
|
+
) -> AffiliateDetailResponse | Any | None:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = AffiliateDetailResponse.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_200
|
|
34
|
+
|
|
35
|
+
if response.status_code == 401:
|
|
36
|
+
response_401 = cast(Any, None)
|
|
37
|
+
return response_401
|
|
38
|
+
|
|
39
|
+
if response.status_code == 404:
|
|
40
|
+
response_404 = cast(Any, None)
|
|
41
|
+
return response_404
|
|
42
|
+
|
|
43
|
+
if client.raise_on_unexpected_status:
|
|
44
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
|
+
else:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _build_response(
|
|
50
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
51
|
+
) -> Response[AffiliateDetailResponse | Any]:
|
|
52
|
+
return Response(
|
|
53
|
+
status_code=HTTPStatus(response.status_code),
|
|
54
|
+
content=response.content,
|
|
55
|
+
headers=response.headers,
|
|
56
|
+
parsed=_parse_response(client=client, response=response),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def sync_detailed(
|
|
61
|
+
id: str,
|
|
62
|
+
*,
|
|
63
|
+
client: AuthenticatedClient | Client,
|
|
64
|
+
) -> Response[AffiliateDetailResponse | Any]:
|
|
65
|
+
"""Retrieve affiliate details
|
|
66
|
+
|
|
67
|
+
Retrieves details of a specific affiliate membership using its ID. It includes affiliate profile
|
|
68
|
+
information and conversion statistics.
|
|
69
|
+
|
|
70
|
+
**Usage:** Use this to get detailed insights into an individual affiliate's performance, including
|
|
71
|
+
total revenue and pending commissions.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
id (str):
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
78
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
Response[AffiliateDetailResponse | Any]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
kwargs = _get_kwargs(
|
|
85
|
+
id=id,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = client.get_httpx_client().request(
|
|
89
|
+
**kwargs,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return _build_response(client=client, response=response)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
id: str,
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient | Client,
|
|
99
|
+
) -> AffiliateDetailResponse | Any | None:
|
|
100
|
+
"""Retrieve affiliate details
|
|
101
|
+
|
|
102
|
+
Retrieves details of a specific affiliate membership using its ID. It includes affiliate profile
|
|
103
|
+
information and conversion statistics.
|
|
104
|
+
|
|
105
|
+
**Usage:** Use this to get detailed insights into an individual affiliate's performance, including
|
|
106
|
+
total revenue and pending commissions.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
id (str):
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
AffiliateDetailResponse | Any
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
return sync_detailed(
|
|
120
|
+
id=id,
|
|
121
|
+
client=client,
|
|
122
|
+
).parsed
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
async def asyncio_detailed(
|
|
126
|
+
id: str,
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient | Client,
|
|
129
|
+
) -> Response[AffiliateDetailResponse | Any]:
|
|
130
|
+
"""Retrieve affiliate details
|
|
131
|
+
|
|
132
|
+
Retrieves details of a specific affiliate membership using its ID. It includes affiliate profile
|
|
133
|
+
information and conversion statistics.
|
|
134
|
+
|
|
135
|
+
**Usage:** Use this to get detailed insights into an individual affiliate's performance, including
|
|
136
|
+
total revenue and pending commissions.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
id (str):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Response[AffiliateDetailResponse | Any]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
kwargs = _get_kwargs(
|
|
150
|
+
id=id,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
154
|
+
|
|
155
|
+
return _build_response(client=client, response=response)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def asyncio(
|
|
159
|
+
id: str,
|
|
160
|
+
*,
|
|
161
|
+
client: AuthenticatedClient | Client,
|
|
162
|
+
) -> AffiliateDetailResponse | Any | None:
|
|
163
|
+
"""Retrieve affiliate details
|
|
164
|
+
|
|
165
|
+
Retrieves details of a specific affiliate membership using its ID. It includes affiliate profile
|
|
166
|
+
information and conversion statistics.
|
|
167
|
+
|
|
168
|
+
**Usage:** Use this to get detailed insights into an individual affiliate's performance, including
|
|
169
|
+
total revenue and pending commissions.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
id (str):
|
|
173
|
+
|
|
174
|
+
Raises:
|
|
175
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
176
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
177
|
+
|
|
178
|
+
Returns:
|
|
179
|
+
AffiliateDetailResponse | Any
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
return (
|
|
183
|
+
await asyncio_detailed(
|
|
184
|
+
id=id,
|
|
185
|
+
client=client,
|
|
186
|
+
)
|
|
187
|
+
).parsed
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.affiliate_conversions import AffiliateConversions
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
id: str,
|
|
15
|
+
*,
|
|
16
|
+
limit: int | Unset = 10,
|
|
17
|
+
page: int | Unset = 1,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
params: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
params["limit"] = limit
|
|
23
|
+
|
|
24
|
+
params["page"] = page
|
|
25
|
+
|
|
26
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
27
|
+
|
|
28
|
+
_kwargs: dict[str, Any] = {
|
|
29
|
+
"method": "get",
|
|
30
|
+
"url": "/affiliates/{id}/conversions".format(
|
|
31
|
+
id=quote(str(id), safe=""),
|
|
32
|
+
),
|
|
33
|
+
"params": params,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return _kwargs
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(
|
|
40
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
41
|
+
) -> AffiliateConversions | Any | None:
|
|
42
|
+
if response.status_code == 200:
|
|
43
|
+
response_200 = AffiliateConversions.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_200
|
|
46
|
+
|
|
47
|
+
if response.status_code == 401:
|
|
48
|
+
response_401 = cast(Any, None)
|
|
49
|
+
return response_401
|
|
50
|
+
|
|
51
|
+
if response.status_code == 404:
|
|
52
|
+
response_404 = cast(Any, None)
|
|
53
|
+
return response_404
|
|
54
|
+
|
|
55
|
+
if client.raise_on_unexpected_status:
|
|
56
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
57
|
+
else:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _build_response(
|
|
62
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
63
|
+
) -> Response[AffiliateConversions | Any]:
|
|
64
|
+
return Response(
|
|
65
|
+
status_code=HTTPStatus(response.status_code),
|
|
66
|
+
content=response.content,
|
|
67
|
+
headers=response.headers,
|
|
68
|
+
parsed=_parse_response(client=client, response=response),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync_detailed(
|
|
73
|
+
id: str,
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient | Client,
|
|
76
|
+
limit: int | Unset = 10,
|
|
77
|
+
page: int | Unset = 1,
|
|
78
|
+
) -> Response[AffiliateConversions | Any]:
|
|
79
|
+
"""Get affiliate conversions
|
|
80
|
+
|
|
81
|
+
Retrieves a list of orders that are attributed to a specific affiliate based on their membership ID.
|
|
82
|
+
Provides detailed order information, including the status, amount, and commission.
|
|
83
|
+
|
|
84
|
+
**Usage:** Allows affiliates to track their performance and commissions by viewing the orders they
|
|
85
|
+
have influenced.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
id (str):
|
|
89
|
+
limit (int | Unset): Default: 10.
|
|
90
|
+
page (int | Unset): Default: 1.
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[AffiliateConversions | Any]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
kwargs = _get_kwargs(
|
|
101
|
+
id=id,
|
|
102
|
+
limit=limit,
|
|
103
|
+
page=page,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
response = client.get_httpx_client().request(
|
|
107
|
+
**kwargs,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
return _build_response(client=client, response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def sync(
|
|
114
|
+
id: str,
|
|
115
|
+
*,
|
|
116
|
+
client: AuthenticatedClient | Client,
|
|
117
|
+
limit: int | Unset = 10,
|
|
118
|
+
page: int | Unset = 1,
|
|
119
|
+
) -> AffiliateConversions | Any | None:
|
|
120
|
+
"""Get affiliate conversions
|
|
121
|
+
|
|
122
|
+
Retrieves a list of orders that are attributed to a specific affiliate based on their membership ID.
|
|
123
|
+
Provides detailed order information, including the status, amount, and commission.
|
|
124
|
+
|
|
125
|
+
**Usage:** Allows affiliates to track their performance and commissions by viewing the orders they
|
|
126
|
+
have influenced.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
id (str):
|
|
130
|
+
limit (int | Unset): Default: 10.
|
|
131
|
+
page (int | Unset): Default: 1.
|
|
132
|
+
|
|
133
|
+
Raises:
|
|
134
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
135
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
AffiliateConversions | Any
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
return sync_detailed(
|
|
142
|
+
id=id,
|
|
143
|
+
client=client,
|
|
144
|
+
limit=limit,
|
|
145
|
+
page=page,
|
|
146
|
+
).parsed
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
async def asyncio_detailed(
|
|
150
|
+
id: str,
|
|
151
|
+
*,
|
|
152
|
+
client: AuthenticatedClient | Client,
|
|
153
|
+
limit: int | Unset = 10,
|
|
154
|
+
page: int | Unset = 1,
|
|
155
|
+
) -> Response[AffiliateConversions | Any]:
|
|
156
|
+
"""Get affiliate conversions
|
|
157
|
+
|
|
158
|
+
Retrieves a list of orders that are attributed to a specific affiliate based on their membership ID.
|
|
159
|
+
Provides detailed order information, including the status, amount, and commission.
|
|
160
|
+
|
|
161
|
+
**Usage:** Allows affiliates to track their performance and commissions by viewing the orders they
|
|
162
|
+
have influenced.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
id (str):
|
|
166
|
+
limit (int | Unset): Default: 10.
|
|
167
|
+
page (int | Unset): Default: 1.
|
|
168
|
+
|
|
169
|
+
Raises:
|
|
170
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
171
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
Response[AffiliateConversions | Any]
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
kwargs = _get_kwargs(
|
|
178
|
+
id=id,
|
|
179
|
+
limit=limit,
|
|
180
|
+
page=page,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
184
|
+
|
|
185
|
+
return _build_response(client=client, response=response)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
async def asyncio(
|
|
189
|
+
id: str,
|
|
190
|
+
*,
|
|
191
|
+
client: AuthenticatedClient | Client,
|
|
192
|
+
limit: int | Unset = 10,
|
|
193
|
+
page: int | Unset = 1,
|
|
194
|
+
) -> AffiliateConversions | Any | None:
|
|
195
|
+
"""Get affiliate conversions
|
|
196
|
+
|
|
197
|
+
Retrieves a list of orders that are attributed to a specific affiliate based on their membership ID.
|
|
198
|
+
Provides detailed order information, including the status, amount, and commission.
|
|
199
|
+
|
|
200
|
+
**Usage:** Allows affiliates to track their performance and commissions by viewing the orders they
|
|
201
|
+
have influenced.
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
id (str):
|
|
205
|
+
limit (int | Unset): Default: 10.
|
|
206
|
+
page (int | Unset): Default: 1.
|
|
207
|
+
|
|
208
|
+
Raises:
|
|
209
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
210
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
211
|
+
|
|
212
|
+
Returns:
|
|
213
|
+
AffiliateConversions | Any
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
await asyncio_detailed(
|
|
218
|
+
id=id,
|
|
219
|
+
client=client,
|
|
220
|
+
limit=limit,
|
|
221
|
+
page=page,
|
|
222
|
+
)
|
|
223
|
+
).parsed
|