Versions in this module Expand all Collapse all v0 v0.1.0 Jul 15, 2026 Changes in this version + const DefaultBaseURL + const DiscountScopeCart + const DiscountScopeProducts + const DiscountScopeTags + const DiscountTypeFixed + const DiscountTypePercent + const DiscountTypeShippingFixed + const DiscountTypeShippingPercent + const MarketingCampaignGoalAwareness + const MarketingCampaignGoalConversion + const MarketingCampaignGoalLaunch + const MarketingCampaignGoalOther + const MarketingCampaignGoalRetention + const MarketingCampaignStatusArchived + const MarketingCampaignStatusCompleted + const MarketingCampaignStatusDraft + const MarketingCampaignStatusLive + const MarketingCampaignStatusPaused + func BoolPtr(b bool) *bool + func Float64Ptr(f float64) *float64 + func IntPtr(i int) *int + func StrPtr(s string) *string + type APIKeyCreateInput struct + Description *string + Scope *string + type APIKeysResource struct + func (r *APIKeysResource) Create(ctx context.Context, input APIKeyCreateInput) (JSON, error) + func (r *APIKeysResource) List(ctx context.Context) (JSON, error) + func (r *APIKeysResource) Revoke(ctx context.Context, id string) (*RevokedResult, error) + type AbandonedCartConfig struct + AccountID string + DelayHours int + DiscountCodeID *string + EmailPreview string + EmailSubject string + Enabled bool + ID string + type AbandonedCartReminder struct + AccountID string + CartID string + CartSnapshot json.RawMessage + CurrencyAtSend string + CustomerID string + DiscountCodeID *string + Email string + ExternalRef *string + ExternalSource *string + ID string + RecoveredAt *string + RecoveredBySessionID *string + SentAt string + ValueAtSend float64 + type AbandonedCartResource struct + func (r *AbandonedCartResource) GetConfig(ctx context.Context) (*AbandonedCartConfig, error) + func (r *AbandonedCartResource) ListReminders(ctx context.Context, p RemindersListParams) (*RemindersListWrap, error) + func (r *AbandonedCartResource) MarkRecovered(ctx context.Context, input MarkRecoveredInput) (*MarkRecoveredResult, error) + func (r *AbandonedCartResource) RecordReminder(ctx context.Context, input RecordReminderInput) (*RecordReminderResult, error) + func (r *AbandonedCartResource) Stats(ctx context.Context, p StatsParams) (*RecoveryStats, error) + func (r *AbandonedCartResource) UpdateConfig(ctx context.Context, patch AbandonedCartConfig) (*AbandonedCartConfig, error) + type AdminResource struct + func (r *AdminResource) ApproveKYC(ctx context.Context, id string) (JSON, error) + func (r *AdminResource) GetWorkspace(ctx context.Context, accountID string) (*PartnerWorkspace, error) + func (r *AdminResource) ListDisputes(ctx context.Context, p DisputesListParams) (JSON, error) + func (r *AdminResource) ListKYC(ctx context.Context, p KYCListParams) (JSON, error) + func (r *AdminResource) PartnerUsage(ctx context.Context, q PartnerUsageQuery) (*PartnerUsageSummary, error) + func (r *AdminResource) ProvisionWorkspace(ctx context.Context, input ProvisionWorkspaceInput) (*PartnerWorkspace, error) + func (r *AdminResource) RejectKYC(ctx context.Context, id, reason string) (JSON, error) + func (r *AdminResource) ResolveDispute(ctx context.Context, id string, input DisputeResolution) (JSON, error) + type AffiliatesListParams struct + Cursor *string + Limit *int + type AffiliatesResource struct + func (r *AffiliatesResource) List(ctx context.Context, p AffiliatesListParams) (JSON, error) + type AffiliatorProfileResource struct + func (r *AffiliatorProfileResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *AffiliatorProfileResource) Me(ctx context.Context) (JSON, error) + func (r *AffiliatorProfileResource) UpdateMe(ctx context.Context, patch JSON) (JSON, error) + type ApplicableListWrap struct + Items []PublicApplicableCode + type ApplicableParams struct + Currency *string + ProductID *string + Subtotal *float64 + Tags *string + type ArchiveResult struct + Active bool + ID string + type AttributeCheckoutStartInput struct + AccountID string + CheckoutSessionID string + CustomerID string + type AttributeCheckoutStartResult struct + AttributionID string + Stamped bool + type AttributeSignupInput struct + AccountID string + ExternalRef *string + ExternalSource *string + LinkCode string + RefereeCustomerID string + RefereeEmail string + ReferrerEmail *string + type AttributeSignupResult struct + Attribution *ReferralAttribution + type AudienceSegmentsResource struct + func (r *AudienceSegmentsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *AudienceSegmentsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *AudienceSegmentsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *AudienceSegmentsResource) List(ctx context.Context) (JSON, error) + func (r *AudienceSegmentsResource) Preview(ctx context.Context, id string, input JSON) (JSON, error) + func (r *AudienceSegmentsResource) PreviewAdhoc(ctx context.Context, input JSON) (JSON, error) + func (r *AudienceSegmentsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type AuditListParams struct + Cursor *string + EventType *string + Limit *int + Since *string + type AuditLogResource struct + func (r *AuditLogResource) List(ctx context.Context, p AuditListParams) (JSON, error) + type BillingResource struct + func (r *BillingResource) Cancel(ctx context.Context) (JSON, error) + func (r *BillingResource) Checkout(ctx context.Context, input CheckoutInput) (*CheckoutResult, error) + func (r *BillingResource) CurrentPlan(ctx context.Context) (JSON, error) + func (r *BillingResource) Invoices(ctx context.Context, p InvoicesListParams) (JSON, error) + func (r *BillingResource) Plans(ctx context.Context) ([]JSON, error) + func (r *BillingResource) Subscription(ctx context.Context) (JSON, error) + func (r *BillingResource) Usage(ctx context.Context) (JSON, error) + type BlogListParams struct + Status *BlogPostStatus + type BlogPost struct + AccountID string + AuthorName *string + Body string + CoverImage *string + CreatedAt string + Excerpt *string + ID string + MetaDescription *string + MetaTitle *string + PublishedAt *string + Slug string + Status BlogPostStatus + Tags []string + Title string + UpdatedAt string + type BlogPostInput struct + AuthorName *string + Body string + CoverImage *string + Excerpt *string + MetaDescription *string + MetaTitle *string + PublishedAt *string + Slug string + Status *BlogPostStatus + Tags []string + Title string + type BlogPostListWrap struct + Posts []BlogPost + type BlogPostStatus string + const BlogPostStatusDraft + const BlogPostStatusPublished + func StatusPtr(s BlogPostStatus) *BlogPostStatus + type BlogPostWrap struct + Post BlogPost + type BlogResource struct + func (r *BlogResource) Create(ctx context.Context, input BlogPostInput) (*BlogPostWrap, error) + func (r *BlogResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *BlogResource) Get(ctx context.Context, id string) (*BlogPostWrap, error) + func (r *BlogResource) List(ctx context.Context, p BlogListParams) (*BlogPostListWrap, error) + func (r *BlogResource) PublicGet(ctx context.Context, accountID, slug string) (*BlogPostWrap, error) + func (r *BlogResource) PublicList(ctx context.Context, accountID string) (*BlogPostListWrap, error) + func (r *BlogResource) Update(ctx context.Context, id string, patch BlogPostInput) (*BlogPostWrap, error) + type BroadcastsResource struct + func (r *BroadcastsResource) CompileTemplate(ctx context.Context, input JSON) (*CompileTemplateResult, error) + func (r *BroadcastsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *BroadcastsResource) CreateTemplate(ctx context.Context, input JSON) (JSON, error) + func (r *BroadcastsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *BroadcastsResource) List(ctx context.Context) ([]JSON, error) + func (r *BroadcastsResource) ListTemplates(ctx context.Context) (JSON, error) + func (r *BroadcastsResource) Send(ctx context.Context, id string, input JSON) (JSON, error) + func (r *BroadcastsResource) SendTest(ctx context.Context, id, to string) (JSON, error) + func (r *BroadcastsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + func (r *BroadcastsResource) UpdateTemplate(ctx context.Context, templateID string, patch JSON) (JSON, error) + type CampaignsResource struct + func (r *CampaignsResource) AcceptApplication(ctx context.Context, id, applicationID string) (JSON, error) + func (r *CampaignsResource) Analytics(ctx context.Context, id string) (JSON, error) + func (r *CampaignsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *CampaignsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *CampaignsResource) InviteCreator(ctx context.Context, id, creatorID string) (JSON, error) + func (r *CampaignsResource) List(ctx context.Context) (JSON, error) + func (r *CampaignsResource) ListApplications(ctx context.Context, id string) (JSON, error) + func (r *CampaignsResource) RejectApplication(ctx context.Context, id, applicationID string) (JSON, error) + func (r *CampaignsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type ChannelsResource struct + func (r *ChannelsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *ChannelsResource) DNS(ctx context.Context, id string) (JSON, error) + func (r *ChannelsResource) DNSRecords(ctx context.Context, id string) (JSON, error) + func (r *ChannelsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *ChannelsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *ChannelsResource) List(ctx context.Context) (JSON, error) + func (r *ChannelsResource) OAuthStart(ctx context.Context, provider string) (JSON, error) + func (r *ChannelsResource) Test(ctx context.Context, id string) (JSON, error) + func (r *ChannelsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type CheckoutInput struct + CancelURL string + PlanID string + SuccessURL string + type CheckoutResult struct + SessionID string + URL string + type Client struct + APIKeys *APIKeysResource + AbandonedCart *AbandonedCartResource + Admin *AdminResource + Affiliates *AffiliatesResource + AffiliatorProfile *AffiliatorProfileResource + AudienceSegments *AudienceSegmentsResource + AuditLog *AuditLogResource + Billing *BillingResource + Blog *BlogResource + Broadcasts *BroadcastsResource + Campaigns *CampaignsResource + Channels *ChannelsResource + Collaborations *CollaborationsResource + ContactLists *ContactListsResource + Contacts *ContactsResource + CreatorProfile *CreatorProfileResource + CreatorStats *CreatorStatsResource + DiscountCodes *DiscountCodesResource + Feeds *FeedsResource + Funnels *FunnelsResource + Inbox *InboxResource + Insights *InsightsResource + Integrations *IntegrationsResource + KYC *KYCResource + MarketingCampaigns *MarketingCampaignsResource + Marketplace *MarketplaceResource + MerchantProfile *MerchantProfileResource + Pixels *PixelsResource + Programs *ProgramsResource + Referrals *ReferralsResource + Uploads *UploadsResource + Webhooks *WebhooksResource + func NewClient(opts ClientOptions) (*Client, error) + func (c *Client) BaseURL() string + func (c *Client) Do(ctx context.Context, opts RequestOptions, out any) error + func (c *Client) ForMerchant(accountID string) *Client + func (c *Client) Passthrough(ctx context.Context, method, path string, body, out any) error + type ClientOptions struct + BaseURL string + HTTP *http.Client + KeyID string + OnBehalfOf string + Secret string + Timeout time.Duration + type CollaborationsResource struct + func (r *CollaborationsResource) Approve(ctx context.Context, id string) (JSON, error) + func (r *CollaborationsResource) ApproveCollaboration(ctx context.Context, id string) (JSON, error) + func (r *CollaborationsResource) ApproveDeliverable(ctx context.Context, id, deliverableID string) (JSON, error) + func (r *CollaborationsResource) Cancel(ctx context.Context, id string) (JSON, error) + func (r *CollaborationsResource) CancelCollaboration(ctx context.Context, id string) (JSON, error) + func (r *CollaborationsResource) FromApplication(ctx context.Context, applicationID string, input JSON) (JSON, error) + func (r *CollaborationsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *CollaborationsResource) List(ctx context.Context) (JSON, error) + func (r *CollaborationsResource) PublishDeliverable(ctx context.Context, id, deliverableID string) (JSON, error) + func (r *CollaborationsResource) RejectDeliverable(ctx context.Context, id, deliverableID, reason string) (JSON, error) + func (r *CollaborationsResource) UploadDeliverableKey(ctx context.Context, id, deliverableID string, input DeliverableUploadInput) (*SignResult, error) + type CommissionsListParams struct + Cursor *string + Limit *int + type CommissionsTrendParams struct + Days *int + type CompileTemplateResult struct + HTML string + type ContactListInput struct + Description *string + Name string + type ContactListsResource struct + func (r *ContactListsResource) AddMember(ctx context.Context, id, contactID string) (JSON, error) + func (r *ContactListsResource) Create(ctx context.Context, input ContactListInput) (JSON, error) + func (r *ContactListsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *ContactListsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *ContactListsResource) List(ctx context.Context) (JSON, error) + func (r *ContactListsResource) RemoveMember(ctx context.Context, id, contactID string) (JSON, error) + type ContactsListParams struct + Cursor *string + Limit *int + Search *string + type ContactsResource struct + func (r *ContactsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *ContactsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *ContactsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *ContactsResource) Import(ctx context.Context, input JSON) (JSON, error) + func (r *ContactsResource) List(ctx context.Context, p ContactsListParams) (JSON, error) + func (r *ContactsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type CreatorProfileResource struct + func (r *CreatorProfileResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *CreatorProfileResource) Me(ctx context.Context) (JSON, error) + func (r *CreatorProfileResource) UpdateMe(ctx context.Context, patch JSON) (JSON, error) + type CreatorStatsResource struct + func (r *CreatorStatsResource) Connect(ctx context.Context, provider string) (JSON, error) + func (r *CreatorStatsResource) Overview(ctx context.Context) (JSON, error) + type DeletedResult struct + Deleted bool + type DeliverableUploadInput struct + ContentType string + Filename string + type DiscountCode struct + AccountID string + Active bool + Code string + CreatedAt string + Currency string + Description *string + ExpiresAt *string + ID string + MaxUsesPerCustomer *int + MaxUsesTotal *int + MinPurchaseAmount *float64 + ProductIDs []string + Public bool + RedemptionCount int + Scope DiscountScope + Source *string + SourceRefID *string + StartsAt *string + TagFilter []string + Type DiscountType + UpdatedAt string + Value float64 + type DiscountCodeCreateInput struct + Active *bool + Code string + Currency string + Description *string + ExpiresAt *string + MaxUsesPerCustomer *int + MaxUsesTotal *int + MinPurchaseAmount *float64 + ProductIDs []string + Public *bool + Scope DiscountScope + StartsAt *string + TagFilter []string + Type DiscountType + Value float64 + type DiscountCodeListPage struct + HasMore bool + Items []DiscountCode + NextCursor *string + Total int + type DiscountCodesListParams struct + Active *bool + Cursor *string + Limit *int + type DiscountCodesResource struct + func (r *DiscountCodesResource) Applicable(ctx context.Context, accountID string, p ApplicableParams) (*ApplicableListWrap, error) + func (r *DiscountCodesResource) Archive(ctx context.Context, id string) (*ArchiveResult, error) + func (r *DiscountCodesResource) Create(ctx context.Context, input DiscountCodeCreateInput) (*DiscountCode, error) + func (r *DiscountCodesResource) Get(ctx context.Context, id string) (*DiscountCode, error) + func (r *DiscountCodesResource) List(ctx context.Context, p DiscountCodesListParams) (*DiscountCodeListPage, error) + func (r *DiscountCodesResource) Redeem(ctx context.Context, input RedeemInput) (*RedeemResult, error) + func (r *DiscountCodesResource) Update(ctx context.Context, id string, patch DiscountCodeCreateInput) (*DiscountCode, error) + func (r *DiscountCodesResource) Validate(ctx context.Context, input ValidateInput) (*ValidateResult, error) + type DiscountScope string + type DiscountType string + type DisputeResolution struct + Note string + Resolution string + type DisputesListParams struct + Limit *int + Status *string + type Error struct + Code string + Message string + RequestID string + Status int + func (e *Error) Error() string + type EventsListParams struct + Cursor *string + Limit *int + Type *string + type ExpirePendingResult struct + Expired int + type FeedsResource struct + func (r *FeedsResource) GetConfig(ctx context.Context) (*MerchantFeedConfig, error) + func (r *FeedsResource) GoogleFeedURL(accountID string) string + func (r *FeedsResource) UpdateConfig(ctx context.Context, patch MerchantFeedConfig) (*MerchantFeedConfig, error) + type FulfillRewardInput struct + Amount float64 + CheckoutSessionID string + Currency string + Status string + type FulfillRewardResult struct + Issued bool + Reason string + RefereeCodeID string + ReferrerCodeID string + type FunnelsResource struct + func (r *FunnelsResource) Analytics(ctx context.Context, id string) (JSON, error) + func (r *FunnelsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *FunnelsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *FunnelsResource) Enroll(ctx context.Context, id string, input JSON) (JSON, error) + func (r *FunnelsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *FunnelsResource) List(ctx context.Context) (JSON, error) + func (r *FunnelsResource) ListEnrollments(ctx context.Context, id string) (JSON, error) + func (r *FunnelsResource) SetSteps(ctx context.Context, id string, input any) (JSON, error) + func (r *FunnelsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type InboxResource struct + func (r *InboxResource) Archive(ctx context.Context, threadID string) (JSON, error) + func (r *InboxResource) GetThread(ctx context.Context, provider, handle string) (JSON, error) + func (r *InboxResource) ListThreads(ctx context.Context, p InboxThreadsListParams) (JSON, error) + func (r *InboxResource) MarkRead(ctx context.Context, threadID string) (JSON, error) + type InboxThreadsListParams struct + Cursor *string + Limit *int + type InsightsResource struct + func (r *InsightsResource) CampaignDetail(ctx context.Context, id string) (JSON, error) + func (r *InsightsResource) CommissionsTrend(ctx context.Context, p CommissionsTrendParams) (JSON, error) + func (r *InsightsResource) Overview(ctx context.Context) (JSON, error) + func (r *InsightsResource) ProgramDetail(ctx context.Context, id string) (JSON, error) + type IntegrationsResource struct + func (r *IntegrationsResource) GetEmail(ctx context.Context) (JSON, error) + func (r *IntegrationsResource) Status(ctx context.Context) (JSON, error) + func (r *IntegrationsResource) UpdateEmail(ctx context.Context, input JSON) (JSON, error) + type InvoicesListParams struct + Cursor *string + Limit *int + type IssueLinkInput struct + AccountID string + CustomerID string + type IssueLinkResult struct + Link *ReferralLink + type JSON = map[string]any + func AsJSON(v any) (JSON, error) + type KYCListParams struct + Limit *int + Status *string + type KYCResource struct + func (r *KYCResource) GetStatus(ctx context.Context) (JSON, error) + func (r *KYCResource) Submit(ctx context.Context, input JSON) (JSON, error) + type MarkRecoveredInput struct + AccountID string + CheckoutSessionID string + CompletedAt *string + CustomerID string + type MarkRecoveredResult struct + Recovered bool + ReminderID string + type MarketingCampaignCreateInput struct + BudgetIDR *int64 + Description *string + EndsAt *string + Goal MarketingCampaignGoal + Name string + Notes *string + StartsAt *string + Status MarketingCampaignStatus + type MarketingCampaignGoal string + type MarketingCampaignStatus string + type MarketingCampaignUpdateInput = MarketingCampaignCreateInput + type MarketingCampaignsListParams struct + Cursor *string + Limit *int + Status []MarketingCampaignStatus + type MarketingCampaignsResource struct + func (r *MarketingCampaignsResource) Create(ctx context.Context, input MarketingCampaignCreateInput) (JSON, error) + func (r *MarketingCampaignsResource) Delete(ctx context.Context, id string) (JSON, error) + func (r *MarketingCampaignsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *MarketingCampaignsResource) GetFull(ctx context.Context, id string) (JSON, error) + func (r *MarketingCampaignsResource) List(ctx context.Context, p MarketingCampaignsListParams) (JSON, error) + func (r *MarketingCampaignsResource) Selector(ctx context.Context) (JSON, error) + func (r *MarketingCampaignsResource) Update(ctx context.Context, id string, patch MarketingCampaignUpdateInput) (JSON, error) + type MarketplaceResource struct + func (r *MarketplaceResource) ApplyToCampaign(ctx context.Context, id string, input JSON) (JSON, error) + func (r *MarketplaceResource) GetCampaign(ctx context.Context, id string) (JSON, error) + func (r *MarketplaceResource) GetCreator(ctx context.Context, handle string) (JSON, error) + func (r *MarketplaceResource) ListCampaigns(ctx context.Context, params JSON) (JSON, error) + func (r *MarketplaceResource) ListCreators(ctx context.Context, params JSON) (JSON, error) + func (r *MarketplaceResource) MyApplications(ctx context.Context) (JSON, error) + func (r *MarketplaceResource) MyInvitations(ctx context.Context) (JSON, error) + func (r *MarketplaceResource) RespondToInvitation(ctx context.Context, invitationID string, accept bool) (JSON, error) + type MerchantFeedConfig struct + DefaultGoogleProductCategory *string + Enabled bool + IncludeUnpublished bool + type MerchantPixels struct + AccountID string + Enabled bool + GoogleAdsConversionID *string + GoogleAdsPurchaseLabel *string + GoogleAnalyticsID *string + ID string + MetaCapiAccessToken *string + MetaPixelID *string + MetaTestEventCode *string + TiktokPixelID *string + type MerchantProfileResource struct + func (r *MerchantProfileResource) GetBySlug(ctx context.Context, slug string) (JSON, error) + func (r *MerchantProfileResource) List(ctx context.Context) (JSON, error) + func (r *MerchantProfileResource) Me(ctx context.Context) (JSON, error) + func (r *MerchantProfileResource) Publish(ctx context.Context) (JSON, error) + func (r *MerchantProfileResource) Unpublish(ctx context.Context) (JSON, error) + func (r *MerchantProfileResource) UpdateMe(ctx context.Context, patch JSON) (JSON, error) + type MyReward struct + Active bool + AttributionID string + Code string + Currency string + DiscountType DiscountType + EarnedAt string + ExpiresAt *string + Redeemed bool + Role string + Value float64 + type MyRewardsListWrap struct + Items []MyReward + type PartnerUsageQuery struct + From string + Partner string + To string + type PartnerUsageSummary struct + ByMerchant []struct{ ... } + Partner string + Period struct{ ... } + Totals struct{ ... } + type PartnerWorkspace struct + AccountID string + BrandName *string + BusinessEmail *string + CreatedAt string + DiscountRate float64 + Partner string + type PixelsResource struct + func (r *PixelsResource) Get(ctx context.Context) (*MerchantPixels, error) + func (r *PixelsResource) Public(ctx context.Context, accountID string) (*PublicPixels, error) + func (r *PixelsResource) Update(ctx context.Context, patch MerchantPixels) (*MerchantPixels, error) + type ProgramStats struct + AttributedRevenue float64 + ConversionRate float64 + TotalClicks int + TotalLinks int + TotalRewards int + TotalSignups int + type ProgramsResource struct + func (r *ProgramsResource) Approve(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) ApproveEnrollment(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) Commissions(ctx context.Context, p CommissionsListParams) (JSON, error) + func (r *ProgramsResource) Create(ctx context.Context, input JSON) (JSON, error) + func (r *ProgramsResource) Delete(ctx context.Context, id string) (*DeletedResult, error) + func (r *ProgramsResource) Enrollments(ctx context.Context, id string) (JSON, error) + func (r *ProgramsResource) Get(ctx context.Context, id string) (JSON, error) + func (r *ProgramsResource) List(ctx context.Context) (JSON, error) + func (r *ProgramsResource) ListEnrollments(ctx context.Context, id string) (JSON, error) + func (r *ProgramsResource) Reject(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) RejectEnrollment(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) Revoke(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) RevokeEnrollment(ctx context.Context, id, enrollmentID string) (JSON, error) + func (r *ProgramsResource) Update(ctx context.Context, id string, patch JSON) (JSON, error) + type ProvisionWorkspaceInput struct + AccountID string + BrandName *string + BusinessEmail *string + DiscountRate float64 + Partner string + type PublicApplicableCode struct + Code string + Description *string + Eligible bool + EstimatedDiscount float64 + ExpiresAt *string + MinPurchaseAmount *float64 + Scope DiscountScope + Type DiscountType + Value float64 + type PublicPixels struct + Enabled bool + GoogleAdsConversionID *string + GoogleAdsPurchaseLabel *string + GoogleAnalyticsID *string + MetaPixelID *string + TiktokPixelID *string + type RecordClickInput struct + AccountID string + Code string + type RecordClickResult struct + LinkID string + ProgramID string + type RecordReminderInput struct + AccountID string + CartID string + CartSnapshot any + CurrencyAtSend string + CustomerID string + DiscountCodeID *string + Email string + ExternalRef *string + ExternalSource *string + ValueAtSend float64 + type RecordReminderResult struct + Created bool + ID string + Reason string + type RecoveryStats struct + CartsRecovered int + Currency *string + RecoveredValueAtSend float64 + RecoveryRate float64 + RemindersSent int + type RedeemInput struct + AccountID string + AppliedAmount float64 + AppliedShipping *float64 + CheckoutSessionID string + CustomerID *string + DiscountCodeID string + ExternalRef *string + ExternalSource *string + type RedeemResult struct + Created bool + ID string + type ReferralAttribution struct + AccountID string + ClickedAt string + CreatedAt string + ExpiresAt string + ExternalRef *string + ExternalSource *string + ID string + LinkID string + ProgramID string + QualifyingCheckoutSessionID *string + RefereeCustomerID string + RefereeRewardCodeID *string + ReferrerCustomerID string + ReferrerRewardCodeID *string + RewardedAt *string + SignedUpAt *string + Status ReferralAttributionStatus + VoidReason *string + VoidedAt *string + type ReferralAttributionStatus string + type ReferralLink struct + AccountID string + Clicks int + Code string + CreatedAt string + CustomerID string + ID string + ProgramID string + Revenue float64 + Rewards int + Signups int + type ReferralProgram struct + AccountID string + AttributionWindowDays int + CreatedAt string + Currency string + Enabled bool + ID string + MaxRewardsPerReferrer *int + MinPurchaseAmount *float64 + ProgramTerms *string + RefereeValue float64 + ReferrerValue float64 + RewardExpiryDays int + RewardType DiscountType + UpdatedAt string + type ReferralProgramInput struct + AttributionWindowDays *int + Currency string + Enabled *bool + MaxRewardsPerReferrer *int + MinPurchaseAmount *float64 + ProgramTerms *string + RefereeValue float64 + ReferrerValue float64 + RewardExpiryDays *int + RewardType DiscountType + type ReferralsResource struct + func (r *ReferralsResource) AttributeCheckoutStart(ctx context.Context, input AttributeCheckoutStartInput) (*AttributeCheckoutStartResult, error) + func (r *ReferralsResource) AttributeOnSignup(ctx context.Context, input AttributeSignupInput) (*AttributeSignupResult, error) + func (r *ReferralsResource) ExpirePending(ctx context.Context) (*ExpirePendingResult, error) + func (r *ReferralsResource) FulfillRewardOnPayment(ctx context.Context, input FulfillRewardInput) (*FulfillRewardResult, error) + func (r *ReferralsResource) GetProgram(ctx context.Context) (*ReferralProgram, error) + func (r *ReferralsResource) IssueLink(ctx context.Context, input IssueLinkInput) (*IssueLinkResult, error) + func (r *ReferralsResource) ListMyRewards(ctx context.Context, accountID, customerID string) (*MyRewardsListWrap, error) + func (r *ReferralsResource) PutProgram(ctx context.Context, input ReferralProgramInput) (*ReferralProgram, error) + func (r *ReferralsResource) RecordClick(ctx context.Context, input RecordClickInput) (*RecordClickResult, error) + func (r *ReferralsResource) ResolveLink(ctx context.Context, accountID, code string) (*ResolveLinkResult, error) + func (r *ReferralsResource) Stats(ctx context.Context) (*ProgramStats, error) + func (r *ReferralsResource) VoidAttributionOnRefund(ctx context.Context, checkoutSessionID string) (*VoidAttributionResult, error) + type RemindersListParams struct + Limit *int + type RemindersListWrap struct + Items []AbandonedCartReminder + type RequestOptions struct + Body any + IdempotencyKey string + Method string + OnBehalfOf string + Path string + type ResolveLinkResult struct + Link ReferralLink + type RevokedResult struct + Revoked bool + type SignInput struct + Bytes *int + ContentType string + Filename string + type SignResult struct + Headers map[string]string + Key string + URL string + type StatsParams struct + WindowDays *int + type UploadsResource struct + func (r *UploadsResource) GetAvatar(ctx context.Context, key *string) (JSON, error) + func (r *UploadsResource) GetDeliverable(ctx context.Context, key string) (JSON, error) + func (r *UploadsResource) GetMerchantAsset(ctx context.Context, key string) (JSON, error) + func (r *UploadsResource) Sign(ctx context.Context, input SignInput) (*SignResult, error) + func (r *UploadsResource) SignMerchant(ctx context.Context, input SignInput) (*SignResult, error) + type ValidateInput struct + AccountID string + Code string + Currency string + CustomerID *string + Items []ValidateLineItem + ShippingCost *float64 + Subtotal float64 + type ValidateLineItem struct + Price float64 + ProductID *string + Quantity int + Tags []string + type ValidateResult struct + Code *DiscountCode + DiscountAmount float64 + DiscountShipping float64 + Reason string + Valid bool + type VerifyWebhookOptions struct + Now func() time.Time + ToleranceSeconds int64 + type VoidAttributionResult struct + ClawedBack bool + Voided bool + type WebhookEndpointInput struct + Description *string + Events []string + URL string + type WebhookEvent struct + AccountID *string + Data json.RawMessage + ID string + Metadata map[string]any + OccurredAt string + Type string + func VerifyWebhook(rawBody []byte, signatureHeader, secret string, opts *VerifyWebhookOptions) (*WebhookEvent, error) + type WebhooksResource struct + func (r *WebhooksResource) CreateEndpoint(ctx context.Context, input WebhookEndpointInput) (JSON, error) + func (r *WebhooksResource) DeleteEndpoint(ctx context.Context, id string) (*DeletedResult, error) + func (r *WebhooksResource) ListEndpoints(ctx context.Context) (JSON, error) + func (r *WebhooksResource) ListEvents(ctx context.Context, p EventsListParams) (JSON, error) + func (r *WebhooksResource) UpdateEndpoint(ctx context.Context, id string, patch JSON) (JSON, error)