Documentation
¶
Overview ¶
Package ripllo is the official Go SDK for Ripllo.
It mirrors the developer-facing surface of `@forjio/ripllo-node` 0.2.2 and `ripllo` (PyPI) 0.1.x: HMAC-SHA256 partner-billing auth (Pattern 2), resource namespaces for every route group, generic `Passthrough` for partners that need to relay arbitrary merchant-portal requests, and inbound webhook verification.
Auth scheme
Authorization: Ripllo-HMAC-SHA256 keyId=<keyId>, scope=*, signature=<hex> X-Ripllo-Timestamp: <unix_seconds>
where
signature = HMAC-SHA256(secret, "{METHOD}\n{PATH}\n{TIMESTAMP}\n{BODY_SHA256}")
with an optional trailing "\n<idempotencyKey>" segment when the request carries an Idempotency-Key header.
IMPORTANT: the path is signed WITHOUT the query string. The backend verifier strips the query before reconstructing the string-to-sign; signing the full path causes a mismatch on every request that carries query params (`?limit=`, `?status=`, etc.). This is the same fix as Node SDK 0.2.x and Python SDK 0.1.x.
Index ¶
- Constants
- func BoolPtr(b bool) *bool
- func Float64Ptr(f float64) *float64
- func IntPtr(i int) *int
- func StrPtr(s string) *string
- type APIKeyCreateInput
- type APIKeysResource
- type AbandonedCartConfig
- type AbandonedCartReminder
- type AbandonedCartResource
- 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
- 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
- type AffiliatesResource
- type AffiliatorProfileResource
- type ApplicableListWrap
- type ApplicableParams
- type ArchiveResult
- type AttributeCheckoutStartInput
- type AttributeCheckoutStartResult
- type AttributeSignupInput
- type AttributeSignupResult
- type AudienceSegmentsResource
- 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
- type AuditLogResource
- type BillingResource
- 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
- type BlogPost
- type BlogPostInput
- type BlogPostListWrap
- type BlogPostStatus
- type BlogPostWrap
- type BlogResource
- 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
- 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
- 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
- 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
- type CheckoutResult
- type Client
- type ClientOptions
- type CollaborationsResource
- 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
- type CommissionsTrendParams
- type CompileTemplateResult
- type ContactListInput
- type ContactListsResource
- 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
- type ContactsResource
- 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
- type CreatorStatsResource
- type DeletedResult
- type DeliverableUploadInput
- type DiscountCode
- type DiscountCodeCreateInput
- type DiscountCodeListPage
- type DiscountCodesListParams
- type DiscountCodesResource
- 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
- type DiscountType
- type DisputeResolution
- type DisputesListParams
- type Error
- type EventsListParams
- type ExpirePendingResult
- type FeedsResource
- type FulfillRewardInput
- type FulfillRewardResult
- type FunnelsResource
- 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
- 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
- type InsightsResource
- 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
- type InvoicesListParams
- type IssueLinkInput
- type IssueLinkResult
- type JSON
- type KYCListParams
- type KYCResource
- type MarkRecoveredInput
- type MarkRecoveredResult
- type MarketingCampaignCreateInput
- type MarketingCampaignGoal
- type MarketingCampaignStatus
- type MarketingCampaignUpdateInput
- type MarketingCampaignsListParams
- type MarketingCampaignsResource
- 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
- 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
- type MerchantPixels
- type MerchantProfileResource
- 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
- type MyRewardsListWrap
- type PartnerUsageQuery
- type PartnerUsageSummary
- type PartnerWorkspace
- type PixelsResource
- type ProgramStats
- type ProgramsResource
- 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
- type PublicApplicableCode
- type PublicPixels
- type RecordClickInput
- type RecordClickResult
- type RecordReminderInput
- type RecordReminderResult
- type RecoveryStats
- type RedeemInput
- type RedeemResult
- type ReferralAttribution
- type ReferralAttributionStatus
- type ReferralLink
- type ReferralProgram
- type ReferralProgramInput
- type ReferralsResource
- 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
- type RemindersListWrap
- type RequestOptions
- type ResolveLinkResult
- type RevokedResult
- type SignInput
- type SignResult
- type StatsParams
- type UploadsResource
- 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
- type ValidateLineItem
- type ValidateResult
- type VerifyWebhookOptions
- type VoidAttributionResult
- type WebhookEndpointInput
- type WebhookEvent
- type WebhooksResource
- 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)
Constants ¶
const ( MarketingCampaignGoalAwareness MarketingCampaignGoal = "awareness" MarketingCampaignGoalConversion MarketingCampaignGoal = "conversion" MarketingCampaignGoalRetention MarketingCampaignGoal = "retention" MarketingCampaignGoalLaunch MarketingCampaignGoal = "launch" MarketingCampaignGoalOther MarketingCampaignGoal = "other" MarketingCampaignStatusDraft MarketingCampaignStatus = "draft" MarketingCampaignStatusLive MarketingCampaignStatus = "live" MarketingCampaignStatusPaused MarketingCampaignStatus = "paused" MarketingCampaignStatusCompleted MarketingCampaignStatus = "completed" MarketingCampaignStatusArchived MarketingCampaignStatus = "archived" )
const ( DiscountTypePercent DiscountType = "percent" DiscountTypeFixed DiscountType = "fixed" DiscountTypeShippingPercent DiscountType = "shipping_percent" DiscountTypeShippingFixed DiscountType = "shipping_fixed" DiscountScopeCart DiscountScope = "cart" DiscountScopeProducts DiscountScope = "products" DiscountScopeTags DiscountScope = "tags" )
const DefaultBaseURL = "https://ripllo.com"
DefaultBaseURL is the production Ripllo API base.
Variables ¶
This section is empty.
Functions ¶
func Float64Ptr ¶
Types ¶
type APIKeyCreateInput ¶
type APIKeysResource ¶
type APIKeysResource struct {
// contains filtered or unexported fields
}
func (*APIKeysResource) Create ¶
func (r *APIKeysResource) Create(ctx context.Context, input APIKeyCreateInput) (JSON, error)
func (*APIKeysResource) Revoke ¶
func (r *APIKeysResource) Revoke(ctx context.Context, id string) (*RevokedResult, error)
type AbandonedCartConfig ¶
type AbandonedCartConfig struct {
ID string `json:"id,omitempty"`
AccountID string `json:"accountId,omitempty"`
Enabled bool `json:"enabled"`
DelayHours int `json:"delayHours"`
EmailSubject string `json:"emailSubject"`
EmailPreview string `json:"emailPreview"`
DiscountCodeID *string `json:"discountCodeId"`
}
type AbandonedCartReminder ¶
type AbandonedCartReminder struct {
ID string `json:"id"`
AccountID string `json:"accountId"`
CustomerID string `json:"customerId"`
CartID string `json:"cartId"`
Email string `json:"email"`
CartSnapshot json.RawMessage `json:"cartSnapshot"`
ValueAtSend float64 `json:"valueAtSend"`
CurrencyAtSend string `json:"currencyAtSend"`
DiscountCodeID *string `json:"discountCodeId"`
ExternalSource *string `json:"externalSource"`
ExternalRef *string `json:"externalRef"`
SentAt string `json:"sentAt"`
RecoveredAt *string `json:"recoveredAt"`
RecoveredBySessionID *string `json:"recoveredBySessionId"`
}
type AbandonedCartResource ¶
type AbandonedCartResource struct {
// contains filtered or unexported fields
}
func (*AbandonedCartResource) GetConfig ¶
func (r *AbandonedCartResource) GetConfig(ctx context.Context) (*AbandonedCartConfig, error)
func (*AbandonedCartResource) ListReminders ¶
func (r *AbandonedCartResource) ListReminders(ctx context.Context, p RemindersListParams) (*RemindersListWrap, error)
func (*AbandonedCartResource) MarkRecovered ¶
func (r *AbandonedCartResource) MarkRecovered(ctx context.Context, input MarkRecoveredInput) (*MarkRecoveredResult, error)
func (*AbandonedCartResource) RecordReminder ¶
func (r *AbandonedCartResource) RecordReminder(ctx context.Context, input RecordReminderInput) (*RecordReminderResult, error)
func (*AbandonedCartResource) Stats ¶
func (r *AbandonedCartResource) Stats(ctx context.Context, p StatsParams) (*RecoveryStats, error)
func (*AbandonedCartResource) UpdateConfig ¶
func (r *AbandonedCartResource) UpdateConfig(ctx context.Context, patch AbandonedCartConfig) (*AbandonedCartConfig, error)
type AdminResource ¶
type AdminResource struct {
// contains filtered or unexported fields
}
func (*AdminResource) ApproveKYC ¶
func (*AdminResource) GetWorkspace ¶
func (r *AdminResource) GetWorkspace(ctx context.Context, accountID string) (*PartnerWorkspace, error)
func (*AdminResource) ListDisputes ¶
func (r *AdminResource) ListDisputes(ctx context.Context, p DisputesListParams) (JSON, error)
func (*AdminResource) ListKYC ¶
func (r *AdminResource) ListKYC(ctx context.Context, p KYCListParams) (JSON, error)
func (*AdminResource) PartnerUsage ¶
func (r *AdminResource) PartnerUsage(ctx context.Context, q PartnerUsageQuery) (*PartnerUsageSummary, error)
func (*AdminResource) ProvisionWorkspace ¶
func (r *AdminResource) ProvisionWorkspace(ctx context.Context, input ProvisionWorkspaceInput) (*PartnerWorkspace, error)
func (*AdminResource) ResolveDispute ¶
func (r *AdminResource) ResolveDispute(ctx context.Context, id string, input DisputeResolution) (JSON, error)
type AffiliatesListParams ¶
type AffiliatesResource ¶
type AffiliatesResource struct {
// contains filtered or unexported fields
}
func (*AffiliatesResource) List ¶
func (r *AffiliatesResource) List(ctx context.Context, p AffiliatesListParams) (JSON, error)
type AffiliatorProfileResource ¶
type AffiliatorProfileResource struct {
// contains filtered or unexported fields
}
type ApplicableListWrap ¶
type ApplicableListWrap struct {
Items []PublicApplicableCode `json:"items"`
}
type ApplicableParams ¶
type ArchiveResult ¶
type AttributeSignupInput ¶
type AttributeSignupInput struct {
AccountID string `json:"accountId"`
RefereeCustomerID string `json:"refereeCustomerId"`
RefereeEmail string `json:"refereeEmail"`
ReferrerEmail *string `json:"referrerEmail,omitempty"`
LinkCode string `json:"linkCode"`
ExternalSource *string `json:"externalSource,omitempty"`
ExternalRef *string `json:"externalRef,omitempty"`
}
type AttributeSignupResult ¶
type AttributeSignupResult struct {
Attribution *ReferralAttribution `json:"attribution"`
}
type AudienceSegmentsResource ¶
type AudienceSegmentsResource struct {
// contains filtered or unexported fields
}
func (*AudienceSegmentsResource) Delete ¶
func (r *AudienceSegmentsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*AudienceSegmentsResource) List ¶
func (r *AudienceSegmentsResource) List(ctx context.Context) (JSON, error)
func (*AudienceSegmentsResource) PreviewAdhoc ¶
type AuditListParams ¶
type AuditLogResource ¶
type AuditLogResource struct {
// contains filtered or unexported fields
}
func (*AuditLogResource) List ¶
func (r *AuditLogResource) List(ctx context.Context, p AuditListParams) (JSON, error)
type BillingResource ¶
type BillingResource struct {
// contains filtered or unexported fields
}
func (*BillingResource) Cancel ¶
func (r *BillingResource) Cancel(ctx context.Context) (JSON, error)
func (*BillingResource) Checkout ¶
func (r *BillingResource) Checkout(ctx context.Context, input CheckoutInput) (*CheckoutResult, error)
func (*BillingResource) CurrentPlan ¶
func (r *BillingResource) CurrentPlan(ctx context.Context) (JSON, error)
func (*BillingResource) Invoices ¶
func (r *BillingResource) Invoices(ctx context.Context, p InvoicesListParams) (JSON, error)
func (*BillingResource) Plans ¶
func (r *BillingResource) Plans(ctx context.Context) ([]JSON, error)
func (*BillingResource) Subscription ¶
func (r *BillingResource) Subscription(ctx context.Context) (JSON, error)
type BlogListParams ¶
type BlogListParams struct {
Status *BlogPostStatus
}
type BlogPost ¶
type BlogPost struct {
ID string `json:"id"`
AccountID string `json:"accountId"`
Slug string `json:"slug"`
Title string `json:"title"`
Excerpt *string `json:"excerpt"`
Body string `json:"body"`
CoverImage *string `json:"coverImage"`
Status BlogPostStatus `json:"status"`
PublishedAt *string `json:"publishedAt"`
AuthorName *string `json:"authorName"`
Tags []string `json:"tags"`
MetaTitle *string `json:"metaTitle"`
MetaDescription *string `json:"metaDescription"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type BlogPostInput ¶
type BlogPostInput struct {
Slug string `json:"slug"`
Title string `json:"title"`
Excerpt *string `json:"excerpt,omitempty"`
Body string `json:"body"`
CoverImage *string `json:"coverImage,omitempty"`
Status *BlogPostStatus `json:"status,omitempty"`
PublishedAt *string `json:"publishedAt,omitempty"`
AuthorName *string `json:"authorName,omitempty"`
Tags []string `json:"tags,omitempty"`
MetaTitle *string `json:"metaTitle,omitempty"`
MetaDescription *string `json:"metaDescription,omitempty"`
}
type BlogPostListWrap ¶
type BlogPostListWrap struct {
Posts []BlogPost `json:"posts"`
}
type BlogPostStatus ¶
type BlogPostStatus string
BlogPostStatus — `draft` | `published`.
const ( BlogPostStatusDraft BlogPostStatus = "draft" BlogPostStatusPublished BlogPostStatus = "published" )
func StatusPtr ¶
func StatusPtr(s BlogPostStatus) *BlogPostStatus
type BlogPostWrap ¶
type BlogPostWrap struct {
Post BlogPost `json:"post"`
}
type BlogResource ¶
type BlogResource struct {
// contains filtered or unexported fields
}
func (*BlogResource) Create ¶
func (r *BlogResource) Create(ctx context.Context, input BlogPostInput) (*BlogPostWrap, error)
func (*BlogResource) Delete ¶
func (r *BlogResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*BlogResource) Get ¶
func (r *BlogResource) Get(ctx context.Context, id string) (*BlogPostWrap, error)
func (*BlogResource) List ¶
func (r *BlogResource) List(ctx context.Context, p BlogListParams) (*BlogPostListWrap, error)
func (*BlogResource) PublicGet ¶
func (r *BlogResource) PublicGet(ctx context.Context, accountID, slug string) (*BlogPostWrap, error)
func (*BlogResource) PublicList ¶
func (r *BlogResource) PublicList(ctx context.Context, accountID string) (*BlogPostListWrap, error)
PublicList returns a slimmed list shape (no body). Decoded as generic BlogPostListWrap — the Node SDK's Pick<> shape just hides fields, the JSON is still valid against BlogPost.
func (*BlogResource) Update ¶
func (r *BlogResource) Update(ctx context.Context, id string, patch BlogPostInput) (*BlogPostWrap, error)
type BroadcastsResource ¶
type BroadcastsResource struct {
// contains filtered or unexported fields
}
func (*BroadcastsResource) CompileTemplate ¶
func (r *BroadcastsResource) CompileTemplate(ctx context.Context, input JSON) (*CompileTemplateResult, error)
func (*BroadcastsResource) CreateTemplate ¶
func (*BroadcastsResource) List ¶
func (r *BroadcastsResource) List(ctx context.Context) ([]JSON, error)
func (*BroadcastsResource) ListTemplates ¶
func (r *BroadcastsResource) ListTemplates(ctx context.Context) (JSON, error)
func (*BroadcastsResource) UpdateTemplate ¶
type CampaignsResource ¶
type CampaignsResource struct {
// contains filtered or unexported fields
}
func (*CampaignsResource) AcceptApplication ¶
func (*CampaignsResource) InviteCreator ¶
func (*CampaignsResource) List ¶
func (r *CampaignsResource) List(ctx context.Context) (JSON, error)
func (*CampaignsResource) ListApplications ¶
func (*CampaignsResource) RejectApplication ¶
type ChannelsResource ¶
type ChannelsResource struct {
// contains filtered or unexported fields
}
func (*ChannelsResource) DNSRecords ¶
func (*ChannelsResource) Delete ¶
func (r *ChannelsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*ChannelsResource) OAuthStart ¶
type CheckoutInput ¶
type CheckoutResult ¶
type Client ¶
type Client struct {
// Resource namespaces — every API surface is grouped here, matching
// the Node SDK's nested object shape.
DiscountCodes *DiscountCodesResource
Pixels *PixelsResource
Feeds *FeedsResource
Blog *BlogResource
AbandonedCart *AbandonedCartResource
Referrals *ReferralsResource
APIKeys *APIKeysResource
Webhooks *WebhooksResource
AuditLog *AuditLogResource
Integrations *IntegrationsResource
Billing *BillingResource
Uploads *UploadsResource
Campaigns *CampaignsResource
Programs *ProgramsResource
Collaborations *CollaborationsResource
Insights *InsightsResource
Channels *ChannelsResource
Contacts *ContactsResource
ContactLists *ContactListsResource
Broadcasts *BroadcastsResource
// MarketingCampaigns is the top-level marketing-campaign hub
// (/api/v1/marketing-campaigns). It is now a SEPARATE resource
// from Broadcasts — pre-v0.5 it was a deprecated alias of
// Broadcasts (when /api/v1/marketing-campaigns served email
// blasts). The hub took over that URL in PR #11; the alias was
// removed in PR #13.
MarketingCampaigns *MarketingCampaignsResource
Funnels *FunnelsResource
Inbox *InboxResource
AudienceSegments *AudienceSegmentsResource
MerchantProfile *MerchantProfileResource
CreatorProfile *CreatorProfileResource
AffiliatorProfile *AffiliatorProfileResource
Marketplace *MarketplaceResource
Affiliates *AffiliatesResource
KYC *KYCResource
CreatorStats *CreatorStatsResource
Admin *AdminResource
// contains filtered or unexported fields
}
Client is the high-level SDK surface. Construct via NewClient.
Concurrency-safe: every method is safe for use from multiple goroutines. ForMerchant returns a shallow clone that shares the underlying *http.Client.
func NewClient ¶
func NewClient(opts ClientOptions) (*Client, error)
NewClient constructs a Client. KeyID + Secret are required (env fallback is checked first).
func (*Client) BaseURL ¶
BaseURL returns the configured base URL. Useful for building public-facing URLs (e.g. `feeds.GoogleFeedURL`).
func (*Client) Do ¶
Do dispatches a signed request and decodes the `data` envelope into out. Pass out=nil to discard the response. Errors surface as *Error.
out may also be a *json.RawMessage to capture the raw `data` field without decoding.
func (*Client) ForMerchant ¶
ForMerchant returns a clone scoped to a specific merchant accountId, added as `X-Ripllo-On-Behalf-Of` on every request. Use with platform-admin keys.
func (*Client) Passthrough ¶
Passthrough forwards an arbitrary merchant-portal request to Ripllo and decodes the resulting envelope `data` into out. For partners (storlaunch / fulkruma) that need to relay arbitrary requests without hand-writing a typed method per resource.
type ClientOptions ¶
type ClientOptions struct {
KeyID string // defaults to RIPLLO_KEY_ID
Secret string // defaults to RIPLLO_SECRET
BaseURL string // defaults to RIPLLO_BASE_URL, then DefaultBaseURL
OnBehalfOf string // optional merchant accountId for X-Ripllo-On-Behalf-Of
Timeout time.Duration // per-request timeout, default 30s
HTTP *http.Client // custom client; defaults to http.DefaultClient
}
ClientOptions matches the env-var defaults of the Node + Python SDKs. KeyID + Secret default to RIPLLO_KEY_ID + RIPLLO_SECRET when blank. BaseURL defaults to RIPLLO_BASE_URL, then DefaultBaseURL.
type CollaborationsResource ¶
type CollaborationsResource struct {
// contains filtered or unexported fields
}
func (*CollaborationsResource) ApproveCollaboration ¶
func (*CollaborationsResource) ApproveDeliverable ¶
func (*CollaborationsResource) CancelCollaboration ¶
func (*CollaborationsResource) FromApplication ¶
func (*CollaborationsResource) List ¶
func (r *CollaborationsResource) List(ctx context.Context) (JSON, error)
func (*CollaborationsResource) PublishDeliverable ¶
func (*CollaborationsResource) RejectDeliverable ¶
func (*CollaborationsResource) UploadDeliverableKey ¶
func (r *CollaborationsResource) UploadDeliverableKey(ctx context.Context, id, deliverableID string, input DeliverableUploadInput) (*SignResult, error)
type CommissionsListParams ¶
type CommissionsTrendParams ¶
type CommissionsTrendParams struct {
Days *int
}
type CompileTemplateResult ¶
type CompileTemplateResult struct {
HTML string `json:"html"`
}
type ContactListInput ¶
type ContactListsResource ¶
type ContactListsResource struct {
// contains filtered or unexported fields
}
func (*ContactListsResource) Create ¶
func (r *ContactListsResource) Create(ctx context.Context, input ContactListInput) (JSON, error)
func (*ContactListsResource) Delete ¶
func (r *ContactListsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*ContactListsResource) List ¶
func (r *ContactListsResource) List(ctx context.Context) (JSON, error)
func (*ContactListsResource) RemoveMember ¶
type ContactsListParams ¶
type ContactsResource ¶
type ContactsResource struct {
// contains filtered or unexported fields
}
func (*ContactsResource) Delete ¶
func (r *ContactsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*ContactsResource) List ¶
func (r *ContactsResource) List(ctx context.Context, p ContactsListParams) (JSON, error)
type CreatorProfileResource ¶
type CreatorProfileResource struct {
// contains filtered or unexported fields
}
type CreatorStatsResource ¶
type CreatorStatsResource struct {
// contains filtered or unexported fields
}
type DeletedResult ¶
type DeletedResult struct {
Deleted bool `json:"deleted"`
}
type DeliverableUploadInput ¶
type DiscountCode ¶
type DiscountCode struct {
ID string `json:"id"`
AccountID string `json:"accountId"`
Code string `json:"code"`
Description *string `json:"description"`
Type DiscountType `json:"type"`
Value float64 `json:"value"`
Currency string `json:"currency"`
Scope DiscountScope `json:"scope"`
ProductIDs []string `json:"productIds"`
TagFilter []string `json:"tagFilter"`
MinPurchaseAmount *float64 `json:"minPurchaseAmount"`
MaxUsesTotal *int `json:"maxUsesTotal"`
MaxUsesPerCustomer *int `json:"maxUsesPerCustomer"`
StartsAt *string `json:"startsAt"`
ExpiresAt *string `json:"expiresAt"`
Active bool `json:"active"`
Public bool `json:"public"`
RedemptionCount int `json:"redemptionCount"`
Source *string `json:"source"`
SourceRefID *string `json:"sourceRefId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type DiscountCodeCreateInput ¶
type DiscountCodeCreateInput struct {
Code string `json:"code"`
Description *string `json:"description,omitempty"`
Type DiscountType `json:"type"`
Value float64 `json:"value"`
Currency string `json:"currency"`
Scope DiscountScope `json:"scope,omitempty"`
ProductIDs []string `json:"productIds,omitempty"`
TagFilter []string `json:"tagFilter,omitempty"`
MinPurchaseAmount *float64 `json:"minPurchaseAmount,omitempty"`
MaxUsesTotal *int `json:"maxUsesTotal,omitempty"`
MaxUsesPerCustomer *int `json:"maxUsesPerCustomer,omitempty"`
StartsAt *string `json:"startsAt,omitempty"`
ExpiresAt *string `json:"expiresAt,omitempty"`
Active *bool `json:"active,omitempty"`
Public *bool `json:"public,omitempty"`
}
DiscountCodeCreateInput — fields for `discountCodes.Create`. Pointer fields are optional (omitted when nil).
type DiscountCodeListPage ¶
type DiscountCodeListPage struct {
Items []DiscountCode `json:"items"`
Total int `json:"total"`
NextCursor *string `json:"nextCursor"`
HasMore bool `json:"hasMore"`
}
type DiscountCodesListParams ¶
type DiscountCodesResource ¶
type DiscountCodesResource struct {
// contains filtered or unexported fields
}
func (*DiscountCodesResource) Applicable ¶
func (r *DiscountCodesResource) Applicable(ctx context.Context, accountID string, p ApplicableParams) (*ApplicableListWrap, error)
Applicable returns public applicable codes for a storefront teaser.
func (*DiscountCodesResource) Archive ¶
func (r *DiscountCodesResource) Archive(ctx context.Context, id string) (*ArchiveResult, error)
func (*DiscountCodesResource) Create ¶
func (r *DiscountCodesResource) Create(ctx context.Context, input DiscountCodeCreateInput) (*DiscountCode, error)
func (*DiscountCodesResource) Get ¶
func (r *DiscountCodesResource) Get(ctx context.Context, id string) (*DiscountCode, error)
func (*DiscountCodesResource) List ¶
func (r *DiscountCodesResource) List(ctx context.Context, p DiscountCodesListParams) (*DiscountCodeListPage, error)
func (*DiscountCodesResource) Redeem ¶
func (r *DiscountCodesResource) Redeem(ctx context.Context, input RedeemInput) (*RedeemResult, error)
Redeem — idempotent redemption. Call from your payment-success path.
func (*DiscountCodesResource) Update ¶
func (r *DiscountCodesResource) Update(ctx context.Context, id string, patch DiscountCodeCreateInput) (*DiscountCode, error)
Update — patch is a partial DiscountCodeCreateInput. Use pointers to indicate which fields to send.
func (*DiscountCodesResource) Validate ¶
func (r *DiscountCodesResource) Validate(ctx context.Context, input ValidateInput) (*ValidateResult, error)
Validate — read-only validation for cart preview.
type DiscountType ¶
type DiscountType string
DiscountType — `percent` | `fixed` | `shipping_percent` | `shipping_fixed`.
type DisputeResolution ¶
type DisputesListParams ¶
type Error ¶
Error is the single error type returned by every operation in this package. Mirrors the Node `RiplloError` and Python `RiplloError` shape so callers can branch on .Code without matching strings.
Status is the HTTP status code, or 0 for transport-level errors (network, timeout, non-JSON response received before the request reached the API). Code is the machine-readable error code — for server-side errors this is `envelope.error.code`; for client-side failures one of `timeout` / `network_error` / `invalid_response` / `unknown`. RequestID is the `meta.requestId` field of the envelope, when present.
type EventsListParams ¶
type ExpirePendingResult ¶
type ExpirePendingResult struct {
Expired int `json:"expired"`
}
type FeedsResource ¶
type FeedsResource struct {
// contains filtered or unexported fields
}
func (*FeedsResource) GetConfig ¶
func (r *FeedsResource) GetConfig(ctx context.Context) (*MerchantFeedConfig, error)
func (*FeedsResource) GoogleFeedURL ¶
func (r *FeedsResource) GoogleFeedURL(accountID string) string
GoogleFeedURL builds the public XML feed URL — no signing required.
func (*FeedsResource) UpdateConfig ¶
func (r *FeedsResource) UpdateConfig(ctx context.Context, patch MerchantFeedConfig) (*MerchantFeedConfig, error)
type FulfillRewardInput ¶
type FulfillRewardResult ¶
type FunnelsResource ¶
type FunnelsResource struct {
// contains filtered or unexported fields
}
func (*FunnelsResource) Delete ¶
func (r *FunnelsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*FunnelsResource) ListEnrollments ¶
type InboxResource ¶
type InboxResource struct {
// contains filtered or unexported fields
}
func (*InboxResource) ListThreads ¶
func (r *InboxResource) ListThreads(ctx context.Context, p InboxThreadsListParams) (JSON, error)
type InboxThreadsListParams ¶
type InsightsResource ¶
type InsightsResource struct {
// contains filtered or unexported fields
}
func (*InsightsResource) CampaignDetail ¶
func (*InsightsResource) CommissionsTrend ¶
func (r *InsightsResource) CommissionsTrend(ctx context.Context, p CommissionsTrendParams) (JSON, error)
func (*InsightsResource) Overview ¶
func (r *InsightsResource) Overview(ctx context.Context) (JSON, error)
func (*InsightsResource) ProgramDetail ¶
type IntegrationsResource ¶
type IntegrationsResource struct {
// contains filtered or unexported fields
}
func (*IntegrationsResource) GetEmail ¶
func (r *IntegrationsResource) GetEmail(ctx context.Context) (JSON, error)
func (*IntegrationsResource) Status ¶
func (r *IntegrationsResource) Status(ctx context.Context) (JSON, error)
func (*IntegrationsResource) UpdateEmail ¶
type InvoicesListParams ¶
type IssueLinkInput ¶
type IssueLinkResult ¶
type IssueLinkResult struct {
Link *ReferralLink `json:"link"`
}
type JSON ¶
JSON is the generic untyped response shape used by the resource methods that don't have a fully-modeled struct yet (most marketing routes). It's a thin alias for map[string]any so callers can decode once and JSON.Unmarshal into a stricter type if they want.
type KYCListParams ¶
type KYCResource ¶
type KYCResource struct {
// contains filtered or unexported fields
}
type MarkRecoveredInput ¶
type MarkRecoveredResult ¶
type MarketingCampaignCreateInput ¶
type MarketingCampaignCreateInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Goal MarketingCampaignGoal `json:"goal,omitempty"`
Status MarketingCampaignStatus `json:"status,omitempty"`
BudgetIDR *int64 `json:"budgetIdr,omitempty"`
StartsAt *string `json:"startsAt,omitempty"`
EndsAt *string `json:"endsAt,omitempty"`
Notes *string `json:"notes,omitempty"`
}
MarketingCampaignCreateInput — payload for POST /marketing-campaigns.
`omitempty` on optional fields keeps wire payloads small; the pointer-typed fields are NULL-allowing so callers can explicitly clear server-side values.
type MarketingCampaignGoal ¶
type MarketingCampaignGoal string
MarketingCampaignGoal — `awareness` | `conversion` | `retention` | `launch` | `other`.
type MarketingCampaignStatus ¶
type MarketingCampaignStatus string
MarketingCampaignStatus — `draft` | `live` | `paused` | `completed` | `archived`.
type MarketingCampaignUpdateInput ¶
type MarketingCampaignUpdateInput = MarketingCampaignCreateInput
type MarketingCampaignsListParams ¶
type MarketingCampaignsListParams struct {
Status []MarketingCampaignStatus
Limit *int
Cursor *string
}
MarketingCampaignsListParams — narrow filters for List.
Status is comma-joined when sent; a single string is also accepted verbatim. Limit / Cursor mirror the standard Ripllo paging shape; the backend isn't paged yet but the fields are passed through for forward-compat.
type MarketingCampaignsResource ¶
type MarketingCampaignsResource struct {
// contains filtered or unexported fields
}
func (*MarketingCampaignsResource) Create ¶
func (r *MarketingCampaignsResource) Create(ctx context.Context, input MarketingCampaignCreateInput) (JSON, error)
func (*MarketingCampaignsResource) Delete ¶
Delete — soft-delete via status='archived' on the server.
func (*MarketingCampaignsResource) GetFull ¶
GetFull — GET /:id/full — hub + all linked children + perf roll-up.
func (*MarketingCampaignsResource) List ¶
func (r *MarketingCampaignsResource) List(ctx context.Context, p MarketingCampaignsListParams) (JSON, error)
func (*MarketingCampaignsResource) Selector ¶
func (r *MarketingCampaignsResource) Selector(ctx context.Context) (JSON, error)
Selector — GET /_/selector — lightweight dropdown payload (non-archived).
func (*MarketingCampaignsResource) Update ¶
func (r *MarketingCampaignsResource) Update(ctx context.Context, id string, patch MarketingCampaignUpdateInput) (JSON, error)
type MarketplaceResource ¶
type MarketplaceResource struct {
// contains filtered or unexported fields
}
func (*MarketplaceResource) ApplyToCampaign ¶
func (*MarketplaceResource) GetCampaign ¶
func (*MarketplaceResource) GetCreator ¶
func (*MarketplaceResource) ListCampaigns ¶
func (*MarketplaceResource) ListCreators ¶
func (*MarketplaceResource) MyApplications ¶
func (r *MarketplaceResource) MyApplications(ctx context.Context) (JSON, error)
func (*MarketplaceResource) MyInvitations ¶
func (r *MarketplaceResource) MyInvitations(ctx context.Context) (JSON, error)
func (*MarketplaceResource) RespondToInvitation ¶
type MerchantFeedConfig ¶
type MerchantPixels ¶
type MerchantPixels struct {
ID string `json:"id,omitempty"`
AccountID string `json:"accountId,omitempty"`
MetaPixelID *string `json:"metaPixelId"`
MetaCapiAccessToken *string `json:"metaCapiAccessToken,omitempty"`
MetaTestEventCode *string `json:"metaTestEventCode,omitempty"`
GoogleAnalyticsID *string `json:"googleAnalyticsId"`
GoogleAdsConversionID *string `json:"googleAdsConversionId"`
GoogleAdsPurchaseLabel *string `json:"googleAdsPurchaseLabel"`
TiktokPixelID *string `json:"tiktokPixelId"`
Enabled bool `json:"enabled"`
}
type MerchantProfileResource ¶
type MerchantProfileResource struct {
// contains filtered or unexported fields
}
func (*MerchantProfileResource) List ¶
func (r *MerchantProfileResource) List(ctx context.Context) (JSON, error)
func (*MerchantProfileResource) Me ¶
func (r *MerchantProfileResource) Me(ctx context.Context) (JSON, error)
func (*MerchantProfileResource) Publish ¶
func (r *MerchantProfileResource) Publish(ctx context.Context) (JSON, error)
type MyReward ¶
type MyReward struct {
Role string `json:"role"` // "referrer" | "referee"
AttributionID string `json:"attributionId"`
Code string `json:"code"`
DiscountType DiscountType `json:"discountType"`
Value float64 `json:"value"`
Currency string `json:"currency"`
ExpiresAt *string `json:"expiresAt"`
Redeemed bool `json:"redeemed"`
Active bool `json:"active"`
EarnedAt string `json:"earnedAt"`
}
type MyRewardsListWrap ¶
type MyRewardsListWrap struct {
Items []MyReward `json:"items"`
}
type PartnerUsageQuery ¶
type PartnerUsageSummary ¶
type PartnerUsageSummary struct {
Partner string `json:"partner"`
Period struct {
From string `json:"from"`
To string `json:"to"`
} `json:"period"`
Totals struct {
Redemptions int `json:"redemptions"`
ReferralRewards int `json:"referralRewards"`
Reminders int `json:"reminders"`
ChargeableCents int `json:"chargeableCents"`
} `json:"totals"`
ByMerchant []struct {
AccountID string `json:"accountId"`
Redemptions int `json:"redemptions"`
ReferralRewards int `json:"referralRewards"`
Reminders int `json:"reminders"`
ChargeableCents int `json:"chargeableCents"`
} `json:"byMerchant"`
}
type PartnerWorkspace ¶
type PixelsResource ¶
type PixelsResource struct {
// contains filtered or unexported fields
}
func (*PixelsResource) Get ¶
func (r *PixelsResource) Get(ctx context.Context) (*MerchantPixels, error)
func (*PixelsResource) Public ¶
func (r *PixelsResource) Public(ctx context.Context, accountID string) (*PublicPixels, error)
Public — storefront-public read, never returns CAPI secret.
func (*PixelsResource) Update ¶
func (r *PixelsResource) Update(ctx context.Context, patch MerchantPixels) (*MerchantPixels, error)
type ProgramStats ¶
type ProgramsResource ¶
type ProgramsResource struct {
// contains filtered or unexported fields
}
func (*ProgramsResource) ApproveEnrollment ¶
func (*ProgramsResource) Commissions ¶
func (r *ProgramsResource) Commissions(ctx context.Context, p CommissionsListParams) (JSON, error)
func (*ProgramsResource) Delete ¶
func (r *ProgramsResource) Delete(ctx context.Context, id string) (*DeletedResult, error)
func (*ProgramsResource) Enrollments ¶
func (*ProgramsResource) ListEnrollments ¶
func (*ProgramsResource) RejectEnrollment ¶
func (*ProgramsResource) RevokeEnrollment ¶
type ProvisionWorkspaceInput ¶
type PublicApplicableCode ¶
type PublicApplicableCode struct {
Code string `json:"code"`
Description *string `json:"description"`
Type DiscountType `json:"type"`
Value float64 `json:"value"`
Scope DiscountScope `json:"scope"`
MinPurchaseAmount *float64 `json:"minPurchaseAmount"`
ExpiresAt *string `json:"expiresAt"`
EstimatedDiscount float64 `json:"estimatedDiscount"`
Eligible bool `json:"eligible"`
}
type PublicPixels ¶
type PublicPixels struct {
MetaPixelID *string `json:"metaPixelId"`
GoogleAnalyticsID *string `json:"googleAnalyticsId"`
GoogleAdsConversionID *string `json:"googleAdsConversionId"`
GoogleAdsPurchaseLabel *string `json:"googleAdsPurchaseLabel"`
TiktokPixelID *string `json:"tiktokPixelId"`
Enabled bool `json:"enabled"`
}
type RecordClickInput ¶
type RecordClickResult ¶
type RecordReminderInput ¶
type RecordReminderInput struct {
AccountID string `json:"accountId"`
CustomerID string `json:"customerId"`
CartID string `json:"cartId"`
Email string `json:"email"`
CartSnapshot any `json:"cartSnapshot"`
ValueAtSend float64 `json:"valueAtSend"`
CurrencyAtSend string `json:"currencyAtSend"`
DiscountCodeID *string `json:"discountCodeId,omitempty"`
ExternalSource *string `json:"externalSource,omitempty"`
ExternalRef *string `json:"externalRef,omitempty"`
}
type RecordReminderResult ¶
type RecoveryStats ¶
type RedeemInput ¶
type RedeemInput struct {
AccountID string `json:"accountId"`
DiscountCodeID string `json:"discountCodeId"`
CheckoutSessionID string `json:"checkoutSessionId"`
CustomerID *string `json:"customerId,omitempty"`
AppliedAmount float64 `json:"appliedAmount"`
AppliedShipping *float64 `json:"appliedShipping,omitempty"`
ExternalSource *string `json:"externalSource,omitempty"`
ExternalRef *string `json:"externalRef,omitempty"`
}
type RedeemResult ¶
type ReferralAttribution ¶
type ReferralAttribution struct {
ID string `json:"id"`
ProgramID string `json:"programId"`
AccountID string `json:"accountId"`
LinkID string `json:"linkId"`
ReferrerCustomerID string `json:"referrerCustomerId"`
RefereeCustomerID string `json:"refereeCustomerId"`
Status ReferralAttributionStatus `json:"status"`
ReferrerRewardCodeID *string `json:"referrerRewardCodeId"`
RefereeRewardCodeID *string `json:"refereeRewardCodeId"`
QualifyingCheckoutSessionID *string `json:"qualifyingCheckoutSessionId"`
ExpiresAt string `json:"expiresAt"`
ExternalSource *string `json:"externalSource"`
ExternalRef *string `json:"externalRef"`
ClickedAt string `json:"clickedAt"`
SignedUpAt *string `json:"signedUpAt"`
RewardedAt *string `json:"rewardedAt"`
VoidedAt *string `json:"voidedAt"`
VoidReason *string `json:"voidReason"`
CreatedAt string `json:"createdAt"`
}
type ReferralAttributionStatus ¶
type ReferralAttributionStatus string
ReferralAttributionStatus — `pending` | `rewarded` | `voided` | `expired`.
type ReferralLink ¶
type ReferralLink struct {
ID string `json:"id"`
ProgramID string `json:"programId"`
AccountID string `json:"accountId"`
CustomerID string `json:"customerId"`
Code string `json:"code"`
Clicks int `json:"clicks"`
Signups int `json:"signups"`
Rewards int `json:"rewards"`
Revenue float64 `json:"revenue"`
CreatedAt string `json:"createdAt"`
}
type ReferralProgram ¶
type ReferralProgram struct {
ID string `json:"id"`
AccountID string `json:"accountId"`
Enabled bool `json:"enabled"`
RewardType DiscountType `json:"rewardType"`
ReferrerValue float64 `json:"referrerValue"`
RefereeValue float64 `json:"refereeValue"`
Currency string `json:"currency"`
MinPurchaseAmount *float64 `json:"minPurchaseAmount"`
RewardExpiryDays int `json:"rewardExpiryDays"`
AttributionWindowDays int `json:"attributionWindowDays"`
MaxRewardsPerReferrer *int `json:"maxRewardsPerReferrer"`
ProgramTerms *string `json:"programTerms"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ReferralProgramInput ¶
type ReferralProgramInput struct {
Enabled *bool `json:"enabled,omitempty"`
RewardType DiscountType `json:"rewardType"`
ReferrerValue float64 `json:"referrerValue"`
RefereeValue float64 `json:"refereeValue"`
Currency string `json:"currency"`
MinPurchaseAmount *float64 `json:"minPurchaseAmount,omitempty"`
RewardExpiryDays *int `json:"rewardExpiryDays,omitempty"`
AttributionWindowDays *int `json:"attributionWindowDays,omitempty"`
MaxRewardsPerReferrer *int `json:"maxRewardsPerReferrer,omitempty"`
ProgramTerms *string `json:"programTerms,omitempty"`
}
type ReferralsResource ¶
type ReferralsResource struct {
// contains filtered or unexported fields
}
func (*ReferralsResource) AttributeCheckoutStart ¶
func (r *ReferralsResource) AttributeCheckoutStart(ctx context.Context, input AttributeCheckoutStartInput) (*AttributeCheckoutStartResult, error)
func (*ReferralsResource) AttributeOnSignup ¶
func (r *ReferralsResource) AttributeOnSignup(ctx context.Context, input AttributeSignupInput) (*AttributeSignupResult, error)
func (*ReferralsResource) ExpirePending ¶
func (r *ReferralsResource) ExpirePending(ctx context.Context) (*ExpirePendingResult, error)
func (*ReferralsResource) FulfillRewardOnPayment ¶
func (r *ReferralsResource) FulfillRewardOnPayment(ctx context.Context, input FulfillRewardInput) (*FulfillRewardResult, error)
func (*ReferralsResource) GetProgram ¶
func (r *ReferralsResource) GetProgram(ctx context.Context) (*ReferralProgram, error)
func (*ReferralsResource) IssueLink ¶
func (r *ReferralsResource) IssueLink(ctx context.Context, input IssueLinkInput) (*IssueLinkResult, error)
func (*ReferralsResource) ListMyRewards ¶
func (r *ReferralsResource) ListMyRewards(ctx context.Context, accountID, customerID string) (*MyRewardsListWrap, error)
func (*ReferralsResource) PutProgram ¶
func (r *ReferralsResource) PutProgram(ctx context.Context, input ReferralProgramInput) (*ReferralProgram, error)
func (*ReferralsResource) RecordClick ¶
func (r *ReferralsResource) RecordClick(ctx context.Context, input RecordClickInput) (*RecordClickResult, error)
func (*ReferralsResource) ResolveLink ¶
func (r *ReferralsResource) ResolveLink(ctx context.Context, accountID, code string) (*ResolveLinkResult, error)
func (*ReferralsResource) Stats ¶
func (r *ReferralsResource) Stats(ctx context.Context) (*ProgramStats, error)
func (*ReferralsResource) VoidAttributionOnRefund ¶
func (r *ReferralsResource) VoidAttributionOnRefund(ctx context.Context, checkoutSessionID string) (*VoidAttributionResult, error)
type RemindersListParams ¶
type RemindersListParams struct {
Limit *int
}
type RemindersListWrap ¶
type RemindersListWrap struct {
Items []AbandonedCartReminder `json:"items"`
}
type RequestOptions ¶
type RequestOptions struct {
Method string // GET / POST / PATCH / PUT / DELETE
Path string // full URL path including any querystring (e.g. "/api/v1/x?limit=5")
Body any // optional; JSON-encoded if non-nil
IdempotencyKey string // optional
OnBehalfOf string // overrides Client.defaultOnBehalfOf
}
RequestOptions configures a single Do call.
type ResolveLinkResult ¶
type ResolveLinkResult struct {
Link ReferralLink `json:"link"`
}
type RevokedResult ¶
type RevokedResult struct {
Revoked bool `json:"revoked"`
}
type SignResult ¶
type StatsParams ¶
type StatsParams struct {
WindowDays *int
}
type UploadsResource ¶
type UploadsResource struct {
// contains filtered or unexported fields
}
func (*UploadsResource) GetDeliverable ¶
func (*UploadsResource) GetMerchantAsset ¶
func (*UploadsResource) Sign ¶
func (r *UploadsResource) Sign(ctx context.Context, input SignInput) (*SignResult, error)
func (*UploadsResource) SignMerchant ¶
func (r *UploadsResource) SignMerchant(ctx context.Context, input SignInput) (*SignResult, error)
type ValidateInput ¶
type ValidateInput struct {
AccountID string `json:"accountId"`
Code string `json:"code"`
Subtotal float64 `json:"subtotal"`
Currency string `json:"currency"`
ShippingCost *float64 `json:"shippingCost,omitempty"`
CustomerID *string `json:"customerId,omitempty"`
Items []ValidateLineItem `json:"items,omitempty"`
}
type ValidateLineItem ¶
type ValidateResult ¶
type ValidateResult struct {
Valid bool `json:"valid"`
Code *DiscountCode `json:"code,omitempty"`
Reason string `json:"reason,omitempty"`
DiscountAmount float64 `json:"discountAmount"`
DiscountShipping float64 `json:"discountShipping"`
}
type VerifyWebhookOptions ¶
type VerifyWebhookOptions struct {
// ToleranceSeconds rejects signatures with a timestamp older than this
// many seconds. Zero or negative means "use the default" (300).
ToleranceSeconds int64
// Now is the clock used for the freshness check. Nil means time.Now.
// Useful in tests.
Now func() time.Time
}
VerifyWebhookOptions tunes the webhook verifier. Pass nil to use the defaults (300 s tolerance, time.Now clock).
type VoidAttributionResult ¶
type WebhookEndpointInput ¶
type WebhookEvent ¶
type WebhookEvent struct {
ID string `json:"id"`
Type string `json:"type"`
OccurredAt string `json:"occurredAt"`
AccountID *string `json:"accountId"`
Data json.RawMessage `json:"data"`
Metadata map[string]any `json:"metadata"`
}
WebhookEvent is the parsed envelope returned by VerifyWebhook. Data is left as raw JSON so callers can decode into a concrete type.
func VerifyWebhook ¶
func VerifyWebhook(rawBody []byte, signatureHeader, secret string, opts *VerifyWebhookOptions) (*WebhookEvent, error)
VerifyWebhook verifies an inbound Ripllo webhook signature and returns the parsed event envelope.
Header: `Ripllo-Signature: t=<unix>,v1=<hex>` Signed payload: `${t}.${rawBody}` with HMAC-SHA256 keyed on the endpoint's shared secret.
IMPORTANT: pass the raw bytes you received over the wire. If you let a framework parse JSON first and re-stringify, whitespace drift will break the signature.
Mirrors Node `verifyWebhook` + Python `verify_webhook`.
type WebhooksResource ¶
type WebhooksResource struct {
// contains filtered or unexported fields
}
func (*WebhooksResource) CreateEndpoint ¶
func (r *WebhooksResource) CreateEndpoint(ctx context.Context, input WebhookEndpointInput) (JSON, error)
func (*WebhooksResource) DeleteEndpoint ¶
func (r *WebhooksResource) DeleteEndpoint(ctx context.Context, id string) (*DeletedResult, error)
func (*WebhooksResource) ListEndpoints ¶
func (r *WebhooksResource) ListEndpoints(ctx context.Context) (JSON, error)
func (*WebhooksResource) ListEvents ¶
func (r *WebhooksResource) ListEvents(ctx context.Context, p EventsListParams) (JSON, error)