Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AccountDashboardLinkResponse
- type AccountGetResponse
- type AccountGetResponseAccountType
- type AccountGetResponseOrganization
- type AccountGetResponseOrganizationsFeatureSettings
- type AccountGetResponseOrganizationsProfileSettings
- type AccountGetResponseOrganizationsProfileSettingsSubscribe
- type AccountGetResponseStatus
- type AccountGetResponseUser
- type AccountNewParams
- type AccountNewParamsAccountType
- type AccountNewResponse
- type AccountNewResponseAccountType
- type AccountNewResponseOrganization
- type AccountNewResponseOrganizationsFeatureSettings
- type AccountNewResponseOrganizationsProfileSettings
- type AccountNewResponseOrganizationsProfileSettingsSubscribe
- type AccountNewResponseStatus
- type AccountNewResponseUser
- type AccountOnboardingLinkParams
- type AccountOnboardingLinkResponse
- type AccountSearchParams
- type AccountSearchResponse
- type AccountSearchResponseItem
- type AccountSearchResponseItemsAccountType
- type AccountSearchResponseItemsOrganization
- type AccountSearchResponseItemsOrganizationsFeatureSettings
- type AccountSearchResponseItemsOrganizationsProfileSettings
- type AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe
- type AccountSearchResponseItemsStatus
- type AccountSearchResponseItemsUser
- type AccountSearchResponsePagination
- type AccountService
- func (r *AccountService) DashboardLink(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountDashboardLinkResponse, err error)
- func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGetResponse, err error)
- func (r *AccountService) New(ctx context.Context, body AccountNewParams, opts ...option.RequestOption) (res *AccountNewResponse, err error)
- func (r *AccountService) OnboardingLink(ctx context.Context, id string, body AccountOnboardingLinkParams, ...) (res *AccountOnboardingLinkResponse, err error)
- func (r *AccountService) Search(ctx context.Context, query AccountSearchParams, opts ...option.RequestOption) (res *AccountSearchResponse, err error)
- type AdvertisementCampaign
- type AdvertisementCampaignListResource
- type AdvertisementCampaignListResourcePagination
- type AdvertisementListParams
- type AdvertisementService
- type Article
- type ArticleByline
- type ArticleListParams
- type ArticleListParamsOrganizationIDArray
- type ArticleListParamsOrganizationIDUnion
- type ArticleListParamsVisibilityArray
- type ArticleListParamsVisibilityArticleVisibility
- type ArticleListParamsVisibilityUnion
- type ArticleNewParams
- type ArticleNewParamsByline
- type ArticleNewParamsVisibility
- type ArticleOrganization
- type ArticleOrganizationFeatureSettings
- type ArticleOrganizationProfileSettings
- type ArticleOrganizationProfileSettingsSubscribe
- type ArticlePreviewParams
- type ArticlePreviewResponse
- type ArticleReceiverService
- type ArticleReceivers
- type ArticleSendResponse
- type ArticleService
- func (r *ArticleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *ArticleService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Article, err error)
- func (r *ArticleService) List(ctx context.Context, query ArticleListParams, opts ...option.RequestOption) (res *ListResourceArticle, err error)
- func (r *ArticleService) New(ctx context.Context, body ArticleNewParams, opts ...option.RequestOption) (res *Article, err error)
- func (r *ArticleService) Preview(ctx context.Context, id string, body ArticlePreviewParams, ...) (res *ArticlePreviewResponse, err error)
- func (r *ArticleService) Send(ctx context.Context, id string, opts ...option.RequestOption) (res *ArticleSendResponse, err error)
- func (r *ArticleService) Update(ctx context.Context, id string, body ArticleUpdateParams, ...) (res *Article, err error)
- type ArticleUpdateParams
- type ArticleUpdateParamsByline
- type ArticleUpdateParamsVisibility
- type ArticleVisibility
- type AuthorizeResponseOrganization
- type AuthorizeResponseOrganizationClient
- type AuthorizeResponseOrganizationOrganization
- type AuthorizeResponseOrganizationScope
- type AuthorizeResponseOrganizationSub
- type AuthorizeResponseOrganizationSubType
- type AuthorizeResponseUser
- type AuthorizeResponseUserClient
- type AuthorizeResponseUserScope
- type AuthorizeResponseUserSub
- type AuthorizeResponseUserSubType
- type BenefitGetResponse
- type BenefitGetResponseBenefitAds
- type BenefitGetResponseBenefitAdsProperties
- type BenefitGetResponseBenefitAdsType
- type BenefitGetResponseBenefitArticles
- type BenefitGetResponseBenefitArticlesProperties
- type BenefitGetResponseBenefitArticlesType
- type BenefitGetResponseBenefitCustom
- type BenefitGetResponseBenefitCustomProperties
- type BenefitGetResponseBenefitCustomType
- type BenefitGetResponseBenefitDiscordOutput
- type BenefitGetResponseBenefitDiscordOutputProperties
- type BenefitGetResponseBenefitDiscordOutputType
- type BenefitGetResponseBenefitDownloadables
- type BenefitGetResponseBenefitDownloadablesProperties
- type BenefitGetResponseBenefitDownloadablesType
- type BenefitGetResponseBenefitGitHubRepository
- type BenefitGetResponseBenefitGitHubRepositoryProperties
- type BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission
- type BenefitGetResponseBenefitGitHubRepositoryType
- type BenefitGetResponseType
- type BenefitGetResponseUnion
- type BenefitGrantListParams
- type BenefitGrantService
- type BenefitListParams
- type BenefitListParamsOrganizationIDArray
- type BenefitListParamsOrganizationIDUnion
- type BenefitListParamsTypeArray
- type BenefitListParamsTypeBenefitType
- type BenefitListParamsTypeUnion
- type BenefitNewParams
- type BenefitNewParamsBody
- type BenefitNewParamsBodyBenefitAdsCreate
- type BenefitNewParamsBodyBenefitAdsCreateProperties
- type BenefitNewParamsBodyBenefitAdsCreateType
- type BenefitNewParamsBodyBenefitCustomCreate
- type BenefitNewParamsBodyBenefitCustomCreateProperties
- type BenefitNewParamsBodyBenefitCustomCreateType
- type BenefitNewParamsBodyBenefitDiscordCreate
- type BenefitNewParamsBodyBenefitDiscordCreateProperties
- type BenefitNewParamsBodyBenefitDiscordCreateType
- type BenefitNewParamsBodyBenefitDownloadablesCreate
- type BenefitNewParamsBodyBenefitDownloadablesCreateProperties
- type BenefitNewParamsBodyBenefitDownloadablesCreateType
- type BenefitNewParamsBodyBenefitGitHubRepositoryCreate
- type BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties
- type BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission
- type BenefitNewParamsBodyBenefitGitHubRepositoryCreateType
- type BenefitNewParamsBodyType
- type BenefitNewParamsBodyUnion
- type BenefitNewResponse
- type BenefitNewResponseBenefitAds
- type BenefitNewResponseBenefitAdsProperties
- type BenefitNewResponseBenefitAdsType
- type BenefitNewResponseBenefitArticles
- type BenefitNewResponseBenefitArticlesProperties
- type BenefitNewResponseBenefitArticlesType
- type BenefitNewResponseBenefitCustom
- type BenefitNewResponseBenefitCustomProperties
- type BenefitNewResponseBenefitCustomType
- type BenefitNewResponseBenefitDiscordOutput
- type BenefitNewResponseBenefitDiscordOutputProperties
- type BenefitNewResponseBenefitDiscordOutputType
- type BenefitNewResponseBenefitDownloadables
- type BenefitNewResponseBenefitDownloadablesProperties
- type BenefitNewResponseBenefitDownloadablesType
- type BenefitNewResponseBenefitGitHubRepository
- type BenefitNewResponseBenefitGitHubRepositoryProperties
- type BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission
- type BenefitNewResponseBenefitGitHubRepositoryType
- type BenefitNewResponseType
- type BenefitNewResponseUnion
- type BenefitService
- func (r *BenefitService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *BenefitService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *BenefitGetResponse, err error)
- func (r *BenefitService) List(ctx context.Context, query BenefitListParams, opts ...option.RequestOption) (...)
- func (r *BenefitService) New(ctx context.Context, body BenefitNewParams, opts ...option.RequestOption) (res *BenefitNewResponse, err error)
- func (r *BenefitService) Update(ctx context.Context, id string, body BenefitUpdateParams, ...) (res *BenefitUpdateResponse, err error)
- type BenefitUpdateParams
- type BenefitUpdateParamsBody
- type BenefitUpdateParamsBodyBenefitAdsUpdate
- type BenefitUpdateParamsBodyBenefitAdsUpdateProperties
- type BenefitUpdateParamsBodyBenefitAdsUpdateType
- type BenefitUpdateParamsBodyBenefitArticlesUpdate
- type BenefitUpdateParamsBodyBenefitArticlesUpdateType
- type BenefitUpdateParamsBodyBenefitCustomUpdate
- type BenefitUpdateParamsBodyBenefitCustomUpdateProperties
- type BenefitUpdateParamsBodyBenefitCustomUpdateType
- type BenefitUpdateParamsBodyBenefitDiscordUpdate
- type BenefitUpdateParamsBodyBenefitDiscordUpdateProperties
- type BenefitUpdateParamsBodyBenefitDiscordUpdateType
- type BenefitUpdateParamsBodyBenefitDownloadablesUpdate
- type BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties
- type BenefitUpdateParamsBodyBenefitDownloadablesUpdateType
- type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate
- type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties
- type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission
- type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType
- type BenefitUpdateParamsBodyType
- type BenefitUpdateParamsBodyUnion
- type BenefitUpdateResponse
- type BenefitUpdateResponseBenefitAds
- type BenefitUpdateResponseBenefitAdsProperties
- type BenefitUpdateResponseBenefitAdsType
- type BenefitUpdateResponseBenefitArticles
- type BenefitUpdateResponseBenefitArticlesProperties
- type BenefitUpdateResponseBenefitArticlesType
- type BenefitUpdateResponseBenefitCustom
- type BenefitUpdateResponseBenefitCustomProperties
- type BenefitUpdateResponseBenefitCustomType
- type BenefitUpdateResponseBenefitDiscordOutput
- type BenefitUpdateResponseBenefitDiscordOutputProperties
- type BenefitUpdateResponseBenefitDiscordOutputType
- type BenefitUpdateResponseBenefitDownloadables
- type BenefitUpdateResponseBenefitDownloadablesProperties
- type BenefitUpdateResponseBenefitDownloadablesType
- type BenefitUpdateResponseBenefitGitHubRepository
- type BenefitUpdateResponseBenefitGitHubRepositoryProperties
- type BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission
- type BenefitUpdateResponseBenefitGitHubRepositoryType
- type BenefitUpdateResponseType
- type BenefitUpdateResponseUnion
- type Checkout
- type CheckoutNewParams
- type CheckoutProductPrice
- type CheckoutProductPriceProductPriceOneTime
- type CheckoutProductPriceProductPriceOneTimeType
- type CheckoutProductPriceProductPriceRecurring
- type CheckoutProductPriceProductPriceRecurringRecurringInterval
- type CheckoutProductPriceProductPriceRecurringType
- type CheckoutProductPriceRecurringInterval
- type CheckoutProductPriceType
- type CheckoutProductPriceUnion
- type CheckoutService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type DonationPaymentIntentNewParams
- type DonationPaymentIntentNewParamsSetupFutureUsage
- type DonationPaymentIntentService
- func (r *DonationPaymentIntentService) New(ctx context.Context, body DonationPaymentIntentNewParams, ...) (res *DonationStripePaymentIntentMutationResponse, err error)
- func (r *DonationPaymentIntentService) Update(ctx context.Context, id string, body DonationPaymentIntentUpdateParams, ...) (res *DonationStripePaymentIntentMutationResponse, err error)
- type DonationPaymentIntentUpdateParams
- type DonationPaymentIntentUpdateParamsSetupFutureUsage
- type DonationPublicSearchParams
- type DonationPublicService
- type DonationSearchParams
- type DonationService
- type DonationStatistics
- type DonationStatisticsParams
- type DonationStatisticsParamsDonationsInterval
- type DonationStatisticsPeriod
- type DonationStripePaymentIntentMutationResponse
- type DownloadableFileRead
- type DownloadableFileReadService
- type Error
- type ExternalOrganizationListParams
- type ExternalOrganizationListParamsNameArray
- type ExternalOrganizationListParamsNameUnion
- type ExternalOrganizationListParamsOrganizationIDArray
- type ExternalOrganizationListParamsOrganizationIDUnion
- type ExternalOrganizationListParamsPlatformArray
- type ExternalOrganizationListParamsPlatformPlatforms
- type ExternalOrganizationListParamsPlatformUnion
- type ExternalOrganizationListResponse
- type ExternalOrganizationListResponseItem
- type ExternalOrganizationListResponseItemsPlatform
- type ExternalOrganizationListResponsePagination
- type ExternalOrganizationService
- type FileListParams
- type FileNewParams
- type FileNewParamsBody
- type FileNewParamsBodyDownloadableFileCreate
- type FileNewParamsBodyDownloadableFileCreateService
- type FileNewParamsBodyDownloadableFileCreateUpload
- type FileNewParamsBodyDownloadableFileCreateUploadPart
- type FileNewParamsBodyOrganizationAvatarFileCreate
- type FileNewParamsBodyOrganizationAvatarFileCreateService
- type FileNewParamsBodyOrganizationAvatarFileCreateUpload
- type FileNewParamsBodyOrganizationAvatarFileCreateUploadPart
- type FileNewParamsBodyProductMediaFileCreate
- type FileNewParamsBodyProductMediaFileCreateService
- type FileNewParamsBodyProductMediaFileCreateUpload
- type FileNewParamsBodyProductMediaFileCreateUploadPart
- type FileNewParamsBodyService
- type FileNewParamsBodyUnion
- type FileService
- func (r *FileService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *ListResourceAnnotatedUnion, err error)
- func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *FileUpload, err error)
- func (r *FileService) Update(ctx context.Context, id string, body FileUpdateParams, ...) (res *FileUpdateResponse, err error)
- func (r *FileService) Uploaded(ctx context.Context, params FileUploadedParams, opts ...option.RequestOption) (res *FileUploadedResponse, err error)
- type FileUpdateParams
- type FileUpdateResponse
- type FileUpdateResponseService
- type FileUpdateResponseUnion
- type FileUpload
- type FileUploadService
- type FileUploadUpload
- type FileUploadUploadPart
- type FileUploadedParams
- type FileUploadedParamsPart
- type FileUploadedResponse
- type FileUploadedResponseService
- type FileUploadedResponseUnion
- type FundingLookupParams
- type FundingLookupResponse
- type FundingLookupResponseFundingGoal
- type FundingLookupResponseIssue
- type FundingLookupResponseIssueAssignee
- type FundingLookupResponseIssueAuthor
- type FundingLookupResponseIssueFunding
- type FundingLookupResponseIssueFundingFundingGoal
- type FundingLookupResponseIssueFundingPledgesSum
- type FundingLookupResponseIssueLabel
- type FundingLookupResponseIssuePlatform
- type FundingLookupResponseIssueReactions
- type FundingLookupResponseIssueRepository
- type FundingLookupResponseIssueRepositoryOrganization
- type FundingLookupResponseIssueRepositoryOrganizationPlatform
- type FundingLookupResponseIssueRepositoryPlatform
- type FundingLookupResponseIssueRepositoryProfileSettings
- type FundingLookupResponseIssueState
- type FundingLookupResponsePledgesSummaries
- type FundingLookupResponsePledgesSummariesPayDirectly
- type FundingLookupResponsePledgesSummariesPayDirectlyPledger
- type FundingLookupResponsePledgesSummariesPayDirectlyTotal
- type FundingLookupResponsePledgesSummariesPayOnCompletion
- type FundingLookupResponsePledgesSummariesPayOnCompletionPledger
- type FundingLookupResponsePledgesSummariesPayOnCompletionTotal
- type FundingLookupResponsePledgesSummariesPayUpfront
- type FundingLookupResponsePledgesSummariesPayUpfrontPledger
- type FundingLookupResponsePledgesSummariesPayUpfrontTotal
- type FundingLookupResponseTotal
- type FundingSearchParams
- type FundingSearchParamsSorting
- type FundingSearchResponse
- type FundingSearchResponseItem
- type FundingSearchResponseItemsFundingGoal
- type FundingSearchResponseItemsIssue
- type FundingSearchResponseItemsIssueAssignee
- type FundingSearchResponseItemsIssueAuthor
- type FundingSearchResponseItemsIssueFunding
- type FundingSearchResponseItemsIssueFundingFundingGoal
- type FundingSearchResponseItemsIssueFundingPledgesSum
- type FundingSearchResponseItemsIssueLabel
- type FundingSearchResponseItemsIssuePlatform
- type FundingSearchResponseItemsIssueReactions
- type FundingSearchResponseItemsIssueRepository
- type FundingSearchResponseItemsIssueRepositoryOrganization
- type FundingSearchResponseItemsIssueRepositoryOrganizationPlatform
- type FundingSearchResponseItemsIssueRepositoryPlatform
- type FundingSearchResponseItemsIssueRepositoryProfileSettings
- type FundingSearchResponseItemsIssueState
- type FundingSearchResponseItemsPledgesSummaries
- type FundingSearchResponseItemsPledgesSummariesPayDirectly
- type FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger
- type FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal
- type FundingSearchResponseItemsPledgesSummariesPayOnCompletion
- type FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger
- type FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal
- type FundingSearchResponseItemsPledgesSummariesPayUpfront
- type FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger
- type FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal
- type FundingSearchResponseItemsTotal
- type FundingSearchResponsePagination
- type FundingService
- type IntrospectTokenResponse
- type IntrospectTokenResponseSubType
- type IntrospectTokenResponseTokenType
- type IssueBodyGetResponse
- type IssueBodyService
- type IssueConfirmSolvedParams
- type IssueConfirmSolvedParamsSplit
- type IssueConfirmSolvedResponse
- type IssueConfirmSolvedResponseAssignee
- type IssueConfirmSolvedResponseAuthor
- type IssueConfirmSolvedResponseFunding
- type IssueConfirmSolvedResponseFundingFundingGoal
- type IssueConfirmSolvedResponseFundingPledgesSum
- type IssueConfirmSolvedResponseLabel
- type IssueConfirmSolvedResponsePlatform
- type IssueConfirmSolvedResponseReactions
- type IssueConfirmSolvedResponseRepository
- type IssueConfirmSolvedResponseRepositoryOrganization
- type IssueConfirmSolvedResponseRepositoryOrganizationPlatform
- type IssueConfirmSolvedResponseRepositoryPlatform
- type IssueConfirmSolvedResponseRepositoryProfileSettings
- type IssueConfirmSolvedResponseState
- type IssueGetResponse
- type IssueGetResponseAssignee
- type IssueGetResponseAuthor
- type IssueGetResponseFunding
- type IssueGetResponseFundingFundingGoal
- type IssueGetResponseFundingPledgesSum
- type IssueGetResponseLabel
- type IssueGetResponsePlatform
- type IssueGetResponseReactions
- type IssueGetResponseRepository
- type IssueGetResponseRepositoryOrganization
- type IssueGetResponseRepositoryOrganizationPlatform
- type IssueGetResponseRepositoryPlatform
- type IssueGetResponseRepositoryProfileSettings
- type IssueGetResponseState
- type IssueListParams
- type IssueListParamsExternalOrganizationNameArray
- type IssueListParamsExternalOrganizationNameUnion
- type IssueListParamsNumberArray
- type IssueListParamsNumberUnion
- type IssueListParamsOrganizationIDArray
- type IssueListParamsOrganizationIDUnion
- type IssueListParamsPlatformArray
- type IssueListParamsPlatformPlatforms
- type IssueListParamsPlatformUnion
- type IssueListParamsRepositoryNameArray
- type IssueListParamsRepositoryNameUnion
- type IssueListResponse
- type IssueListResponseItem
- type IssueListResponseItemsAssignee
- type IssueListResponseItemsAuthor
- type IssueListResponseItemsFunding
- type IssueListResponseItemsFundingFundingGoal
- type IssueListResponseItemsFundingPledgesSum
- type IssueListResponseItemsLabel
- type IssueListResponseItemsPlatform
- type IssueListResponseItemsReactions
- type IssueListResponseItemsRepository
- type IssueListResponseItemsRepositoryOrganization
- type IssueListResponseItemsRepositoryOrganizationPlatform
- type IssueListResponseItemsRepositoryPlatform
- type IssueListResponseItemsRepositoryProfileSettings
- type IssueListResponseItemsState
- type IssueListResponsePagination
- type IssueLookupGetParams
- type IssueLookupGetResponse
- type IssueLookupGetResponseAssignee
- type IssueLookupGetResponseAuthor
- type IssueLookupGetResponseFunding
- type IssueLookupGetResponseFundingFundingGoal
- type IssueLookupGetResponseFundingPledgesSum
- type IssueLookupGetResponseLabel
- type IssueLookupGetResponsePlatform
- type IssueLookupGetResponseReactions
- type IssueLookupGetResponseRepository
- type IssueLookupGetResponseRepositoryOrganization
- type IssueLookupGetResponseRepositoryOrganizationPlatform
- type IssueLookupGetResponseRepositoryPlatform
- type IssueLookupGetResponseRepositoryProfileSettings
- type IssueLookupGetResponseState
- type IssueLookupService
- type IssueService
- func (r *IssueService) ConfirmSolved(ctx context.Context, id string, body IssueConfirmSolvedParams, ...) (res *IssueConfirmSolvedResponse, err error)
- func (r *IssueService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *IssueGetResponse, err error)
- func (r *IssueService) List(ctx context.Context, query IssueListParams, opts ...option.RequestOption) (res *IssueListResponse, err error)
- func (r *IssueService) Update(ctx context.Context, id string, body IssueUpdateParams, ...) (res *IssueUpdateResponse, err error)
- type IssueUpdateParams
- type IssueUpdateParamsFundingGoal
- type IssueUpdateResponse
- type IssueUpdateResponseAssignee
- type IssueUpdateResponseAuthor
- type IssueUpdateResponseFunding
- type IssueUpdateResponseFundingFundingGoal
- type IssueUpdateResponseFundingPledgesSum
- type IssueUpdateResponseLabel
- type IssueUpdateResponsePlatform
- type IssueUpdateResponseReactions
- type IssueUpdateResponseRepository
- type IssueUpdateResponseRepositoryOrganization
- type IssueUpdateResponseRepositoryOrganizationPlatform
- type IssueUpdateResponseRepositoryPlatform
- type IssueUpdateResponseRepositoryProfileSettings
- type IssueUpdateResponseState
- type ListResourceAnnotatedUnion
- type ListResourceAnnotatedUnionItem
- type ListResourceAnnotatedUnionItemsService
- type ListResourceAnnotatedUnionItemsUnion
- type ListResourceAnnotatedUnionPagination
- type ListResourceArticle
- type ListResourceArticlePagination
- type ListResourceBenefitGrant
- type ListResourceBenefitGrantItem
- type ListResourceBenefitGrantPagination
- type ListResourceDonation
- type ListResourceDonationItem
- type ListResourceDonationItemsDonor
- type ListResourceDonationItemsDonorDonationOrganization
- type ListResourceDonationItemsDonorDonationOrganizationPlatform
- type ListResourceDonationItemsDonorDonationUser
- type ListResourceDonationItemsDonorPlatform
- type ListResourceDonationItemsDonorUnion
- type ListResourceDonationItemsIssue
- type ListResourceDonationItemsIssueAssignee
- type ListResourceDonationItemsIssueAuthor
- type ListResourceDonationItemsIssueFunding
- type ListResourceDonationItemsIssueFundingFundingGoal
- type ListResourceDonationItemsIssueFundingPledgesSum
- type ListResourceDonationItemsIssueLabel
- type ListResourceDonationItemsIssuePlatform
- type ListResourceDonationItemsIssueReactions
- type ListResourceDonationItemsIssueRepository
- type ListResourceDonationItemsIssueRepositoryOrganization
- type ListResourceDonationItemsIssueRepositoryOrganizationPlatform
- type ListResourceDonationItemsIssueRepositoryPlatform
- type ListResourceDonationItemsIssueRepositoryProfileSettings
- type ListResourceDonationItemsIssueState
- type ListResourceDonationPagination
- type ListResourceOrder
- type ListResourceOrderPagination
- type ListResourceProduct
- type ListResourceProductPagination
- type ListResourcePublicDonation
- type ListResourcePublicDonationItem
- type ListResourcePublicDonationItemsDonor
- type ListResourcePublicDonationItemsDonorDonationOrganization
- type ListResourcePublicDonationItemsDonorDonationOrganizationPlatform
- type ListResourcePublicDonationItemsDonorDonationUser
- type ListResourcePublicDonationItemsDonorPlatform
- type ListResourcePublicDonationItemsDonorUnion
- type ListResourcePublicDonationPagination
- type ListResourceTransaction
- type ListResourceTransactionPagination
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem
- func (r ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) AsUnion() ...
- func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) UnmarshalJSON(data []byte) (err error)
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsUnion
- type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination
- type ListResourceWebhookDelivery
- type ListResourceWebhookDeliveryItem
- type ListResourceWebhookDeliveryItemsWebhookEvent
- type ListResourceWebhookDeliveryPagination
- type ListResourceWebhookEndpoint
- type ListResourceWebhookEndpointPagination
- type MetricLimitService
- type MetricListParams
- type MetricListParamsInterval
- type MetricListParamsOrganizationIDArray
- type MetricListParamsOrganizationIDUnion
- type MetricListParamsProductIDArray
- type MetricListParamsProductIDUnion
- type MetricListParamsProductPriceTypeArray
- type MetricListParamsProductPriceTypeProductPriceType
- type MetricListParamsProductPriceTypeUnion
- type MetricService
- type MetricsLimits
- type MetricsLimitsIntervals
- type MetricsLimitsIntervalsDay
- type MetricsLimitsIntervalsHour
- type MetricsLimitsIntervalsMonth
- type MetricsLimitsIntervalsWeek
- type MetricsLimitsIntervalsYear
- type MetricsResponse
- type MetricsResponseMetrics
- type MetricsResponseMetricsActiveSubscriptions
- type MetricsResponseMetricsActiveSubscriptionsType
- type MetricsResponseMetricsAverageOrderValue
- type MetricsResponseMetricsAverageOrderValueType
- type MetricsResponseMetricsMonthlyRecurringRevenue
- type MetricsResponseMetricsMonthlyRecurringRevenueType
- type MetricsResponseMetricsNewSubscriptions
- type MetricsResponseMetricsNewSubscriptionsRevenue
- type MetricsResponseMetricsNewSubscriptionsRevenueType
- type MetricsResponseMetricsNewSubscriptionsType
- type MetricsResponseMetricsOneTimeProducts
- type MetricsResponseMetricsOneTimeProductsRevenue
- type MetricsResponseMetricsOneTimeProductsRevenueType
- type MetricsResponseMetricsOneTimeProductsType
- type MetricsResponseMetricsOrders
- type MetricsResponseMetricsOrdersType
- type MetricsResponseMetricsRenewedSubscriptions
- type MetricsResponseMetricsRenewedSubscriptionsRevenue
- type MetricsResponseMetricsRenewedSubscriptionsRevenueType
- type MetricsResponseMetricsRenewedSubscriptionsType
- type MetricsResponseMetricsRevenue
- type MetricsResponseMetricsRevenueType
- type MetricsResponsePeriod
- type Oauth2AuthorizeResponse
- type Oauth2AuthorizeResponseSubType
- type Oauth2AuthorizeResponseUnion
- type Oauth2IntrospectParams
- type Oauth2IntrospectParamsTokenTypeHint
- type Oauth2ListParams
- type Oauth2ListResponse
- type Oauth2ListResponseItem
- type Oauth2ListResponseItemsGrantType
- type Oauth2ListResponseItemsResponseType
- type Oauth2ListResponseItemsTokenEndpointAuthMethod
- type Oauth2ListResponsePagination
- type Oauth2RegisterDeleteResponse
- type Oauth2RegisterGetResponse
- type Oauth2RegisterNewParams
- type Oauth2RegisterNewParamsGrantType
- type Oauth2RegisterNewParamsResponseType
- type Oauth2RegisterNewParamsTokenEndpointAuthMethod
- type Oauth2RegisterNewResponse
- type Oauth2RegisterService
- func (r *Oauth2RegisterService) Delete(ctx context.Context, clientID string, opts ...option.RequestOption) (res *Oauth2RegisterDeleteResponse, err error)
- func (r *Oauth2RegisterService) Get(ctx context.Context, clientID string, opts ...option.RequestOption) (res *Oauth2RegisterGetResponse, err error)
- func (r *Oauth2RegisterService) New(ctx context.Context, body Oauth2RegisterNewParams, ...) (res *Oauth2RegisterNewResponse, err error)
- func (r *Oauth2RegisterService) Update(ctx context.Context, params Oauth2RegisterUpdateParams, ...) (res *Oauth2RegisterUpdateResponse, err error)
- type Oauth2RegisterUpdateParams
- type Oauth2RegisterUpdateParamsGrantType
- type Oauth2RegisterUpdateParamsResponseType
- type Oauth2RegisterUpdateParamsTokenEndpointAuthMethod
- type Oauth2RegisterUpdateResponse
- type Oauth2RevokeParams
- type Oauth2RevokeParamsTokenTypeHint
- type Oauth2Service
- func (r *Oauth2Service) Authorize(ctx context.Context, opts ...option.RequestOption) (res *Oauth2AuthorizeResponse, err error)
- func (r *Oauth2Service) Introspect(ctx context.Context, body Oauth2IntrospectParams, opts ...option.RequestOption) (res *IntrospectTokenResponse, err error)
- func (r *Oauth2Service) List(ctx context.Context, query Oauth2ListParams, opts ...option.RequestOption) (res *Oauth2ListResponse, err error)
- func (r *Oauth2Service) Revoke(ctx context.Context, body Oauth2RevokeParams, opts ...option.RequestOption) (res *RevokeTokenResponse, err error)
- func (r *Oauth2Service) Token(ctx context.Context, body Oauth2TokenParams, opts ...option.RequestOption) (res *TokenResponse, err error)
- type Oauth2TokenParams
- type Oauth2TokenParamsBodyUnion
- type Oauth2UserinfoGetResponse
- type Oauth2UserinfoGetResponseUnion
- type Oauth2UserinfoNewResponse
- type Oauth2UserinfoNewResponseUnion
- type Oauth2UserinfoService
- type OrderInvoice
- type OrderInvoiceService
- type OrderListParams
- type OrderListParamsOrganizationIDArray
- type OrderListParamsOrganizationIDUnion
- type OrderListParamsProductIDArray
- type OrderListParamsProductIDUnion
- type OrderListParamsProductPriceTypeArray
- type OrderListParamsProductPriceTypeProductPriceType
- type OrderListParamsProductPriceTypeUnion
- type OrderListParamsUserIDArray
- type OrderListParamsUserIDUnion
- type OrderOutput
- type OrderOutputProduct
- type OrderOutputProductPrice
- type OrderOutputProductPriceProductPriceOneTime
- type OrderOutputProductPriceProductPriceOneTimeType
- type OrderOutputProductPriceProductPriceRecurring
- type OrderOutputProductPriceProductPriceRecurringRecurringInterval
- type OrderOutputProductPriceProductPriceRecurringType
- type OrderOutputProductPriceRecurringInterval
- type OrderOutputProductPriceType
- type OrderOutputProductPriceUnion
- type OrderOutputProductType
- type OrderOutputSubscription
- type OrderOutputSubscriptionStatus
- type OrderOutputUser
- type OrderService
- type OrganizationAvatarFileRead
- type OrganizationAvatarFileReadService
- type OrganizationCustomerListParams
- type OrganizationCustomerListParamsCustomerType
- type OrganizationCustomerListResponse
- type OrganizationCustomerListResponseItem
- type OrganizationCustomerListResponsePagination
- type OrganizationCustomerService
- type OrganizationGetResponse
- type OrganizationGetResponseFeatureSettings
- type OrganizationGetResponseProfileSettings
- type OrganizationGetResponseProfileSettingsSubscribe
- type OrganizationListParams
- type OrganizationListResponse
- type OrganizationListResponseItem
- type OrganizationListResponseItemsFeatureSettings
- type OrganizationListResponseItemsProfileSettings
- type OrganizationListResponseItemsProfileSettingsSubscribe
- type OrganizationListResponsePagination
- type OrganizationNewParams
- type OrganizationNewParamsFeatureSettings
- type OrganizationNewResponse
- type OrganizationNewResponseFeatureSettings
- type OrganizationNewResponseProfileSettings
- type OrganizationNewResponseProfileSettingsSubscribe
- type OrganizationService
- func (r *OrganizationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *OrganizationListResponse, err error)
- func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
- func (r *OrganizationService) Update(ctx context.Context, id string, body OrganizationUpdateParams, ...) (res *OrganizationUpdateResponse, err error)
- type OrganizationUpdateParams
- type OrganizationUpdateParamsFeatureSettings
- type OrganizationUpdateParamsProfileSettings
- type OrganizationUpdateParamsProfileSettingsSubscribe
- type OrganizationUpdateResponse
- type OrganizationUpdateResponseFeatureSettings
- type OrganizationUpdateResponseProfileSettings
- type OrganizationUpdateResponseProfileSettingsSubscribe
- type PayoutEstimate
- type PledgeGetResponse
- type PledgeGetResponseCreatedBy
- type PledgeGetResponseIssue
- type PledgeGetResponseIssueAssignee
- type PledgeGetResponseIssueAuthor
- type PledgeGetResponseIssueFunding
- type PledgeGetResponseIssueFundingFundingGoal
- type PledgeGetResponseIssueFundingPledgesSum
- type PledgeGetResponseIssueLabel
- type PledgeGetResponseIssuePlatform
- type PledgeGetResponseIssueReactions
- type PledgeGetResponseIssueRepository
- type PledgeGetResponseIssueRepositoryOrganization
- type PledgeGetResponseIssueRepositoryOrganizationPlatform
- type PledgeGetResponseIssueRepositoryPlatform
- type PledgeGetResponseIssueRepositoryProfileSettings
- type PledgeGetResponseIssueState
- type PledgeGetResponsePledger
- type PledgeGetResponseState
- type PledgeGetResponseType
- type PledgeSearchParams
- type PledgeSearchResponse
- type PledgeSearchResponseItem
- type PledgeSearchResponseItemsCreatedBy
- type PledgeSearchResponseItemsIssue
- type PledgeSearchResponseItemsIssueAssignee
- type PledgeSearchResponseItemsIssueAuthor
- type PledgeSearchResponseItemsIssueFunding
- type PledgeSearchResponseItemsIssueFundingFundingGoal
- type PledgeSearchResponseItemsIssueFundingPledgesSum
- type PledgeSearchResponseItemsIssueLabel
- type PledgeSearchResponseItemsIssuePlatform
- type PledgeSearchResponseItemsIssueReactions
- type PledgeSearchResponseItemsIssueRepository
- type PledgeSearchResponseItemsIssueRepositoryOrganization
- type PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform
- type PledgeSearchResponseItemsIssueRepositoryPlatform
- type PledgeSearchResponseItemsIssueRepositoryProfileSettings
- type PledgeSearchResponseItemsIssueState
- type PledgeSearchResponseItemsPledger
- type PledgeSearchResponseItemsState
- type PledgeSearchResponseItemsType
- type PledgeSearchResponsePagination
- type PledgeService
- func (r *PledgeService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PledgeGetResponse, err error)
- func (r *PledgeService) Search(ctx context.Context, query PledgeSearchParams, opts ...option.RequestOption) (res *PledgeSearchResponse, err error)
- func (r *PledgeService) Spending(ctx context.Context, query PledgeSpendingParams, opts ...option.RequestOption) (res *PledgeSpendingResponse, err error)
- type PledgeSpendingParams
- type PledgeSpendingResponse
- type PledgeSummaryGetParams
- type PledgeSummaryGetResponse
- type PledgeSummaryGetResponseFunding
- type PledgeSummaryGetResponseFundingFundingGoal
- type PledgeSummaryGetResponseFundingPledgesSum
- type PledgeSummaryGetResponsePledge
- type PledgeSummaryGetResponsePledgesPledger
- type PledgeSummaryGetResponsePledgesType
- type PledgeSummaryService
- type ProductBenefitService
- type ProductBenefitUpdateParams
- type ProductListParams
- type ProductListParamsBenefitIDArray
- type ProductListParamsBenefitIDUnion
- type ProductListParamsOrganizationIDArray
- type ProductListParamsOrganizationIDUnion
- type ProductListParamsTypeArray
- type ProductListParamsTypeSubscriptionTierType
- type ProductListParamsTypeUnion
- type ProductMediaFileReadOutput
- type ProductMediaFileReadOutputService
- type ProductNewParams
- type ProductNewParamsBody
- type ProductNewParamsBodyProductOneTimeCreate
- type ProductNewParamsBodyProductOneTimeCreatePrice
- type ProductNewParamsBodyProductOneTimeCreatePricesType
- type ProductNewParamsBodyProductRecurringCreate
- type ProductNewParamsBodyProductRecurringCreatePrice
- type ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval
- type ProductNewParamsBodyProductRecurringCreatePricesType
- type ProductNewParamsBodyProductRecurringCreateType
- type ProductNewParamsBodyType
- type ProductNewParamsBodyUnion
- type ProductOutput
- type ProductOutputBenefit
- type ProductOutputBenefitsBenefitArticles
- type ProductOutputBenefitsBenefitArticlesProperties
- type ProductOutputBenefitsBenefitArticlesType
- type ProductOutputBenefitsBenefitBase
- type ProductOutputBenefitsBenefitBaseType
- type ProductOutputBenefitsType
- type ProductOutputBenefitsUnion
- type ProductOutputPrice
- type ProductOutputPricesProductPriceOneTime
- type ProductOutputPricesProductPriceOneTimeType
- type ProductOutputPricesProductPriceRecurring
- type ProductOutputPricesProductPriceRecurringRecurringInterval
- type ProductOutputPricesProductPriceRecurringType
- type ProductOutputPricesRecurringInterval
- type ProductOutputPricesType
- type ProductOutputPricesUnion
- type ProductOutputType
- type ProductService
- func (r *ProductService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductOutput, err error)
- func (r *ProductService) List(ctx context.Context, query ProductListParams, opts ...option.RequestOption) (res *ListResourceProduct, err error)
- func (r *ProductService) New(ctx context.Context, body ProductNewParams, opts ...option.RequestOption) (res *ProductOutput, err error)
- func (r *ProductService) Update(ctx context.Context, id string, body ProductUpdateParams, ...) (res *ProductOutput, err error)
- type ProductUpdateParams
- type ProductUpdateParamsPrice
- type ProductUpdateParamsPriceUnion
- type ProductUpdateParamsPricesExistingProductPrice
- type ProductUpdateParamsPricesProductPriceOneTimeCreate
- type ProductUpdateParamsPricesProductPriceOneTimeCreateType
- type ProductUpdateParamsPricesProductPriceRecurringCreate
- type ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval
- type ProductUpdateParamsPricesProductPriceRecurringCreateType
- type ProductUpdateParamsPricesRecurringInterval
- type ProductUpdateParamsPricesType
- type PullRequestSearchParams
- type PullRequestSearchResponse
- type PullRequestSearchResponseItem
- type PullRequestSearchResponseItemsAuthor
- type PullRequestSearchResponsePagination
- type PullRequestService
- type RepositoryGetResponse
- type RepositoryGetResponseOrganization
- type RepositoryGetResponseOrganizationPlatform
- type RepositoryGetResponsePlatform
- type RepositoryGetResponseProfileSettings
- type RepositoryListParams
- type RepositoryListParamsExternalOrganizationNameArray
- type RepositoryListParamsExternalOrganizationNameUnion
- type RepositoryListParamsNameArray
- type RepositoryListParamsNameUnion
- type RepositoryListParamsOrganizationIDArray
- type RepositoryListParamsOrganizationIDUnion
- type RepositoryListParamsPlatformArray
- type RepositoryListParamsPlatformPlatforms
- type RepositoryListParamsPlatformUnion
- type RepositoryListResponse
- type RepositoryListResponseItem
- type RepositoryListResponseItemsOrganization
- type RepositoryListResponseItemsOrganizationPlatform
- type RepositoryListResponseItemsPlatform
- type RepositoryListResponseItemsProfileSettings
- type RepositoryListResponsePagination
- type RepositoryService
- func (r *RepositoryService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *RepositoryGetResponse, err error)
- func (r *RepositoryService) List(ctx context.Context, query RepositoryListParams, opts ...option.RequestOption) (res *RepositoryListResponse, err error)
- func (r *RepositoryService) Update(ctx context.Context, id string, body RepositoryUpdateParams, ...) (res *RepositoryUpdateResponse, err error)
- type RepositoryUpdateParams
- type RepositoryUpdateParamsProfileSettings
- type RepositoryUpdateResponse
- type RepositoryUpdateResponseOrganization
- type RepositoryUpdateResponseOrganizationPlatform
- type RepositoryUpdateResponsePlatform
- type RepositoryUpdateResponseProfileSettings
- type RevokeTokenResponse
- type RewardSearchParams
- type RewardSearchResponse
- type RewardSearchResponseItem
- type RewardSearchResponseItemsAmount
- type RewardSearchResponseItemsOrganization
- type RewardSearchResponseItemsOrganizationFeatureSettings
- type RewardSearchResponseItemsOrganizationProfileSettings
- type RewardSearchResponseItemsOrganizationProfileSettingsSubscribe
- type RewardSearchResponseItemsPledge
- type RewardSearchResponseItemsPledgeCreatedBy
- type RewardSearchResponseItemsPledgeIssue
- type RewardSearchResponseItemsPledgeIssueAssignee
- type RewardSearchResponseItemsPledgeIssueAuthor
- type RewardSearchResponseItemsPledgeIssueFunding
- type RewardSearchResponseItemsPledgeIssueFundingFundingGoal
- type RewardSearchResponseItemsPledgeIssueFundingPledgesSum
- type RewardSearchResponseItemsPledgeIssueLabel
- type RewardSearchResponseItemsPledgeIssuePlatform
- type RewardSearchResponseItemsPledgeIssueReactions
- type RewardSearchResponseItemsPledgeIssueRepository
- type RewardSearchResponseItemsPledgeIssueRepositoryOrganization
- type RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform
- type RewardSearchResponseItemsPledgeIssueRepositoryPlatform
- type RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings
- type RewardSearchResponseItemsPledgeIssueState
- type RewardSearchResponseItemsPledgePledger
- type RewardSearchResponseItemsPledgeState
- type RewardSearchResponseItemsPledgeType
- type RewardSearchResponseItemsState
- type RewardSearchResponseItemsUser
- type RewardSearchResponsePagination
- type RewardService
- type RewardSummaryParams
- type RewardSummaryResponse
- type RewardSummaryResponseReceiver
- type SubscriptionExportParams
- type SubscriptionExportParamsOrganizationIDArray
- type SubscriptionExportParamsOrganizationIDUnion
- type SubscriptionExportResponse
- type SubscriptionImportParams
- type SubscriptionImportResponse
- type SubscriptionListParams
- type SubscriptionListParamsOrganizationIDArray
- type SubscriptionListParamsOrganizationIDUnion
- type SubscriptionListParamsProductIDArray
- type SubscriptionListParamsProductIDUnion
- type SubscriptionListParamsTypeArray
- type SubscriptionListParamsTypeSubscriptionTierType
- type SubscriptionListParamsTypeUnion
- type SubscriptionListResponse
- type SubscriptionListResponseItem
- type SubscriptionListResponseItemsPrice
- type SubscriptionListResponseItemsPriceProductPriceOneTime
- type SubscriptionListResponseItemsPriceProductPriceOneTimeType
- type SubscriptionListResponseItemsPriceProductPriceRecurring
- type SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval
- type SubscriptionListResponseItemsPriceProductPriceRecurringType
- type SubscriptionListResponseItemsPriceRecurringInterval
- type SubscriptionListResponseItemsPriceType
- type SubscriptionListResponseItemsPriceUnion
- type SubscriptionListResponseItemsStatus
- type SubscriptionListResponseItemsUser
- type SubscriptionListResponsePagination
- type SubscriptionNewParams
- type SubscriptionNewResponse
- type SubscriptionNewResponsePrice
- type SubscriptionNewResponsePriceProductPriceOneTime
- type SubscriptionNewResponsePriceProductPriceOneTimeType
- type SubscriptionNewResponsePriceProductPriceRecurring
- type SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval
- type SubscriptionNewResponsePriceProductPriceRecurringType
- type SubscriptionNewResponsePriceRecurringInterval
- type SubscriptionNewResponsePriceType
- type SubscriptionNewResponsePriceUnion
- type SubscriptionNewResponseStatus
- type SubscriptionNewResponseUser
- type SubscriptionService
- func (r *SubscriptionService) Export(ctx context.Context, query SubscriptionExportParams, ...) (res *SubscriptionExportResponse, err error)
- func (r *SubscriptionService) Import(ctx context.Context, body SubscriptionImportParams, ...) (res *SubscriptionImportResponse, err error)
- func (r *SubscriptionService) List(ctx context.Context, query SubscriptionListParams, ...) (res *SubscriptionListResponse, err error)
- func (r *SubscriptionService) New(ctx context.Context, body SubscriptionNewParams, opts ...option.RequestOption) (res *SubscriptionNewResponse, err error)
- type TokenResponse
- type TokenResponseTokenType
- type Transaction
- type TransactionAccountIncurredTransaction
- type TransactionAccountIncurredTransactionsPlatformFeeType
- type TransactionAccountIncurredTransactionsProcessor
- type TransactionAccountIncurredTransactionsType
- type TransactionDetails
- type TransactionDetailsAccountIncurredTransaction
- type TransactionDetailsAccountIncurredTransactionsPlatformFeeType
- type TransactionDetailsAccountIncurredTransactionsProcessor
- type TransactionDetailsAccountIncurredTransactionsType
- type TransactionDetailsDonation
- type TransactionDetailsDonationToOrganization
- type TransactionDetailsIssueReward
- type TransactionDetailsOrder
- type TransactionDetailsOrderProduct
- type TransactionDetailsOrderProductOrganization
- type TransactionDetailsOrderProductPrice
- type TransactionDetailsOrderProductPriceProductPriceOneTime
- type TransactionDetailsOrderProductPriceProductPriceOneTimeType
- type TransactionDetailsOrderProductPriceProductPriceRecurring
- type TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval
- type TransactionDetailsOrderProductPriceProductPriceRecurringType
- type TransactionDetailsOrderProductPriceRecurringInterval
- type TransactionDetailsOrderProductPriceType
- type TransactionDetailsOrderProductPriceUnion
- type TransactionDetailsOrderProductType
- type TransactionDetailsPlatformFeeType
- type TransactionDetailsPledge
- type TransactionDetailsPledgeIssue
- type TransactionDetailsPledgeIssueOrganization
- type TransactionDetailsPledgeIssueOrganizationPlatform
- type TransactionDetailsPledgeIssuePlatform
- type TransactionDetailsPledgeIssueRepository
- type TransactionDetailsPledgeIssueRepositoryPlatform
- type TransactionDetailsPledgeState
- type TransactionDetailsProcessor
- type TransactionDetailsType
- type TransactionDonation
- type TransactionDonationToOrganization
- type TransactionIssueReward
- type TransactionLookupParams
- type TransactionOrder
- type TransactionOrderProduct
- type TransactionOrderProductOrganization
- type TransactionOrderProductPrice
- type TransactionOrderProductPriceProductPriceOneTime
- type TransactionOrderProductPriceProductPriceOneTimeType
- type TransactionOrderProductPriceProductPriceRecurring
- type TransactionOrderProductPriceProductPriceRecurringRecurringInterval
- type TransactionOrderProductPriceProductPriceRecurringType
- type TransactionOrderProductPriceRecurringInterval
- type TransactionOrderProductPriceType
- type TransactionOrderProductPriceUnion
- type TransactionOrderProductType
- type TransactionPayoutCsvResponse
- type TransactionPayoutListParams
- type TransactionPayoutNewParams
- type TransactionPayoutService
- func (r *TransactionPayoutService) Csv(ctx context.Context, id string, opts ...option.RequestOption) (res *TransactionPayoutCsvResponse, err error)
- func (r *TransactionPayoutService) List(ctx context.Context, query TransactionPayoutListParams, ...) (res *PayoutEstimate, err error)
- func (r *TransactionPayoutService) New(ctx context.Context, body TransactionPayoutNewParams, ...) (res *Transaction, err error)
- type TransactionPlatformFeeType
- type TransactionPledge
- type TransactionPledgeIssue
- type TransactionPledgeIssueOrganization
- type TransactionPledgeIssueOrganizationPlatform
- type TransactionPledgeIssuePlatform
- type TransactionPledgeIssueRepository
- type TransactionPledgeIssueRepositoryPlatform
- type TransactionPledgeState
- type TransactionProcessor
- type TransactionSearchParams
- type TransactionSearchParamsType
- type TransactionService
- func (r *TransactionService) Lookup(ctx context.Context, query TransactionLookupParams, ...) (res *TransactionDetails, err error)
- func (r *TransactionService) Search(ctx context.Context, query TransactionSearchParams, ...) (res *ListResourceTransaction, err error)
- func (r *TransactionService) Summary(ctx context.Context, query TransactionSummaryParams, ...) (res *TransactionsSummary, err error)
- type TransactionSummaryParams
- type TransactionType
- type TransactionsSummary
- type TransactionsSummaryBalance
- type TransactionsSummaryPayout
- type UserAdvertisementDeleteResponse
- type UserAdvertisementEnableParams
- type UserAdvertisementGetResponse
- type UserAdvertisementListParams
- type UserAdvertisementListResponse
- type UserAdvertisementListResponseItem
- type UserAdvertisementListResponsePagination
- type UserAdvertisementNewParams
- type UserAdvertisementNewResponse
- type UserAdvertisementService
- func (r *UserAdvertisementService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *UserAdvertisementDeleteResponse, err error)
- func (r *UserAdvertisementService) Enable(ctx context.Context, id string, body UserAdvertisementEnableParams, ...) (err error)
- func (r *UserAdvertisementService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserAdvertisementGetResponse, err error)
- func (r *UserAdvertisementService) List(ctx context.Context, query UserAdvertisementListParams, ...) (res *UserAdvertisementListResponse, err error)
- func (r *UserAdvertisementService) New(ctx context.Context, body UserAdvertisementNewParams, ...) (res *UserAdvertisementNewResponse, err error)
- func (r *UserAdvertisementService) Update(ctx context.Context, id string, body UserAdvertisementUpdateParams, ...) (res *UserAdvertisementUpdateResponse, err error)
- type UserAdvertisementUpdateParams
- type UserAdvertisementUpdateResponse
- type UserBenefitGetResponse
- type UserBenefitGetResponseBenefitAdsSubscriber
- type UserBenefitGetResponseBenefitAdsSubscriberGrant
- type UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties
- type UserBenefitGetResponseBenefitAdsSubscriberProperties
- type UserBenefitGetResponseBenefitAdsSubscriberType
- type UserBenefitGetResponseBenefitArticlesSubscriber
- type UserBenefitGetResponseBenefitArticlesSubscriberProperties
- type UserBenefitGetResponseBenefitArticlesSubscriberType
- type UserBenefitGetResponseBenefitCustomSubscriber
- type UserBenefitGetResponseBenefitCustomSubscriberGrant
- type UserBenefitGetResponseBenefitCustomSubscriberProperties
- type UserBenefitGetResponseBenefitCustomSubscriberType
- type UserBenefitGetResponseBenefitDiscordSubscriber
- type UserBenefitGetResponseBenefitDiscordSubscriberProperties
- type UserBenefitGetResponseBenefitDiscordSubscriberType
- type UserBenefitGetResponseBenefitDownloadablesSubscriber
- type UserBenefitGetResponseBenefitDownloadablesSubscriberProperties
- type UserBenefitGetResponseBenefitDownloadablesSubscriberType
- type UserBenefitGetResponseBenefitGitHubRepositorySubscriber
- type UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties
- type UserBenefitGetResponseBenefitGitHubRepositorySubscriberType
- type UserBenefitGetResponseType
- type UserBenefitGetResponseUnion
- type UserBenefitListParams
- type UserBenefitListParamsOrderIDArray
- type UserBenefitListParamsOrderIDUnion
- type UserBenefitListParamsOrganizationIDArray
- type UserBenefitListParamsOrganizationIDUnion
- type UserBenefitListParamsSubscriptionIDArray
- type UserBenefitListParamsSubscriptionIDUnion
- type UserBenefitListParamsTypeArray
- type UserBenefitListParamsTypeBenefitType
- type UserBenefitListParamsTypeUnion
- type UserBenefitListResponse
- type UserBenefitListResponseItem
- type UserBenefitListResponseItemsBenefitAdsSubscriber
- type UserBenefitListResponseItemsBenefitAdsSubscriberGrant
- type UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties
- type UserBenefitListResponseItemsBenefitAdsSubscriberProperties
- type UserBenefitListResponseItemsBenefitAdsSubscriberType
- type UserBenefitListResponseItemsBenefitArticlesSubscriber
- type UserBenefitListResponseItemsBenefitArticlesSubscriberProperties
- type UserBenefitListResponseItemsBenefitArticlesSubscriberType
- type UserBenefitListResponseItemsBenefitCustomSubscriber
- type UserBenefitListResponseItemsBenefitCustomSubscriberGrant
- type UserBenefitListResponseItemsBenefitCustomSubscriberProperties
- type UserBenefitListResponseItemsBenefitCustomSubscriberType
- type UserBenefitListResponseItemsBenefitDiscordSubscriber
- type UserBenefitListResponseItemsBenefitDiscordSubscriberProperties
- type UserBenefitListResponseItemsBenefitDiscordSubscriberType
- type UserBenefitListResponseItemsBenefitDownloadablesSubscriber
- type UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties
- type UserBenefitListResponseItemsBenefitDownloadablesSubscriberType
- type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber
- type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties
- type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType
- type UserBenefitListResponseItemsType
- type UserBenefitListResponseItemsUnion
- type UserBenefitListResponsePagination
- type UserBenefitService
- type UserDownloadableGetResponse
- type UserDownloadableListParams
- type UserDownloadableListParamsBenefitIDArray
- type UserDownloadableListParamsBenefitIDUnion
- type UserDownloadableListParamsOrganizationIDArray
- type UserDownloadableListParamsOrganizationIDUnion
- type UserDownloadableListResponse
- type UserDownloadableListResponseItem
- type UserDownloadableListResponseItemsFile
- type UserDownloadableListResponseItemsFileDownload
- type UserDownloadableListResponseItemsFileService
- type UserDownloadableListResponsePagination
- type UserDownloadableService
- type UserInfoOrganization
- type UserInfoUser
- type UserOrderGetResponse
- type UserOrderGetResponseProduct
- type UserOrderGetResponseProductBenefit
- type UserOrderGetResponseProductBenefitsBenefitArticles
- type UserOrderGetResponseProductBenefitsBenefitArticlesProperties
- type UserOrderGetResponseProductBenefitsBenefitArticlesType
- type UserOrderGetResponseProductBenefitsBenefitBase
- type UserOrderGetResponseProductBenefitsBenefitBaseType
- type UserOrderGetResponseProductBenefitsType
- type UserOrderGetResponseProductBenefitsUnion
- type UserOrderGetResponseProductPrice
- type UserOrderGetResponseProductPricesProductPriceOneTime
- type UserOrderGetResponseProductPricesProductPriceOneTimeType
- type UserOrderGetResponseProductPricesProductPriceRecurring
- type UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval
- type UserOrderGetResponseProductPricesProductPriceRecurringType
- type UserOrderGetResponseProductPricesRecurringInterval
- type UserOrderGetResponseProductPricesType
- type UserOrderGetResponseProductPricesUnion
- type UserOrderGetResponseProductType
- type UserOrderGetResponseSubscription
- type UserOrderGetResponseSubscriptionStatus
- type UserOrderInvoiceResponse
- type UserOrderListParams
- type UserOrderListParamsOrganizationIDArray
- type UserOrderListParamsOrganizationIDUnion
- type UserOrderListParamsProductIDArray
- type UserOrderListParamsProductIDUnion
- type UserOrderListParamsProductPriceTypeArray
- type UserOrderListParamsProductPriceTypeProductPriceType
- type UserOrderListParamsProductPriceTypeUnion
- type UserOrderListParamsSubscriptionIDArray
- type UserOrderListParamsSubscriptionIDUnion
- type UserOrderListResponse
- type UserOrderListResponseItem
- type UserOrderListResponseItemsProduct
- type UserOrderListResponseItemsProductBenefit
- type UserOrderListResponseItemsProductBenefitsBenefitArticles
- type UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties
- type UserOrderListResponseItemsProductBenefitsBenefitArticlesType
- type UserOrderListResponseItemsProductBenefitsBenefitBase
- type UserOrderListResponseItemsProductBenefitsBenefitBaseType
- type UserOrderListResponseItemsProductBenefitsType
- type UserOrderListResponseItemsProductBenefitsUnion
- type UserOrderListResponseItemsProductPrice
- type UserOrderListResponseItemsProductPricesProductPriceOneTime
- type UserOrderListResponseItemsProductPricesProductPriceOneTimeType
- type UserOrderListResponseItemsProductPricesProductPriceRecurring
- type UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval
- type UserOrderListResponseItemsProductPricesProductPriceRecurringType
- type UserOrderListResponseItemsProductPricesRecurringInterval
- type UserOrderListResponseItemsProductPricesType
- type UserOrderListResponseItemsProductPricesUnion
- type UserOrderListResponseItemsProductType
- type UserOrderListResponseItemsSubscription
- type UserOrderListResponseItemsSubscriptionStatus
- type UserOrderListResponsePagination
- type UserOrderService
- func (r *UserOrderService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserOrderGetResponse, err error)
- func (r *UserOrderService) Invoice(ctx context.Context, id string, opts ...option.RequestOption) (res *UserOrderInvoiceResponse, err error)
- func (r *UserOrderService) List(ctx context.Context, query UserOrderListParams, opts ...option.RequestOption) (res *UserOrderListResponse, err error)
- type UserService
- type UserSubscriptionDeleteResponse
- type UserSubscriptionDeleteResponsePrice
- type UserSubscriptionDeleteResponsePriceProductPriceOneTime
- type UserSubscriptionDeleteResponsePriceProductPriceOneTimeType
- type UserSubscriptionDeleteResponsePriceProductPriceRecurring
- type UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval
- type UserSubscriptionDeleteResponsePriceProductPriceRecurringType
- type UserSubscriptionDeleteResponsePriceRecurringInterval
- type UserSubscriptionDeleteResponsePriceType
- type UserSubscriptionDeleteResponsePriceUnion
- type UserSubscriptionDeleteResponseProduct
- type UserSubscriptionDeleteResponseProductBenefit
- type UserSubscriptionDeleteResponseProductBenefitsBenefitArticles
- type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties
- type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType
- type UserSubscriptionDeleteResponseProductBenefitsBenefitBase
- type UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType
- type UserSubscriptionDeleteResponseProductBenefitsType
- type UserSubscriptionDeleteResponseProductBenefitsUnion
- type UserSubscriptionDeleteResponseProductPrice
- type UserSubscriptionDeleteResponseProductPricesProductPriceOneTime
- type UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType
- type UserSubscriptionDeleteResponseProductPricesProductPriceRecurring
- type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval
- type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType
- type UserSubscriptionDeleteResponseProductPricesRecurringInterval
- type UserSubscriptionDeleteResponseProductPricesType
- type UserSubscriptionDeleteResponseProductPricesUnion
- type UserSubscriptionDeleteResponseProductType
- type UserSubscriptionDeleteResponseStatus
- type UserSubscriptionGetResponse
- type UserSubscriptionGetResponsePrice
- type UserSubscriptionGetResponsePriceProductPriceOneTime
- type UserSubscriptionGetResponsePriceProductPriceOneTimeType
- type UserSubscriptionGetResponsePriceProductPriceRecurring
- type UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval
- type UserSubscriptionGetResponsePriceProductPriceRecurringType
- type UserSubscriptionGetResponsePriceRecurringInterval
- type UserSubscriptionGetResponsePriceType
- type UserSubscriptionGetResponsePriceUnion
- type UserSubscriptionGetResponseProduct
- type UserSubscriptionGetResponseProductBenefit
- type UserSubscriptionGetResponseProductBenefitsBenefitArticles
- type UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties
- type UserSubscriptionGetResponseProductBenefitsBenefitArticlesType
- type UserSubscriptionGetResponseProductBenefitsBenefitBase
- type UserSubscriptionGetResponseProductBenefitsBenefitBaseType
- type UserSubscriptionGetResponseProductBenefitsType
- type UserSubscriptionGetResponseProductBenefitsUnion
- type UserSubscriptionGetResponseProductPrice
- type UserSubscriptionGetResponseProductPricesProductPriceOneTime
- type UserSubscriptionGetResponseProductPricesProductPriceOneTimeType
- type UserSubscriptionGetResponseProductPricesProductPriceRecurring
- type UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval
- type UserSubscriptionGetResponseProductPricesProductPriceRecurringType
- type UserSubscriptionGetResponseProductPricesRecurringInterval
- type UserSubscriptionGetResponseProductPricesType
- type UserSubscriptionGetResponseProductPricesUnion
- type UserSubscriptionGetResponseProductType
- type UserSubscriptionGetResponseStatus
- type UserSubscriptionListParams
- type UserSubscriptionListParamsOrganizationIDArray
- type UserSubscriptionListParamsOrganizationIDUnion
- type UserSubscriptionListParamsProductIDArray
- type UserSubscriptionListParamsProductIDUnion
- type UserSubscriptionListResponse
- type UserSubscriptionListResponseItem
- type UserSubscriptionListResponseItemsPrice
- type UserSubscriptionListResponseItemsPriceProductPriceOneTime
- type UserSubscriptionListResponseItemsPriceProductPriceOneTimeType
- type UserSubscriptionListResponseItemsPriceProductPriceRecurring
- type UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval
- type UserSubscriptionListResponseItemsPriceProductPriceRecurringType
- type UserSubscriptionListResponseItemsPriceRecurringInterval
- type UserSubscriptionListResponseItemsPriceType
- type UserSubscriptionListResponseItemsPriceUnion
- type UserSubscriptionListResponseItemsProduct
- type UserSubscriptionListResponseItemsProductBenefit
- type UserSubscriptionListResponseItemsProductBenefitsBenefitArticles
- type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties
- type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType
- type UserSubscriptionListResponseItemsProductBenefitsBenefitBase
- type UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType
- type UserSubscriptionListResponseItemsProductBenefitsType
- type UserSubscriptionListResponseItemsProductBenefitsUnion
- type UserSubscriptionListResponseItemsProductPrice
- type UserSubscriptionListResponseItemsProductPricesProductPriceOneTime
- type UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType
- type UserSubscriptionListResponseItemsProductPricesProductPriceRecurring
- type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval
- type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType
- type UserSubscriptionListResponseItemsProductPricesRecurringInterval
- type UserSubscriptionListResponseItemsProductPricesType
- type UserSubscriptionListResponseItemsProductPricesUnion
- type UserSubscriptionListResponseItemsProductType
- type UserSubscriptionListResponseItemsStatus
- type UserSubscriptionListResponsePagination
- type UserSubscriptionNewParams
- type UserSubscriptionNewResponse
- type UserSubscriptionNewResponsePrice
- type UserSubscriptionNewResponsePriceProductPriceOneTime
- type UserSubscriptionNewResponsePriceProductPriceOneTimeType
- type UserSubscriptionNewResponsePriceProductPriceRecurring
- type UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval
- type UserSubscriptionNewResponsePriceProductPriceRecurringType
- type UserSubscriptionNewResponsePriceRecurringInterval
- type UserSubscriptionNewResponsePriceType
- type UserSubscriptionNewResponsePriceUnion
- type UserSubscriptionNewResponseProduct
- type UserSubscriptionNewResponseProductBenefit
- type UserSubscriptionNewResponseProductBenefitsBenefitArticles
- type UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties
- type UserSubscriptionNewResponseProductBenefitsBenefitArticlesType
- type UserSubscriptionNewResponseProductBenefitsBenefitBase
- type UserSubscriptionNewResponseProductBenefitsBenefitBaseType
- type UserSubscriptionNewResponseProductBenefitsType
- type UserSubscriptionNewResponseProductBenefitsUnion
- type UserSubscriptionNewResponseProductPrice
- type UserSubscriptionNewResponseProductPricesProductPriceOneTime
- type UserSubscriptionNewResponseProductPricesProductPriceOneTimeType
- type UserSubscriptionNewResponseProductPricesProductPriceRecurring
- type UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval
- type UserSubscriptionNewResponseProductPricesProductPriceRecurringType
- type UserSubscriptionNewResponseProductPricesRecurringInterval
- type UserSubscriptionNewResponseProductPricesType
- type UserSubscriptionNewResponseProductPricesUnion
- type UserSubscriptionNewResponseProductType
- type UserSubscriptionNewResponseStatus
- type UserSubscriptionService
- func (r *UserSubscriptionService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *UserSubscriptionDeleteResponse, err error)
- func (r *UserSubscriptionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserSubscriptionGetResponse, err error)
- func (r *UserSubscriptionService) List(ctx context.Context, query UserSubscriptionListParams, ...) (res *UserSubscriptionListResponse, err error)
- func (r *UserSubscriptionService) New(ctx context.Context, body UserSubscriptionNewParams, ...) (res *UserSubscriptionNewResponse, err error)
- func (r *UserSubscriptionService) Update(ctx context.Context, id string, body UserSubscriptionUpdateParams, ...) (res *UserSubscriptionUpdateResponse, err error)
- type UserSubscriptionUpdateParams
- type UserSubscriptionUpdateResponse
- type UserSubscriptionUpdateResponsePrice
- type UserSubscriptionUpdateResponsePriceProductPriceOneTime
- type UserSubscriptionUpdateResponsePriceProductPriceOneTimeType
- type UserSubscriptionUpdateResponsePriceProductPriceRecurring
- type UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval
- type UserSubscriptionUpdateResponsePriceProductPriceRecurringType
- type UserSubscriptionUpdateResponsePriceRecurringInterval
- type UserSubscriptionUpdateResponsePriceType
- type UserSubscriptionUpdateResponsePriceUnion
- type UserSubscriptionUpdateResponseProduct
- type UserSubscriptionUpdateResponseProductBenefit
- type UserSubscriptionUpdateResponseProductBenefitsBenefitArticles
- type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties
- type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType
- type UserSubscriptionUpdateResponseProductBenefitsBenefitBase
- type UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType
- type UserSubscriptionUpdateResponseProductBenefitsType
- type UserSubscriptionUpdateResponseProductBenefitsUnion
- type UserSubscriptionUpdateResponseProductPrice
- type UserSubscriptionUpdateResponseProductPricesProductPriceOneTime
- type UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType
- type UserSubscriptionUpdateResponseProductPricesProductPriceRecurring
- type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval
- type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType
- type UserSubscriptionUpdateResponseProductPricesRecurringInterval
- type UserSubscriptionUpdateResponseProductPricesType
- type UserSubscriptionUpdateResponseProductPricesUnion
- type UserSubscriptionUpdateResponseProductType
- type UserSubscriptionUpdateResponseStatus
- type WebhookDeliveryListParams
- type WebhookDeliveryService
- type WebhookEndpoint
- type WebhookEndpointEvent
- type WebhookEndpointFormat
- type WebhookEndpointListParams
- type WebhookEndpointNewParams
- type WebhookEndpointNewParamsEvent
- type WebhookEndpointNewParamsFormat
- type WebhookEndpointService
- func (r *WebhookEndpointService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *WebhookEndpointService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
- func (r *WebhookEndpointService) List(ctx context.Context, query WebhookEndpointListParams, ...) (res *ListResourceWebhookEndpoint, err error)
- func (r *WebhookEndpointService) New(ctx context.Context, body WebhookEndpointNewParams, ...) (res *WebhookEndpoint, err error)
- func (r *WebhookEndpointService) Update(ctx context.Context, id string, body WebhookEndpointUpdateParams, ...) (res *WebhookEndpoint, err error)
- type WebhookEndpointUpdateParams
- type WebhookEndpointUpdateParamsEvent
- type WebhookEndpointUpdateParamsFormat
- type WebhookEventRedeliverResponse
- type WebhookEventService
- type WebhookService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AccountDashboardLinkResponse ¶
type AccountDashboardLinkResponse struct {
URL string `json:"url,required"`
JSON accountDashboardLinkResponseJSON `json:"-"`
}
func (*AccountDashboardLinkResponse) UnmarshalJSON ¶
func (r *AccountDashboardLinkResponse) UnmarshalJSON(data []byte) (err error)
type AccountGetResponse ¶
type AccountGetResponse struct {
ID string `json:"id,required" format:"uuid"`
AccountType AccountGetResponseAccountType `json:"account_type,required"`
Country string `json:"country,required"`
IsChargesEnabled bool `json:"is_charges_enabled,required"`
IsDetailsSubmitted bool `json:"is_details_submitted,required"`
IsPayoutsEnabled bool `json:"is_payouts_enabled,required"`
Organizations []AccountGetResponseOrganization `json:"organizations,required"`
Status AccountGetResponseStatus `json:"status,required"`
Users []AccountGetResponseUser `json:"users,required"`
OpenCollectiveSlug string `json:"open_collective_slug,nullable"`
StripeID string `json:"stripe_id,nullable"`
JSON accountGetResponseJSON `json:"-"`
}
func (*AccountGetResponse) UnmarshalJSON ¶
func (r *AccountGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseAccountType ¶
type AccountGetResponseAccountType string
const ( AccountGetResponseAccountTypeStripe AccountGetResponseAccountType = "stripe" AccountGetResponseAccountTypeOpenCollective AccountGetResponseAccountType = "open_collective" )
func (AccountGetResponseAccountType) IsKnown ¶
func (r AccountGetResponseAccountType) IsKnown() bool
type AccountGetResponseOrganization ¶
type AccountGetResponseOrganization struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings AccountGetResponseOrganizationsFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings AccountGetResponseOrganizationsProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON accountGetResponseOrganizationJSON `json:"-"`
}
func (*AccountGetResponseOrganization) UnmarshalJSON ¶
func (r *AccountGetResponseOrganization) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseOrganizationsFeatureSettings ¶
type AccountGetResponseOrganizationsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON accountGetResponseOrganizationsFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*AccountGetResponseOrganizationsFeatureSettings) UnmarshalJSON ¶
func (r *AccountGetResponseOrganizationsFeatureSettings) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseOrganizationsProfileSettings ¶
type AccountGetResponseOrganizationsProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe AccountGetResponseOrganizationsProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON accountGetResponseOrganizationsProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*AccountGetResponseOrganizationsProfileSettings) UnmarshalJSON ¶
func (r *AccountGetResponseOrganizationsProfileSettings) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseOrganizationsProfileSettingsSubscribe ¶
type AccountGetResponseOrganizationsProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON accountGetResponseOrganizationsProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*AccountGetResponseOrganizationsProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *AccountGetResponseOrganizationsProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseStatus ¶
type AccountGetResponseStatus string
const ( AccountGetResponseStatusCreated AccountGetResponseStatus = "created" AccountGetResponseStatusOnboardingStarted AccountGetResponseStatus = "onboarding_started" AccountGetResponseStatusUnderReview AccountGetResponseStatus = "under_review" AccountGetResponseStatusActive AccountGetResponseStatus = "active" )
func (AccountGetResponseStatus) IsKnown ¶
func (r AccountGetResponseStatus) IsKnown() bool
type AccountGetResponseUser ¶
type AccountGetResponseUser struct {
Email string `json:"email,required" format:"email"`
Username string `json:"username,required"`
AccountID string `json:"account_id,nullable" format:"uuid4"`
AvatarURL string `json:"avatar_url,nullable"`
JSON accountGetResponseUserJSON `json:"-"`
}
func (*AccountGetResponseUser) UnmarshalJSON ¶
func (r *AccountGetResponseUser) UnmarshalJSON(data []byte) (err error)
type AccountNewParams ¶
type AccountNewParams struct {
AccountType param.Field[AccountNewParamsAccountType] `json:"account_type,required"`
// Two letter uppercase country code
Country param.Field[string] `json:"country,required"`
OpenCollectiveSlug param.Field[string] `json:"open_collective_slug"`
}
func (AccountNewParams) MarshalJSON ¶
func (r AccountNewParams) MarshalJSON() (data []byte, err error)
type AccountNewParamsAccountType ¶
type AccountNewParamsAccountType string
const ( AccountNewParamsAccountTypeStripe AccountNewParamsAccountType = "stripe" AccountNewParamsAccountTypeOpenCollective AccountNewParamsAccountType = "open_collective" )
func (AccountNewParamsAccountType) IsKnown ¶
func (r AccountNewParamsAccountType) IsKnown() bool
type AccountNewResponse ¶
type AccountNewResponse struct {
ID string `json:"id,required" format:"uuid"`
AccountType AccountNewResponseAccountType `json:"account_type,required"`
Country string `json:"country,required"`
IsChargesEnabled bool `json:"is_charges_enabled,required"`
IsDetailsSubmitted bool `json:"is_details_submitted,required"`
IsPayoutsEnabled bool `json:"is_payouts_enabled,required"`
Organizations []AccountNewResponseOrganization `json:"organizations,required"`
Status AccountNewResponseStatus `json:"status,required"`
Users []AccountNewResponseUser `json:"users,required"`
OpenCollectiveSlug string `json:"open_collective_slug,nullable"`
StripeID string `json:"stripe_id,nullable"`
JSON accountNewResponseJSON `json:"-"`
}
func (*AccountNewResponse) UnmarshalJSON ¶
func (r *AccountNewResponse) UnmarshalJSON(data []byte) (err error)
type AccountNewResponseAccountType ¶
type AccountNewResponseAccountType string
const ( AccountNewResponseAccountTypeStripe AccountNewResponseAccountType = "stripe" AccountNewResponseAccountTypeOpenCollective AccountNewResponseAccountType = "open_collective" )
func (AccountNewResponseAccountType) IsKnown ¶
func (r AccountNewResponseAccountType) IsKnown() bool
type AccountNewResponseOrganization ¶
type AccountNewResponseOrganization struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings AccountNewResponseOrganizationsFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings AccountNewResponseOrganizationsProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON accountNewResponseOrganizationJSON `json:"-"`
}
func (*AccountNewResponseOrganization) UnmarshalJSON ¶
func (r *AccountNewResponseOrganization) UnmarshalJSON(data []byte) (err error)
type AccountNewResponseOrganizationsFeatureSettings ¶
type AccountNewResponseOrganizationsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON accountNewResponseOrganizationsFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*AccountNewResponseOrganizationsFeatureSettings) UnmarshalJSON ¶
func (r *AccountNewResponseOrganizationsFeatureSettings) UnmarshalJSON(data []byte) (err error)
type AccountNewResponseOrganizationsProfileSettings ¶
type AccountNewResponseOrganizationsProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe AccountNewResponseOrganizationsProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON accountNewResponseOrganizationsProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*AccountNewResponseOrganizationsProfileSettings) UnmarshalJSON ¶
func (r *AccountNewResponseOrganizationsProfileSettings) UnmarshalJSON(data []byte) (err error)
type AccountNewResponseOrganizationsProfileSettingsSubscribe ¶
type AccountNewResponseOrganizationsProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON accountNewResponseOrganizationsProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*AccountNewResponseOrganizationsProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *AccountNewResponseOrganizationsProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type AccountNewResponseStatus ¶
type AccountNewResponseStatus string
const ( AccountNewResponseStatusCreated AccountNewResponseStatus = "created" AccountNewResponseStatusOnboardingStarted AccountNewResponseStatus = "onboarding_started" AccountNewResponseStatusUnderReview AccountNewResponseStatus = "under_review" AccountNewResponseStatusActive AccountNewResponseStatus = "active" )
func (AccountNewResponseStatus) IsKnown ¶
func (r AccountNewResponseStatus) IsKnown() bool
type AccountNewResponseUser ¶
type AccountNewResponseUser struct {
Email string `json:"email,required" format:"email"`
Username string `json:"username,required"`
AccountID string `json:"account_id,nullable" format:"uuid4"`
AvatarURL string `json:"avatar_url,nullable"`
JSON accountNewResponseUserJSON `json:"-"`
}
func (*AccountNewResponseUser) UnmarshalJSON ¶
func (r *AccountNewResponseUser) UnmarshalJSON(data []byte) (err error)
type AccountOnboardingLinkParams ¶
type AccountOnboardingLinkParams struct {
ReturnPath param.Field[string] `query:"return_path,required"`
}
func (AccountOnboardingLinkParams) URLQuery ¶
func (r AccountOnboardingLinkParams) URLQuery() (v url.Values)
URLQuery serializes AccountOnboardingLinkParams's query parameters as `url.Values`.
type AccountOnboardingLinkResponse ¶
type AccountOnboardingLinkResponse struct {
URL string `json:"url,required"`
JSON accountOnboardingLinkResponseJSON `json:"-"`
}
func (*AccountOnboardingLinkResponse) UnmarshalJSON ¶
func (r *AccountOnboardingLinkResponse) UnmarshalJSON(data []byte) (err error)
type AccountSearchParams ¶
type AccountSearchParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (AccountSearchParams) URLQuery ¶
func (r AccountSearchParams) URLQuery() (v url.Values)
URLQuery serializes AccountSearchParams's query parameters as `url.Values`.
type AccountSearchResponse ¶
type AccountSearchResponse struct {
Pagination AccountSearchResponsePagination `json:"pagination,required"`
Items []AccountSearchResponseItem `json:"items"`
JSON accountSearchResponseJSON `json:"-"`
}
func (*AccountSearchResponse) UnmarshalJSON ¶
func (r *AccountSearchResponse) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItem ¶
type AccountSearchResponseItem struct {
ID string `json:"id,required" format:"uuid"`
AccountType AccountSearchResponseItemsAccountType `json:"account_type,required"`
Country string `json:"country,required"`
IsChargesEnabled bool `json:"is_charges_enabled,required"`
IsDetailsSubmitted bool `json:"is_details_submitted,required"`
IsPayoutsEnabled bool `json:"is_payouts_enabled,required"`
Organizations []AccountSearchResponseItemsOrganization `json:"organizations,required"`
Status AccountSearchResponseItemsStatus `json:"status,required"`
Users []AccountSearchResponseItemsUser `json:"users,required"`
OpenCollectiveSlug string `json:"open_collective_slug,nullable"`
StripeID string `json:"stripe_id,nullable"`
JSON accountSearchResponseItemJSON `json:"-"`
}
func (*AccountSearchResponseItem) UnmarshalJSON ¶
func (r *AccountSearchResponseItem) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItemsAccountType ¶
type AccountSearchResponseItemsAccountType string
const ( AccountSearchResponseItemsAccountTypeStripe AccountSearchResponseItemsAccountType = "stripe" AccountSearchResponseItemsAccountTypeOpenCollective AccountSearchResponseItemsAccountType = "open_collective" )
func (AccountSearchResponseItemsAccountType) IsKnown ¶
func (r AccountSearchResponseItemsAccountType) IsKnown() bool
type AccountSearchResponseItemsOrganization ¶
type AccountSearchResponseItemsOrganization struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings AccountSearchResponseItemsOrganizationsFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings AccountSearchResponseItemsOrganizationsProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON accountSearchResponseItemsOrganizationJSON `json:"-"`
}
func (*AccountSearchResponseItemsOrganization) UnmarshalJSON ¶
func (r *AccountSearchResponseItemsOrganization) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItemsOrganizationsFeatureSettings ¶
type AccountSearchResponseItemsOrganizationsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON accountSearchResponseItemsOrganizationsFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*AccountSearchResponseItemsOrganizationsFeatureSettings) UnmarshalJSON ¶
func (r *AccountSearchResponseItemsOrganizationsFeatureSettings) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItemsOrganizationsProfileSettings ¶
type AccountSearchResponseItemsOrganizationsProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON accountSearchResponseItemsOrganizationsProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*AccountSearchResponseItemsOrganizationsProfileSettings) UnmarshalJSON ¶
func (r *AccountSearchResponseItemsOrganizationsProfileSettings) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe ¶
type AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON accountSearchResponseItemsOrganizationsProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *AccountSearchResponseItemsOrganizationsProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponseItemsStatus ¶
type AccountSearchResponseItemsStatus string
const ( AccountSearchResponseItemsStatusCreated AccountSearchResponseItemsStatus = "created" AccountSearchResponseItemsStatusOnboardingStarted AccountSearchResponseItemsStatus = "onboarding_started" AccountSearchResponseItemsStatusUnderReview AccountSearchResponseItemsStatus = "under_review" AccountSearchResponseItemsStatusActive AccountSearchResponseItemsStatus = "active" )
func (AccountSearchResponseItemsStatus) IsKnown ¶
func (r AccountSearchResponseItemsStatus) IsKnown() bool
type AccountSearchResponseItemsUser ¶
type AccountSearchResponseItemsUser struct {
Email string `json:"email,required" format:"email"`
Username string `json:"username,required"`
AccountID string `json:"account_id,nullable" format:"uuid4"`
AvatarURL string `json:"avatar_url,nullable"`
JSON accountSearchResponseItemsUserJSON `json:"-"`
}
func (*AccountSearchResponseItemsUser) UnmarshalJSON ¶
func (r *AccountSearchResponseItemsUser) UnmarshalJSON(data []byte) (err error)
type AccountSearchResponsePagination ¶
type AccountSearchResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON accountSearchResponsePaginationJSON `json:"-"`
}
func (*AccountSearchResponsePagination) UnmarshalJSON ¶
func (r *AccountSearchResponsePagination) UnmarshalJSON(data []byte) (err error)
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
}
AccountService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) DashboardLink ¶
func (r *AccountService) DashboardLink(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountDashboardLinkResponse, err error)
Dashboard Link
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGetResponse, err error)
Get
func (*AccountService) New ¶
func (r *AccountService) New(ctx context.Context, body AccountNewParams, opts ...option.RequestOption) (res *AccountNewResponse, err error)
Create
func (*AccountService) OnboardingLink ¶
func (r *AccountService) OnboardingLink(ctx context.Context, id string, body AccountOnboardingLinkParams, opts ...option.RequestOption) (res *AccountOnboardingLinkResponse, err error)
Onboarding Link
func (*AccountService) Search ¶
func (r *AccountService) Search(ctx context.Context, query AccountSearchParams, opts ...option.RequestOption) (res *AccountSearchResponse, err error)
Search
type AdvertisementCampaign ¶
type AdvertisementCampaign struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ImageURL string `json:"image_url,required" format:"uri"`
LinkURL string `json:"link_url,required" format:"uri"`
Text string `json:"text,required"`
ImageURLDark string `json:"image_url_dark,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON advertisementCampaignJSON `json:"-"`
}
func (*AdvertisementCampaign) UnmarshalJSON ¶
func (r *AdvertisementCampaign) UnmarshalJSON(data []byte) (err error)
type AdvertisementCampaignListResource ¶
type AdvertisementCampaignListResource struct {
// The dimensions (width, height) in pixels of the advertisement images.
Dimensions []int64 `json:"dimensions,required"`
Pagination AdvertisementCampaignListResourcePagination `json:"pagination,required"`
Items []AdvertisementCampaign `json:"items"`
JSON advertisementCampaignListResourceJSON `json:"-"`
}
func (*AdvertisementCampaignListResource) UnmarshalJSON ¶
func (r *AdvertisementCampaignListResource) UnmarshalJSON(data []byte) (err error)
type AdvertisementCampaignListResourcePagination ¶
type AdvertisementCampaignListResourcePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON advertisementCampaignListResourcePaginationJSON `json:"-"`
}
func (*AdvertisementCampaignListResourcePagination) UnmarshalJSON ¶
func (r *AdvertisementCampaignListResourcePagination) UnmarshalJSON(data []byte) (err error)
type AdvertisementListParams ¶
type AdvertisementListParams struct {
// The benefit ID.
BenefitID param.Field[string] `query:"benefit_id,required" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (AdvertisementListParams) URLQuery ¶
func (r AdvertisementListParams) URLQuery() (v url.Values)
URLQuery serializes AdvertisementListParams's query parameters as `url.Values`.
type AdvertisementService ¶
type AdvertisementService struct {
Options []option.RequestOption
}
AdvertisementService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAdvertisementService method instead.
func NewAdvertisementService ¶
func NewAdvertisementService(opts ...option.RequestOption) (r *AdvertisementService)
NewAdvertisementService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AdvertisementService) Get ¶
func (r *AdvertisementService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AdvertisementCampaign, err error)
Get an advertisement campaign by ID.
func (*AdvertisementService) List ¶
func (r *AdvertisementService) List(ctx context.Context, query AdvertisementListParams, opts ...option.RequestOption) (res *AdvertisementCampaignListResource, err error)
List active advertisement campaigns for a benefit.
type Article ¶
type Article struct {
ID string `json:"id,required" format:"uuid4"`
Body string `json:"body,required"`
Byline ArticleByline `json:"byline,required"`
IsPinned bool `json:"is_pinned,required"`
IsPreview bool `json:"is_preview,required"`
Organization ArticleOrganization `json:"organization,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Slug string `json:"slug,required"`
Title string `json:"title,required"`
Visibility ArticleVisibility `json:"visibility,required"`
EmailSentToCount int64 `json:"email_sent_to_count,nullable"`
NotificationsSentAt time.Time `json:"notifications_sent_at,nullable" format:"date-time"`
NotifySubscribers bool `json:"notify_subscribers,nullable"`
OgDescription string `json:"og_description,nullable"`
OgImageURL string `json:"og_image_url,nullable"`
PaidSubscribersOnly bool `json:"paid_subscribers_only,nullable"`
PaidSubscribersOnlyEndsAt time.Time `json:"paid_subscribers_only_ends_at,nullable" format:"date-time"`
PublishedAt time.Time `json:"published_at,nullable" format:"date-time"`
UserID string `json:"user_id,nullable" format:"uuid4"`
JSON articleJSON `json:"-"`
}
func (*Article) UnmarshalJSON ¶
type ArticleByline ¶
type ArticleByline struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
JSON articleBylineJSON `json:"-"`
}
func (*ArticleByline) UnmarshalJSON ¶
func (r *ArticleByline) UnmarshalJSON(data []byte) (err error)
type ArticleListParams ¶
type ArticleListParams struct {
// Filter by pinned status.
IsPinned param.Field[bool] `query:"is_pinned"`
// Filter by published status.
IsPublished param.Field[bool] `query:"is_published"`
// Filter by subscription status.
IsSubscribed param.Field[bool] `query:"is_subscribed"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[ArticleListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by slug.
Slug param.Field[string] `query:"slug"`
// Filter by visibility.
Visibility param.Field[ArticleListParamsVisibilityUnion] `query:"visibility"`
}
func (ArticleListParams) URLQuery ¶
func (r ArticleListParams) URLQuery() (v url.Values)
URLQuery serializes ArticleListParams's query parameters as `url.Values`.
type ArticleListParamsOrganizationIDArray ¶
type ArticleListParamsOrganizationIDArray []string
func (ArticleListParamsOrganizationIDArray) ImplementsArticleListParamsOrganizationIDUnion ¶
func (r ArticleListParamsOrganizationIDArray) ImplementsArticleListParamsOrganizationIDUnion()
type ArticleListParamsOrganizationIDUnion ¶
type ArticleListParamsOrganizationIDUnion interface {
ImplementsArticleListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], ArticleListParamsOrganizationIDArray.
type ArticleListParamsVisibilityArray ¶
type ArticleListParamsVisibilityArray []ArticleListParamsVisibilityArray
type ArticleListParamsVisibilityArticleVisibility ¶
type ArticleListParamsVisibilityArticleVisibility string
const ( ArticleListParamsVisibilityArticleVisibilityPublic ArticleListParamsVisibilityArticleVisibility = "public" ArticleListParamsVisibilityArticleVisibilityHidden ArticleListParamsVisibilityArticleVisibility = "hidden" ArticleListParamsVisibilityArticleVisibilityPrivate ArticleListParamsVisibilityArticleVisibility = "private" )
func (ArticleListParamsVisibilityArticleVisibility) IsKnown ¶
func (r ArticleListParamsVisibilityArticleVisibility) IsKnown() bool
type ArticleListParamsVisibilityUnion ¶
type ArticleListParamsVisibilityUnion interface {
// contains filtered or unexported methods
}
Filter by visibility.
Satisfied by ArticleListParamsVisibilityArticleVisibility, ArticleListParamsVisibilityArray.
type ArticleNewParams ¶
type ArticleNewParams struct {
// Title of the article.
Title param.Field[string] `json:"title,required"`
// Body in string format. Either one of body or body_base64 is required.
Body param.Field[string] `json:"body"`
// Body in base64-encoded format. Can be helpful to bypass Web Application
// Firewalls (WAF). Either one of body or body_base64 is required.
BodyBase64 param.Field[string] `json:"body_base64"`
// If the user or organization should be credited in the byline.
Byline param.Field[ArticleNewParamsByline] `json:"byline"`
// If the article should be pinned
IsPinned param.Field[bool] `json:"is_pinned"`
// Set to true to deliver this article via email and/or notifications to
// subscribers.
NotifySubscribers param.Field[bool] `json:"notify_subscribers"`
// Custom og:description value
OgDescription param.Field[string] `json:"og_description"`
// Custom og:image URL value
OgImageURL param.Field[string] `json:"og_image_url" format:"uri"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
// Set to true to only make this article available for subscribers to a paid
// subscription tier in the organization.
PaidSubscribersOnly param.Field[bool] `json:"paid_subscribers_only"`
// If specified, time at which the article should no longer be restricted to paid
// subscribers. Only relevant if `paid_subscribers_only` is true.
PaidSubscribersOnlyEndsAt param.Field[time.Time] `json:"paid_subscribers_only_ends_at" format:"date-time"`
// Time of publishing. If this date is in the future, the post will be scheduled to
// publish at this time. If visibility is 'public', published_at will default to
// the current time.
PublishedAt param.Field[time.Time] `json:"published_at" format:"date-time"`
// Slug of the article to be used in URLs. If no slug is provided one will be
// generated from the title.
Slug param.Field[string] `json:"slug"`
Visibility param.Field[ArticleNewParamsVisibility] `json:"visibility"`
}
func (ArticleNewParams) MarshalJSON ¶
func (r ArticleNewParams) MarshalJSON() (data []byte, err error)
type ArticleNewParamsByline ¶
type ArticleNewParamsByline string
If the user or organization should be credited in the byline.
const ( ArticleNewParamsBylineUser ArticleNewParamsByline = "user" ArticleNewParamsBylineOrganization ArticleNewParamsByline = "organization" )
func (ArticleNewParamsByline) IsKnown ¶
func (r ArticleNewParamsByline) IsKnown() bool
type ArticleNewParamsVisibility ¶
type ArticleNewParamsVisibility string
const ( ArticleNewParamsVisibilityPublic ArticleNewParamsVisibility = "public" ArticleNewParamsVisibilityHidden ArticleNewParamsVisibility = "hidden" ArticleNewParamsVisibilityPrivate ArticleNewParamsVisibility = "private" )
func (ArticleNewParamsVisibility) IsKnown ¶
func (r ArticleNewParamsVisibility) IsKnown() bool
type ArticleOrganization ¶
type ArticleOrganization struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings ArticleOrganizationFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings ArticleOrganizationProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON articleOrganizationJSON `json:"-"`
}
func (*ArticleOrganization) UnmarshalJSON ¶
func (r *ArticleOrganization) UnmarshalJSON(data []byte) (err error)
type ArticleOrganizationFeatureSettings ¶
type ArticleOrganizationFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON articleOrganizationFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*ArticleOrganizationFeatureSettings) UnmarshalJSON ¶
func (r *ArticleOrganizationFeatureSettings) UnmarshalJSON(data []byte) (err error)
type ArticleOrganizationProfileSettings ¶
type ArticleOrganizationProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe ArticleOrganizationProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON articleOrganizationProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*ArticleOrganizationProfileSettings) UnmarshalJSON ¶
func (r *ArticleOrganizationProfileSettings) UnmarshalJSON(data []byte) (err error)
type ArticleOrganizationProfileSettingsSubscribe ¶
type ArticleOrganizationProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON articleOrganizationProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*ArticleOrganizationProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *ArticleOrganizationProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type ArticlePreviewParams ¶
type ArticlePreviewParams struct {
// Email address to send the preview to. The user must be registered on Polar.
Email param.Field[string] `json:"email,required" format:"email"`
}
func (ArticlePreviewParams) MarshalJSON ¶
func (r ArticlePreviewParams) MarshalJSON() (data []byte, err error)
type ArticlePreviewResponse ¶
type ArticlePreviewResponse = interface{}
type ArticleReceiverService ¶
type ArticleReceiverService struct {
Options []option.RequestOption
}
ArticleReceiverService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewArticleReceiverService method instead.
func NewArticleReceiverService ¶
func NewArticleReceiverService(opts ...option.RequestOption) (r *ArticleReceiverService)
NewArticleReceiverService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ArticleReceiverService) List ¶
func (r *ArticleReceiverService) List(ctx context.Context, id string, opts ...option.RequestOption) (res *ArticleReceivers, err error)
Get number of potential receivers for an article.
type ArticleReceivers ¶
type ArticleReceivers struct {
FreeSubscribers int64 `json:"free_subscribers,required"`
OrganizationMembers int64 `json:"organization_members,required"`
PremiumSubscribers int64 `json:"premium_subscribers,required"`
JSON articleReceiversJSON `json:"-"`
}
func (*ArticleReceivers) UnmarshalJSON ¶
func (r *ArticleReceivers) UnmarshalJSON(data []byte) (err error)
type ArticleSendResponse ¶
type ArticleSendResponse = interface{}
type ArticleService ¶
type ArticleService struct {
Options []option.RequestOption
Receivers *ArticleReceiverService
}
ArticleService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewArticleService method instead.
func NewArticleService ¶
func NewArticleService(opts ...option.RequestOption) (r *ArticleService)
NewArticleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ArticleService) Delete ¶
func (r *ArticleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete an article.
func (*ArticleService) Get ¶
func (r *ArticleService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Article, err error)
Get an article by ID.
func (*ArticleService) List ¶
func (r *ArticleService) List(ctx context.Context, query ArticleListParams, opts ...option.RequestOption) (res *ListResourceArticle, err error)
List articles.
func (*ArticleService) New ¶
func (r *ArticleService) New(ctx context.Context, body ArticleNewParams, opts ...option.RequestOption) (res *Article, err error)
Create an article.
func (*ArticleService) Preview ¶
func (r *ArticleService) Preview(ctx context.Context, id string, body ArticlePreviewParams, opts ...option.RequestOption) (res *ArticlePreviewResponse, err error)
Send an article preview by email.
func (*ArticleService) Send ¶
func (r *ArticleService) Send(ctx context.Context, id string, opts ...option.RequestOption) (res *ArticleSendResponse, err error)
Send an article by email to all subscribers.
func (*ArticleService) Update ¶
func (r *ArticleService) Update(ctx context.Context, id string, body ArticleUpdateParams, opts ...option.RequestOption) (res *Article, err error)
Update an article.
type ArticleUpdateParams ¶
type ArticleUpdateParams struct {
// Body in string format. body and body_base64 are mutually exclusive.
Body param.Field[string] `json:"body"`
// Body in base64-encoded format. Can be helpful to bypass Web Application
// Firewalls (WAF). body and body_base64 are mutually exclusive.
BodyBase64 param.Field[string] `json:"body_base64"`
// If the user or organization should be credited in the byline.
Byline param.Field[ArticleUpdateParamsByline] `json:"byline"`
// If the article should be pinned
IsPinned param.Field[bool] `json:"is_pinned"`
// Set to true to deliver this article via email and/or notifications to
// subscribers.
NotifySubscribers param.Field[bool] `json:"notify_subscribers"`
// Custom og:description value
OgDescription param.Field[string] `json:"og_description"`
// Custom og:image URL value
OgImageURL param.Field[string] `json:"og_image_url" format:"uri"`
// Set to true to only make this article available for subscribers to a paid
// subscription tier in the organization.
PaidSubscribersOnly param.Field[bool] `json:"paid_subscribers_only"`
// If specified, time at which the article should no longer be restricted to paid
// subscribers. Only relevant if `paid_subscribers_only` is true.
PaidSubscribersOnlyEndsAt param.Field[time.Time] `json:"paid_subscribers_only_ends_at" format:"date-time"`
// Time of publishing. If this date is in the future, the post will be scheduled to
// publish at this time.
PublishedAt param.Field[time.Time] `json:"published_at" format:"date-time"`
Slug param.Field[string] `json:"slug"`
Title param.Field[string] `json:"title"`
Visibility param.Field[ArticleUpdateParamsVisibility] `json:"visibility"`
}
func (ArticleUpdateParams) MarshalJSON ¶
func (r ArticleUpdateParams) MarshalJSON() (data []byte, err error)
type ArticleUpdateParamsByline ¶
type ArticleUpdateParamsByline string
If the user or organization should be credited in the byline.
const ( ArticleUpdateParamsBylineUser ArticleUpdateParamsByline = "user" ArticleUpdateParamsBylineOrganization ArticleUpdateParamsByline = "organization" )
func (ArticleUpdateParamsByline) IsKnown ¶
func (r ArticleUpdateParamsByline) IsKnown() bool
type ArticleUpdateParamsVisibility ¶
type ArticleUpdateParamsVisibility string
const ( ArticleUpdateParamsVisibilityPublic ArticleUpdateParamsVisibility = "public" ArticleUpdateParamsVisibilityHidden ArticleUpdateParamsVisibility = "hidden" ArticleUpdateParamsVisibilityPrivate ArticleUpdateParamsVisibility = "private" )
func (ArticleUpdateParamsVisibility) IsKnown ¶
func (r ArticleUpdateParamsVisibility) IsKnown() bool
type ArticleVisibility ¶
type ArticleVisibility string
const ( ArticleVisibilityPublic ArticleVisibility = "public" ArticleVisibilityHidden ArticleVisibility = "hidden" ArticleVisibilityPrivate ArticleVisibility = "private" )
func (ArticleVisibility) IsKnown ¶
func (r ArticleVisibility) IsKnown() bool
type AuthorizeResponseOrganization ¶
type AuthorizeResponseOrganization struct {
Client AuthorizeResponseOrganizationClient `json:"client,required"`
Organizations []AuthorizeResponseOrganizationOrganization `json:"organizations,required"`
Scopes []AuthorizeResponseOrganizationScope `json:"scopes,required"`
SubType AuthorizeResponseOrganizationSubType `json:"sub_type,required"`
Sub AuthorizeResponseOrganizationSub `json:"sub,nullable"`
JSON authorizeResponseOrganizationJSON `json:"-"`
}
func (*AuthorizeResponseOrganization) UnmarshalJSON ¶
func (r *AuthorizeResponseOrganization) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseOrganizationClient ¶
type AuthorizeResponseOrganizationClient struct {
ClientID string `json:"client_id,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ClientName string `json:"client_name,nullable"`
ClientUri string `json:"client_uri,nullable"`
LogoUri string `json:"logo_uri,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PolicyUri string `json:"policy_uri,nullable"`
TosUri string `json:"tos_uri,nullable"`
JSON authorizeResponseOrganizationClientJSON `json:"-"`
}
func (*AuthorizeResponseOrganizationClient) UnmarshalJSON ¶
func (r *AuthorizeResponseOrganizationClient) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseOrganizationOrganization ¶
type AuthorizeResponseOrganizationOrganization struct {
ID string `json:"id,required" format:"uuid4"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
JSON authorizeResponseOrganizationOrganizationJSON `json:"-"`
}
func (*AuthorizeResponseOrganizationOrganization) UnmarshalJSON ¶
func (r *AuthorizeResponseOrganizationOrganization) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseOrganizationScope ¶
type AuthorizeResponseOrganizationScope string
const ( AuthorizeResponseOrganizationScopeOpenid AuthorizeResponseOrganizationScope = "openid" AuthorizeResponseOrganizationScopeProfile AuthorizeResponseOrganizationScope = "profile" AuthorizeResponseOrganizationScopeEmail AuthorizeResponseOrganizationScope = "email" AuthorizeResponseOrganizationScopeUserRead AuthorizeResponseOrganizationScope = "user:read" AuthorizeResponseOrganizationScopeAdmin AuthorizeResponseOrganizationScope = "admin" AuthorizeResponseOrganizationScopeWebDefault AuthorizeResponseOrganizationScope = "web_default" AuthorizeResponseOrganizationScopeOrganizationsRead AuthorizeResponseOrganizationScope = "organizations:read" AuthorizeResponseOrganizationScopeOrganizationsWrite AuthorizeResponseOrganizationScope = "organizations:write" AuthorizeResponseOrganizationScopeProductsRead AuthorizeResponseOrganizationScope = "products:read" AuthorizeResponseOrganizationScopeProductsWrite AuthorizeResponseOrganizationScope = "products:write" AuthorizeResponseOrganizationScopeBenefitsRead AuthorizeResponseOrganizationScope = "benefits:read" AuthorizeResponseOrganizationScopeBenefitsWrite AuthorizeResponseOrganizationScope = "benefits:write" AuthorizeResponseOrganizationScopeFilesRead AuthorizeResponseOrganizationScope = "files:read" AuthorizeResponseOrganizationScopeFilesWrite AuthorizeResponseOrganizationScope = "files:write" AuthorizeResponseOrganizationScopeSubscriptionsRead AuthorizeResponseOrganizationScope = "subscriptions:read" AuthorizeResponseOrganizationScopeSubscriptionsWrite AuthorizeResponseOrganizationScope = "subscriptions:write" AuthorizeResponseOrganizationScopeOrdersRead AuthorizeResponseOrganizationScope = "orders:read" AuthorizeResponseOrganizationScopeMetricsRead AuthorizeResponseOrganizationScope = "metrics:read" AuthorizeResponseOrganizationScopeArticlesRead AuthorizeResponseOrganizationScope = "articles:read" AuthorizeResponseOrganizationScopeArticlesWrite AuthorizeResponseOrganizationScope = "articles:write" AuthorizeResponseOrganizationScopeWebhooksRead AuthorizeResponseOrganizationScope = "webhooks:read" AuthorizeResponseOrganizationScopeWebhooksWrite AuthorizeResponseOrganizationScope = "webhooks:write" AuthorizeResponseOrganizationScopeExternalOrganizationsRead AuthorizeResponseOrganizationScope = "external_organizations:read" AuthorizeResponseOrganizationScopeRepositoriesRead AuthorizeResponseOrganizationScope = "repositories:read" AuthorizeResponseOrganizationScopeRepositoriesWrite AuthorizeResponseOrganizationScope = "repositories:write" AuthorizeResponseOrganizationScopeIssuesRead AuthorizeResponseOrganizationScope = "issues:read" AuthorizeResponseOrganizationScopeIssuesWrite AuthorizeResponseOrganizationScope = "issues:write" AuthorizeResponseOrganizationScopeUserBenefitsRead AuthorizeResponseOrganizationScope = "user:benefits:read" AuthorizeResponseOrganizationScopeUserOrdersRead AuthorizeResponseOrganizationScope = "user:orders:read" AuthorizeResponseOrganizationScopeUserSubscriptionsRead AuthorizeResponseOrganizationScope = "user:subscriptions:read" AuthorizeResponseOrganizationScopeUserSubscriptionsWrite AuthorizeResponseOrganizationScope = "user:subscriptions:write" AuthorizeResponseOrganizationScopeUserDownloadablesRead AuthorizeResponseOrganizationScope = "user:downloadables:read" AuthorizeResponseOrganizationScopeUserAdvertisementCampaignsRead AuthorizeResponseOrganizationScope = "user:advertisement_campaigns:read" AuthorizeResponseOrganizationScopeUserAdvertisementCampaignsWrite AuthorizeResponseOrganizationScope = "user:advertisement_campaigns:write" )
func (AuthorizeResponseOrganizationScope) IsKnown ¶
func (r AuthorizeResponseOrganizationScope) IsKnown() bool
type AuthorizeResponseOrganizationSub ¶
type AuthorizeResponseOrganizationSub struct {
ID string `json:"id,required" format:"uuid4"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
JSON authorizeResponseOrganizationSubJSON `json:"-"`
}
func (*AuthorizeResponseOrganizationSub) UnmarshalJSON ¶
func (r *AuthorizeResponseOrganizationSub) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseOrganizationSubType ¶
type AuthorizeResponseOrganizationSubType string
const (
AuthorizeResponseOrganizationSubTypeOrganization AuthorizeResponseOrganizationSubType = "organization"
)
func (AuthorizeResponseOrganizationSubType) IsKnown ¶
func (r AuthorizeResponseOrganizationSubType) IsKnown() bool
type AuthorizeResponseUser ¶
type AuthorizeResponseUser struct {
Client AuthorizeResponseUserClient `json:"client,required"`
Scopes []AuthorizeResponseUserScope `json:"scopes,required"`
SubType AuthorizeResponseUserSubType `json:"sub_type,required"`
Sub AuthorizeResponseUserSub `json:"sub,nullable"`
JSON authorizeResponseUserJSON `json:"-"`
}
func (*AuthorizeResponseUser) UnmarshalJSON ¶
func (r *AuthorizeResponseUser) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseUserClient ¶
type AuthorizeResponseUserClient struct {
ClientID string `json:"client_id,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ClientName string `json:"client_name,nullable"`
ClientUri string `json:"client_uri,nullable"`
LogoUri string `json:"logo_uri,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PolicyUri string `json:"policy_uri,nullable"`
TosUri string `json:"tos_uri,nullable"`
JSON authorizeResponseUserClientJSON `json:"-"`
}
func (*AuthorizeResponseUserClient) UnmarshalJSON ¶
func (r *AuthorizeResponseUserClient) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseUserScope ¶
type AuthorizeResponseUserScope string
const ( AuthorizeResponseUserScopeOpenid AuthorizeResponseUserScope = "openid" AuthorizeResponseUserScopeProfile AuthorizeResponseUserScope = "profile" AuthorizeResponseUserScopeEmail AuthorizeResponseUserScope = "email" AuthorizeResponseUserScopeUserRead AuthorizeResponseUserScope = "user:read" AuthorizeResponseUserScopeAdmin AuthorizeResponseUserScope = "admin" AuthorizeResponseUserScopeWebDefault AuthorizeResponseUserScope = "web_default" AuthorizeResponseUserScopeOrganizationsRead AuthorizeResponseUserScope = "organizations:read" AuthorizeResponseUserScopeOrganizationsWrite AuthorizeResponseUserScope = "organizations:write" AuthorizeResponseUserScopeProductsRead AuthorizeResponseUserScope = "products:read" AuthorizeResponseUserScopeProductsWrite AuthorizeResponseUserScope = "products:write" AuthorizeResponseUserScopeBenefitsRead AuthorizeResponseUserScope = "benefits:read" AuthorizeResponseUserScopeBenefitsWrite AuthorizeResponseUserScope = "benefits:write" AuthorizeResponseUserScopeFilesRead AuthorizeResponseUserScope = "files:read" AuthorizeResponseUserScopeFilesWrite AuthorizeResponseUserScope = "files:write" AuthorizeResponseUserScopeSubscriptionsRead AuthorizeResponseUserScope = "subscriptions:read" AuthorizeResponseUserScopeSubscriptionsWrite AuthorizeResponseUserScope = "subscriptions:write" AuthorizeResponseUserScopeOrdersRead AuthorizeResponseUserScope = "orders:read" AuthorizeResponseUserScopeMetricsRead AuthorizeResponseUserScope = "metrics:read" AuthorizeResponseUserScopeArticlesRead AuthorizeResponseUserScope = "articles:read" AuthorizeResponseUserScopeArticlesWrite AuthorizeResponseUserScope = "articles:write" AuthorizeResponseUserScopeWebhooksRead AuthorizeResponseUserScope = "webhooks:read" AuthorizeResponseUserScopeWebhooksWrite AuthorizeResponseUserScope = "webhooks:write" AuthorizeResponseUserScopeExternalOrganizationsRead AuthorizeResponseUserScope = "external_organizations:read" AuthorizeResponseUserScopeRepositoriesRead AuthorizeResponseUserScope = "repositories:read" AuthorizeResponseUserScopeRepositoriesWrite AuthorizeResponseUserScope = "repositories:write" AuthorizeResponseUserScopeIssuesRead AuthorizeResponseUserScope = "issues:read" AuthorizeResponseUserScopeIssuesWrite AuthorizeResponseUserScope = "issues:write" AuthorizeResponseUserScopeUserBenefitsRead AuthorizeResponseUserScope = "user:benefits:read" AuthorizeResponseUserScopeUserOrdersRead AuthorizeResponseUserScope = "user:orders:read" AuthorizeResponseUserScopeUserSubscriptionsRead AuthorizeResponseUserScope = "user:subscriptions:read" AuthorizeResponseUserScopeUserSubscriptionsWrite AuthorizeResponseUserScope = "user:subscriptions:write" AuthorizeResponseUserScopeUserDownloadablesRead AuthorizeResponseUserScope = "user:downloadables:read" AuthorizeResponseUserScopeUserAdvertisementCampaignsRead AuthorizeResponseUserScope = "user:advertisement_campaigns:read" AuthorizeResponseUserScopeUserAdvertisementCampaignsWrite AuthorizeResponseUserScope = "user:advertisement_campaigns:write" )
func (AuthorizeResponseUserScope) IsKnown ¶
func (r AuthorizeResponseUserScope) IsKnown() bool
type AuthorizeResponseUserSub ¶
type AuthorizeResponseUserSub struct {
ID string `json:"id,required" format:"uuid4"`
Email string `json:"email,required" format:"email"`
Username string `json:"username,required"`
AvatarURL string `json:"avatar_url,nullable"`
JSON authorizeResponseUserSubJSON `json:"-"`
}
func (*AuthorizeResponseUserSub) UnmarshalJSON ¶
func (r *AuthorizeResponseUserSub) UnmarshalJSON(data []byte) (err error)
type AuthorizeResponseUserSubType ¶
type AuthorizeResponseUserSubType string
const (
AuthorizeResponseUserSubTypeUser AuthorizeResponseUserSubType = "user"
)
func (AuthorizeResponseUserSubType) IsKnown ¶
func (r AuthorizeResponseUserSubType) IsKnown() bool
type BenefitGetResponse ¶
type BenefitGetResponse struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type BenefitGetResponseType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [BenefitGetResponseBenefitArticlesProperties],
// [BenefitGetResponseBenefitAdsProperties],
// [BenefitGetResponseBenefitCustomProperties],
// [BenefitGetResponseBenefitDiscordOutputProperties],
// [BenefitGetResponseBenefitGitHubRepositoryProperties],
// [BenefitGetResponseBenefitDownloadablesProperties].
Properties interface{} `json:"properties"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable"`
JSON benefitGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (BenefitGetResponse) AsUnion ¶
func (r BenefitGetResponse) AsUnion() BenefitGetResponseUnion
AsUnion returns a BenefitGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BenefitGetResponseBenefitArticles, BenefitGetResponseBenefitAds, BenefitGetResponseBenefitCustom, BenefitGetResponseBenefitDiscordOutput, BenefitGetResponseBenefitGitHubRepository, BenefitGetResponseBenefitDownloadables.
func (*BenefitGetResponse) UnmarshalJSON ¶
func (r *BenefitGetResponse) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitAds ¶
type BenefitGetResponseBenefitAds struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties BenefitGetResponseBenefitAdsProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitAdsType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitAdsJSON `json:"-"`
}
A benefit of type `ads`.
Use it so your backers can display ads on your README, website, etc.
func (*BenefitGetResponseBenefitAds) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitAds) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitAdsProperties ¶
type BenefitGetResponseBenefitAdsProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON benefitGetResponseBenefitAdsPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*BenefitGetResponseBenefitAdsProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitAdsProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitAdsType ¶
type BenefitGetResponseBenefitAdsType string
const (
BenefitGetResponseBenefitAdsTypeAds BenefitGetResponseBenefitAdsType = "ads"
)
func (BenefitGetResponseBenefitAdsType) IsKnown ¶
func (r BenefitGetResponseBenefitAdsType) IsKnown() bool
type BenefitGetResponseBenefitArticles ¶
type BenefitGetResponseBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties BenefitGetResponseBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*BenefitGetResponseBenefitArticles) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitArticles) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitArticlesProperties ¶
type BenefitGetResponseBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON benefitGetResponseBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*BenefitGetResponseBenefitArticlesProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitArticlesType ¶
type BenefitGetResponseBenefitArticlesType string
const (
BenefitGetResponseBenefitArticlesTypeArticles BenefitGetResponseBenefitArticlesType = "articles"
)
func (BenefitGetResponseBenefitArticlesType) IsKnown ¶
func (r BenefitGetResponseBenefitArticlesType) IsKnown() bool
type BenefitGetResponseBenefitCustom ¶
type BenefitGetResponseBenefitCustom struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `custom`.
Properties BenefitGetResponseBenefitCustomProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitCustomType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitCustomJSON `json:"-"`
}
A benefit of type `custom`.
Use it to grant any kind of benefit that doesn't fit in the other types.
func (*BenefitGetResponseBenefitCustom) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitCustom) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitCustomProperties ¶
type BenefitGetResponseBenefitCustomProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON benefitGetResponseBenefitCustomPropertiesJSON `json:"-"`
}
Properties for a benefit of type `custom`.
func (*BenefitGetResponseBenefitCustomProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitCustomProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitCustomType ¶
type BenefitGetResponseBenefitCustomType string
const (
BenefitGetResponseBenefitCustomTypeCustom BenefitGetResponseBenefitCustomType = "custom"
)
func (BenefitGetResponseBenefitCustomType) IsKnown ¶
func (r BenefitGetResponseBenefitCustomType) IsKnown() bool
type BenefitGetResponseBenefitDiscordOutput ¶
type BenefitGetResponseBenefitDiscordOutput struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `discord`.
Properties BenefitGetResponseBenefitDiscordOutputProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitDiscordOutputType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitDiscordOutputJSON `json:"-"`
}
A benefit of type `discord`.
Use it to automatically invite your backers to a Discord server.
func (*BenefitGetResponseBenefitDiscordOutput) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitDiscordOutput) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitDiscordOutputProperties ¶
type BenefitGetResponseBenefitDiscordOutputProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
GuildToken string `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID string `json:"role_id,required"`
JSON benefitGetResponseBenefitDiscordOutputPropertiesJSON `json:"-"`
}
Properties for a benefit of type `discord`.
func (*BenefitGetResponseBenefitDiscordOutputProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitDiscordOutputProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitDiscordOutputType ¶
type BenefitGetResponseBenefitDiscordOutputType string
const (
BenefitGetResponseBenefitDiscordOutputTypeDiscord BenefitGetResponseBenefitDiscordOutputType = "discord"
)
func (BenefitGetResponseBenefitDiscordOutputType) IsKnown ¶
func (r BenefitGetResponseBenefitDiscordOutputType) IsKnown() bool
type BenefitGetResponseBenefitDownloadables ¶
type BenefitGetResponseBenefitDownloadables struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties BenefitGetResponseBenefitDownloadablesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitDownloadablesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitDownloadablesJSON `json:"-"`
}
func (*BenefitGetResponseBenefitDownloadables) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitDownloadables) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitDownloadablesProperties ¶
type BenefitGetResponseBenefitDownloadablesProperties struct {
Archived map[string]bool `json:"archived,required"`
Files []string `json:"files,required" format:"uuid4"`
JSON benefitGetResponseBenefitDownloadablesPropertiesJSON `json:"-"`
}
func (*BenefitGetResponseBenefitDownloadablesProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitDownloadablesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitDownloadablesType ¶
type BenefitGetResponseBenefitDownloadablesType string
const (
BenefitGetResponseBenefitDownloadablesTypeDownloadables BenefitGetResponseBenefitDownloadablesType = "downloadables"
)
func (BenefitGetResponseBenefitDownloadablesType) IsKnown ¶
func (r BenefitGetResponseBenefitDownloadablesType) IsKnown() bool
type BenefitGetResponseBenefitGitHubRepository ¶
type BenefitGetResponseBenefitGitHubRepository struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `github_repository`.
Properties BenefitGetResponseBenefitGitHubRepositoryProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitGetResponseBenefitGitHubRepositoryType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitGetResponseBenefitGitHubRepositoryJSON `json:"-"`
}
A benefit of type `github_repository`.
Use it to automatically invite your backers to a private GitHub repository.
func (*BenefitGetResponseBenefitGitHubRepository) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitGitHubRepository) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitGitHubRepositoryProperties ¶
type BenefitGetResponseBenefitGitHubRepositoryProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission `json:"permission,required"`
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
RepositoryID string `json:"repository_id,nullable" format:"uuid4"`
JSON benefitGetResponseBenefitGitHubRepositoryPropertiesJSON `json:"-"`
}
Properties for a benefit of type `github_repository`.
func (*BenefitGetResponseBenefitGitHubRepositoryProperties) UnmarshalJSON ¶
func (r *BenefitGetResponseBenefitGitHubRepositoryProperties) UnmarshalJSON(data []byte) (err error)
type BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission ¶
type BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( BenefitGetResponseBenefitGitHubRepositoryPropertiesPermissionPull BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission = "pull" BenefitGetResponseBenefitGitHubRepositoryPropertiesPermissionTriage BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission = "triage" BenefitGetResponseBenefitGitHubRepositoryPropertiesPermissionPush BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission = "push" BenefitGetResponseBenefitGitHubRepositoryPropertiesPermissionMaintain BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission = "maintain" BenefitGetResponseBenefitGitHubRepositoryPropertiesPermissionAdmin BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission = "admin" )
func (BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown ¶
func (r BenefitGetResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown() bool
type BenefitGetResponseBenefitGitHubRepositoryType ¶
type BenefitGetResponseBenefitGitHubRepositoryType string
const (
BenefitGetResponseBenefitGitHubRepositoryTypeGitHubRepository BenefitGetResponseBenefitGitHubRepositoryType = "github_repository"
)
func (BenefitGetResponseBenefitGitHubRepositoryType) IsKnown ¶
func (r BenefitGetResponseBenefitGitHubRepositoryType) IsKnown() bool
type BenefitGetResponseType ¶
type BenefitGetResponseType string
const ( BenefitGetResponseTypeArticles BenefitGetResponseType = "articles" BenefitGetResponseTypeAds BenefitGetResponseType = "ads" BenefitGetResponseTypeCustom BenefitGetResponseType = "custom" BenefitGetResponseTypeDiscord BenefitGetResponseType = "discord" BenefitGetResponseTypeGitHubRepository BenefitGetResponseType = "github_repository" BenefitGetResponseTypeDownloadables BenefitGetResponseType = "downloadables" )
func (BenefitGetResponseType) IsKnown ¶
func (r BenefitGetResponseType) IsKnown() bool
type BenefitGetResponseUnion ¶
type BenefitGetResponseUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by BenefitGetResponseBenefitArticles, BenefitGetResponseBenefitAds, BenefitGetResponseBenefitCustom, BenefitGetResponseBenefitDiscordOutput, BenefitGetResponseBenefitGitHubRepository or BenefitGetResponseBenefitDownloadables.
type BenefitGrantListParams ¶
type BenefitGrantListParams struct {
// Filter by GitHub user ID. Only available for users who have linked their GitHub
// account on Polar.
GitHubUserID param.Field[int64] `query:"github_user_id"`
// Filter by granted status. If `true`, only granted benefits will be returned. If
// `false`, only revoked benefits will be returned.
IsGranted param.Field[bool] `query:"is_granted"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by user ID.
UserID param.Field[string] `query:"user_id" format:"uuid4"`
}
func (BenefitGrantListParams) URLQuery ¶
func (r BenefitGrantListParams) URLQuery() (v url.Values)
URLQuery serializes BenefitGrantListParams's query parameters as `url.Values`.
type BenefitGrantService ¶
type BenefitGrantService struct {
Options []option.RequestOption
}
BenefitGrantService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBenefitGrantService method instead.
func NewBenefitGrantService ¶
func NewBenefitGrantService(opts ...option.RequestOption) (r *BenefitGrantService)
NewBenefitGrantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BenefitGrantService) List ¶
func (r *BenefitGrantService) List(ctx context.Context, id string, query BenefitGrantListParams, opts ...option.RequestOption) (res *ListResourceBenefitGrant, err error)
List the individual grants for a benefit.
It's especially useful to check if a user has been granted a benefit.
type BenefitListParams ¶
type BenefitListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[BenefitListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by benefit type.
Type param.Field[BenefitListParamsTypeUnion] `query:"type"`
}
func (BenefitListParams) URLQuery ¶
func (r BenefitListParams) URLQuery() (v url.Values)
URLQuery serializes BenefitListParams's query parameters as `url.Values`.
type BenefitListParamsOrganizationIDArray ¶
type BenefitListParamsOrganizationIDArray []string
func (BenefitListParamsOrganizationIDArray) ImplementsBenefitListParamsOrganizationIDUnion ¶
func (r BenefitListParamsOrganizationIDArray) ImplementsBenefitListParamsOrganizationIDUnion()
type BenefitListParamsOrganizationIDUnion ¶
type BenefitListParamsOrganizationIDUnion interface {
ImplementsBenefitListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], BenefitListParamsOrganizationIDArray.
type BenefitListParamsTypeArray ¶
type BenefitListParamsTypeArray []BenefitListParamsTypeArray
type BenefitListParamsTypeBenefitType ¶
type BenefitListParamsTypeBenefitType string
const ( BenefitListParamsTypeBenefitTypeCustom BenefitListParamsTypeBenefitType = "custom" BenefitListParamsTypeBenefitTypeArticles BenefitListParamsTypeBenefitType = "articles" BenefitListParamsTypeBenefitTypeAds BenefitListParamsTypeBenefitType = "ads" BenefitListParamsTypeBenefitTypeDiscord BenefitListParamsTypeBenefitType = "discord" BenefitListParamsTypeBenefitTypeGitHubRepository BenefitListParamsTypeBenefitType = "github_repository" BenefitListParamsTypeBenefitTypeDownloadables BenefitListParamsTypeBenefitType = "downloadables" )
func (BenefitListParamsTypeBenefitType) IsKnown ¶
func (r BenefitListParamsTypeBenefitType) IsKnown() bool
type BenefitListParamsTypeUnion ¶
type BenefitListParamsTypeUnion interface {
// contains filtered or unexported methods
}
Filter by benefit type.
Satisfied by BenefitListParamsTypeBenefitType, BenefitListParamsTypeArray.
type BenefitNewParams ¶
type BenefitNewParams struct {
// Schema to create a benefit of type `custom`.
Body BenefitNewParamsBodyUnion `json:"body,required"`
}
func (BenefitNewParams) MarshalJSON ¶
func (r BenefitNewParams) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBody ¶
type BenefitNewParamsBody struct {
Type param.Field[BenefitNewParamsBodyType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
// Whether the benefit is taxable.
IsTaxApplicable param.Field[bool] `json:"is_tax_applicable"`
Properties param.Field[interface{}] `json:"properties"`
}
Schema to create a benefit of type `custom`.
func (BenefitNewParamsBody) MarshalJSON ¶
func (r BenefitNewParamsBody) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitAdsCreate ¶
type BenefitNewParamsBodyBenefitAdsCreate struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
// Properties for a benefit of type `ads`.
Properties param.Field[BenefitNewParamsBodyBenefitAdsCreateProperties] `json:"properties,required"`
Type param.Field[BenefitNewParamsBodyBenefitAdsCreateType] `json:"type,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
func (BenefitNewParamsBodyBenefitAdsCreate) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitAdsCreate) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitAdsCreateProperties ¶
type BenefitNewParamsBodyBenefitAdsCreateProperties struct {
// The height of the displayed ad.
ImageHeight param.Field[int64] `json:"image_height"`
// The width of the displayed ad.
ImageWidth param.Field[int64] `json:"image_width"`
}
Properties for a benefit of type `ads`.
func (BenefitNewParamsBodyBenefitAdsCreateProperties) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitAdsCreateProperties) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitAdsCreateType ¶
type BenefitNewParamsBodyBenefitAdsCreateType string
const (
BenefitNewParamsBodyBenefitAdsCreateTypeAds BenefitNewParamsBodyBenefitAdsCreateType = "ads"
)
func (BenefitNewParamsBodyBenefitAdsCreateType) IsKnown ¶
func (r BenefitNewParamsBodyBenefitAdsCreateType) IsKnown() bool
type BenefitNewParamsBodyBenefitCustomCreate ¶
type BenefitNewParamsBodyBenefitCustomCreate struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
// Whether the benefit is taxable.
IsTaxApplicable param.Field[bool] `json:"is_tax_applicable,required"`
// Properties for a benefit of type `custom`.
Properties param.Field[BenefitNewParamsBodyBenefitCustomCreateProperties] `json:"properties,required"`
Type param.Field[BenefitNewParamsBodyBenefitCustomCreateType] `json:"type,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
Schema to create a benefit of type `custom`.
func (BenefitNewParamsBodyBenefitCustomCreate) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitCustomCreate) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitCustomCreateProperties ¶
type BenefitNewParamsBodyBenefitCustomCreateProperties struct {
// Private note to be shared with users who have this benefit granted.
Note param.Field[string] `json:"note"`
}
Properties for a benefit of type `custom`.
func (BenefitNewParamsBodyBenefitCustomCreateProperties) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitCustomCreateProperties) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitCustomCreateType ¶
type BenefitNewParamsBodyBenefitCustomCreateType string
const (
BenefitNewParamsBodyBenefitCustomCreateTypeCustom BenefitNewParamsBodyBenefitCustomCreateType = "custom"
)
func (BenefitNewParamsBodyBenefitCustomCreateType) IsKnown ¶
func (r BenefitNewParamsBodyBenefitCustomCreateType) IsKnown() bool
type BenefitNewParamsBodyBenefitDiscordCreate ¶
type BenefitNewParamsBodyBenefitDiscordCreate struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
// Properties to create a benefit of type `discord`.
Properties param.Field[BenefitNewParamsBodyBenefitDiscordCreateProperties] `json:"properties,required"`
Type param.Field[BenefitNewParamsBodyBenefitDiscordCreateType] `json:"type,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
func (BenefitNewParamsBodyBenefitDiscordCreate) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitDiscordCreate) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitDiscordCreateProperties ¶
type BenefitNewParamsBodyBenefitDiscordCreateProperties struct {
GuildToken param.Field[string] `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID param.Field[string] `json:"role_id,required"`
}
Properties to create a benefit of type `discord`.
func (BenefitNewParamsBodyBenefitDiscordCreateProperties) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitDiscordCreateProperties) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitDiscordCreateType ¶
type BenefitNewParamsBodyBenefitDiscordCreateType string
const (
BenefitNewParamsBodyBenefitDiscordCreateTypeDiscord BenefitNewParamsBodyBenefitDiscordCreateType = "discord"
)
func (BenefitNewParamsBodyBenefitDiscordCreateType) IsKnown ¶
func (r BenefitNewParamsBodyBenefitDiscordCreateType) IsKnown() bool
type BenefitNewParamsBodyBenefitDownloadablesCreate ¶
type BenefitNewParamsBodyBenefitDownloadablesCreate struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
Properties param.Field[BenefitNewParamsBodyBenefitDownloadablesCreateProperties] `json:"properties,required"`
Type param.Field[BenefitNewParamsBodyBenefitDownloadablesCreateType] `json:"type,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
func (BenefitNewParamsBodyBenefitDownloadablesCreate) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitDownloadablesCreate) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitDownloadablesCreateProperties ¶
type BenefitNewParamsBodyBenefitDownloadablesCreateProperties struct {
Files param.Field[[]string] `json:"files,required" format:"uuid4"`
Archived param.Field[map[string]bool] `json:"archived"`
}
func (BenefitNewParamsBodyBenefitDownloadablesCreateProperties) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitDownloadablesCreateProperties) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitDownloadablesCreateType ¶
type BenefitNewParamsBodyBenefitDownloadablesCreateType string
const (
BenefitNewParamsBodyBenefitDownloadablesCreateTypeDownloadables BenefitNewParamsBodyBenefitDownloadablesCreateType = "downloadables"
)
func (BenefitNewParamsBodyBenefitDownloadablesCreateType) IsKnown ¶
func (r BenefitNewParamsBodyBenefitDownloadablesCreateType) IsKnown() bool
type BenefitNewParamsBodyBenefitGitHubRepositoryCreate ¶
type BenefitNewParamsBodyBenefitGitHubRepositoryCreate struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description,required"`
// Properties to create a benefit of type `github_repository`.
Properties param.Field[BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties] `json:"properties,required"`
Type param.Field[BenefitNewParamsBodyBenefitGitHubRepositoryCreateType] `json:"type,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
func (BenefitNewParamsBodyBenefitGitHubRepositoryCreate) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitGitHubRepositoryCreate) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties ¶
type BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission param.Field[BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission] `json:"permission,required"`
RepositoryID param.Field[string] `json:"repository_id" format:"uuid4"`
// The name of the repository.
RepositoryName param.Field[string] `json:"repository_name"`
// The owner of the repository.
RepositoryOwner param.Field[string] `json:"repository_owner"`
}
Properties to create a benefit of type `github_repository`.
func (BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties) MarshalJSON ¶
func (r BenefitNewParamsBodyBenefitGitHubRepositoryCreateProperties) MarshalJSON() (data []byte, err error)
type BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission ¶
type BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermissionPull BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission = "pull" BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermissionTriage BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission = "triage" BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermissionPush BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission = "push" BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermissionMaintain BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission = "maintain" BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermissionAdmin BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission = "admin" )
func (BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission) IsKnown ¶
func (r BenefitNewParamsBodyBenefitGitHubRepositoryCreatePropertiesPermission) IsKnown() bool
type BenefitNewParamsBodyBenefitGitHubRepositoryCreateType ¶
type BenefitNewParamsBodyBenefitGitHubRepositoryCreateType string
const (
BenefitNewParamsBodyBenefitGitHubRepositoryCreateTypeGitHubRepository BenefitNewParamsBodyBenefitGitHubRepositoryCreateType = "github_repository"
)
func (BenefitNewParamsBodyBenefitGitHubRepositoryCreateType) IsKnown ¶
func (r BenefitNewParamsBodyBenefitGitHubRepositoryCreateType) IsKnown() bool
type BenefitNewParamsBodyType ¶
type BenefitNewParamsBodyType string
const ( BenefitNewParamsBodyTypeCustom BenefitNewParamsBodyType = "custom" BenefitNewParamsBodyTypeAds BenefitNewParamsBodyType = "ads" BenefitNewParamsBodyTypeDiscord BenefitNewParamsBodyType = "discord" BenefitNewParamsBodyTypeGitHubRepository BenefitNewParamsBodyType = "github_repository" BenefitNewParamsBodyTypeDownloadables BenefitNewParamsBodyType = "downloadables" )
func (BenefitNewParamsBodyType) IsKnown ¶
func (r BenefitNewParamsBodyType) IsKnown() bool
type BenefitNewParamsBodyUnion ¶
type BenefitNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Schema to create a benefit of type `custom`.
Satisfied by BenefitNewParamsBodyBenefitCustomCreate, BenefitNewParamsBodyBenefitAdsCreate, BenefitNewParamsBodyBenefitDiscordCreate, BenefitNewParamsBodyBenefitGitHubRepositoryCreate, BenefitNewParamsBodyBenefitDownloadablesCreate, BenefitNewParamsBody.
type BenefitNewResponse ¶
type BenefitNewResponse struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type BenefitNewResponseType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [BenefitNewResponseBenefitArticlesProperties],
// [BenefitNewResponseBenefitAdsProperties],
// [BenefitNewResponseBenefitCustomProperties],
// [BenefitNewResponseBenefitDiscordOutputProperties],
// [BenefitNewResponseBenefitGitHubRepositoryProperties],
// [BenefitNewResponseBenefitDownloadablesProperties].
Properties interface{} `json:"properties"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable"`
JSON benefitNewResponseJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (BenefitNewResponse) AsUnion ¶
func (r BenefitNewResponse) AsUnion() BenefitNewResponseUnion
AsUnion returns a BenefitNewResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BenefitNewResponseBenefitArticles, BenefitNewResponseBenefitAds, BenefitNewResponseBenefitCustom, BenefitNewResponseBenefitDiscordOutput, BenefitNewResponseBenefitGitHubRepository, BenefitNewResponseBenefitDownloadables.
func (*BenefitNewResponse) UnmarshalJSON ¶
func (r *BenefitNewResponse) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitAds ¶
type BenefitNewResponseBenefitAds struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties BenefitNewResponseBenefitAdsProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitAdsType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitAdsJSON `json:"-"`
}
A benefit of type `ads`.
Use it so your backers can display ads on your README, website, etc.
func (*BenefitNewResponseBenefitAds) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitAds) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitAdsProperties ¶
type BenefitNewResponseBenefitAdsProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON benefitNewResponseBenefitAdsPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*BenefitNewResponseBenefitAdsProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitAdsProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitAdsType ¶
type BenefitNewResponseBenefitAdsType string
const (
BenefitNewResponseBenefitAdsTypeAds BenefitNewResponseBenefitAdsType = "ads"
)
func (BenefitNewResponseBenefitAdsType) IsKnown ¶
func (r BenefitNewResponseBenefitAdsType) IsKnown() bool
type BenefitNewResponseBenefitArticles ¶
type BenefitNewResponseBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties BenefitNewResponseBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*BenefitNewResponseBenefitArticles) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitArticles) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitArticlesProperties ¶
type BenefitNewResponseBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON benefitNewResponseBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*BenefitNewResponseBenefitArticlesProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitArticlesType ¶
type BenefitNewResponseBenefitArticlesType string
const (
BenefitNewResponseBenefitArticlesTypeArticles BenefitNewResponseBenefitArticlesType = "articles"
)
func (BenefitNewResponseBenefitArticlesType) IsKnown ¶
func (r BenefitNewResponseBenefitArticlesType) IsKnown() bool
type BenefitNewResponseBenefitCustom ¶
type BenefitNewResponseBenefitCustom struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `custom`.
Properties BenefitNewResponseBenefitCustomProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitCustomType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitCustomJSON `json:"-"`
}
A benefit of type `custom`.
Use it to grant any kind of benefit that doesn't fit in the other types.
func (*BenefitNewResponseBenefitCustom) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitCustom) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitCustomProperties ¶
type BenefitNewResponseBenefitCustomProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON benefitNewResponseBenefitCustomPropertiesJSON `json:"-"`
}
Properties for a benefit of type `custom`.
func (*BenefitNewResponseBenefitCustomProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitCustomProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitCustomType ¶
type BenefitNewResponseBenefitCustomType string
const (
BenefitNewResponseBenefitCustomTypeCustom BenefitNewResponseBenefitCustomType = "custom"
)
func (BenefitNewResponseBenefitCustomType) IsKnown ¶
func (r BenefitNewResponseBenefitCustomType) IsKnown() bool
type BenefitNewResponseBenefitDiscordOutput ¶
type BenefitNewResponseBenefitDiscordOutput struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `discord`.
Properties BenefitNewResponseBenefitDiscordOutputProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitDiscordOutputType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitDiscordOutputJSON `json:"-"`
}
A benefit of type `discord`.
Use it to automatically invite your backers to a Discord server.
func (*BenefitNewResponseBenefitDiscordOutput) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitDiscordOutput) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitDiscordOutputProperties ¶
type BenefitNewResponseBenefitDiscordOutputProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
GuildToken string `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID string `json:"role_id,required"`
JSON benefitNewResponseBenefitDiscordOutputPropertiesJSON `json:"-"`
}
Properties for a benefit of type `discord`.
func (*BenefitNewResponseBenefitDiscordOutputProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitDiscordOutputProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitDiscordOutputType ¶
type BenefitNewResponseBenefitDiscordOutputType string
const (
BenefitNewResponseBenefitDiscordOutputTypeDiscord BenefitNewResponseBenefitDiscordOutputType = "discord"
)
func (BenefitNewResponseBenefitDiscordOutputType) IsKnown ¶
func (r BenefitNewResponseBenefitDiscordOutputType) IsKnown() bool
type BenefitNewResponseBenefitDownloadables ¶
type BenefitNewResponseBenefitDownloadables struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties BenefitNewResponseBenefitDownloadablesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitDownloadablesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitDownloadablesJSON `json:"-"`
}
func (*BenefitNewResponseBenefitDownloadables) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitDownloadables) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitDownloadablesProperties ¶
type BenefitNewResponseBenefitDownloadablesProperties struct {
Archived map[string]bool `json:"archived,required"`
Files []string `json:"files,required" format:"uuid4"`
JSON benefitNewResponseBenefitDownloadablesPropertiesJSON `json:"-"`
}
func (*BenefitNewResponseBenefitDownloadablesProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitDownloadablesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitDownloadablesType ¶
type BenefitNewResponseBenefitDownloadablesType string
const (
BenefitNewResponseBenefitDownloadablesTypeDownloadables BenefitNewResponseBenefitDownloadablesType = "downloadables"
)
func (BenefitNewResponseBenefitDownloadablesType) IsKnown ¶
func (r BenefitNewResponseBenefitDownloadablesType) IsKnown() bool
type BenefitNewResponseBenefitGitHubRepository ¶
type BenefitNewResponseBenefitGitHubRepository struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `github_repository`.
Properties BenefitNewResponseBenefitGitHubRepositoryProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitNewResponseBenefitGitHubRepositoryType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitNewResponseBenefitGitHubRepositoryJSON `json:"-"`
}
A benefit of type `github_repository`.
Use it to automatically invite your backers to a private GitHub repository.
func (*BenefitNewResponseBenefitGitHubRepository) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitGitHubRepository) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitGitHubRepositoryProperties ¶
type BenefitNewResponseBenefitGitHubRepositoryProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission `json:"permission,required"`
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
RepositoryID string `json:"repository_id,nullable" format:"uuid4"`
JSON benefitNewResponseBenefitGitHubRepositoryPropertiesJSON `json:"-"`
}
Properties for a benefit of type `github_repository`.
func (*BenefitNewResponseBenefitGitHubRepositoryProperties) UnmarshalJSON ¶
func (r *BenefitNewResponseBenefitGitHubRepositoryProperties) UnmarshalJSON(data []byte) (err error)
type BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission ¶
type BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( BenefitNewResponseBenefitGitHubRepositoryPropertiesPermissionPull BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission = "pull" BenefitNewResponseBenefitGitHubRepositoryPropertiesPermissionTriage BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission = "triage" BenefitNewResponseBenefitGitHubRepositoryPropertiesPermissionPush BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission = "push" BenefitNewResponseBenefitGitHubRepositoryPropertiesPermissionMaintain BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission = "maintain" BenefitNewResponseBenefitGitHubRepositoryPropertiesPermissionAdmin BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission = "admin" )
func (BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown ¶
func (r BenefitNewResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown() bool
type BenefitNewResponseBenefitGitHubRepositoryType ¶
type BenefitNewResponseBenefitGitHubRepositoryType string
const (
BenefitNewResponseBenefitGitHubRepositoryTypeGitHubRepository BenefitNewResponseBenefitGitHubRepositoryType = "github_repository"
)
func (BenefitNewResponseBenefitGitHubRepositoryType) IsKnown ¶
func (r BenefitNewResponseBenefitGitHubRepositoryType) IsKnown() bool
type BenefitNewResponseType ¶
type BenefitNewResponseType string
const ( BenefitNewResponseTypeArticles BenefitNewResponseType = "articles" BenefitNewResponseTypeAds BenefitNewResponseType = "ads" BenefitNewResponseTypeCustom BenefitNewResponseType = "custom" BenefitNewResponseTypeDiscord BenefitNewResponseType = "discord" BenefitNewResponseTypeGitHubRepository BenefitNewResponseType = "github_repository" BenefitNewResponseTypeDownloadables BenefitNewResponseType = "downloadables" )
func (BenefitNewResponseType) IsKnown ¶
func (r BenefitNewResponseType) IsKnown() bool
type BenefitNewResponseUnion ¶
type BenefitNewResponseUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by BenefitNewResponseBenefitArticles, BenefitNewResponseBenefitAds, BenefitNewResponseBenefitCustom, BenefitNewResponseBenefitDiscordOutput, BenefitNewResponseBenefitGitHubRepository or BenefitNewResponseBenefitDownloadables.
type BenefitService ¶
type BenefitService struct {
Options []option.RequestOption
Grants *BenefitGrantService
}
BenefitService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBenefitService method instead.
func NewBenefitService ¶
func NewBenefitService(opts ...option.RequestOption) (r *BenefitService)
NewBenefitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BenefitService) Delete ¶
func (r *BenefitService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a benefit.
> [!WARNING] Every grants associated with the benefit will be revoked. Users > will lose access to the benefit.
func (*BenefitService) Get ¶
func (r *BenefitService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *BenefitGetResponse, err error)
Get a benefit by ID.
func (*BenefitService) List ¶
func (r *BenefitService) List(ctx context.Context, query BenefitListParams, opts ...option.RequestOption) (res *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables, err error)
List benefits.
func (*BenefitService) New ¶
func (r *BenefitService) New(ctx context.Context, body BenefitNewParams, opts ...option.RequestOption) (res *BenefitNewResponse, err error)
Create a benefit.
func (*BenefitService) Update ¶
func (r *BenefitService) Update(ctx context.Context, id string, body BenefitUpdateParams, opts ...option.RequestOption) (res *BenefitUpdateResponse, err error)
Update a benefit.
type BenefitUpdateParams ¶
type BenefitUpdateParams struct {
Body BenefitUpdateParamsBodyUnion `json:"body,required"`
}
func (BenefitUpdateParams) MarshalJSON ¶
func (r BenefitUpdateParams) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBody ¶
type BenefitUpdateParamsBody struct {
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
Type param.Field[BenefitUpdateParamsBodyType] `json:"type,required"`
Properties param.Field[interface{}] `json:"properties,required"`
}
func (BenefitUpdateParamsBody) MarshalJSON ¶
func (r BenefitUpdateParamsBody) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitAdsUpdate ¶
type BenefitUpdateParamsBodyBenefitAdsUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitAdsUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
// Properties for a benefit of type `ads`.
Properties param.Field[BenefitUpdateParamsBodyBenefitAdsUpdateProperties] `json:"properties"`
}
func (BenefitUpdateParamsBodyBenefitAdsUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitAdsUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitAdsUpdateProperties ¶
type BenefitUpdateParamsBodyBenefitAdsUpdateProperties struct {
// The height of the displayed ad.
ImageHeight param.Field[int64] `json:"image_height"`
// The width of the displayed ad.
ImageWidth param.Field[int64] `json:"image_width"`
}
Properties for a benefit of type `ads`.
func (BenefitUpdateParamsBodyBenefitAdsUpdateProperties) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitAdsUpdateProperties) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitAdsUpdateType ¶
type BenefitUpdateParamsBodyBenefitAdsUpdateType string
const (
BenefitUpdateParamsBodyBenefitAdsUpdateTypeAds BenefitUpdateParamsBodyBenefitAdsUpdateType = "ads"
)
func (BenefitUpdateParamsBodyBenefitAdsUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitAdsUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyBenefitArticlesUpdate ¶
type BenefitUpdateParamsBodyBenefitArticlesUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitArticlesUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
}
func (BenefitUpdateParamsBodyBenefitArticlesUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitArticlesUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitArticlesUpdateType ¶
type BenefitUpdateParamsBodyBenefitArticlesUpdateType string
const (
BenefitUpdateParamsBodyBenefitArticlesUpdateTypeArticles BenefitUpdateParamsBodyBenefitArticlesUpdateType = "articles"
)
func (BenefitUpdateParamsBodyBenefitArticlesUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitArticlesUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyBenefitCustomUpdate ¶
type BenefitUpdateParamsBodyBenefitCustomUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitCustomUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
// Properties for a benefit of type `custom`.
Properties param.Field[BenefitUpdateParamsBodyBenefitCustomUpdateProperties] `json:"properties"`
}
func (BenefitUpdateParamsBodyBenefitCustomUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitCustomUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitCustomUpdateProperties ¶
type BenefitUpdateParamsBodyBenefitCustomUpdateProperties struct {
// Private note to be shared with users who have this benefit granted.
Note param.Field[string] `json:"note"`
}
Properties for a benefit of type `custom`.
func (BenefitUpdateParamsBodyBenefitCustomUpdateProperties) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitCustomUpdateProperties) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitCustomUpdateType ¶
type BenefitUpdateParamsBodyBenefitCustomUpdateType string
const (
BenefitUpdateParamsBodyBenefitCustomUpdateTypeCustom BenefitUpdateParamsBodyBenefitCustomUpdateType = "custom"
)
func (BenefitUpdateParamsBodyBenefitCustomUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitCustomUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyBenefitDiscordUpdate ¶
type BenefitUpdateParamsBodyBenefitDiscordUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitDiscordUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
// Properties to create a benefit of type `discord`.
Properties param.Field[BenefitUpdateParamsBodyBenefitDiscordUpdateProperties] `json:"properties"`
}
func (BenefitUpdateParamsBodyBenefitDiscordUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitDiscordUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitDiscordUpdateProperties ¶
type BenefitUpdateParamsBodyBenefitDiscordUpdateProperties struct {
GuildToken param.Field[string] `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID param.Field[string] `json:"role_id,required"`
}
Properties to create a benefit of type `discord`.
func (BenefitUpdateParamsBodyBenefitDiscordUpdateProperties) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitDiscordUpdateProperties) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitDiscordUpdateType ¶
type BenefitUpdateParamsBodyBenefitDiscordUpdateType string
const (
BenefitUpdateParamsBodyBenefitDiscordUpdateTypeDiscord BenefitUpdateParamsBodyBenefitDiscordUpdateType = "discord"
)
func (BenefitUpdateParamsBodyBenefitDiscordUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitDiscordUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyBenefitDownloadablesUpdate ¶
type BenefitUpdateParamsBodyBenefitDownloadablesUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitDownloadablesUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
Properties param.Field[BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties] `json:"properties"`
}
func (BenefitUpdateParamsBodyBenefitDownloadablesUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitDownloadablesUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties ¶
type BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties struct {
Files param.Field[[]string] `json:"files,required" format:"uuid4"`
Archived param.Field[map[string]bool] `json:"archived"`
}
func (BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitDownloadablesUpdateProperties) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitDownloadablesUpdateType ¶
type BenefitUpdateParamsBodyBenefitDownloadablesUpdateType string
const (
BenefitUpdateParamsBodyBenefitDownloadablesUpdateTypeDownloadables BenefitUpdateParamsBodyBenefitDownloadablesUpdateType = "downloadables"
)
func (BenefitUpdateParamsBodyBenefitDownloadablesUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitDownloadablesUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate ¶
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate struct {
Type param.Field[BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType] `json:"type,required"`
// The description of the benefit. Will be displayed on products having this
// benefit.
Description param.Field[string] `json:"description"`
// Properties to create a benefit of type `github_repository`.
Properties param.Field[BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties] `json:"properties"`
}
func (BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties ¶
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission param.Field[BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission] `json:"permission,required"`
RepositoryID param.Field[string] `json:"repository_id" format:"uuid4"`
// The name of the repository.
RepositoryName param.Field[string] `json:"repository_name"`
// The owner of the repository.
RepositoryOwner param.Field[string] `json:"repository_owner"`
}
Properties to create a benefit of type `github_repository`.
func (BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties) MarshalJSON ¶
func (r BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateProperties) MarshalJSON() (data []byte, err error)
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission ¶
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermissionPull BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission = "pull" BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermissionTriage BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission = "triage" BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermissionPush BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission = "push" BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermissionMaintain BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission = "maintain" BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermissionAdmin BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission = "admin" )
func (BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdatePropertiesPermission) IsKnown() bool
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType ¶
type BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType string
const (
BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateTypeGitHubRepository BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType = "github_repository"
)
func (BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType) IsKnown ¶
func (r BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdateType) IsKnown() bool
type BenefitUpdateParamsBodyType ¶
type BenefitUpdateParamsBodyType string
const ( BenefitUpdateParamsBodyTypeArticles BenefitUpdateParamsBodyType = "articles" BenefitUpdateParamsBodyTypeAds BenefitUpdateParamsBodyType = "ads" BenefitUpdateParamsBodyTypeCustom BenefitUpdateParamsBodyType = "custom" BenefitUpdateParamsBodyTypeDiscord BenefitUpdateParamsBodyType = "discord" BenefitUpdateParamsBodyTypeGitHubRepository BenefitUpdateParamsBodyType = "github_repository" BenefitUpdateParamsBodyTypeDownloadables BenefitUpdateParamsBodyType = "downloadables" )
func (BenefitUpdateParamsBodyType) IsKnown ¶
func (r BenefitUpdateParamsBodyType) IsKnown() bool
type BenefitUpdateParamsBodyUnion ¶
type BenefitUpdateParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by BenefitUpdateParamsBodyBenefitArticlesUpdate, BenefitUpdateParamsBodyBenefitAdsUpdate, BenefitUpdateParamsBodyBenefitCustomUpdate, BenefitUpdateParamsBodyBenefitDiscordUpdate, BenefitUpdateParamsBodyBenefitGitHubRepositoryUpdate, BenefitUpdateParamsBodyBenefitDownloadablesUpdate, BenefitUpdateParamsBody.
type BenefitUpdateResponse ¶
type BenefitUpdateResponse struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type BenefitUpdateResponseType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [BenefitUpdateResponseBenefitArticlesProperties],
// [BenefitUpdateResponseBenefitAdsProperties],
// [BenefitUpdateResponseBenefitCustomProperties],
// [BenefitUpdateResponseBenefitDiscordOutputProperties],
// [BenefitUpdateResponseBenefitGitHubRepositoryProperties],
// [BenefitUpdateResponseBenefitDownloadablesProperties].
Properties interface{} `json:"properties"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable"`
JSON benefitUpdateResponseJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (BenefitUpdateResponse) AsUnion ¶
func (r BenefitUpdateResponse) AsUnion() BenefitUpdateResponseUnion
AsUnion returns a BenefitUpdateResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BenefitUpdateResponseBenefitArticles, BenefitUpdateResponseBenefitAds, BenefitUpdateResponseBenefitCustom, BenefitUpdateResponseBenefitDiscordOutput, BenefitUpdateResponseBenefitGitHubRepository, BenefitUpdateResponseBenefitDownloadables.
func (*BenefitUpdateResponse) UnmarshalJSON ¶
func (r *BenefitUpdateResponse) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitAds ¶
type BenefitUpdateResponseBenefitAds struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties BenefitUpdateResponseBenefitAdsProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitAdsType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitAdsJSON `json:"-"`
}
A benefit of type `ads`.
Use it so your backers can display ads on your README, website, etc.
func (*BenefitUpdateResponseBenefitAds) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitAds) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitAdsProperties ¶
type BenefitUpdateResponseBenefitAdsProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON benefitUpdateResponseBenefitAdsPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*BenefitUpdateResponseBenefitAdsProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitAdsProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitAdsType ¶
type BenefitUpdateResponseBenefitAdsType string
const (
BenefitUpdateResponseBenefitAdsTypeAds BenefitUpdateResponseBenefitAdsType = "ads"
)
func (BenefitUpdateResponseBenefitAdsType) IsKnown ¶
func (r BenefitUpdateResponseBenefitAdsType) IsKnown() bool
type BenefitUpdateResponseBenefitArticles ¶
type BenefitUpdateResponseBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties BenefitUpdateResponseBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*BenefitUpdateResponseBenefitArticles) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitArticles) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitArticlesProperties ¶
type BenefitUpdateResponseBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON benefitUpdateResponseBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*BenefitUpdateResponseBenefitArticlesProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitArticlesType ¶
type BenefitUpdateResponseBenefitArticlesType string
const (
BenefitUpdateResponseBenefitArticlesTypeArticles BenefitUpdateResponseBenefitArticlesType = "articles"
)
func (BenefitUpdateResponseBenefitArticlesType) IsKnown ¶
func (r BenefitUpdateResponseBenefitArticlesType) IsKnown() bool
type BenefitUpdateResponseBenefitCustom ¶
type BenefitUpdateResponseBenefitCustom struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `custom`.
Properties BenefitUpdateResponseBenefitCustomProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitCustomType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitCustomJSON `json:"-"`
}
A benefit of type `custom`.
Use it to grant any kind of benefit that doesn't fit in the other types.
func (*BenefitUpdateResponseBenefitCustom) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitCustom) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitCustomProperties ¶
type BenefitUpdateResponseBenefitCustomProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON benefitUpdateResponseBenefitCustomPropertiesJSON `json:"-"`
}
Properties for a benefit of type `custom`.
func (*BenefitUpdateResponseBenefitCustomProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitCustomProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitCustomType ¶
type BenefitUpdateResponseBenefitCustomType string
const (
BenefitUpdateResponseBenefitCustomTypeCustom BenefitUpdateResponseBenefitCustomType = "custom"
)
func (BenefitUpdateResponseBenefitCustomType) IsKnown ¶
func (r BenefitUpdateResponseBenefitCustomType) IsKnown() bool
type BenefitUpdateResponseBenefitDiscordOutput ¶
type BenefitUpdateResponseBenefitDiscordOutput struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `discord`.
Properties BenefitUpdateResponseBenefitDiscordOutputProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitDiscordOutputType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitDiscordOutputJSON `json:"-"`
}
A benefit of type `discord`.
Use it to automatically invite your backers to a Discord server.
func (*BenefitUpdateResponseBenefitDiscordOutput) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitDiscordOutput) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitDiscordOutputProperties ¶
type BenefitUpdateResponseBenefitDiscordOutputProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
GuildToken string `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID string `json:"role_id,required"`
JSON benefitUpdateResponseBenefitDiscordOutputPropertiesJSON `json:"-"`
}
Properties for a benefit of type `discord`.
func (*BenefitUpdateResponseBenefitDiscordOutputProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitDiscordOutputProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitDiscordOutputType ¶
type BenefitUpdateResponseBenefitDiscordOutputType string
const (
BenefitUpdateResponseBenefitDiscordOutputTypeDiscord BenefitUpdateResponseBenefitDiscordOutputType = "discord"
)
func (BenefitUpdateResponseBenefitDiscordOutputType) IsKnown ¶
func (r BenefitUpdateResponseBenefitDiscordOutputType) IsKnown() bool
type BenefitUpdateResponseBenefitDownloadables ¶
type BenefitUpdateResponseBenefitDownloadables struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties BenefitUpdateResponseBenefitDownloadablesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitDownloadablesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitDownloadablesJSON `json:"-"`
}
func (*BenefitUpdateResponseBenefitDownloadables) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitDownloadables) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitDownloadablesProperties ¶
type BenefitUpdateResponseBenefitDownloadablesProperties struct {
Archived map[string]bool `json:"archived,required"`
Files []string `json:"files,required" format:"uuid4"`
JSON benefitUpdateResponseBenefitDownloadablesPropertiesJSON `json:"-"`
}
func (*BenefitUpdateResponseBenefitDownloadablesProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitDownloadablesProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitDownloadablesType ¶
type BenefitUpdateResponseBenefitDownloadablesType string
const (
BenefitUpdateResponseBenefitDownloadablesTypeDownloadables BenefitUpdateResponseBenefitDownloadablesType = "downloadables"
)
func (BenefitUpdateResponseBenefitDownloadablesType) IsKnown ¶
func (r BenefitUpdateResponseBenefitDownloadablesType) IsKnown() bool
type BenefitUpdateResponseBenefitGitHubRepository ¶
type BenefitUpdateResponseBenefitGitHubRepository struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `github_repository`.
Properties BenefitUpdateResponseBenefitGitHubRepositoryProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type BenefitUpdateResponseBenefitGitHubRepositoryType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON benefitUpdateResponseBenefitGitHubRepositoryJSON `json:"-"`
}
A benefit of type `github_repository`.
Use it to automatically invite your backers to a private GitHub repository.
func (*BenefitUpdateResponseBenefitGitHubRepository) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitGitHubRepository) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitGitHubRepositoryProperties ¶
type BenefitUpdateResponseBenefitGitHubRepositoryProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission `json:"permission,required"`
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
RepositoryID string `json:"repository_id,nullable" format:"uuid4"`
JSON benefitUpdateResponseBenefitGitHubRepositoryPropertiesJSON `json:"-"`
}
Properties for a benefit of type `github_repository`.
func (*BenefitUpdateResponseBenefitGitHubRepositoryProperties) UnmarshalJSON ¶
func (r *BenefitUpdateResponseBenefitGitHubRepositoryProperties) UnmarshalJSON(data []byte) (err error)
type BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission ¶
type BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermissionPull BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission = "pull" BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermissionTriage BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission = "triage" BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermissionPush BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission = "push" BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermissionMaintain BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission = "maintain" BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermissionAdmin BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission = "admin" )
func (BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown ¶
func (r BenefitUpdateResponseBenefitGitHubRepositoryPropertiesPermission) IsKnown() bool
type BenefitUpdateResponseBenefitGitHubRepositoryType ¶
type BenefitUpdateResponseBenefitGitHubRepositoryType string
const (
BenefitUpdateResponseBenefitGitHubRepositoryTypeGitHubRepository BenefitUpdateResponseBenefitGitHubRepositoryType = "github_repository"
)
func (BenefitUpdateResponseBenefitGitHubRepositoryType) IsKnown ¶
func (r BenefitUpdateResponseBenefitGitHubRepositoryType) IsKnown() bool
type BenefitUpdateResponseType ¶
type BenefitUpdateResponseType string
const ( BenefitUpdateResponseTypeArticles BenefitUpdateResponseType = "articles" BenefitUpdateResponseTypeAds BenefitUpdateResponseType = "ads" BenefitUpdateResponseTypeCustom BenefitUpdateResponseType = "custom" BenefitUpdateResponseTypeDiscord BenefitUpdateResponseType = "discord" BenefitUpdateResponseTypeGitHubRepository BenefitUpdateResponseType = "github_repository" BenefitUpdateResponseTypeDownloadables BenefitUpdateResponseType = "downloadables" )
func (BenefitUpdateResponseType) IsKnown ¶
func (r BenefitUpdateResponseType) IsKnown() bool
type BenefitUpdateResponseUnion ¶
type BenefitUpdateResponseUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by BenefitUpdateResponseBenefitArticles, BenefitUpdateResponseBenefitAds, BenefitUpdateResponseBenefitCustom, BenefitUpdateResponseBenefitDiscordOutput, BenefitUpdateResponseBenefitGitHubRepository or BenefitUpdateResponseBenefitDownloadables.
type Checkout ¶
type Checkout struct {
// The ID of the checkout.
ID string `json:"id,required"`
// A product.
Product ProductOutput `json:"product,required"`
// A recurring price for a product, i.e. a subscription.
ProductPrice CheckoutProductPrice `json:"product_price,required"`
CustomerEmail string `json:"customer_email,nullable"`
CustomerName string `json:"customer_name,nullable"`
// URL the customer should be redirected to complete the purchase.
URL string `json:"url,nullable"`
JSON checkoutJSON `json:"-"`
}
A checkout session.
func (*Checkout) UnmarshalJSON ¶
type CheckoutNewParams ¶
type CheckoutNewParams struct {
// ID of the product price to subscribe to.
ProductPriceID param.Field[string] `json:"product_price_id,required" format:"uuid4"`
// URL where the customer will be redirected after a successful subscription. You
// can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the
// checkout session id.
SuccessURL param.Field[string] `json:"success_url,required" format:"uri"`
// If you already know the email of your customer, you can set it. It'll be
// pre-filled on the checkout page.
CustomerEmail param.Field[string] `json:"customer_email" format:"email"`
}
func (CheckoutNewParams) MarshalJSON ¶
func (r CheckoutNewParams) MarshalJSON() (data []byte, err error)
type CheckoutProductPrice ¶
type CheckoutProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type CheckoutProductPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval CheckoutProductPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON checkoutProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (CheckoutProductPrice) AsUnion ¶
func (r CheckoutProductPrice) AsUnion() CheckoutProductPriceUnion
AsUnion returns a CheckoutProductPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CheckoutProductPriceProductPriceRecurring, CheckoutProductPriceProductPriceOneTime.
func (*CheckoutProductPrice) UnmarshalJSON ¶
func (r *CheckoutProductPrice) UnmarshalJSON(data []byte) (err error)
type CheckoutProductPriceProductPriceOneTime ¶
type CheckoutProductPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type CheckoutProductPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON checkoutProductPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*CheckoutProductPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *CheckoutProductPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type CheckoutProductPriceProductPriceOneTimeType ¶
type CheckoutProductPriceProductPriceOneTimeType string
The type of the price.
const (
CheckoutProductPriceProductPriceOneTimeTypeOneTime CheckoutProductPriceProductPriceOneTimeType = "one_time"
)
func (CheckoutProductPriceProductPriceOneTimeType) IsKnown ¶
func (r CheckoutProductPriceProductPriceOneTimeType) IsKnown() bool
type CheckoutProductPriceProductPriceRecurring ¶
type CheckoutProductPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type CheckoutProductPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval CheckoutProductPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON checkoutProductPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*CheckoutProductPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *CheckoutProductPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type CheckoutProductPriceProductPriceRecurringRecurringInterval ¶
type CheckoutProductPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( CheckoutProductPriceProductPriceRecurringRecurringIntervalMonth CheckoutProductPriceProductPriceRecurringRecurringInterval = "month" CheckoutProductPriceProductPriceRecurringRecurringIntervalYear CheckoutProductPriceProductPriceRecurringRecurringInterval = "year" )
func (CheckoutProductPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r CheckoutProductPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type CheckoutProductPriceProductPriceRecurringType ¶
type CheckoutProductPriceProductPriceRecurringType string
The type of the price.
const (
CheckoutProductPriceProductPriceRecurringTypeRecurring CheckoutProductPriceProductPriceRecurringType = "recurring"
)
func (CheckoutProductPriceProductPriceRecurringType) IsKnown ¶
func (r CheckoutProductPriceProductPriceRecurringType) IsKnown() bool
type CheckoutProductPriceRecurringInterval ¶
type CheckoutProductPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( CheckoutProductPriceRecurringIntervalMonth CheckoutProductPriceRecurringInterval = "month" CheckoutProductPriceRecurringIntervalYear CheckoutProductPriceRecurringInterval = "year" )
func (CheckoutProductPriceRecurringInterval) IsKnown ¶
func (r CheckoutProductPriceRecurringInterval) IsKnown() bool
type CheckoutProductPriceType ¶
type CheckoutProductPriceType string
The type of the price.
const ( CheckoutProductPriceTypeRecurring CheckoutProductPriceType = "recurring" CheckoutProductPriceTypeOneTime CheckoutProductPriceType = "one_time" )
func (CheckoutProductPriceType) IsKnown ¶
func (r CheckoutProductPriceType) IsKnown() bool
type CheckoutProductPriceUnion ¶
type CheckoutProductPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by CheckoutProductPriceProductPriceRecurring or CheckoutProductPriceProductPriceOneTime.
type CheckoutService ¶
type CheckoutService struct {
Options []option.RequestOption
}
CheckoutService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCheckoutService method instead.
func NewCheckoutService ¶
func NewCheckoutService(opts ...option.RequestOption) (r *CheckoutService)
NewCheckoutService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CheckoutService) Get ¶
func (r *CheckoutService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Checkout, err error)
Get an active checkout session by ID.
func (*CheckoutService) New ¶
func (r *CheckoutService) New(ctx context.Context, body CheckoutNewParams, opts ...option.RequestOption) (res *Checkout, err error)
Create a checkout session.
type Client ¶
type Client struct {
Options []option.RequestOption
Users *UserService
Funding *FundingService
ExternalOrganizations *ExternalOrganizationService
Repositories *RepositoryService
Rewards *RewardService
PullRequests *PullRequestService
Accounts *AccountService
Issues *IssueService
Pledges *PledgeService
Organizations *OrganizationService
Subscriptions *SubscriptionService
Articles *ArticleService
Transactions *TransactionService
Advertisements *AdvertisementService
Donations *DonationService
Oauth2 *Oauth2Service
Benefits *BenefitService
Webhooks *WebhookService
Products *ProductService
Orders *OrderService
Checkouts *CheckoutService
Files *FileService
Metrics *MetricService
}
Client creates a struct with services and top level methods that help with interacting with the polar API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (POLAR_BEARER_TOKEN). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type DonationPaymentIntentNewParams ¶
type DonationPaymentIntentNewParams struct {
// The amount in cents.
Amount param.Field[int64] `json:"amount,required"`
// The donators email address. Receipts will be sent to this address.
Email param.Field[string] `json:"email,required" format:"email"`
ToOrganizationID param.Field[string] `json:"to_organization_id,required" format:"uuid4"`
// The currency. Currently, only `usd` is supported.
Currency param.Field[string] `json:"currency"`
IssueID param.Field[string] `json:"issue_id" format:"uuid4"`
// Message included with the donation
Message param.Field[string] `json:"message"`
// The organization to give credit to. The pledge will be paid by the authenticated
// user.
OnBehalfOfOrganizationID param.Field[string] `json:"on_behalf_of_organization_id" format:"uuid4"`
// If the payment method should be saved for future usage.
SetupFutureUsage param.Field[DonationPaymentIntentNewParamsSetupFutureUsage] `json:"setup_future_usage"`
}
func (DonationPaymentIntentNewParams) MarshalJSON ¶
func (r DonationPaymentIntentNewParams) MarshalJSON() (data []byte, err error)
type DonationPaymentIntentNewParamsSetupFutureUsage ¶
type DonationPaymentIntentNewParamsSetupFutureUsage string
If the payment method should be saved for future usage.
const (
DonationPaymentIntentNewParamsSetupFutureUsageOnSession DonationPaymentIntentNewParamsSetupFutureUsage = "on_session"
)
func (DonationPaymentIntentNewParamsSetupFutureUsage) IsKnown ¶
func (r DonationPaymentIntentNewParamsSetupFutureUsage) IsKnown() bool
type DonationPaymentIntentService ¶
type DonationPaymentIntentService struct {
Options []option.RequestOption
}
DonationPaymentIntentService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDonationPaymentIntentService method instead.
func NewDonationPaymentIntentService ¶
func NewDonationPaymentIntentService(opts ...option.RequestOption) (r *DonationPaymentIntentService)
NewDonationPaymentIntentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DonationPaymentIntentService) New ¶
func (r *DonationPaymentIntentService) New(ctx context.Context, body DonationPaymentIntentNewParams, opts ...option.RequestOption) (res *DonationStripePaymentIntentMutationResponse, err error)
Create Payment Intent
func (*DonationPaymentIntentService) Update ¶
func (r *DonationPaymentIntentService) Update(ctx context.Context, id string, body DonationPaymentIntentUpdateParams, opts ...option.RequestOption) (res *DonationStripePaymentIntentMutationResponse, err error)
Update Payment Intent
type DonationPaymentIntentUpdateParams ¶
type DonationPaymentIntentUpdateParams struct {
// The amount in cents.
Amount param.Field[int64] `json:"amount,required"`
// The donators email address. Receipts will be sent to this address.
Email param.Field[string] `json:"email,required"`
// The currency. Currently, only `usd` is supported.
Currency param.Field[string] `json:"currency"`
IssueID param.Field[string] `json:"issue_id" format:"uuid4"`
// Message included with the donation
Message param.Field[string] `json:"message"`
// The organization to give credit to. The pledge will be paid by the authenticated
// user.
OnBehalfOfOrganizationID param.Field[string] `json:"on_behalf_of_organization_id" format:"uuid4"`
// If the payment method should be saved for future usage.
SetupFutureUsage param.Field[DonationPaymentIntentUpdateParamsSetupFutureUsage] `json:"setup_future_usage"`
}
func (DonationPaymentIntentUpdateParams) MarshalJSON ¶
func (r DonationPaymentIntentUpdateParams) MarshalJSON() (data []byte, err error)
type DonationPaymentIntentUpdateParamsSetupFutureUsage ¶
type DonationPaymentIntentUpdateParamsSetupFutureUsage string
If the payment method should be saved for future usage.
const (
DonationPaymentIntentUpdateParamsSetupFutureUsageOnSession DonationPaymentIntentUpdateParamsSetupFutureUsage = "on_session"
)
func (DonationPaymentIntentUpdateParamsSetupFutureUsage) IsKnown ¶
func (r DonationPaymentIntentUpdateParamsSetupFutureUsage) IsKnown() bool
type DonationPublicSearchParams ¶
type DonationPublicSearchParams struct {
// The organization ID.
OrganizationID param.Field[string] `query:"organization_id,required" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (DonationPublicSearchParams) URLQuery ¶
func (r DonationPublicSearchParams) URLQuery() (v url.Values)
URLQuery serializes DonationPublicSearchParams's query parameters as `url.Values`.
type DonationPublicService ¶
type DonationPublicService struct {
Options []option.RequestOption
}
DonationPublicService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDonationPublicService method instead.
func NewDonationPublicService ¶
func NewDonationPublicService(opts ...option.RequestOption) (r *DonationPublicService)
NewDonationPublicService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DonationPublicService) Search ¶
func (r *DonationPublicService) Search(ctx context.Context, query DonationPublicSearchParams, opts ...option.RequestOption) (res *ListResourcePublicDonation, err error)
Donations Public Search
type DonationSearchParams ¶
type DonationSearchParams struct {
ToOrganizationID param.Field[string] `query:"to_organization_id,required" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (DonationSearchParams) URLQuery ¶
func (r DonationSearchParams) URLQuery() (v url.Values)
URLQuery serializes DonationSearchParams's query parameters as `url.Values`.
type DonationService ¶
type DonationService struct {
Options []option.RequestOption
PaymentIntent *DonationPaymentIntentService
Public *DonationPublicService
}
DonationService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDonationService method instead.
func NewDonationService ¶
func NewDonationService(opts ...option.RequestOption) (r *DonationService)
NewDonationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DonationService) Search ¶
func (r *DonationService) Search(ctx context.Context, query DonationSearchParams, opts ...option.RequestOption) (res *ListResourceDonation, err error)
Search Donations
func (*DonationService) Statistics ¶
func (r *DonationService) Statistics(ctx context.Context, query DonationStatisticsParams, opts ...option.RequestOption) (res *DonationStatistics, err error)
Statistics
type DonationStatistics ¶
type DonationStatistics struct {
Periods []DonationStatisticsPeriod `json:"periods,required"`
JSON donationStatisticsJSON `json:"-"`
}
func (*DonationStatistics) UnmarshalJSON ¶
func (r *DonationStatistics) UnmarshalJSON(data []byte) (err error)
type DonationStatisticsParams ¶
type DonationStatisticsParams struct {
DonationsInterval param.Field[DonationStatisticsParamsDonationsInterval] `query:"donationsInterval,required"`
EndDate param.Field[time.Time] `query:"end_date,required" format:"date"`
StartDate param.Field[time.Time] `query:"start_date,required" format:"date"`
ToOrganizationID param.Field[string] `query:"to_organization_id,required" format:"uuid4"`
}
func (DonationStatisticsParams) URLQuery ¶
func (r DonationStatisticsParams) URLQuery() (v url.Values)
URLQuery serializes DonationStatisticsParams's query parameters as `url.Values`.
type DonationStatisticsParamsDonationsInterval ¶
type DonationStatisticsParamsDonationsInterval string
const ( DonationStatisticsParamsDonationsIntervalMonth DonationStatisticsParamsDonationsInterval = "month" DonationStatisticsParamsDonationsIntervalWeek DonationStatisticsParamsDonationsInterval = "week" DonationStatisticsParamsDonationsIntervalDay DonationStatisticsParamsDonationsInterval = "day" )
func (DonationStatisticsParamsDonationsInterval) IsKnown ¶
func (r DonationStatisticsParamsDonationsInterval) IsKnown() bool
type DonationStatisticsPeriod ¶
type DonationStatisticsPeriod struct {
EndDate time.Time `json:"end_date,required" format:"date"`
StartDate time.Time `json:"start_date,required" format:"date"`
Sum int64 `json:"sum,required"`
JSON donationStatisticsPeriodJSON `json:"-"`
}
func (*DonationStatisticsPeriod) UnmarshalJSON ¶
func (r *DonationStatisticsPeriod) UnmarshalJSON(data []byte) (err error)
type DonationStripePaymentIntentMutationResponse ¶
type DonationStripePaymentIntentMutationResponse struct {
Amount int64 `json:"amount,required"`
Currency string `json:"currency,required"`
PaymentIntentID string `json:"payment_intent_id,required"`
ClientSecret string `json:"client_secret,nullable"`
JSON donationStripePaymentIntentMutationResponseJSON `json:"-"`
}
func (*DonationStripePaymentIntentMutationResponse) UnmarshalJSON ¶
func (r *DonationStripePaymentIntentMutationResponse) UnmarshalJSON(data []byte) (err error)
type DownloadableFileRead ¶
type DownloadableFileRead struct {
ID string `json:"id,required" format:"uuid4"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IsUploaded bool `json:"is_uploaded,required"`
MimeType string `json:"mime_type,required"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Path string `json:"path,required"`
Service DownloadableFileReadService `json:"service,required"`
Size int64 `json:"size,required"`
SizeReadable string `json:"size_readable,required"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
StorageVersion string `json:"storage_version,nullable"`
Version string `json:"version,nullable"`
JSON downloadableFileReadJSON `json:"-"`
}
File to be associated with the downloadables benefit.
func (*DownloadableFileRead) UnmarshalJSON ¶
func (r *DownloadableFileRead) UnmarshalJSON(data []byte) (err error)
type DownloadableFileReadService ¶
type DownloadableFileReadService string
const (
DownloadableFileReadServiceDownloadable DownloadableFileReadService = "downloadable"
)
func (DownloadableFileReadService) IsKnown ¶
func (r DownloadableFileReadService) IsKnown() bool
type ExternalOrganizationListParams ¶
type ExternalOrganizationListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by name.
Name param.Field[ExternalOrganizationListParamsNameUnion] `query:"name"`
// Filter by organization ID.
OrganizationID param.Field[ExternalOrganizationListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by platform.
Platform param.Field[ExternalOrganizationListParamsPlatformUnion] `query:"platform"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (ExternalOrganizationListParams) URLQuery ¶
func (r ExternalOrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes ExternalOrganizationListParams's query parameters as `url.Values`.
type ExternalOrganizationListParamsNameArray ¶
type ExternalOrganizationListParamsNameArray []string
func (ExternalOrganizationListParamsNameArray) ImplementsExternalOrganizationListParamsNameUnion ¶
func (r ExternalOrganizationListParamsNameArray) ImplementsExternalOrganizationListParamsNameUnion()
type ExternalOrganizationListParamsNameUnion ¶
type ExternalOrganizationListParamsNameUnion interface {
ImplementsExternalOrganizationListParamsNameUnion()
}
Filter by name.
Satisfied by [shared.UnionString], ExternalOrganizationListParamsNameArray.
type ExternalOrganizationListParamsOrganizationIDArray ¶
type ExternalOrganizationListParamsOrganizationIDArray []string
func (ExternalOrganizationListParamsOrganizationIDArray) ImplementsExternalOrganizationListParamsOrganizationIDUnion ¶
func (r ExternalOrganizationListParamsOrganizationIDArray) ImplementsExternalOrganizationListParamsOrganizationIDUnion()
type ExternalOrganizationListParamsOrganizationIDUnion ¶
type ExternalOrganizationListParamsOrganizationIDUnion interface {
ImplementsExternalOrganizationListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], ExternalOrganizationListParamsOrganizationIDArray.
type ExternalOrganizationListParamsPlatformArray ¶
type ExternalOrganizationListParamsPlatformArray []ExternalOrganizationListParamsPlatformArray
type ExternalOrganizationListParamsPlatformPlatforms ¶
type ExternalOrganizationListParamsPlatformPlatforms string
const (
ExternalOrganizationListParamsPlatformPlatformsGitHub ExternalOrganizationListParamsPlatformPlatforms = "github"
)
func (ExternalOrganizationListParamsPlatformPlatforms) IsKnown ¶
func (r ExternalOrganizationListParamsPlatformPlatforms) IsKnown() bool
type ExternalOrganizationListParamsPlatformUnion ¶
type ExternalOrganizationListParamsPlatformUnion interface {
// contains filtered or unexported methods
}
Filter by platform.
Satisfied by ExternalOrganizationListParamsPlatformPlatforms, ExternalOrganizationListParamsPlatformArray.
type ExternalOrganizationListResponse ¶
type ExternalOrganizationListResponse struct {
Pagination ExternalOrganizationListResponsePagination `json:"pagination,required"`
Items []ExternalOrganizationListResponseItem `json:"items"`
JSON externalOrganizationListResponseJSON `json:"-"`
}
func (*ExternalOrganizationListResponse) UnmarshalJSON ¶
func (r *ExternalOrganizationListResponse) UnmarshalJSON(data []byte) (err error)
type ExternalOrganizationListResponseItem ¶
type ExternalOrganizationListResponseItem struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform ExternalOrganizationListResponseItemsPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON externalOrganizationListResponseItemJSON `json:"-"`
}
func (*ExternalOrganizationListResponseItem) UnmarshalJSON ¶
func (r *ExternalOrganizationListResponseItem) UnmarshalJSON(data []byte) (err error)
type ExternalOrganizationListResponseItemsPlatform ¶
type ExternalOrganizationListResponseItemsPlatform string
const (
ExternalOrganizationListResponseItemsPlatformGitHub ExternalOrganizationListResponseItemsPlatform = "github"
)
func (ExternalOrganizationListResponseItemsPlatform) IsKnown ¶
func (r ExternalOrganizationListResponseItemsPlatform) IsKnown() bool
type ExternalOrganizationListResponsePagination ¶
type ExternalOrganizationListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON externalOrganizationListResponsePaginationJSON `json:"-"`
}
func (*ExternalOrganizationListResponsePagination) UnmarshalJSON ¶
func (r *ExternalOrganizationListResponsePagination) UnmarshalJSON(data []byte) (err error)
type ExternalOrganizationService ¶
type ExternalOrganizationService struct {
Options []option.RequestOption
}
ExternalOrganizationService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExternalOrganizationService method instead.
func NewExternalOrganizationService ¶
func NewExternalOrganizationService(opts ...option.RequestOption) (r *ExternalOrganizationService)
NewExternalOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExternalOrganizationService) List ¶
func (r *ExternalOrganizationService) List(ctx context.Context, query ExternalOrganizationListParams, opts ...option.RequestOption) (res *ExternalOrganizationListResponse, err error)
List external organizations.
type FileListParams ¶
type FileListParams struct {
// List of file IDs to get.
IDs param.Field[[]string] `query:"ids" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// The organization ID.
OrganizationID param.Field[string] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (FileListParams) URLQuery ¶
func (r FileListParams) URLQuery() (v url.Values)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileNewParams ¶
type FileNewParams struct {
// Schema to create a file to be associated with the downloadables benefit.
Body FileNewParamsBodyUnion `json:"body,required"`
}
func (FileNewParams) MarshalJSON ¶
func (r FileNewParams) MarshalJSON() (data []byte, err error)
type FileNewParamsBody ¶
type FileNewParamsBody struct {
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
Name param.Field[string] `json:"name,required"`
MimeType param.Field[string] `json:"mime_type,required"`
Size param.Field[int64] `json:"size,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
Upload param.Field[interface{}] `json:"upload"`
Service param.Field[FileNewParamsBodyService] `json:"service,required"`
Version param.Field[string] `json:"version"`
}
Schema to create a file to be associated with the downloadables benefit.
func (FileNewParamsBody) MarshalJSON ¶
func (r FileNewParamsBody) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyDownloadableFileCreate ¶
type FileNewParamsBodyDownloadableFileCreate struct {
MimeType param.Field[string] `json:"mime_type,required"`
Name param.Field[string] `json:"name,required"`
Service param.Field[FileNewParamsBodyDownloadableFileCreateService] `json:"service,required"`
Size param.Field[int64] `json:"size,required"`
Upload param.Field[FileNewParamsBodyDownloadableFileCreateUpload] `json:"upload,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
Version param.Field[string] `json:"version"`
}
Schema to create a file to be associated with the downloadables benefit.
func (FileNewParamsBodyDownloadableFileCreate) MarshalJSON ¶
func (r FileNewParamsBodyDownloadableFileCreate) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyDownloadableFileCreateService ¶
type FileNewParamsBodyDownloadableFileCreateService string
const (
FileNewParamsBodyDownloadableFileCreateServiceDownloadable FileNewParamsBodyDownloadableFileCreateService = "downloadable"
)
func (FileNewParamsBodyDownloadableFileCreateService) IsKnown ¶
func (r FileNewParamsBodyDownloadableFileCreateService) IsKnown() bool
type FileNewParamsBodyDownloadableFileCreateUpload ¶
type FileNewParamsBodyDownloadableFileCreateUpload struct {
Parts param.Field[[]FileNewParamsBodyDownloadableFileCreateUploadPart] `json:"parts,required"`
}
func (FileNewParamsBodyDownloadableFileCreateUpload) MarshalJSON ¶
func (r FileNewParamsBodyDownloadableFileCreateUpload) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyDownloadableFileCreateUploadPart ¶
type FileNewParamsBodyDownloadableFileCreateUploadPart struct {
ChunkEnd param.Field[int64] `json:"chunk_end,required"`
ChunkStart param.Field[int64] `json:"chunk_start,required"`
Number param.Field[int64] `json:"number,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
}
func (FileNewParamsBodyDownloadableFileCreateUploadPart) MarshalJSON ¶
func (r FileNewParamsBodyDownloadableFileCreateUploadPart) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyOrganizationAvatarFileCreate ¶
type FileNewParamsBodyOrganizationAvatarFileCreate struct {
// MIME type of the file. Only images are supported for this type of file.
MimeType param.Field[string] `json:"mime_type,required"`
Name param.Field[string] `json:"name,required"`
Service param.Field[FileNewParamsBodyOrganizationAvatarFileCreateService] `json:"service,required"`
// Size of the file. A maximum of 1 MB is allowed for this type of file.
Size param.Field[int64] `json:"size,required"`
Upload param.Field[FileNewParamsBodyOrganizationAvatarFileCreateUpload] `json:"upload,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
Version param.Field[string] `json:"version"`
}
Schema to create a file to be used as an organization avatar.
func (FileNewParamsBodyOrganizationAvatarFileCreate) MarshalJSON ¶
func (r FileNewParamsBodyOrganizationAvatarFileCreate) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyOrganizationAvatarFileCreateService ¶
type FileNewParamsBodyOrganizationAvatarFileCreateService string
const (
FileNewParamsBodyOrganizationAvatarFileCreateServiceOrganizationAvatar FileNewParamsBodyOrganizationAvatarFileCreateService = "organization_avatar"
)
func (FileNewParamsBodyOrganizationAvatarFileCreateService) IsKnown ¶
func (r FileNewParamsBodyOrganizationAvatarFileCreateService) IsKnown() bool
type FileNewParamsBodyOrganizationAvatarFileCreateUpload ¶
type FileNewParamsBodyOrganizationAvatarFileCreateUpload struct {
Parts param.Field[[]FileNewParamsBodyOrganizationAvatarFileCreateUploadPart] `json:"parts,required"`
}
func (FileNewParamsBodyOrganizationAvatarFileCreateUpload) MarshalJSON ¶
func (r FileNewParamsBodyOrganizationAvatarFileCreateUpload) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyOrganizationAvatarFileCreateUploadPart ¶
type FileNewParamsBodyOrganizationAvatarFileCreateUploadPart struct {
ChunkEnd param.Field[int64] `json:"chunk_end,required"`
ChunkStart param.Field[int64] `json:"chunk_start,required"`
Number param.Field[int64] `json:"number,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
}
func (FileNewParamsBodyOrganizationAvatarFileCreateUploadPart) MarshalJSON ¶
func (r FileNewParamsBodyOrganizationAvatarFileCreateUploadPart) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyProductMediaFileCreate ¶
type FileNewParamsBodyProductMediaFileCreate struct {
// MIME type of the file. Only images are supported for this type of file.
MimeType param.Field[string] `json:"mime_type,required"`
Name param.Field[string] `json:"name,required"`
Service param.Field[FileNewParamsBodyProductMediaFileCreateService] `json:"service,required"`
// Size of the file. A maximum of 10 MB is allowed for this type of file.
Size param.Field[int64] `json:"size,required"`
Upload param.Field[FileNewParamsBodyProductMediaFileCreateUpload] `json:"upload,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
Version param.Field[string] `json:"version"`
}
Schema to create a file to be used as a product media file.
func (FileNewParamsBodyProductMediaFileCreate) MarshalJSON ¶
func (r FileNewParamsBodyProductMediaFileCreate) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyProductMediaFileCreateService ¶
type FileNewParamsBodyProductMediaFileCreateService string
const (
FileNewParamsBodyProductMediaFileCreateServiceProductMedia FileNewParamsBodyProductMediaFileCreateService = "product_media"
)
func (FileNewParamsBodyProductMediaFileCreateService) IsKnown ¶
func (r FileNewParamsBodyProductMediaFileCreateService) IsKnown() bool
type FileNewParamsBodyProductMediaFileCreateUpload ¶
type FileNewParamsBodyProductMediaFileCreateUpload struct {
Parts param.Field[[]FileNewParamsBodyProductMediaFileCreateUploadPart] `json:"parts,required"`
}
func (FileNewParamsBodyProductMediaFileCreateUpload) MarshalJSON ¶
func (r FileNewParamsBodyProductMediaFileCreateUpload) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyProductMediaFileCreateUploadPart ¶
type FileNewParamsBodyProductMediaFileCreateUploadPart struct {
ChunkEnd param.Field[int64] `json:"chunk_end,required"`
ChunkStart param.Field[int64] `json:"chunk_start,required"`
Number param.Field[int64] `json:"number,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
}
func (FileNewParamsBodyProductMediaFileCreateUploadPart) MarshalJSON ¶
func (r FileNewParamsBodyProductMediaFileCreateUploadPart) MarshalJSON() (data []byte, err error)
type FileNewParamsBodyService ¶
type FileNewParamsBodyService string
const ( FileNewParamsBodyServiceDownloadable FileNewParamsBodyService = "downloadable" FileNewParamsBodyServiceProductMedia FileNewParamsBodyService = "product_media" FileNewParamsBodyServiceOrganizationAvatar FileNewParamsBodyService = "organization_avatar" )
func (FileNewParamsBodyService) IsKnown ¶
func (r FileNewParamsBodyService) IsKnown() bool
type FileNewParamsBodyUnion ¶
type FileNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Schema to create a file to be associated with the downloadables benefit.
Satisfied by FileNewParamsBodyDownloadableFileCreate, FileNewParamsBodyProductMediaFileCreate, FileNewParamsBodyOrganizationAvatarFileCreate, FileNewParamsBody.
type FileService ¶
type FileService struct {
Options []option.RequestOption
}
FileService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.
func NewFileService ¶
func NewFileService(opts ...option.RequestOption) (r *FileService)
NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileService) Delete ¶
func (r *FileService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a file.
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *ListResourceAnnotatedUnion, err error)
List files.
func (*FileService) New ¶
func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *FileUpload, err error)
Create a file.
func (*FileService) Update ¶
func (r *FileService) Update(ctx context.Context, id string, body FileUpdateParams, opts ...option.RequestOption) (res *FileUpdateResponse, err error)
Update a file.
func (*FileService) Uploaded ¶
func (r *FileService) Uploaded(ctx context.Context, params FileUploadedParams, opts ...option.RequestOption) (res *FileUploadedResponse, err error)
Complete a file upload.
type FileUpdateParams ¶
type FileUpdateParams struct {
Name param.Field[string] `json:"name"`
Version param.Field[string] `json:"version"`
}
func (FileUpdateParams) MarshalJSON ¶
func (r FileUpdateParams) MarshalJSON() (data []byte, err error)
type FileUpdateResponse ¶
type FileUpdateResponse struct {
ID string `json:"id,required" format:"uuid4"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Name string `json:"name,required"`
Path string `json:"path,required"`
MimeType string `json:"mime_type,required"`
Size int64 `json:"size,required"`
StorageVersion string `json:"storage_version,nullable"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
Version string `json:"version,nullable"`
Service FileUpdateResponseService `json:"service,required"`
IsUploaded bool `json:"is_uploaded,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
SizeReadable string `json:"size_readable,required"`
PublicURL string `json:"public_url"`
JSON fileUpdateResponseJSON `json:"-"`
// contains filtered or unexported fields
}
File to be associated with the downloadables benefit.
func (FileUpdateResponse) AsUnion ¶
func (r FileUpdateResponse) AsUnion() FileUpdateResponseUnion
AsUnion returns a FileUpdateResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are DownloadableFileRead, ProductMediaFileReadOutput, OrganizationAvatarFileRead.
func (*FileUpdateResponse) UnmarshalJSON ¶
func (r *FileUpdateResponse) UnmarshalJSON(data []byte) (err error)
type FileUpdateResponseService ¶
type FileUpdateResponseService string
const ( FileUpdateResponseServiceDownloadable FileUpdateResponseService = "downloadable" FileUpdateResponseServiceProductMedia FileUpdateResponseService = "product_media" FileUpdateResponseServiceOrganizationAvatar FileUpdateResponseService = "organization_avatar" )
func (FileUpdateResponseService) IsKnown ¶
func (r FileUpdateResponseService) IsKnown() bool
type FileUpdateResponseUnion ¶
type FileUpdateResponseUnion interface {
// contains filtered or unexported methods
}
File to be associated with the downloadables benefit.
Union satisfied by DownloadableFileRead, ProductMediaFileReadOutput or OrganizationAvatarFileRead.
type FileUpload ¶
type FileUpload struct {
ID string `json:"id,required" format:"uuid4"`
MimeType string `json:"mime_type,required"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Path string `json:"path,required"`
Service FileUploadService `json:"service,required"`
Size int64 `json:"size,required"`
SizeReadable string `json:"size_readable,required"`
Upload FileUploadUpload `json:"upload,required"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
IsUploaded bool `json:"is_uploaded"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
StorageVersion string `json:"storage_version,nullable"`
Version string `json:"version,nullable"`
JSON fileUploadJSON `json:"-"`
}
func (*FileUpload) UnmarshalJSON ¶
func (r *FileUpload) UnmarshalJSON(data []byte) (err error)
type FileUploadService ¶
type FileUploadService string
const ( FileUploadServiceDownloadable FileUploadService = "downloadable" FileUploadServiceProductMedia FileUploadService = "product_media" FileUploadServiceOrganizationAvatar FileUploadService = "organization_avatar" )
func (FileUploadService) IsKnown ¶
func (r FileUploadService) IsKnown() bool
type FileUploadUpload ¶
type FileUploadUpload struct {
ID string `json:"id,required"`
Parts []FileUploadUploadPart `json:"parts,required"`
Path string `json:"path,required"`
JSON fileUploadUploadJSON `json:"-"`
}
func (*FileUploadUpload) UnmarshalJSON ¶
func (r *FileUploadUpload) UnmarshalJSON(data []byte) (err error)
type FileUploadUploadPart ¶
type FileUploadUploadPart struct {
ChunkEnd int64 `json:"chunk_end,required"`
ChunkStart int64 `json:"chunk_start,required"`
ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
Number int64 `json:"number,required"`
URL string `json:"url,required"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
Headers map[string]string `json:"headers"`
JSON fileUploadUploadPartJSON `json:"-"`
}
func (*FileUploadUploadPart) UnmarshalJSON ¶
func (r *FileUploadUploadPart) UnmarshalJSON(data []byte) (err error)
type FileUploadedParams ¶
type FileUploadedParams struct {
// The file ID.
PathID param.Field[string] `path:"id,required" format:"uuid4"`
BodyID param.Field[string] `json:"id,required"`
Parts param.Field[[]FileUploadedParamsPart] `json:"parts,required"`
Path param.Field[string] `json:"path,required"`
}
func (FileUploadedParams) MarshalJSON ¶
func (r FileUploadedParams) MarshalJSON() (data []byte, err error)
type FileUploadedParamsPart ¶
type FileUploadedParamsPart struct {
ChecksumEtag param.Field[string] `json:"checksum_etag,required"`
Number param.Field[int64] `json:"number,required"`
ChecksumSha256Base64 param.Field[string] `json:"checksum_sha256_base64"`
}
func (FileUploadedParamsPart) MarshalJSON ¶
func (r FileUploadedParamsPart) MarshalJSON() (data []byte, err error)
type FileUploadedResponse ¶
type FileUploadedResponse struct {
ID string `json:"id,required" format:"uuid4"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Name string `json:"name,required"`
Path string `json:"path,required"`
MimeType string `json:"mime_type,required"`
Size int64 `json:"size,required"`
StorageVersion string `json:"storage_version,nullable"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
Version string `json:"version,nullable"`
Service FileUploadedResponseService `json:"service,required"`
IsUploaded bool `json:"is_uploaded,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
SizeReadable string `json:"size_readable,required"`
PublicURL string `json:"public_url"`
JSON fileUploadedResponseJSON `json:"-"`
// contains filtered or unexported fields
}
File to be associated with the downloadables benefit.
func (FileUploadedResponse) AsUnion ¶
func (r FileUploadedResponse) AsUnion() FileUploadedResponseUnion
AsUnion returns a FileUploadedResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are DownloadableFileRead, ProductMediaFileReadOutput, OrganizationAvatarFileRead.
func (*FileUploadedResponse) UnmarshalJSON ¶
func (r *FileUploadedResponse) UnmarshalJSON(data []byte) (err error)
type FileUploadedResponseService ¶
type FileUploadedResponseService string
const ( FileUploadedResponseServiceDownloadable FileUploadedResponseService = "downloadable" FileUploadedResponseServiceProductMedia FileUploadedResponseService = "product_media" FileUploadedResponseServiceOrganizationAvatar FileUploadedResponseService = "organization_avatar" )
func (FileUploadedResponseService) IsKnown ¶
func (r FileUploadedResponseService) IsKnown() bool
type FileUploadedResponseUnion ¶
type FileUploadedResponseUnion interface {
// contains filtered or unexported methods
}
File to be associated with the downloadables benefit.
Union satisfied by DownloadableFileRead, ProductMediaFileReadOutput or OrganizationAvatarFileRead.
type FundingLookupParams ¶
type FundingLookupParams struct {
IssueID param.Field[string] `query:"issue_id,required" format:"uuid"`
}
func (FundingLookupParams) URLQuery ¶
func (r FundingLookupParams) URLQuery() (v url.Values)
URLQuery serializes FundingLookupParams's query parameters as `url.Values`.
type FundingLookupResponse ¶
type FundingLookupResponse struct {
Issue FundingLookupResponseIssue `json:"issue,required"`
PledgesSummaries FundingLookupResponsePledgesSummaries `json:"pledges_summaries,required"`
Total FundingLookupResponseTotal `json:"total,required"`
FundingGoal FundingLookupResponseFundingGoal `json:"funding_goal,nullable"`
JSON fundingLookupResponseJSON `json:"-"`
}
func (*FundingLookupResponse) UnmarshalJSON ¶
func (r *FundingLookupResponse) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseFundingGoal ¶
type FundingLookupResponseFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponseFundingGoalJSON `json:"-"`
}
func (*FundingLookupResponseFundingGoal) UnmarshalJSON ¶
func (r *FundingLookupResponseFundingGoal) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssue ¶
type FundingLookupResponseIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding FundingLookupResponseIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform FundingLookupResponseIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository FundingLookupResponseIssueRepository `json:"repository,required"`
State FundingLookupResponseIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []FundingLookupResponseIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author FundingLookupResponseIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []FundingLookupResponseIssueLabel `json:"labels"`
// GitHub reactions
Reactions FundingLookupResponseIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON fundingLookupResponseIssueJSON `json:"-"`
}
func (*FundingLookupResponseIssue) UnmarshalJSON ¶
func (r *FundingLookupResponseIssue) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueAssignee ¶
type FundingLookupResponseIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON fundingLookupResponseIssueAssigneeJSON `json:"-"`
}
func (*FundingLookupResponseIssueAssignee) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueAssignee) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueAuthor ¶
type FundingLookupResponseIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON fundingLookupResponseIssueAuthorJSON `json:"-"`
}
GitHub author
func (*FundingLookupResponseIssueAuthor) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueAuthor) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueFunding ¶
type FundingLookupResponseIssueFunding struct {
FundingGoal FundingLookupResponseIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum FundingLookupResponseIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON fundingLookupResponseIssueFundingJSON `json:"-"`
}
func (*FundingLookupResponseIssueFunding) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueFunding) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueFundingFundingGoal ¶
type FundingLookupResponseIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponseIssueFundingFundingGoalJSON `json:"-"`
}
func (*FundingLookupResponseIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueFundingPledgesSum ¶
type FundingLookupResponseIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponseIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*FundingLookupResponseIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueLabel ¶
type FundingLookupResponseIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON fundingLookupResponseIssueLabelJSON `json:"-"`
}
func (*FundingLookupResponseIssueLabel) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueLabel) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssuePlatform ¶
type FundingLookupResponseIssuePlatform string
Issue platform (currently always GitHub)
const (
FundingLookupResponseIssuePlatformGitHub FundingLookupResponseIssuePlatform = "github"
)
func (FundingLookupResponseIssuePlatform) IsKnown ¶
func (r FundingLookupResponseIssuePlatform) IsKnown() bool
type FundingLookupResponseIssueReactions ¶
type FundingLookupResponseIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON fundingLookupResponseIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*FundingLookupResponseIssueReactions) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueReactions) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueRepository ¶
type FundingLookupResponseIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization FundingLookupResponseIssueRepositoryOrganization `json:"organization,required"`
Platform FundingLookupResponseIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings FundingLookupResponseIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON fundingLookupResponseIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*FundingLookupResponseIssueRepository) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueRepository) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueRepositoryOrganization ¶
type FundingLookupResponseIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform FundingLookupResponseIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON fundingLookupResponseIssueRepositoryOrganizationJSON `json:"-"`
}
func (*FundingLookupResponseIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueRepositoryOrganizationPlatform ¶
type FundingLookupResponseIssueRepositoryOrganizationPlatform string
const (
FundingLookupResponseIssueRepositoryOrganizationPlatformGitHub FundingLookupResponseIssueRepositoryOrganizationPlatform = "github"
)
func (FundingLookupResponseIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r FundingLookupResponseIssueRepositoryOrganizationPlatform) IsKnown() bool
type FundingLookupResponseIssueRepositoryPlatform ¶
type FundingLookupResponseIssueRepositoryPlatform string
const (
FundingLookupResponseIssueRepositoryPlatformGitHub FundingLookupResponseIssueRepositoryPlatform = "github"
)
func (FundingLookupResponseIssueRepositoryPlatform) IsKnown ¶
func (r FundingLookupResponseIssueRepositoryPlatform) IsKnown() bool
type FundingLookupResponseIssueRepositoryProfileSettings ¶
type FundingLookupResponseIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON fundingLookupResponseIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*FundingLookupResponseIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *FundingLookupResponseIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseIssueState ¶
type FundingLookupResponseIssueState string
const ( FundingLookupResponseIssueStateOpen FundingLookupResponseIssueState = "open" FundingLookupResponseIssueStateClosed FundingLookupResponseIssueState = "closed" )
func (FundingLookupResponseIssueState) IsKnown ¶
func (r FundingLookupResponseIssueState) IsKnown() bool
type FundingLookupResponsePledgesSummaries ¶
type FundingLookupResponsePledgesSummaries struct {
PayDirectly FundingLookupResponsePledgesSummariesPayDirectly `json:"pay_directly,required"`
PayOnCompletion FundingLookupResponsePledgesSummariesPayOnCompletion `json:"pay_on_completion,required"`
PayUpfront FundingLookupResponsePledgesSummariesPayUpfront `json:"pay_upfront,required"`
JSON fundingLookupResponsePledgesSummariesJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummaries) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummaries) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayDirectly ¶
type FundingLookupResponsePledgesSummariesPayDirectly struct {
Pledgers []FundingLookupResponsePledgesSummariesPayDirectlyPledger `json:"pledgers,required"`
Total FundingLookupResponsePledgesSummariesPayDirectlyTotal `json:"total,required"`
JSON fundingLookupResponsePledgesSummariesPayDirectlyJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayDirectly) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayDirectly) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayDirectlyPledger ¶
type FundingLookupResponsePledgesSummariesPayDirectlyPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingLookupResponsePledgesSummariesPayDirectlyPledgerJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayDirectlyPledger) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayDirectlyPledger) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayDirectlyTotal ¶
type FundingLookupResponsePledgesSummariesPayDirectlyTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponsePledgesSummariesPayDirectlyTotalJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayDirectlyTotal) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayDirectlyTotal) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayOnCompletion ¶
type FundingLookupResponsePledgesSummariesPayOnCompletion struct {
Pledgers []FundingLookupResponsePledgesSummariesPayOnCompletionPledger `json:"pledgers,required"`
Total FundingLookupResponsePledgesSummariesPayOnCompletionTotal `json:"total,required"`
JSON fundingLookupResponsePledgesSummariesPayOnCompletionJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayOnCompletion) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayOnCompletion) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayOnCompletionPledger ¶
type FundingLookupResponsePledgesSummariesPayOnCompletionPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingLookupResponsePledgesSummariesPayOnCompletionPledgerJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayOnCompletionPledger) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayOnCompletionPledger) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayOnCompletionTotal ¶
type FundingLookupResponsePledgesSummariesPayOnCompletionTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponsePledgesSummariesPayOnCompletionTotalJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayOnCompletionTotal) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayOnCompletionTotal) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayUpfront ¶
type FundingLookupResponsePledgesSummariesPayUpfront struct {
Pledgers []FundingLookupResponsePledgesSummariesPayUpfrontPledger `json:"pledgers,required"`
Total FundingLookupResponsePledgesSummariesPayUpfrontTotal `json:"total,required"`
JSON fundingLookupResponsePledgesSummariesPayUpfrontJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayUpfront) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayUpfront) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayUpfrontPledger ¶
type FundingLookupResponsePledgesSummariesPayUpfrontPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingLookupResponsePledgesSummariesPayUpfrontPledgerJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayUpfrontPledger) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayUpfrontPledger) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponsePledgesSummariesPayUpfrontTotal ¶
type FundingLookupResponsePledgesSummariesPayUpfrontTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponsePledgesSummariesPayUpfrontTotalJSON `json:"-"`
}
func (*FundingLookupResponsePledgesSummariesPayUpfrontTotal) UnmarshalJSON ¶
func (r *FundingLookupResponsePledgesSummariesPayUpfrontTotal) UnmarshalJSON(data []byte) (err error)
type FundingLookupResponseTotal ¶
type FundingLookupResponseTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingLookupResponseTotalJSON `json:"-"`
}
func (*FundingLookupResponseTotal) UnmarshalJSON ¶
func (r *FundingLookupResponseTotal) UnmarshalJSON(data []byte) (err error)
type FundingSearchParams ¶
type FundingSearchParams struct {
// The organization ID.
OrganizationID param.Field[string] `query:"organization_id,required" format:"uuid4"`
Badged param.Field[bool] `query:"badged"`
Closed param.Field[bool] `query:"closed"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
Query param.Field[string] `query:"query"`
// Filter by repository name.
RepositoryName param.Field[string] `query:"repository_name"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order.
Sorting param.Field[[]FundingSearchParamsSorting] `query:"sorting"`
}
func (FundingSearchParams) URLQuery ¶
func (r FundingSearchParams) URLQuery() (v url.Values)
URLQuery serializes FundingSearchParams's query parameters as `url.Values`.
type FundingSearchParamsSorting ¶
type FundingSearchParamsSorting string
const ( FundingSearchParamsSortingOldest FundingSearchParamsSorting = "oldest" FundingSearchParamsSortingNewest FundingSearchParamsSorting = "newest" FundingSearchParamsSortingMostFunded FundingSearchParamsSorting = "most_funded" FundingSearchParamsSortingMostRecentlyFunded FundingSearchParamsSorting = "most_recently_funded" FundingSearchParamsSortingMostEngagement FundingSearchParamsSorting = "most_engagement" )
func (FundingSearchParamsSorting) IsKnown ¶
func (r FundingSearchParamsSorting) IsKnown() bool
type FundingSearchResponse ¶
type FundingSearchResponse struct {
Pagination FundingSearchResponsePagination `json:"pagination,required"`
Items []FundingSearchResponseItem `json:"items"`
JSON fundingSearchResponseJSON `json:"-"`
}
func (*FundingSearchResponse) UnmarshalJSON ¶
func (r *FundingSearchResponse) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItem ¶
type FundingSearchResponseItem struct {
Issue FundingSearchResponseItemsIssue `json:"issue,required"`
PledgesSummaries FundingSearchResponseItemsPledgesSummaries `json:"pledges_summaries,required"`
Total FundingSearchResponseItemsTotal `json:"total,required"`
FundingGoal FundingSearchResponseItemsFundingGoal `json:"funding_goal,nullable"`
JSON fundingSearchResponseItemJSON `json:"-"`
}
func (*FundingSearchResponseItem) UnmarshalJSON ¶
func (r *FundingSearchResponseItem) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsFundingGoal ¶
type FundingSearchResponseItemsFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsFundingGoalJSON `json:"-"`
}
func (*FundingSearchResponseItemsFundingGoal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsFundingGoal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssue ¶
type FundingSearchResponseItemsIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding FundingSearchResponseItemsIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform FundingSearchResponseItemsIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository FundingSearchResponseItemsIssueRepository `json:"repository,required"`
State FundingSearchResponseItemsIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []FundingSearchResponseItemsIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author FundingSearchResponseItemsIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []FundingSearchResponseItemsIssueLabel `json:"labels"`
// GitHub reactions
Reactions FundingSearchResponseItemsIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON fundingSearchResponseItemsIssueJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssue) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssue) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueAssignee ¶
type FundingSearchResponseItemsIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON fundingSearchResponseItemsIssueAssigneeJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssueAssignee) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueAssignee) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueAuthor ¶
type FundingSearchResponseItemsIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON fundingSearchResponseItemsIssueAuthorJSON `json:"-"`
}
GitHub author
func (*FundingSearchResponseItemsIssueAuthor) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueAuthor) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueFunding ¶
type FundingSearchResponseItemsIssueFunding struct {
FundingGoal FundingSearchResponseItemsIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum FundingSearchResponseItemsIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON fundingSearchResponseItemsIssueFundingJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssueFunding) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueFunding) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueFundingFundingGoal ¶
type FundingSearchResponseItemsIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsIssueFundingFundingGoalJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueFundingPledgesSum ¶
type FundingSearchResponseItemsIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*FundingSearchResponseItemsIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueLabel ¶
type FundingSearchResponseItemsIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON fundingSearchResponseItemsIssueLabelJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssueLabel) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueLabel) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssuePlatform ¶
type FundingSearchResponseItemsIssuePlatform string
Issue platform (currently always GitHub)
const (
FundingSearchResponseItemsIssuePlatformGitHub FundingSearchResponseItemsIssuePlatform = "github"
)
func (FundingSearchResponseItemsIssuePlatform) IsKnown ¶
func (r FundingSearchResponseItemsIssuePlatform) IsKnown() bool
type FundingSearchResponseItemsIssueReactions ¶
type FundingSearchResponseItemsIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON fundingSearchResponseItemsIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*FundingSearchResponseItemsIssueReactions) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueReactions) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueRepository ¶
type FundingSearchResponseItemsIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization FundingSearchResponseItemsIssueRepositoryOrganization `json:"organization,required"`
Platform FundingSearchResponseItemsIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings FundingSearchResponseItemsIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON fundingSearchResponseItemsIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*FundingSearchResponseItemsIssueRepository) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueRepository) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueRepositoryOrganization ¶
type FundingSearchResponseItemsIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform FundingSearchResponseItemsIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON fundingSearchResponseItemsIssueRepositoryOrganizationJSON `json:"-"`
}
func (*FundingSearchResponseItemsIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueRepositoryOrganizationPlatform ¶
type FundingSearchResponseItemsIssueRepositoryOrganizationPlatform string
const (
FundingSearchResponseItemsIssueRepositoryOrganizationPlatformGitHub FundingSearchResponseItemsIssueRepositoryOrganizationPlatform = "github"
)
func (FundingSearchResponseItemsIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r FundingSearchResponseItemsIssueRepositoryOrganizationPlatform) IsKnown() bool
type FundingSearchResponseItemsIssueRepositoryPlatform ¶
type FundingSearchResponseItemsIssueRepositoryPlatform string
const (
FundingSearchResponseItemsIssueRepositoryPlatformGitHub FundingSearchResponseItemsIssueRepositoryPlatform = "github"
)
func (FundingSearchResponseItemsIssueRepositoryPlatform) IsKnown ¶
func (r FundingSearchResponseItemsIssueRepositoryPlatform) IsKnown() bool
type FundingSearchResponseItemsIssueRepositoryProfileSettings ¶
type FundingSearchResponseItemsIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON fundingSearchResponseItemsIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*FundingSearchResponseItemsIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsIssueState ¶
type FundingSearchResponseItemsIssueState string
const ( FundingSearchResponseItemsIssueStateOpen FundingSearchResponseItemsIssueState = "open" FundingSearchResponseItemsIssueStateClosed FundingSearchResponseItemsIssueState = "closed" )
func (FundingSearchResponseItemsIssueState) IsKnown ¶
func (r FundingSearchResponseItemsIssueState) IsKnown() bool
type FundingSearchResponseItemsPledgesSummaries ¶
type FundingSearchResponseItemsPledgesSummaries struct {
PayDirectly FundingSearchResponseItemsPledgesSummariesPayDirectly `json:"pay_directly,required"`
PayOnCompletion FundingSearchResponseItemsPledgesSummariesPayOnCompletion `json:"pay_on_completion,required"`
PayUpfront FundingSearchResponseItemsPledgesSummariesPayUpfront `json:"pay_upfront,required"`
JSON fundingSearchResponseItemsPledgesSummariesJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummaries) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummaries) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayDirectly ¶
type FundingSearchResponseItemsPledgesSummariesPayDirectly struct {
Pledgers []FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger `json:"pledgers,required"`
Total FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal `json:"total,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayDirectlyJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayDirectly) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayDirectly) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger ¶
type FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingSearchResponseItemsPledgesSummariesPayDirectlyPledgerJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayDirectlyPledger) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal ¶
type FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayDirectlyTotalJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayDirectlyTotal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayOnCompletion ¶
type FundingSearchResponseItemsPledgesSummariesPayOnCompletion struct {
Pledgers []FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger `json:"pledgers,required"`
Total FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal `json:"total,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayOnCompletionJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayOnCompletion) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayOnCompletion) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger ¶
type FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingSearchResponseItemsPledgesSummariesPayOnCompletionPledgerJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayOnCompletionPledger) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal ¶
type FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayOnCompletionTotalJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayOnCompletionTotal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayUpfront ¶
type FundingSearchResponseItemsPledgesSummariesPayUpfront struct {
Pledgers []FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger `json:"pledgers,required"`
Total FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal `json:"total,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayUpfrontJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayUpfront) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayUpfront) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger ¶
type FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON fundingSearchResponseItemsPledgesSummariesPayUpfrontPledgerJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayUpfrontPledger) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal ¶
type FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsPledgesSummariesPayUpfrontTotalJSON `json:"-"`
}
func (*FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsPledgesSummariesPayUpfrontTotal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponseItemsTotal ¶
type FundingSearchResponseItemsTotal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON fundingSearchResponseItemsTotalJSON `json:"-"`
}
func (*FundingSearchResponseItemsTotal) UnmarshalJSON ¶
func (r *FundingSearchResponseItemsTotal) UnmarshalJSON(data []byte) (err error)
type FundingSearchResponsePagination ¶
type FundingSearchResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON fundingSearchResponsePaginationJSON `json:"-"`
}
func (*FundingSearchResponsePagination) UnmarshalJSON ¶
func (r *FundingSearchResponsePagination) UnmarshalJSON(data []byte) (err error)
type FundingService ¶
type FundingService struct {
Options []option.RequestOption
}
FundingService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFundingService method instead.
func NewFundingService ¶
func NewFundingService(opts ...option.RequestOption) (r *FundingService)
NewFundingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FundingService) Lookup ¶
func (r *FundingService) Lookup(ctx context.Context, query FundingLookupParams, opts ...option.RequestOption) (res *FundingLookupResponse, err error)
Lookup
func (*FundingService) Search ¶
func (r *FundingService) Search(ctx context.Context, query FundingSearchParams, opts ...option.RequestOption) (res *FundingSearchResponse, err error)
Search
type IntrospectTokenResponse ¶
type IntrospectTokenResponse struct {
Active bool `json:"active,required"`
Aud string `json:"aud,required"`
ClientID string `json:"client_id,required"`
Exp int64 `json:"exp,required"`
Iat int64 `json:"iat,required"`
Iss string `json:"iss,required"`
Scope string `json:"scope,required"`
Sub string `json:"sub,required"`
SubType IntrospectTokenResponseSubType `json:"sub_type,required"`
TokenType IntrospectTokenResponseTokenType `json:"token_type,required"`
JSON introspectTokenResponseJSON `json:"-"`
}
func (*IntrospectTokenResponse) UnmarshalJSON ¶
func (r *IntrospectTokenResponse) UnmarshalJSON(data []byte) (err error)
type IntrospectTokenResponseSubType ¶
type IntrospectTokenResponseSubType string
const ( IntrospectTokenResponseSubTypeUser IntrospectTokenResponseSubType = "user" IntrospectTokenResponseSubTypeOrganization IntrospectTokenResponseSubType = "organization" )
func (IntrospectTokenResponseSubType) IsKnown ¶
func (r IntrospectTokenResponseSubType) IsKnown() bool
type IntrospectTokenResponseTokenType ¶
type IntrospectTokenResponseTokenType string
const ( IntrospectTokenResponseTokenTypeAccessToken IntrospectTokenResponseTokenType = "access_token" IntrospectTokenResponseTokenTypeRefreshToken IntrospectTokenResponseTokenType = "refresh_token" )
func (IntrospectTokenResponseTokenType) IsKnown ¶
func (r IntrospectTokenResponseTokenType) IsKnown() bool
type IssueBodyGetResponse ¶
type IssueBodyGetResponse = interface{}
type IssueBodyService ¶
type IssueBodyService struct {
Options []option.RequestOption
}
IssueBodyService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIssueBodyService method instead.
func NewIssueBodyService ¶
func NewIssueBodyService(opts ...option.RequestOption) (r *IssueBodyService)
NewIssueBodyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IssueBodyService) Get ¶
func (r *IssueBodyService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *IssueBodyGetResponse, err error)
Get Body
type IssueConfirmSolvedParams ¶
type IssueConfirmSolvedParams struct {
Splits param.Field[[]IssueConfirmSolvedParamsSplit] `json:"splits,required"`
}
func (IssueConfirmSolvedParams) MarshalJSON ¶
func (r IssueConfirmSolvedParams) MarshalJSON() (data []byte, err error)
type IssueConfirmSolvedParamsSplit ¶
type IssueConfirmSolvedParamsSplit struct {
GitHubUsername param.Field[string] `json:"github_username"`
OrganizationID param.Field[string] `json:"organization_id" format:"uuid"`
}
func (IssueConfirmSolvedParamsSplit) MarshalJSON ¶
func (r IssueConfirmSolvedParamsSplit) MarshalJSON() (data []byte, err error)
type IssueConfirmSolvedResponse ¶
type IssueConfirmSolvedResponse struct {
ID string `json:"id,required" format:"uuid"`
Funding IssueConfirmSolvedResponseFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform IssueConfirmSolvedResponsePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository IssueConfirmSolvedResponseRepository `json:"repository,required"`
State IssueConfirmSolvedResponseState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []IssueConfirmSolvedResponseAssignee `json:"assignees,nullable"`
// GitHub author
Author IssueConfirmSolvedResponseAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []IssueConfirmSolvedResponseLabel `json:"labels"`
// GitHub reactions
Reactions IssueConfirmSolvedResponseReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON issueConfirmSolvedResponseJSON `json:"-"`
}
func (*IssueConfirmSolvedResponse) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponse) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseAssignee ¶
type IssueConfirmSolvedResponseAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueConfirmSolvedResponseAssigneeJSON `json:"-"`
}
func (*IssueConfirmSolvedResponseAssignee) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseAssignee) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseAuthor ¶
type IssueConfirmSolvedResponseAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueConfirmSolvedResponseAuthorJSON `json:"-"`
}
GitHub author
func (*IssueConfirmSolvedResponseAuthor) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseAuthor) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseFunding ¶
type IssueConfirmSolvedResponseFunding struct {
FundingGoal IssueConfirmSolvedResponseFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum IssueConfirmSolvedResponseFundingPledgesSum `json:"pledges_sum,nullable"`
JSON issueConfirmSolvedResponseFundingJSON `json:"-"`
}
func (*IssueConfirmSolvedResponseFunding) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseFunding) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseFundingFundingGoal ¶
type IssueConfirmSolvedResponseFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueConfirmSolvedResponseFundingFundingGoalJSON `json:"-"`
}
func (*IssueConfirmSolvedResponseFundingFundingGoal) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseFundingPledgesSum ¶
type IssueConfirmSolvedResponseFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueConfirmSolvedResponseFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*IssueConfirmSolvedResponseFundingPledgesSum) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseLabel ¶
type IssueConfirmSolvedResponseLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON issueConfirmSolvedResponseLabelJSON `json:"-"`
}
func (*IssueConfirmSolvedResponseLabel) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseLabel) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponsePlatform ¶
type IssueConfirmSolvedResponsePlatform string
Issue platform (currently always GitHub)
const (
IssueConfirmSolvedResponsePlatformGitHub IssueConfirmSolvedResponsePlatform = "github"
)
func (IssueConfirmSolvedResponsePlatform) IsKnown ¶
func (r IssueConfirmSolvedResponsePlatform) IsKnown() bool
type IssueConfirmSolvedResponseReactions ¶
type IssueConfirmSolvedResponseReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueConfirmSolvedResponseReactionsJSON `json:"-"`
}
GitHub reactions
func (*IssueConfirmSolvedResponseReactions) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseReactions) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseRepository ¶
type IssueConfirmSolvedResponseRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization IssueConfirmSolvedResponseRepositoryOrganization `json:"organization,required"`
Platform IssueConfirmSolvedResponseRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings IssueConfirmSolvedResponseRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON issueConfirmSolvedResponseRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*IssueConfirmSolvedResponseRepository) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseRepository) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseRepositoryOrganization ¶
type IssueConfirmSolvedResponseRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform IssueConfirmSolvedResponseRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON issueConfirmSolvedResponseRepositoryOrganizationJSON `json:"-"`
}
func (*IssueConfirmSolvedResponseRepositoryOrganization) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseRepositoryOrganizationPlatform ¶
type IssueConfirmSolvedResponseRepositoryOrganizationPlatform string
const (
IssueConfirmSolvedResponseRepositoryOrganizationPlatformGitHub IssueConfirmSolvedResponseRepositoryOrganizationPlatform = "github"
)
func (IssueConfirmSolvedResponseRepositoryOrganizationPlatform) IsKnown ¶
func (r IssueConfirmSolvedResponseRepositoryOrganizationPlatform) IsKnown() bool
type IssueConfirmSolvedResponseRepositoryPlatform ¶
type IssueConfirmSolvedResponseRepositoryPlatform string
const (
IssueConfirmSolvedResponseRepositoryPlatformGitHub IssueConfirmSolvedResponseRepositoryPlatform = "github"
)
func (IssueConfirmSolvedResponseRepositoryPlatform) IsKnown ¶
func (r IssueConfirmSolvedResponseRepositoryPlatform) IsKnown() bool
type IssueConfirmSolvedResponseRepositoryProfileSettings ¶
type IssueConfirmSolvedResponseRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON issueConfirmSolvedResponseRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*IssueConfirmSolvedResponseRepositoryProfileSettings) UnmarshalJSON ¶
func (r *IssueConfirmSolvedResponseRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type IssueConfirmSolvedResponseState ¶
type IssueConfirmSolvedResponseState string
const ( IssueConfirmSolvedResponseStateOpen IssueConfirmSolvedResponseState = "open" IssueConfirmSolvedResponseStateClosed IssueConfirmSolvedResponseState = "closed" )
func (IssueConfirmSolvedResponseState) IsKnown ¶
func (r IssueConfirmSolvedResponseState) IsKnown() bool
type IssueGetResponse ¶
type IssueGetResponse struct {
ID string `json:"id,required" format:"uuid"`
Funding IssueGetResponseFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform IssueGetResponsePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository IssueGetResponseRepository `json:"repository,required"`
State IssueGetResponseState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []IssueGetResponseAssignee `json:"assignees,nullable"`
// GitHub author
Author IssueGetResponseAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []IssueGetResponseLabel `json:"labels"`
// GitHub reactions
Reactions IssueGetResponseReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON issueGetResponseJSON `json:"-"`
}
func (*IssueGetResponse) UnmarshalJSON ¶
func (r *IssueGetResponse) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseAssignee ¶
type IssueGetResponseAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueGetResponseAssigneeJSON `json:"-"`
}
func (*IssueGetResponseAssignee) UnmarshalJSON ¶
func (r *IssueGetResponseAssignee) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseAuthor ¶
type IssueGetResponseAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueGetResponseAuthorJSON `json:"-"`
}
GitHub author
func (*IssueGetResponseAuthor) UnmarshalJSON ¶
func (r *IssueGetResponseAuthor) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseFunding ¶
type IssueGetResponseFunding struct {
FundingGoal IssueGetResponseFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum IssueGetResponseFundingPledgesSum `json:"pledges_sum,nullable"`
JSON issueGetResponseFundingJSON `json:"-"`
}
func (*IssueGetResponseFunding) UnmarshalJSON ¶
func (r *IssueGetResponseFunding) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseFundingFundingGoal ¶
type IssueGetResponseFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueGetResponseFundingFundingGoalJSON `json:"-"`
}
func (*IssueGetResponseFundingFundingGoal) UnmarshalJSON ¶
func (r *IssueGetResponseFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseFundingPledgesSum ¶
type IssueGetResponseFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueGetResponseFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*IssueGetResponseFundingPledgesSum) UnmarshalJSON ¶
func (r *IssueGetResponseFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseLabel ¶
type IssueGetResponseLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON issueGetResponseLabelJSON `json:"-"`
}
func (*IssueGetResponseLabel) UnmarshalJSON ¶
func (r *IssueGetResponseLabel) UnmarshalJSON(data []byte) (err error)
type IssueGetResponsePlatform ¶
type IssueGetResponsePlatform string
Issue platform (currently always GitHub)
const (
IssueGetResponsePlatformGitHub IssueGetResponsePlatform = "github"
)
func (IssueGetResponsePlatform) IsKnown ¶
func (r IssueGetResponsePlatform) IsKnown() bool
type IssueGetResponseReactions ¶
type IssueGetResponseReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueGetResponseReactionsJSON `json:"-"`
}
GitHub reactions
func (*IssueGetResponseReactions) UnmarshalJSON ¶
func (r *IssueGetResponseReactions) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseRepository ¶
type IssueGetResponseRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization IssueGetResponseRepositoryOrganization `json:"organization,required"`
Platform IssueGetResponseRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings IssueGetResponseRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON issueGetResponseRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*IssueGetResponseRepository) UnmarshalJSON ¶
func (r *IssueGetResponseRepository) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseRepositoryOrganization ¶
type IssueGetResponseRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform IssueGetResponseRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON issueGetResponseRepositoryOrganizationJSON `json:"-"`
}
func (*IssueGetResponseRepositoryOrganization) UnmarshalJSON ¶
func (r *IssueGetResponseRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseRepositoryOrganizationPlatform ¶
type IssueGetResponseRepositoryOrganizationPlatform string
const (
IssueGetResponseRepositoryOrganizationPlatformGitHub IssueGetResponseRepositoryOrganizationPlatform = "github"
)
func (IssueGetResponseRepositoryOrganizationPlatform) IsKnown ¶
func (r IssueGetResponseRepositoryOrganizationPlatform) IsKnown() bool
type IssueGetResponseRepositoryPlatform ¶
type IssueGetResponseRepositoryPlatform string
const (
IssueGetResponseRepositoryPlatformGitHub IssueGetResponseRepositoryPlatform = "github"
)
func (IssueGetResponseRepositoryPlatform) IsKnown ¶
func (r IssueGetResponseRepositoryPlatform) IsKnown() bool
type IssueGetResponseRepositoryProfileSettings ¶
type IssueGetResponseRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON issueGetResponseRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*IssueGetResponseRepositoryProfileSettings) UnmarshalJSON ¶
func (r *IssueGetResponseRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type IssueGetResponseState ¶
type IssueGetResponseState string
const ( IssueGetResponseStateOpen IssueGetResponseState = "open" IssueGetResponseStateClosed IssueGetResponseState = "closed" )
func (IssueGetResponseState) IsKnown ¶
func (r IssueGetResponseState) IsKnown() bool
type IssueListParams ¶
type IssueListParams struct {
// Filter by external organization name.
ExternalOrganizationName param.Field[IssueListParamsExternalOrganizationNameUnion] `query:"external_organization_name"`
// Filter by badged status.
IsBadged param.Field[bool] `query:"is_badged"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by issue number.
Number param.Field[IssueListParamsNumberUnion] `query:"number"`
// Filter by organization ID.
OrganizationID param.Field[IssueListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by platform.
Platform param.Field[IssueListParamsPlatformUnion] `query:"platform"`
// Filter by repository name.
RepositoryName param.Field[IssueListParamsRepositoryNameUnion] `query:"repository_name"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (IssueListParams) URLQuery ¶
func (r IssueListParams) URLQuery() (v url.Values)
URLQuery serializes IssueListParams's query parameters as `url.Values`.
type IssueListParamsExternalOrganizationNameArray ¶
type IssueListParamsExternalOrganizationNameArray []string
func (IssueListParamsExternalOrganizationNameArray) ImplementsIssueListParamsExternalOrganizationNameUnion ¶
func (r IssueListParamsExternalOrganizationNameArray) ImplementsIssueListParamsExternalOrganizationNameUnion()
type IssueListParamsExternalOrganizationNameUnion ¶
type IssueListParamsExternalOrganizationNameUnion interface {
ImplementsIssueListParamsExternalOrganizationNameUnion()
}
Filter by external organization name.
Satisfied by [shared.UnionString], IssueListParamsExternalOrganizationNameArray.
type IssueListParamsNumberArray ¶
type IssueListParamsNumberArray []int64
func (IssueListParamsNumberArray) ImplementsIssueListParamsNumberUnion ¶
func (r IssueListParamsNumberArray) ImplementsIssueListParamsNumberUnion()
type IssueListParamsNumberUnion ¶
type IssueListParamsNumberUnion interface {
ImplementsIssueListParamsNumberUnion()
}
Filter by issue number.
Satisfied by [shared.UnionInt], IssueListParamsNumberArray.
type IssueListParamsOrganizationIDArray ¶
type IssueListParamsOrganizationIDArray []string
func (IssueListParamsOrganizationIDArray) ImplementsIssueListParamsOrganizationIDUnion ¶
func (r IssueListParamsOrganizationIDArray) ImplementsIssueListParamsOrganizationIDUnion()
type IssueListParamsOrganizationIDUnion ¶
type IssueListParamsOrganizationIDUnion interface {
ImplementsIssueListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], IssueListParamsOrganizationIDArray.
type IssueListParamsPlatformArray ¶
type IssueListParamsPlatformArray []IssueListParamsPlatformArray
type IssueListParamsPlatformPlatforms ¶
type IssueListParamsPlatformPlatforms string
const (
IssueListParamsPlatformPlatformsGitHub IssueListParamsPlatformPlatforms = "github"
)
func (IssueListParamsPlatformPlatforms) IsKnown ¶
func (r IssueListParamsPlatformPlatforms) IsKnown() bool
type IssueListParamsPlatformUnion ¶
type IssueListParamsPlatformUnion interface {
// contains filtered or unexported methods
}
Filter by platform.
Satisfied by IssueListParamsPlatformPlatforms, IssueListParamsPlatformArray.
type IssueListParamsRepositoryNameArray ¶
type IssueListParamsRepositoryNameArray []string
func (IssueListParamsRepositoryNameArray) ImplementsIssueListParamsRepositoryNameUnion ¶
func (r IssueListParamsRepositoryNameArray) ImplementsIssueListParamsRepositoryNameUnion()
type IssueListParamsRepositoryNameUnion ¶
type IssueListParamsRepositoryNameUnion interface {
ImplementsIssueListParamsRepositoryNameUnion()
}
Filter by repository name.
Satisfied by [shared.UnionString], IssueListParamsRepositoryNameArray.
type IssueListResponse ¶
type IssueListResponse struct {
Pagination IssueListResponsePagination `json:"pagination,required"`
Items []IssueListResponseItem `json:"items"`
JSON issueListResponseJSON `json:"-"`
}
func (*IssueListResponse) UnmarshalJSON ¶
func (r *IssueListResponse) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItem ¶
type IssueListResponseItem struct {
ID string `json:"id,required" format:"uuid"`
Funding IssueListResponseItemsFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform IssueListResponseItemsPlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository IssueListResponseItemsRepository `json:"repository,required"`
State IssueListResponseItemsState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []IssueListResponseItemsAssignee `json:"assignees,nullable"`
// GitHub author
Author IssueListResponseItemsAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []IssueListResponseItemsLabel `json:"labels"`
// GitHub reactions
Reactions IssueListResponseItemsReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON issueListResponseItemJSON `json:"-"`
}
func (*IssueListResponseItem) UnmarshalJSON ¶
func (r *IssueListResponseItem) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsAssignee ¶
type IssueListResponseItemsAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueListResponseItemsAssigneeJSON `json:"-"`
}
func (*IssueListResponseItemsAssignee) UnmarshalJSON ¶
func (r *IssueListResponseItemsAssignee) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsAuthor ¶
type IssueListResponseItemsAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueListResponseItemsAuthorJSON `json:"-"`
}
GitHub author
func (*IssueListResponseItemsAuthor) UnmarshalJSON ¶
func (r *IssueListResponseItemsAuthor) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsFunding ¶
type IssueListResponseItemsFunding struct {
FundingGoal IssueListResponseItemsFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum IssueListResponseItemsFundingPledgesSum `json:"pledges_sum,nullable"`
JSON issueListResponseItemsFundingJSON `json:"-"`
}
func (*IssueListResponseItemsFunding) UnmarshalJSON ¶
func (r *IssueListResponseItemsFunding) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsFundingFundingGoal ¶
type IssueListResponseItemsFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueListResponseItemsFundingFundingGoalJSON `json:"-"`
}
func (*IssueListResponseItemsFundingFundingGoal) UnmarshalJSON ¶
func (r *IssueListResponseItemsFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsFundingPledgesSum ¶
type IssueListResponseItemsFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueListResponseItemsFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*IssueListResponseItemsFundingPledgesSum) UnmarshalJSON ¶
func (r *IssueListResponseItemsFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsLabel ¶
type IssueListResponseItemsLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON issueListResponseItemsLabelJSON `json:"-"`
}
func (*IssueListResponseItemsLabel) UnmarshalJSON ¶
func (r *IssueListResponseItemsLabel) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsPlatform ¶
type IssueListResponseItemsPlatform string
Issue platform (currently always GitHub)
const (
IssueListResponseItemsPlatformGitHub IssueListResponseItemsPlatform = "github"
)
func (IssueListResponseItemsPlatform) IsKnown ¶
func (r IssueListResponseItemsPlatform) IsKnown() bool
type IssueListResponseItemsReactions ¶
type IssueListResponseItemsReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueListResponseItemsReactionsJSON `json:"-"`
}
GitHub reactions
func (*IssueListResponseItemsReactions) UnmarshalJSON ¶
func (r *IssueListResponseItemsReactions) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsRepository ¶
type IssueListResponseItemsRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization IssueListResponseItemsRepositoryOrganization `json:"organization,required"`
Platform IssueListResponseItemsRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings IssueListResponseItemsRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON issueListResponseItemsRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*IssueListResponseItemsRepository) UnmarshalJSON ¶
func (r *IssueListResponseItemsRepository) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsRepositoryOrganization ¶
type IssueListResponseItemsRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform IssueListResponseItemsRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON issueListResponseItemsRepositoryOrganizationJSON `json:"-"`
}
func (*IssueListResponseItemsRepositoryOrganization) UnmarshalJSON ¶
func (r *IssueListResponseItemsRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsRepositoryOrganizationPlatform ¶
type IssueListResponseItemsRepositoryOrganizationPlatform string
const (
IssueListResponseItemsRepositoryOrganizationPlatformGitHub IssueListResponseItemsRepositoryOrganizationPlatform = "github"
)
func (IssueListResponseItemsRepositoryOrganizationPlatform) IsKnown ¶
func (r IssueListResponseItemsRepositoryOrganizationPlatform) IsKnown() bool
type IssueListResponseItemsRepositoryPlatform ¶
type IssueListResponseItemsRepositoryPlatform string
const (
IssueListResponseItemsRepositoryPlatformGitHub IssueListResponseItemsRepositoryPlatform = "github"
)
func (IssueListResponseItemsRepositoryPlatform) IsKnown ¶
func (r IssueListResponseItemsRepositoryPlatform) IsKnown() bool
type IssueListResponseItemsRepositoryProfileSettings ¶
type IssueListResponseItemsRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON issueListResponseItemsRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*IssueListResponseItemsRepositoryProfileSettings) UnmarshalJSON ¶
func (r *IssueListResponseItemsRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type IssueListResponseItemsState ¶
type IssueListResponseItemsState string
const ( IssueListResponseItemsStateOpen IssueListResponseItemsState = "open" IssueListResponseItemsStateClosed IssueListResponseItemsState = "closed" )
func (IssueListResponseItemsState) IsKnown ¶
func (r IssueListResponseItemsState) IsKnown() bool
type IssueListResponsePagination ¶
type IssueListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueListResponsePaginationJSON `json:"-"`
}
func (*IssueListResponsePagination) UnmarshalJSON ¶
func (r *IssueListResponsePagination) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetParams ¶
type IssueLookupGetParams struct {
// URL to issue on external source
ExternalURL param.Field[string] `query:"external_url"`
}
func (IssueLookupGetParams) URLQuery ¶
func (r IssueLookupGetParams) URLQuery() (v url.Values)
URLQuery serializes IssueLookupGetParams's query parameters as `url.Values`.
type IssueLookupGetResponse ¶
type IssueLookupGetResponse struct {
ID string `json:"id,required" format:"uuid"`
Funding IssueLookupGetResponseFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform IssueLookupGetResponsePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository IssueLookupGetResponseRepository `json:"repository,required"`
State IssueLookupGetResponseState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []IssueLookupGetResponseAssignee `json:"assignees,nullable"`
// GitHub author
Author IssueLookupGetResponseAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []IssueLookupGetResponseLabel `json:"labels"`
// GitHub reactions
Reactions IssueLookupGetResponseReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON issueLookupGetResponseJSON `json:"-"`
}
func (*IssueLookupGetResponse) UnmarshalJSON ¶
func (r *IssueLookupGetResponse) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseAssignee ¶
type IssueLookupGetResponseAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueLookupGetResponseAssigneeJSON `json:"-"`
}
func (*IssueLookupGetResponseAssignee) UnmarshalJSON ¶
func (r *IssueLookupGetResponseAssignee) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseAuthor ¶
type IssueLookupGetResponseAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueLookupGetResponseAuthorJSON `json:"-"`
}
GitHub author
func (*IssueLookupGetResponseAuthor) UnmarshalJSON ¶
func (r *IssueLookupGetResponseAuthor) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseFunding ¶
type IssueLookupGetResponseFunding struct {
FundingGoal IssueLookupGetResponseFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum IssueLookupGetResponseFundingPledgesSum `json:"pledges_sum,nullable"`
JSON issueLookupGetResponseFundingJSON `json:"-"`
}
func (*IssueLookupGetResponseFunding) UnmarshalJSON ¶
func (r *IssueLookupGetResponseFunding) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseFundingFundingGoal ¶
type IssueLookupGetResponseFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueLookupGetResponseFundingFundingGoalJSON `json:"-"`
}
func (*IssueLookupGetResponseFundingFundingGoal) UnmarshalJSON ¶
func (r *IssueLookupGetResponseFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseFundingPledgesSum ¶
type IssueLookupGetResponseFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueLookupGetResponseFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*IssueLookupGetResponseFundingPledgesSum) UnmarshalJSON ¶
func (r *IssueLookupGetResponseFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseLabel ¶
type IssueLookupGetResponseLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON issueLookupGetResponseLabelJSON `json:"-"`
}
func (*IssueLookupGetResponseLabel) UnmarshalJSON ¶
func (r *IssueLookupGetResponseLabel) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponsePlatform ¶
type IssueLookupGetResponsePlatform string
Issue platform (currently always GitHub)
const (
IssueLookupGetResponsePlatformGitHub IssueLookupGetResponsePlatform = "github"
)
func (IssueLookupGetResponsePlatform) IsKnown ¶
func (r IssueLookupGetResponsePlatform) IsKnown() bool
type IssueLookupGetResponseReactions ¶
type IssueLookupGetResponseReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueLookupGetResponseReactionsJSON `json:"-"`
}
GitHub reactions
func (*IssueLookupGetResponseReactions) UnmarshalJSON ¶
func (r *IssueLookupGetResponseReactions) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseRepository ¶
type IssueLookupGetResponseRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization IssueLookupGetResponseRepositoryOrganization `json:"organization,required"`
Platform IssueLookupGetResponseRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings IssueLookupGetResponseRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON issueLookupGetResponseRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*IssueLookupGetResponseRepository) UnmarshalJSON ¶
func (r *IssueLookupGetResponseRepository) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseRepositoryOrganization ¶
type IssueLookupGetResponseRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform IssueLookupGetResponseRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON issueLookupGetResponseRepositoryOrganizationJSON `json:"-"`
}
func (*IssueLookupGetResponseRepositoryOrganization) UnmarshalJSON ¶
func (r *IssueLookupGetResponseRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseRepositoryOrganizationPlatform ¶
type IssueLookupGetResponseRepositoryOrganizationPlatform string
const (
IssueLookupGetResponseRepositoryOrganizationPlatformGitHub IssueLookupGetResponseRepositoryOrganizationPlatform = "github"
)
func (IssueLookupGetResponseRepositoryOrganizationPlatform) IsKnown ¶
func (r IssueLookupGetResponseRepositoryOrganizationPlatform) IsKnown() bool
type IssueLookupGetResponseRepositoryPlatform ¶
type IssueLookupGetResponseRepositoryPlatform string
const (
IssueLookupGetResponseRepositoryPlatformGitHub IssueLookupGetResponseRepositoryPlatform = "github"
)
func (IssueLookupGetResponseRepositoryPlatform) IsKnown ¶
func (r IssueLookupGetResponseRepositoryPlatform) IsKnown() bool
type IssueLookupGetResponseRepositoryProfileSettings ¶
type IssueLookupGetResponseRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON issueLookupGetResponseRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*IssueLookupGetResponseRepositoryProfileSettings) UnmarshalJSON ¶
func (r *IssueLookupGetResponseRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type IssueLookupGetResponseState ¶
type IssueLookupGetResponseState string
const ( IssueLookupGetResponseStateOpen IssueLookupGetResponseState = "open" IssueLookupGetResponseStateClosed IssueLookupGetResponseState = "closed" )
func (IssueLookupGetResponseState) IsKnown ¶
func (r IssueLookupGetResponseState) IsKnown() bool
type IssueLookupService ¶
type IssueLookupService struct {
Options []option.RequestOption
}
IssueLookupService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIssueLookupService method instead.
func NewIssueLookupService ¶
func NewIssueLookupService(opts ...option.RequestOption) (r *IssueLookupService)
NewIssueLookupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IssueLookupService) Get ¶
func (r *IssueLookupService) Get(ctx context.Context, query IssueLookupGetParams, opts ...option.RequestOption) (res *IssueLookupGetResponse, err error)
Lookup
type IssueService ¶
type IssueService struct {
Options []option.RequestOption
Lookup *IssueLookupService
Body *IssueBodyService
}
IssueService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIssueService method instead.
func NewIssueService ¶
func NewIssueService(opts ...option.RequestOption) (r *IssueService)
NewIssueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IssueService) ConfirmSolved ¶
func (r *IssueService) ConfirmSolved(ctx context.Context, id string, body IssueConfirmSolvedParams, opts ...option.RequestOption) (res *IssueConfirmSolvedResponse, err error)
Mark an issue as confirmed solved, and configure issue reward splits. Enables payouts of pledges. Can only be done once per issue. Requires authentication.
func (*IssueService) Get ¶
func (r *IssueService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *IssueGetResponse, err error)
Get issue
func (*IssueService) List ¶
func (r *IssueService) List(ctx context.Context, query IssueListParams, opts ...option.RequestOption) (res *IssueListResponse, err error)
List issues.
func (*IssueService) Update ¶
func (r *IssueService) Update(ctx context.Context, id string, body IssueUpdateParams, opts ...option.RequestOption) (res *IssueUpdateResponse, err error)
Update issue. Requires authentication.
type IssueUpdateParams ¶
type IssueUpdateParams struct {
FundingGoal param.Field[IssueUpdateParamsFundingGoal] `json:"funding_goal"`
SetUpfrontSplitToContributors param.Field[bool] `json:"set_upfront_split_to_contributors"`
UpfrontSplitToContributors param.Field[int64] `json:"upfront_split_to_contributors"`
}
func (IssueUpdateParams) MarshalJSON ¶
func (r IssueUpdateParams) MarshalJSON() (data []byte, err error)
type IssueUpdateParamsFundingGoal ¶
type IssueUpdateParamsFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount param.Field[int64] `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency param.Field[string] `json:"currency,required"`
}
func (IssueUpdateParamsFundingGoal) MarshalJSON ¶
func (r IssueUpdateParamsFundingGoal) MarshalJSON() (data []byte, err error)
type IssueUpdateResponse ¶
type IssueUpdateResponse struct {
ID string `json:"id,required" format:"uuid"`
Funding IssueUpdateResponseFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform IssueUpdateResponsePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository IssueUpdateResponseRepository `json:"repository,required"`
State IssueUpdateResponseState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []IssueUpdateResponseAssignee `json:"assignees,nullable"`
// GitHub author
Author IssueUpdateResponseAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []IssueUpdateResponseLabel `json:"labels"`
// GitHub reactions
Reactions IssueUpdateResponseReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON issueUpdateResponseJSON `json:"-"`
}
func (*IssueUpdateResponse) UnmarshalJSON ¶
func (r *IssueUpdateResponse) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseAssignee ¶
type IssueUpdateResponseAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueUpdateResponseAssigneeJSON `json:"-"`
}
func (*IssueUpdateResponseAssignee) UnmarshalJSON ¶
func (r *IssueUpdateResponseAssignee) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseAuthor ¶
type IssueUpdateResponseAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON issueUpdateResponseAuthorJSON `json:"-"`
}
GitHub author
func (*IssueUpdateResponseAuthor) UnmarshalJSON ¶
func (r *IssueUpdateResponseAuthor) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseFunding ¶
type IssueUpdateResponseFunding struct {
FundingGoal IssueUpdateResponseFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum IssueUpdateResponseFundingPledgesSum `json:"pledges_sum,nullable"`
JSON issueUpdateResponseFundingJSON `json:"-"`
}
func (*IssueUpdateResponseFunding) UnmarshalJSON ¶
func (r *IssueUpdateResponseFunding) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseFundingFundingGoal ¶
type IssueUpdateResponseFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueUpdateResponseFundingFundingGoalJSON `json:"-"`
}
func (*IssueUpdateResponseFundingFundingGoal) UnmarshalJSON ¶
func (r *IssueUpdateResponseFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseFundingPledgesSum ¶
type IssueUpdateResponseFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON issueUpdateResponseFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*IssueUpdateResponseFundingPledgesSum) UnmarshalJSON ¶
func (r *IssueUpdateResponseFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseLabel ¶
type IssueUpdateResponseLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON issueUpdateResponseLabelJSON `json:"-"`
}
func (*IssueUpdateResponseLabel) UnmarshalJSON ¶
func (r *IssueUpdateResponseLabel) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponsePlatform ¶
type IssueUpdateResponsePlatform string
Issue platform (currently always GitHub)
const (
IssueUpdateResponsePlatformGitHub IssueUpdateResponsePlatform = "github"
)
func (IssueUpdateResponsePlatform) IsKnown ¶
func (r IssueUpdateResponsePlatform) IsKnown() bool
type IssueUpdateResponseReactions ¶
type IssueUpdateResponseReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON issueUpdateResponseReactionsJSON `json:"-"`
}
GitHub reactions
func (*IssueUpdateResponseReactions) UnmarshalJSON ¶
func (r *IssueUpdateResponseReactions) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseRepository ¶
type IssueUpdateResponseRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization IssueUpdateResponseRepositoryOrganization `json:"organization,required"`
Platform IssueUpdateResponseRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings IssueUpdateResponseRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON issueUpdateResponseRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*IssueUpdateResponseRepository) UnmarshalJSON ¶
func (r *IssueUpdateResponseRepository) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseRepositoryOrganization ¶
type IssueUpdateResponseRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform IssueUpdateResponseRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON issueUpdateResponseRepositoryOrganizationJSON `json:"-"`
}
func (*IssueUpdateResponseRepositoryOrganization) UnmarshalJSON ¶
func (r *IssueUpdateResponseRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseRepositoryOrganizationPlatform ¶
type IssueUpdateResponseRepositoryOrganizationPlatform string
const (
IssueUpdateResponseRepositoryOrganizationPlatformGitHub IssueUpdateResponseRepositoryOrganizationPlatform = "github"
)
func (IssueUpdateResponseRepositoryOrganizationPlatform) IsKnown ¶
func (r IssueUpdateResponseRepositoryOrganizationPlatform) IsKnown() bool
type IssueUpdateResponseRepositoryPlatform ¶
type IssueUpdateResponseRepositoryPlatform string
const (
IssueUpdateResponseRepositoryPlatformGitHub IssueUpdateResponseRepositoryPlatform = "github"
)
func (IssueUpdateResponseRepositoryPlatform) IsKnown ¶
func (r IssueUpdateResponseRepositoryPlatform) IsKnown() bool
type IssueUpdateResponseRepositoryProfileSettings ¶
type IssueUpdateResponseRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON issueUpdateResponseRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*IssueUpdateResponseRepositoryProfileSettings) UnmarshalJSON ¶
func (r *IssueUpdateResponseRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type IssueUpdateResponseState ¶
type IssueUpdateResponseState string
const ( IssueUpdateResponseStateOpen IssueUpdateResponseState = "open" IssueUpdateResponseStateClosed IssueUpdateResponseState = "closed" )
func (IssueUpdateResponseState) IsKnown ¶
func (r IssueUpdateResponseState) IsKnown() bool
type ListResourceAnnotatedUnion ¶
type ListResourceAnnotatedUnion struct {
Pagination ListResourceAnnotatedUnionPagination `json:"pagination,required"`
Items []ListResourceAnnotatedUnionItem `json:"items"`
JSON listResourceAnnotatedUnionJSON `json:"-"`
}
func (*ListResourceAnnotatedUnion) UnmarshalJSON ¶
func (r *ListResourceAnnotatedUnion) UnmarshalJSON(data []byte) (err error)
type ListResourceAnnotatedUnionItem ¶
type ListResourceAnnotatedUnionItem struct {
ID string `json:"id,required" format:"uuid4"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Name string `json:"name,required"`
Path string `json:"path,required"`
MimeType string `json:"mime_type,required"`
Size int64 `json:"size,required"`
StorageVersion string `json:"storage_version,nullable"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
Version string `json:"version,nullable"`
Service ListResourceAnnotatedUnionItemsService `json:"service,required"`
IsUploaded bool `json:"is_uploaded,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
SizeReadable string `json:"size_readable,required"`
PublicURL string `json:"public_url"`
JSON listResourceAnnotatedUnionItemJSON `json:"-"`
// contains filtered or unexported fields
}
File to be associated with the downloadables benefit.
func (ListResourceAnnotatedUnionItem) AsUnion ¶
func (r ListResourceAnnotatedUnionItem) AsUnion() ListResourceAnnotatedUnionItemsUnion
AsUnion returns a ListResourceAnnotatedUnionItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are DownloadableFileRead, ProductMediaFileReadOutput, OrganizationAvatarFileRead.
func (*ListResourceAnnotatedUnionItem) UnmarshalJSON ¶
func (r *ListResourceAnnotatedUnionItem) UnmarshalJSON(data []byte) (err error)
type ListResourceAnnotatedUnionItemsService ¶
type ListResourceAnnotatedUnionItemsService string
const ( ListResourceAnnotatedUnionItemsServiceDownloadable ListResourceAnnotatedUnionItemsService = "downloadable" ListResourceAnnotatedUnionItemsServiceProductMedia ListResourceAnnotatedUnionItemsService = "product_media" ListResourceAnnotatedUnionItemsServiceOrganizationAvatar ListResourceAnnotatedUnionItemsService = "organization_avatar" )
func (ListResourceAnnotatedUnionItemsService) IsKnown ¶
func (r ListResourceAnnotatedUnionItemsService) IsKnown() bool
type ListResourceAnnotatedUnionItemsUnion ¶
type ListResourceAnnotatedUnionItemsUnion interface {
// contains filtered or unexported methods
}
File to be associated with the downloadables benefit.
Union satisfied by DownloadableFileRead, ProductMediaFileReadOutput or OrganizationAvatarFileRead.
type ListResourceAnnotatedUnionPagination ¶
type ListResourceAnnotatedUnionPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceAnnotatedUnionPaginationJSON `json:"-"`
}
func (*ListResourceAnnotatedUnionPagination) UnmarshalJSON ¶
func (r *ListResourceAnnotatedUnionPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceArticle ¶
type ListResourceArticle struct {
Pagination ListResourceArticlePagination `json:"pagination,required"`
Items []Article `json:"items"`
JSON listResourceArticleJSON `json:"-"`
}
func (*ListResourceArticle) UnmarshalJSON ¶
func (r *ListResourceArticle) UnmarshalJSON(data []byte) (err error)
type ListResourceArticlePagination ¶
type ListResourceArticlePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceArticlePaginationJSON `json:"-"`
}
func (*ListResourceArticlePagination) UnmarshalJSON ¶
func (r *ListResourceArticlePagination) UnmarshalJSON(data []byte) (err error)
type ListResourceBenefitGrant ¶
type ListResourceBenefitGrant struct {
Pagination ListResourceBenefitGrantPagination `json:"pagination,required"`
Items []ListResourceBenefitGrantItem `json:"items"`
JSON listResourceBenefitGrantJSON `json:"-"`
}
func (*ListResourceBenefitGrant) UnmarshalJSON ¶
func (r *ListResourceBenefitGrant) UnmarshalJSON(data []byte) (err error)
type ListResourceBenefitGrantItem ¶
type ListResourceBenefitGrantItem struct {
// The ID of the grant.
ID string `json:"id,required" format:"uuid4"`
// The ID of the benefit concerned by this grant.
BenefitID string `json:"benefit_id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is granted.
IsGranted bool `json:"is_granted,required"`
// Whether the benefit is revoked.
IsRevoked bool `json:"is_revoked,required"`
// Properties for a benefit grant.
Properties interface{} `json:"properties,required"`
// The ID of the user concerned by this grant.
UserID string `json:"user_id,required" format:"uuid4"`
// The timestamp when the benefit was granted. If `None`, the benefit is not
// granted.
GrantedAt time.Time `json:"granted_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the order that granted this benefit.
OrderID string `json:"order_id,nullable" format:"uuid4"`
// The timestamp when the benefit was revoked. If `None`, the benefit is not
// revoked.
RevokedAt time.Time `json:"revoked_at,nullable" format:"date-time"`
// The ID of the subscription that granted this benefit.
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON listResourceBenefitGrantItemJSON `json:"-"`
}
A grant of a benefit to a user.
func (*ListResourceBenefitGrantItem) UnmarshalJSON ¶
func (r *ListResourceBenefitGrantItem) UnmarshalJSON(data []byte) (err error)
type ListResourceBenefitGrantPagination ¶
type ListResourceBenefitGrantPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceBenefitGrantPaginationJSON `json:"-"`
}
func (*ListResourceBenefitGrantPagination) UnmarshalJSON ¶
func (r *ListResourceBenefitGrantPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceDonation ¶
type ListResourceDonation struct {
Pagination ListResourceDonationPagination `json:"pagination,required"`
Items []ListResourceDonationItem `json:"items"`
JSON listResourceDonationJSON `json:"-"`
}
func (*ListResourceDonation) UnmarshalJSON ¶
func (r *ListResourceDonation) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItem ¶
type ListResourceDonationItem struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
Email string `json:"email,required"`
Message string `json:"message,required,nullable"`
Donor ListResourceDonationItemsDonor `json:"donor,nullable"`
Issue ListResourceDonationItemsIssue `json:"issue,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceDonationItemJSON `json:"-"`
}
func (*ListResourceDonationItem) UnmarshalJSON ¶
func (r *ListResourceDonationItem) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsDonor ¶
type ListResourceDonationItemsDonor struct {
ID string `json:"id,required" format:"uuid4"`
Platform ListResourceDonationItemsDonorPlatform `json:"platform"`
Name string `json:"name"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal"`
PublicName string `json:"public_name"`
JSON listResourceDonationItemsDonorJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListResourceDonationItemsDonor) AsUnion ¶
func (r ListResourceDonationItemsDonor) AsUnion() ListResourceDonationItemsDonorUnion
AsUnion returns a ListResourceDonationItemsDonorUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListResourceDonationItemsDonorDonationOrganization, ListResourceDonationItemsDonorDonationUser.
func (*ListResourceDonationItemsDonor) UnmarshalJSON ¶
func (r *ListResourceDonationItemsDonor) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsDonorDonationOrganization ¶
type ListResourceDonationItemsDonorDonationOrganization struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform ListResourceDonationItemsDonorDonationOrganizationPlatform `json:"platform,required"`
JSON listResourceDonationItemsDonorDonationOrganizationJSON `json:"-"`
}
func (*ListResourceDonationItemsDonorDonationOrganization) UnmarshalJSON ¶
func (r *ListResourceDonationItemsDonorDonationOrganization) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsDonorDonationOrganizationPlatform ¶
type ListResourceDonationItemsDonorDonationOrganizationPlatform string
const (
ListResourceDonationItemsDonorDonationOrganizationPlatformGitHub ListResourceDonationItemsDonorDonationOrganizationPlatform = "github"
)
func (ListResourceDonationItemsDonorDonationOrganizationPlatform) IsKnown ¶
func (r ListResourceDonationItemsDonorDonationOrganizationPlatform) IsKnown() bool
type ListResourceDonationItemsDonorDonationUser ¶
type ListResourceDonationItemsDonorDonationUser struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required,nullable"`
PublicName string `json:"public_name,required"`
JSON listResourceDonationItemsDonorDonationUserJSON `json:"-"`
}
func (*ListResourceDonationItemsDonorDonationUser) UnmarshalJSON ¶
func (r *ListResourceDonationItemsDonorDonationUser) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsDonorPlatform ¶
type ListResourceDonationItemsDonorPlatform string
const (
ListResourceDonationItemsDonorPlatformGitHub ListResourceDonationItemsDonorPlatform = "github"
)
func (ListResourceDonationItemsDonorPlatform) IsKnown ¶
func (r ListResourceDonationItemsDonorPlatform) IsKnown() bool
type ListResourceDonationItemsDonorUnion ¶
type ListResourceDonationItemsDonorUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListResourceDonationItemsDonorDonationOrganization or ListResourceDonationItemsDonorDonationUser.
type ListResourceDonationItemsIssue ¶
type ListResourceDonationItemsIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding ListResourceDonationItemsIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform ListResourceDonationItemsIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository ListResourceDonationItemsIssueRepository `json:"repository,required"`
State ListResourceDonationItemsIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []ListResourceDonationItemsIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author ListResourceDonationItemsIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []ListResourceDonationItemsIssueLabel `json:"labels"`
// GitHub reactions
Reactions ListResourceDonationItemsIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON listResourceDonationItemsIssueJSON `json:"-"`
}
func (*ListResourceDonationItemsIssue) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssue) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueAssignee ¶
type ListResourceDonationItemsIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON listResourceDonationItemsIssueAssigneeJSON `json:"-"`
}
func (*ListResourceDonationItemsIssueAssignee) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueAssignee) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueAuthor ¶
type ListResourceDonationItemsIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON listResourceDonationItemsIssueAuthorJSON `json:"-"`
}
GitHub author
func (*ListResourceDonationItemsIssueAuthor) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueAuthor) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueFunding ¶
type ListResourceDonationItemsIssueFunding struct {
FundingGoal ListResourceDonationItemsIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum ListResourceDonationItemsIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON listResourceDonationItemsIssueFundingJSON `json:"-"`
}
func (*ListResourceDonationItemsIssueFunding) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueFunding) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueFundingFundingGoal ¶
type ListResourceDonationItemsIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON listResourceDonationItemsIssueFundingFundingGoalJSON `json:"-"`
}
func (*ListResourceDonationItemsIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueFundingPledgesSum ¶
type ListResourceDonationItemsIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON listResourceDonationItemsIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*ListResourceDonationItemsIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueLabel ¶
type ListResourceDonationItemsIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON listResourceDonationItemsIssueLabelJSON `json:"-"`
}
func (*ListResourceDonationItemsIssueLabel) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueLabel) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssuePlatform ¶
type ListResourceDonationItemsIssuePlatform string
Issue platform (currently always GitHub)
const (
ListResourceDonationItemsIssuePlatformGitHub ListResourceDonationItemsIssuePlatform = "github"
)
func (ListResourceDonationItemsIssuePlatform) IsKnown ¶
func (r ListResourceDonationItemsIssuePlatform) IsKnown() bool
type ListResourceDonationItemsIssueReactions ¶
type ListResourceDonationItemsIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceDonationItemsIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*ListResourceDonationItemsIssueReactions) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueReactions) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueRepository ¶
type ListResourceDonationItemsIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization ListResourceDonationItemsIssueRepositoryOrganization `json:"organization,required"`
Platform ListResourceDonationItemsIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings ListResourceDonationItemsIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON listResourceDonationItemsIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*ListResourceDonationItemsIssueRepository) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueRepository) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueRepositoryOrganization ¶
type ListResourceDonationItemsIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform ListResourceDonationItemsIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON listResourceDonationItemsIssueRepositoryOrganizationJSON `json:"-"`
}
func (*ListResourceDonationItemsIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueRepositoryOrganizationPlatform ¶
type ListResourceDonationItemsIssueRepositoryOrganizationPlatform string
const (
ListResourceDonationItemsIssueRepositoryOrganizationPlatformGitHub ListResourceDonationItemsIssueRepositoryOrganizationPlatform = "github"
)
func (ListResourceDonationItemsIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r ListResourceDonationItemsIssueRepositoryOrganizationPlatform) IsKnown() bool
type ListResourceDonationItemsIssueRepositoryPlatform ¶
type ListResourceDonationItemsIssueRepositoryPlatform string
const (
ListResourceDonationItemsIssueRepositoryPlatformGitHub ListResourceDonationItemsIssueRepositoryPlatform = "github"
)
func (ListResourceDonationItemsIssueRepositoryPlatform) IsKnown ¶
func (r ListResourceDonationItemsIssueRepositoryPlatform) IsKnown() bool
type ListResourceDonationItemsIssueRepositoryProfileSettings ¶
type ListResourceDonationItemsIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON listResourceDonationItemsIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*ListResourceDonationItemsIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *ListResourceDonationItemsIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type ListResourceDonationItemsIssueState ¶
type ListResourceDonationItemsIssueState string
const ( ListResourceDonationItemsIssueStateOpen ListResourceDonationItemsIssueState = "open" ListResourceDonationItemsIssueStateClosed ListResourceDonationItemsIssueState = "closed" )
func (ListResourceDonationItemsIssueState) IsKnown ¶
func (r ListResourceDonationItemsIssueState) IsKnown() bool
type ListResourceDonationPagination ¶
type ListResourceDonationPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceDonationPaginationJSON `json:"-"`
}
func (*ListResourceDonationPagination) UnmarshalJSON ¶
func (r *ListResourceDonationPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceOrder ¶
type ListResourceOrder struct {
Pagination ListResourceOrderPagination `json:"pagination,required"`
Items []OrderOutput `json:"items"`
JSON listResourceOrderJSON `json:"-"`
}
func (*ListResourceOrder) UnmarshalJSON ¶
func (r *ListResourceOrder) UnmarshalJSON(data []byte) (err error)
type ListResourceOrderPagination ¶
type ListResourceOrderPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceOrderPaginationJSON `json:"-"`
}
func (*ListResourceOrderPagination) UnmarshalJSON ¶
func (r *ListResourceOrderPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceProduct ¶
type ListResourceProduct struct {
Pagination ListResourceProductPagination `json:"pagination,required"`
Items []ProductOutput `json:"items"`
JSON listResourceProductJSON `json:"-"`
}
func (*ListResourceProduct) UnmarshalJSON ¶
func (r *ListResourceProduct) UnmarshalJSON(data []byte) (err error)
type ListResourceProductPagination ¶
type ListResourceProductPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceProductPaginationJSON `json:"-"`
}
func (*ListResourceProductPagination) UnmarshalJSON ¶
func (r *ListResourceProductPagination) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonation ¶
type ListResourcePublicDonation struct {
Pagination ListResourcePublicDonationPagination `json:"pagination,required"`
Items []ListResourcePublicDonationItem `json:"items"`
JSON listResourcePublicDonationJSON `json:"-"`
}
func (*ListResourcePublicDonation) UnmarshalJSON ¶
func (r *ListResourcePublicDonation) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonationItem ¶
type ListResourcePublicDonationItem struct {
ID string `json:"id,required" format:"uuid4"`
Amount int64 `json:"amount,required"`
Currency string `json:"currency,required"`
Donor ListResourcePublicDonationItemsDonor `json:"donor,required,nullable"`
Message string `json:"message,required,nullable"`
JSON listResourcePublicDonationItemJSON `json:"-"`
}
func (*ListResourcePublicDonationItem) UnmarshalJSON ¶
func (r *ListResourcePublicDonationItem) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonationItemsDonor ¶
type ListResourcePublicDonationItemsDonor struct {
ID string `json:"id,required" format:"uuid4"`
Platform ListResourcePublicDonationItemsDonorPlatform `json:"platform"`
Name string `json:"name"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal"`
PublicName string `json:"public_name"`
JSON listResourcePublicDonationItemsDonorJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListResourcePublicDonationItemsDonor) AsUnion ¶
func (r ListResourcePublicDonationItemsDonor) AsUnion() ListResourcePublicDonationItemsDonorUnion
AsUnion returns a ListResourcePublicDonationItemsDonorUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListResourcePublicDonationItemsDonorDonationOrganization, ListResourcePublicDonationItemsDonorDonationUser.
func (*ListResourcePublicDonationItemsDonor) UnmarshalJSON ¶
func (r *ListResourcePublicDonationItemsDonor) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonationItemsDonorDonationOrganization ¶
type ListResourcePublicDonationItemsDonorDonationOrganization struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform ListResourcePublicDonationItemsDonorDonationOrganizationPlatform `json:"platform,required"`
JSON listResourcePublicDonationItemsDonorDonationOrganizationJSON `json:"-"`
}
func (*ListResourcePublicDonationItemsDonorDonationOrganization) UnmarshalJSON ¶
func (r *ListResourcePublicDonationItemsDonorDonationOrganization) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonationItemsDonorDonationOrganizationPlatform ¶
type ListResourcePublicDonationItemsDonorDonationOrganizationPlatform string
const (
ListResourcePublicDonationItemsDonorDonationOrganizationPlatformGitHub ListResourcePublicDonationItemsDonorDonationOrganizationPlatform = "github"
)
func (ListResourcePublicDonationItemsDonorDonationOrganizationPlatform) IsKnown ¶
func (r ListResourcePublicDonationItemsDonorDonationOrganizationPlatform) IsKnown() bool
type ListResourcePublicDonationItemsDonorDonationUser ¶
type ListResourcePublicDonationItemsDonorDonationUser struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required,nullable"`
PublicName string `json:"public_name,required"`
JSON listResourcePublicDonationItemsDonorDonationUserJSON `json:"-"`
}
func (*ListResourcePublicDonationItemsDonorDonationUser) UnmarshalJSON ¶
func (r *ListResourcePublicDonationItemsDonorDonationUser) UnmarshalJSON(data []byte) (err error)
type ListResourcePublicDonationItemsDonorPlatform ¶
type ListResourcePublicDonationItemsDonorPlatform string
const (
ListResourcePublicDonationItemsDonorPlatformGitHub ListResourcePublicDonationItemsDonorPlatform = "github"
)
func (ListResourcePublicDonationItemsDonorPlatform) IsKnown ¶
func (r ListResourcePublicDonationItemsDonorPlatform) IsKnown() bool
type ListResourcePublicDonationItemsDonorUnion ¶
type ListResourcePublicDonationItemsDonorUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListResourcePublicDonationItemsDonorDonationOrganization or ListResourcePublicDonationItemsDonorDonationUser.
type ListResourcePublicDonationPagination ¶
type ListResourcePublicDonationPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourcePublicDonationPaginationJSON `json:"-"`
}
func (*ListResourcePublicDonationPagination) UnmarshalJSON ¶
func (r *ListResourcePublicDonationPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceTransaction ¶
type ListResourceTransaction struct {
Pagination ListResourceTransactionPagination `json:"pagination,required"`
Items []Transaction `json:"items"`
JSON listResourceTransactionJSON `json:"-"`
}
func (*ListResourceTransaction) UnmarshalJSON ¶
func (r *ListResourceTransaction) UnmarshalJSON(data []byte) (err error)
type ListResourceTransactionPagination ¶
type ListResourceTransactionPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceTransactionPaginationJSON `json:"-"`
}
func (*ListResourceTransactionPagination) UnmarshalJSON ¶
func (r *ListResourceTransactionPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables struct {
Pagination ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination `json:"pagination,required"`
Items []ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem `json:"items"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesJSON `json:"-"`
}
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadables) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties],
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties],
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties],
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties],
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties],
// [ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties].
Properties interface{} `json:"properties"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) AsUnion ¶
func (r ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) AsUnion() ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsUnion
AsUnion returns a ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItem) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsJSON `json:"-"`
}
A benefit of type `ads`.
Use it so your backers can display ads on your README, website, etc.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsTypeAds ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAdsType = "ads"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesTypeArticles ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticlesType = "articles"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is taxable.
IsTaxApplicable bool `json:"is_tax_applicable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `custom`.
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomJSON `json:"-"`
}
A benefit of type `custom`.
Use it to grant any kind of benefit that doesn't fit in the other types.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomPropertiesJSON `json:"-"`
}
Properties for a benefit of type `custom`.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomTypeCustom ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustomType = "custom"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `discord`.
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputJSON `json:"-"`
}
A benefit of type `discord`.
Use it to automatically invite your backers to a Discord server.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
GuildToken string `json:"guild_token,required"`
// The ID of the Discord role to grant.
RoleID string `json:"role_id,required"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputPropertiesJSON `json:"-"`
}
Properties for a benefit of type `discord`.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputTypeDiscord ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutputType = "discord"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesJSON `json:"-"`
}
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties struct {
Archived map[string]bool `json:"archived,required"`
Files []string `json:"files,required" format:"uuid4"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesPropertiesJSON `json:"-"`
}
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesTypeDownloadables ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadablesType = "downloadables"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `github_repository`.
Properties ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryJSON `json:"-"`
}
A benefit of type `github_repository`.
Use it to automatically invite your backers to a private GitHub repository.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties struct {
// The permission level to grant. Read more about roles and their permissions on
// [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
Permission ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission `json:"permission,required"`
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
RepositoryID string `json:"repository_id,nullable" format:"uuid4"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesJSON `json:"-"`
}
Properties for a benefit of type `github_repository`.
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryProperties) UnmarshalJSON(data []byte) (err error)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission string
The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
const ( ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermissionPull ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission = "pull" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermissionTriage ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission = "triage" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermissionPush ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission = "push" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermissionMaintain ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission = "maintain" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermissionAdmin ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryPropertiesPermission = "admin" )
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryType string
const (
ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryTypeGitHubRepository ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepositoryType = "github_repository"
)
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType string
const ( ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeArticles ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "articles" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeAds ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "ads" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeCustom ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "custom" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeDiscord ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "discord" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeGitHubRepository ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "github_repository" ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsTypeDownloadables ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsType = "downloadables" )
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsUnion ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitArticles, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitAds, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitCustom, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDiscordOutput, ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitGitHubRepository or ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesItemsBenefitDownloadables.
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination ¶
type ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPaginationJSON `json:"-"`
}
func (*ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination) UnmarshalJSON ¶
func (r *ListResourceUnionBenefitArticlesBenefitAdsBenefitCustomBenefitDiscordBenefitGitHubRepositoryBenefitDownloadablesPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookDelivery ¶
type ListResourceWebhookDelivery struct {
Pagination ListResourceWebhookDeliveryPagination `json:"pagination,required"`
Items []ListResourceWebhookDeliveryItem `json:"items"`
JSON listResourceWebhookDeliveryJSON `json:"-"`
}
func (*ListResourceWebhookDelivery) UnmarshalJSON ¶
func (r *ListResourceWebhookDelivery) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookDeliveryItem ¶
type ListResourceWebhookDeliveryItem struct {
// The webhook delivery ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the delivery was successful.
Succeeded bool `json:"succeeded,required"`
// A webhook event.
//
// An event represent something that happened in the system that should be sent to
// the webhook endpoint.
//
// It can be delivered multiple times until it's marked as succeeded, each one
// creating a new delivery.
WebhookEvent ListResourceWebhookDeliveryItemsWebhookEvent `json:"webhook_event,required"`
// The HTTP code returned by the URL. `null` if the endpoint was unreachable.
HTTPCode int64 `json:"http_code,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON listResourceWebhookDeliveryItemJSON `json:"-"`
}
A webhook delivery for a webhook event.
func (*ListResourceWebhookDeliveryItem) UnmarshalJSON ¶
func (r *ListResourceWebhookDeliveryItem) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookDeliveryItemsWebhookEvent ¶
type ListResourceWebhookDeliveryItemsWebhookEvent struct {
// The webhook event ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// The payload of the webhook event.
Payload string `json:"payload,required"`
// Last HTTP code returned by the URL. `null` if no delviery has been attempted or
// if the endpoint was unreachable.
LastHTTPCode int64 `json:"last_http_code,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// Whether this event was successfully delivered. `null` if no delivery has been
// attempted.
Succeeded bool `json:"succeeded,nullable"`
JSON listResourceWebhookDeliveryItemsWebhookEventJSON `json:"-"`
}
A webhook event.
An event represent something that happened in the system that should be sent to the webhook endpoint.
It can be delivered multiple times until it's marked as succeeded, each one creating a new delivery.
func (*ListResourceWebhookDeliveryItemsWebhookEvent) UnmarshalJSON ¶
func (r *ListResourceWebhookDeliveryItemsWebhookEvent) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookDeliveryPagination ¶
type ListResourceWebhookDeliveryPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceWebhookDeliveryPaginationJSON `json:"-"`
}
func (*ListResourceWebhookDeliveryPagination) UnmarshalJSON ¶
func (r *ListResourceWebhookDeliveryPagination) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookEndpoint ¶
type ListResourceWebhookEndpoint struct {
Pagination ListResourceWebhookEndpointPagination `json:"pagination,required"`
Items []WebhookEndpoint `json:"items"`
JSON listResourceWebhookEndpointJSON `json:"-"`
}
func (*ListResourceWebhookEndpoint) UnmarshalJSON ¶
func (r *ListResourceWebhookEndpoint) UnmarshalJSON(data []byte) (err error)
type ListResourceWebhookEndpointPagination ¶
type ListResourceWebhookEndpointPagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON listResourceWebhookEndpointPaginationJSON `json:"-"`
}
func (*ListResourceWebhookEndpointPagination) UnmarshalJSON ¶
func (r *ListResourceWebhookEndpointPagination) UnmarshalJSON(data []byte) (err error)
type MetricLimitService ¶
type MetricLimitService struct {
Options []option.RequestOption
}
MetricLimitService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMetricLimitService method instead.
func NewMetricLimitService ¶
func NewMetricLimitService(opts ...option.RequestOption) (r *MetricLimitService)
NewMetricLimitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MetricLimitService) Get ¶
func (r *MetricLimitService) Get(ctx context.Context, opts ...option.RequestOption) (res *MetricsLimits, err error)
Get the interval limits for the metrics endpoint.
type MetricListParams ¶
type MetricListParams struct {
// End date.
EndDate param.Field[time.Time] `query:"end_date,required" format:"date"`
// Interval between two timestamps.
Interval param.Field[MetricListParamsInterval] `query:"interval,required"`
// Start date.
StartDate param.Field[time.Time] `query:"start_date,required" format:"date"`
// Filter by organization ID.
OrganizationID param.Field[MetricListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Filter by product ID.
ProductID param.Field[MetricListParamsProductIDUnion] `query:"product_id" format:"uuid4"`
// Filter by product price type. `recurring` will filter data corresponding to
// subscriptions creations or renewals. `one_time` will filter data corresponding
// to one-time purchases.
ProductPriceType param.Field[MetricListParamsProductPriceTypeUnion] `query:"product_price_type"`
}
func (MetricListParams) URLQuery ¶
func (r MetricListParams) URLQuery() (v url.Values)
URLQuery serializes MetricListParams's query parameters as `url.Values`.
type MetricListParamsInterval ¶
type MetricListParamsInterval string
Interval between two timestamps.
const ( MetricListParamsIntervalYear MetricListParamsInterval = "year" MetricListParamsIntervalMonth MetricListParamsInterval = "month" MetricListParamsIntervalWeek MetricListParamsInterval = "week" MetricListParamsIntervalDay MetricListParamsInterval = "day" MetricListParamsIntervalHour MetricListParamsInterval = "hour" )
func (MetricListParamsInterval) IsKnown ¶
func (r MetricListParamsInterval) IsKnown() bool
type MetricListParamsOrganizationIDArray ¶
type MetricListParamsOrganizationIDArray []string
func (MetricListParamsOrganizationIDArray) ImplementsMetricListParamsOrganizationIDUnion ¶
func (r MetricListParamsOrganizationIDArray) ImplementsMetricListParamsOrganizationIDUnion()
type MetricListParamsOrganizationIDUnion ¶
type MetricListParamsOrganizationIDUnion interface {
ImplementsMetricListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], MetricListParamsOrganizationIDArray.
type MetricListParamsProductIDArray ¶
type MetricListParamsProductIDArray []string
func (MetricListParamsProductIDArray) ImplementsMetricListParamsProductIDUnion ¶
func (r MetricListParamsProductIDArray) ImplementsMetricListParamsProductIDUnion()
type MetricListParamsProductIDUnion ¶
type MetricListParamsProductIDUnion interface {
ImplementsMetricListParamsProductIDUnion()
}
Filter by product ID.
Satisfied by [shared.UnionString], MetricListParamsProductIDArray.
type MetricListParamsProductPriceTypeArray ¶
type MetricListParamsProductPriceTypeArray []MetricListParamsProductPriceTypeArray
type MetricListParamsProductPriceTypeProductPriceType ¶
type MetricListParamsProductPriceTypeProductPriceType string
const ( MetricListParamsProductPriceTypeProductPriceTypeOneTime MetricListParamsProductPriceTypeProductPriceType = "one_time" MetricListParamsProductPriceTypeProductPriceTypeRecurring MetricListParamsProductPriceTypeProductPriceType = "recurring" )
func (MetricListParamsProductPriceTypeProductPriceType) IsKnown ¶
func (r MetricListParamsProductPriceTypeProductPriceType) IsKnown() bool
type MetricListParamsProductPriceTypeUnion ¶
type MetricListParamsProductPriceTypeUnion interface {
// contains filtered or unexported methods
}
Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases.
Satisfied by MetricListParamsProductPriceTypeProductPriceType, MetricListParamsProductPriceTypeArray.
type MetricService ¶
type MetricService struct {
Options []option.RequestOption
Limits *MetricLimitService
}
MetricService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMetricService method instead.
func NewMetricService ¶
func NewMetricService(opts ...option.RequestOption) (r *MetricService)
NewMetricService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MetricService) List ¶
func (r *MetricService) List(ctx context.Context, query MetricListParams, opts ...option.RequestOption) (res *MetricsResponse, err error)
Get metrics about your orders and subscriptions.
type MetricsLimits ¶
type MetricsLimits struct {
// Date interval limits to get metrics for each interval.
Intervals MetricsLimitsIntervals `json:"intervals,required"`
// Minimum date to get metrics.
MinDate time.Time `json:"min_date,required" format:"date"`
JSON metricsLimitsJSON `json:"-"`
}
Date limits to get metrics.
func (*MetricsLimits) UnmarshalJSON ¶
func (r *MetricsLimits) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervals ¶
type MetricsLimitsIntervals struct {
// Date interval limit to get metrics for a given interval.
Day MetricsLimitsIntervalsDay `json:"day,required"`
// Date interval limit to get metrics for a given interval.
Hour MetricsLimitsIntervalsHour `json:"hour,required"`
// Date interval limit to get metrics for a given interval.
Month MetricsLimitsIntervalsMonth `json:"month,required"`
// Date interval limit to get metrics for a given interval.
Week MetricsLimitsIntervalsWeek `json:"week,required"`
// Date interval limit to get metrics for a given interval.
Year MetricsLimitsIntervalsYear `json:"year,required"`
JSON metricsLimitsIntervalsJSON `json:"-"`
}
Date interval limits to get metrics for each interval.
func (*MetricsLimitsIntervals) UnmarshalJSON ¶
func (r *MetricsLimitsIntervals) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervalsDay ¶
type MetricsLimitsIntervalsDay struct {
// Maximum number of days for this interval.
MaxDays int64 `json:"max_days,required"`
JSON metricsLimitsIntervalsDayJSON `json:"-"`
}
Date interval limit to get metrics for a given interval.
func (*MetricsLimitsIntervalsDay) UnmarshalJSON ¶
func (r *MetricsLimitsIntervalsDay) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervalsHour ¶
type MetricsLimitsIntervalsHour struct {
// Maximum number of days for this interval.
MaxDays int64 `json:"max_days,required"`
JSON metricsLimitsIntervalsHourJSON `json:"-"`
}
Date interval limit to get metrics for a given interval.
func (*MetricsLimitsIntervalsHour) UnmarshalJSON ¶
func (r *MetricsLimitsIntervalsHour) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervalsMonth ¶
type MetricsLimitsIntervalsMonth struct {
// Maximum number of days for this interval.
MaxDays int64 `json:"max_days,required"`
JSON metricsLimitsIntervalsMonthJSON `json:"-"`
}
Date interval limit to get metrics for a given interval.
func (*MetricsLimitsIntervalsMonth) UnmarshalJSON ¶
func (r *MetricsLimitsIntervalsMonth) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervalsWeek ¶
type MetricsLimitsIntervalsWeek struct {
// Maximum number of days for this interval.
MaxDays int64 `json:"max_days,required"`
JSON metricsLimitsIntervalsWeekJSON `json:"-"`
}
Date interval limit to get metrics for a given interval.
func (*MetricsLimitsIntervalsWeek) UnmarshalJSON ¶
func (r *MetricsLimitsIntervalsWeek) UnmarshalJSON(data []byte) (err error)
type MetricsLimitsIntervalsYear ¶
type MetricsLimitsIntervalsYear struct {
// Maximum number of days for this interval.
MaxDays int64 `json:"max_days,required"`
JSON metricsLimitsIntervalsYearJSON `json:"-"`
}
Date interval limit to get metrics for a given interval.
func (*MetricsLimitsIntervalsYear) UnmarshalJSON ¶
func (r *MetricsLimitsIntervalsYear) UnmarshalJSON(data []byte) (err error)
type MetricsResponse ¶
type MetricsResponse struct {
// Information about the returned metrics.
Metrics MetricsResponseMetrics `json:"metrics,required"`
// List of data for each timestamp.
Periods []MetricsResponsePeriod `json:"periods,required"`
JSON metricsResponseJSON `json:"-"`
}
Metrics response schema.
func (*MetricsResponse) UnmarshalJSON ¶
func (r *MetricsResponse) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetrics ¶
type MetricsResponseMetrics struct {
// Information about a metric.
ActiveSubscriptions MetricsResponseMetricsActiveSubscriptions `json:"active_subscriptions,required"`
// Information about a metric.
AverageOrderValue MetricsResponseMetricsAverageOrderValue `json:"average_order_value,required"`
// Information about a metric.
MonthlyRecurringRevenue MetricsResponseMetricsMonthlyRecurringRevenue `json:"monthly_recurring_revenue,required"`
// Information about a metric.
NewSubscriptions MetricsResponseMetricsNewSubscriptions `json:"new_subscriptions,required"`
// Information about a metric.
NewSubscriptionsRevenue MetricsResponseMetricsNewSubscriptionsRevenue `json:"new_subscriptions_revenue,required"`
// Information about a metric.
OneTimeProducts MetricsResponseMetricsOneTimeProducts `json:"one_time_products,required"`
// Information about a metric.
OneTimeProductsRevenue MetricsResponseMetricsOneTimeProductsRevenue `json:"one_time_products_revenue,required"`
// Information about a metric.
Orders MetricsResponseMetricsOrders `json:"orders,required"`
// Information about a metric.
RenewedSubscriptions MetricsResponseMetricsRenewedSubscriptions `json:"renewed_subscriptions,required"`
// Information about a metric.
RenewedSubscriptionsRevenue MetricsResponseMetricsRenewedSubscriptionsRevenue `json:"renewed_subscriptions_revenue,required"`
// Information about a metric.
Revenue MetricsResponseMetricsRevenue `json:"revenue,required"`
JSON metricsResponseMetricsJSON `json:"-"`
}
Information about the returned metrics.
func (*MetricsResponseMetrics) UnmarshalJSON ¶
func (r *MetricsResponseMetrics) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsActiveSubscriptions ¶
type MetricsResponseMetricsActiveSubscriptions struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsActiveSubscriptionsType `json:"type,required"`
JSON metricsResponseMetricsActiveSubscriptionsJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsActiveSubscriptions) UnmarshalJSON ¶
func (r *MetricsResponseMetricsActiveSubscriptions) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsActiveSubscriptionsType ¶
type MetricsResponseMetricsActiveSubscriptionsType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsActiveSubscriptionsTypeScalar MetricsResponseMetricsActiveSubscriptionsType = "scalar" MetricsResponseMetricsActiveSubscriptionsTypeCurrency MetricsResponseMetricsActiveSubscriptionsType = "currency" )
func (MetricsResponseMetricsActiveSubscriptionsType) IsKnown ¶
func (r MetricsResponseMetricsActiveSubscriptionsType) IsKnown() bool
type MetricsResponseMetricsAverageOrderValue ¶
type MetricsResponseMetricsAverageOrderValue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsAverageOrderValueType `json:"type,required"`
JSON metricsResponseMetricsAverageOrderValueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsAverageOrderValue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsAverageOrderValue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsAverageOrderValueType ¶
type MetricsResponseMetricsAverageOrderValueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsAverageOrderValueTypeScalar MetricsResponseMetricsAverageOrderValueType = "scalar" MetricsResponseMetricsAverageOrderValueTypeCurrency MetricsResponseMetricsAverageOrderValueType = "currency" )
func (MetricsResponseMetricsAverageOrderValueType) IsKnown ¶
func (r MetricsResponseMetricsAverageOrderValueType) IsKnown() bool
type MetricsResponseMetricsMonthlyRecurringRevenue ¶
type MetricsResponseMetricsMonthlyRecurringRevenue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsMonthlyRecurringRevenueType `json:"type,required"`
JSON metricsResponseMetricsMonthlyRecurringRevenueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsMonthlyRecurringRevenue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsMonthlyRecurringRevenue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsMonthlyRecurringRevenueType ¶
type MetricsResponseMetricsMonthlyRecurringRevenueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsMonthlyRecurringRevenueTypeScalar MetricsResponseMetricsMonthlyRecurringRevenueType = "scalar" MetricsResponseMetricsMonthlyRecurringRevenueTypeCurrency MetricsResponseMetricsMonthlyRecurringRevenueType = "currency" )
func (MetricsResponseMetricsMonthlyRecurringRevenueType) IsKnown ¶
func (r MetricsResponseMetricsMonthlyRecurringRevenueType) IsKnown() bool
type MetricsResponseMetricsNewSubscriptions ¶
type MetricsResponseMetricsNewSubscriptions struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsNewSubscriptionsType `json:"type,required"`
JSON metricsResponseMetricsNewSubscriptionsJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsNewSubscriptions) UnmarshalJSON ¶
func (r *MetricsResponseMetricsNewSubscriptions) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsNewSubscriptionsRevenue ¶
type MetricsResponseMetricsNewSubscriptionsRevenue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsNewSubscriptionsRevenueType `json:"type,required"`
JSON metricsResponseMetricsNewSubscriptionsRevenueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsNewSubscriptionsRevenue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsNewSubscriptionsRevenue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsNewSubscriptionsRevenueType ¶
type MetricsResponseMetricsNewSubscriptionsRevenueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsNewSubscriptionsRevenueTypeScalar MetricsResponseMetricsNewSubscriptionsRevenueType = "scalar" MetricsResponseMetricsNewSubscriptionsRevenueTypeCurrency MetricsResponseMetricsNewSubscriptionsRevenueType = "currency" )
func (MetricsResponseMetricsNewSubscriptionsRevenueType) IsKnown ¶
func (r MetricsResponseMetricsNewSubscriptionsRevenueType) IsKnown() bool
type MetricsResponseMetricsNewSubscriptionsType ¶
type MetricsResponseMetricsNewSubscriptionsType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsNewSubscriptionsTypeScalar MetricsResponseMetricsNewSubscriptionsType = "scalar" MetricsResponseMetricsNewSubscriptionsTypeCurrency MetricsResponseMetricsNewSubscriptionsType = "currency" )
func (MetricsResponseMetricsNewSubscriptionsType) IsKnown ¶
func (r MetricsResponseMetricsNewSubscriptionsType) IsKnown() bool
type MetricsResponseMetricsOneTimeProducts ¶
type MetricsResponseMetricsOneTimeProducts struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsOneTimeProductsType `json:"type,required"`
JSON metricsResponseMetricsOneTimeProductsJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsOneTimeProducts) UnmarshalJSON ¶
func (r *MetricsResponseMetricsOneTimeProducts) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsOneTimeProductsRevenue ¶
type MetricsResponseMetricsOneTimeProductsRevenue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsOneTimeProductsRevenueType `json:"type,required"`
JSON metricsResponseMetricsOneTimeProductsRevenueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsOneTimeProductsRevenue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsOneTimeProductsRevenue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsOneTimeProductsRevenueType ¶
type MetricsResponseMetricsOneTimeProductsRevenueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsOneTimeProductsRevenueTypeScalar MetricsResponseMetricsOneTimeProductsRevenueType = "scalar" MetricsResponseMetricsOneTimeProductsRevenueTypeCurrency MetricsResponseMetricsOneTimeProductsRevenueType = "currency" )
func (MetricsResponseMetricsOneTimeProductsRevenueType) IsKnown ¶
func (r MetricsResponseMetricsOneTimeProductsRevenueType) IsKnown() bool
type MetricsResponseMetricsOneTimeProductsType ¶
type MetricsResponseMetricsOneTimeProductsType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsOneTimeProductsTypeScalar MetricsResponseMetricsOneTimeProductsType = "scalar" MetricsResponseMetricsOneTimeProductsTypeCurrency MetricsResponseMetricsOneTimeProductsType = "currency" )
func (MetricsResponseMetricsOneTimeProductsType) IsKnown ¶
func (r MetricsResponseMetricsOneTimeProductsType) IsKnown() bool
type MetricsResponseMetricsOrders ¶
type MetricsResponseMetricsOrders struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsOrdersType `json:"type,required"`
JSON metricsResponseMetricsOrdersJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsOrders) UnmarshalJSON ¶
func (r *MetricsResponseMetricsOrders) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsOrdersType ¶
type MetricsResponseMetricsOrdersType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsOrdersTypeScalar MetricsResponseMetricsOrdersType = "scalar" MetricsResponseMetricsOrdersTypeCurrency MetricsResponseMetricsOrdersType = "currency" )
func (MetricsResponseMetricsOrdersType) IsKnown ¶
func (r MetricsResponseMetricsOrdersType) IsKnown() bool
type MetricsResponseMetricsRenewedSubscriptions ¶
type MetricsResponseMetricsRenewedSubscriptions struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsRenewedSubscriptionsType `json:"type,required"`
JSON metricsResponseMetricsRenewedSubscriptionsJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsRenewedSubscriptions) UnmarshalJSON ¶
func (r *MetricsResponseMetricsRenewedSubscriptions) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsRenewedSubscriptionsRevenue ¶
type MetricsResponseMetricsRenewedSubscriptionsRevenue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsRenewedSubscriptionsRevenueType `json:"type,required"`
JSON metricsResponseMetricsRenewedSubscriptionsRevenueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsRenewedSubscriptionsRevenue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsRenewedSubscriptionsRevenue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsRenewedSubscriptionsRevenueType ¶
type MetricsResponseMetricsRenewedSubscriptionsRevenueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsRenewedSubscriptionsRevenueTypeScalar MetricsResponseMetricsRenewedSubscriptionsRevenueType = "scalar" MetricsResponseMetricsRenewedSubscriptionsRevenueTypeCurrency MetricsResponseMetricsRenewedSubscriptionsRevenueType = "currency" )
func (MetricsResponseMetricsRenewedSubscriptionsRevenueType) IsKnown ¶
func (r MetricsResponseMetricsRenewedSubscriptionsRevenueType) IsKnown() bool
type MetricsResponseMetricsRenewedSubscriptionsType ¶
type MetricsResponseMetricsRenewedSubscriptionsType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsRenewedSubscriptionsTypeScalar MetricsResponseMetricsRenewedSubscriptionsType = "scalar" MetricsResponseMetricsRenewedSubscriptionsTypeCurrency MetricsResponseMetricsRenewedSubscriptionsType = "currency" )
func (MetricsResponseMetricsRenewedSubscriptionsType) IsKnown ¶
func (r MetricsResponseMetricsRenewedSubscriptionsType) IsKnown() bool
type MetricsResponseMetricsRevenue ¶
type MetricsResponseMetricsRevenue struct {
// Human-readable name for the metric.
DisplayName string `json:"display_name,required"`
// Unique identifier for the metric.
Slug string `json:"slug,required"`
// Type of the metric, useful to know the unit or format of the value.
Type MetricsResponseMetricsRevenueType `json:"type,required"`
JSON metricsResponseMetricsRevenueJSON `json:"-"`
}
Information about a metric.
func (*MetricsResponseMetricsRevenue) UnmarshalJSON ¶
func (r *MetricsResponseMetricsRevenue) UnmarshalJSON(data []byte) (err error)
type MetricsResponseMetricsRevenueType ¶
type MetricsResponseMetricsRevenueType string
Type of the metric, useful to know the unit or format of the value.
const ( MetricsResponseMetricsRevenueTypeScalar MetricsResponseMetricsRevenueType = "scalar" MetricsResponseMetricsRevenueTypeCurrency MetricsResponseMetricsRevenueType = "currency" )
func (MetricsResponseMetricsRevenueType) IsKnown ¶
func (r MetricsResponseMetricsRevenueType) IsKnown() bool
type MetricsResponsePeriod ¶
type MetricsResponsePeriod struct {
ActiveSubscriptions int64 `json:"active_subscriptions,required"`
AverageOrderValue int64 `json:"average_order_value,required"`
MonthlyRecurringRevenue int64 `json:"monthly_recurring_revenue,required"`
NewSubscriptions int64 `json:"new_subscriptions,required"`
NewSubscriptionsRevenue int64 `json:"new_subscriptions_revenue,required"`
OneTimeProducts int64 `json:"one_time_products,required"`
OneTimeProductsRevenue int64 `json:"one_time_products_revenue,required"`
Orders int64 `json:"orders,required"`
RenewedSubscriptions int64 `json:"renewed_subscriptions,required"`
RenewedSubscriptionsRevenue int64 `json:"renewed_subscriptions_revenue,required"`
Revenue int64 `json:"revenue,required"`
// Timestamp of this period data.
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
JSON metricsResponsePeriodJSON `json:"-"`
}
func (*MetricsResponsePeriod) UnmarshalJSON ¶
func (r *MetricsResponsePeriod) UnmarshalJSON(data []byte) (err error)
type Oauth2AuthorizeResponse ¶
type Oauth2AuthorizeResponse struct {
// This field can have the runtime type of [AuthorizeResponseUserClient],
// [AuthorizeResponseOrganizationClient].
Client interface{} `json:"client"`
SubType Oauth2AuthorizeResponseSubType `json:"sub_type,required"`
// This field can have the runtime type of [AuthorizeResponseUserSub],
// [AuthorizeResponseOrganizationSub].
Sub interface{} `json:"sub,required"`
// This field can have the runtime type of [[]AuthorizeResponseUserScope],
// [[]AuthorizeResponseOrganizationScope].
Scopes interface{} `json:"scopes"`
// This field can have the runtime type of
// [[]AuthorizeResponseOrganizationOrganization].
Organizations interface{} `json:"organizations,required"`
JSON oauth2AuthorizeResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (Oauth2AuthorizeResponse) AsUnion ¶
func (r Oauth2AuthorizeResponse) AsUnion() Oauth2AuthorizeResponseUnion
AsUnion returns a Oauth2AuthorizeResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AuthorizeResponseUser, AuthorizeResponseOrganization.
func (*Oauth2AuthorizeResponse) UnmarshalJSON ¶
func (r *Oauth2AuthorizeResponse) UnmarshalJSON(data []byte) (err error)
type Oauth2AuthorizeResponseSubType ¶
type Oauth2AuthorizeResponseSubType string
const ( Oauth2AuthorizeResponseSubTypeUser Oauth2AuthorizeResponseSubType = "user" Oauth2AuthorizeResponseSubTypeOrganization Oauth2AuthorizeResponseSubType = "organization" )
func (Oauth2AuthorizeResponseSubType) IsKnown ¶
func (r Oauth2AuthorizeResponseSubType) IsKnown() bool
type Oauth2AuthorizeResponseUnion ¶
type Oauth2AuthorizeResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AuthorizeResponseUser or AuthorizeResponseOrganization.
type Oauth2IntrospectParams ¶
type Oauth2IntrospectParams struct {
Token param.Field[string] `json:"token,required"`
ClientID param.Field[string] `json:"client_id,required"`
ClientSecret param.Field[string] `json:"client_secret,required"`
TokenTypeHint param.Field[Oauth2IntrospectParamsTokenTypeHint] `json:"token_type_hint"`
}
func (Oauth2IntrospectParams) MarshalJSON ¶
func (r Oauth2IntrospectParams) MarshalJSON() (data []byte, err error)
type Oauth2IntrospectParamsTokenTypeHint ¶
type Oauth2IntrospectParamsTokenTypeHint string
const ( Oauth2IntrospectParamsTokenTypeHintAccessToken Oauth2IntrospectParamsTokenTypeHint = "access_token" Oauth2IntrospectParamsTokenTypeHintRefreshToken Oauth2IntrospectParamsTokenTypeHint = "refresh_token" )
func (Oauth2IntrospectParamsTokenTypeHint) IsKnown ¶
func (r Oauth2IntrospectParamsTokenTypeHint) IsKnown() bool
type Oauth2ListParams ¶
type Oauth2ListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (Oauth2ListParams) URLQuery ¶
func (r Oauth2ListParams) URLQuery() (v url.Values)
URLQuery serializes Oauth2ListParams's query parameters as `url.Values`.
type Oauth2ListResponse ¶
type Oauth2ListResponse struct {
Pagination Oauth2ListResponsePagination `json:"pagination,required"`
Items []Oauth2ListResponseItem `json:"items"`
JSON oauth2ListResponseJSON `json:"-"`
}
func (*Oauth2ListResponse) UnmarshalJSON ¶
func (r *Oauth2ListResponse) UnmarshalJSON(data []byte) (err error)
type Oauth2ListResponseItem ¶
type Oauth2ListResponseItem struct {
ClientID string `json:"client_id,required"`
ClientIDIssuedAt int64 `json:"client_id_issued_at,required"`
ClientName string `json:"client_name,required"`
ClientSecret string `json:"client_secret,required"`
ClientSecretExpiresAt int64 `json:"client_secret_expires_at,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
RedirectUris []string `json:"redirect_uris,required" format:"uri"`
ClientUri string `json:"client_uri,nullable"`
GrantTypes []Oauth2ListResponseItemsGrantType `json:"grant_types"`
LogoUri string `json:"logo_uri,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PolicyUri string `json:"policy_uri,nullable" format:"uri"`
ResponseTypes []Oauth2ListResponseItemsResponseType `json:"response_types"`
Scope string `json:"scope"`
TokenEndpointAuthMethod Oauth2ListResponseItemsTokenEndpointAuthMethod `json:"token_endpoint_auth_method"`
TosUri string `json:"tos_uri,nullable" format:"uri"`
JSON oauth2ListResponseItemJSON `json:"-"`
}
func (*Oauth2ListResponseItem) UnmarshalJSON ¶
func (r *Oauth2ListResponseItem) UnmarshalJSON(data []byte) (err error)
type Oauth2ListResponseItemsGrantType ¶
type Oauth2ListResponseItemsGrantType string
const ( Oauth2ListResponseItemsGrantTypeAuthorizationCode Oauth2ListResponseItemsGrantType = "authorization_code" Oauth2ListResponseItemsGrantTypeRefreshToken Oauth2ListResponseItemsGrantType = "refresh_token" )
func (Oauth2ListResponseItemsGrantType) IsKnown ¶
func (r Oauth2ListResponseItemsGrantType) IsKnown() bool
type Oauth2ListResponseItemsResponseType ¶
type Oauth2ListResponseItemsResponseType string
const (
Oauth2ListResponseItemsResponseTypeCode Oauth2ListResponseItemsResponseType = "code"
)
func (Oauth2ListResponseItemsResponseType) IsKnown ¶
func (r Oauth2ListResponseItemsResponseType) IsKnown() bool
type Oauth2ListResponseItemsTokenEndpointAuthMethod ¶
type Oauth2ListResponseItemsTokenEndpointAuthMethod string
const ( Oauth2ListResponseItemsTokenEndpointAuthMethodClientSecretBasic Oauth2ListResponseItemsTokenEndpointAuthMethod = "client_secret_basic" Oauth2ListResponseItemsTokenEndpointAuthMethodClientSecretPost Oauth2ListResponseItemsTokenEndpointAuthMethod = "client_secret_post" Oauth2ListResponseItemsTokenEndpointAuthMethodNone Oauth2ListResponseItemsTokenEndpointAuthMethod = "none" )
func (Oauth2ListResponseItemsTokenEndpointAuthMethod) IsKnown ¶
func (r Oauth2ListResponseItemsTokenEndpointAuthMethod) IsKnown() bool
type Oauth2ListResponsePagination ¶
type Oauth2ListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON oauth2ListResponsePaginationJSON `json:"-"`
}
func (*Oauth2ListResponsePagination) UnmarshalJSON ¶
func (r *Oauth2ListResponsePagination) UnmarshalJSON(data []byte) (err error)
type Oauth2RegisterDeleteResponse ¶
type Oauth2RegisterDeleteResponse = interface{}
type Oauth2RegisterGetResponse ¶
type Oauth2RegisterGetResponse = interface{}
type Oauth2RegisterNewParams ¶
type Oauth2RegisterNewParams struct {
ClientName param.Field[string] `json:"client_name,required"`
RedirectUris param.Field[[]string] `json:"redirect_uris,required" format:"uri"`
ClientUri param.Field[string] `json:"client_uri"`
GrantTypes param.Field[[]Oauth2RegisterNewParamsGrantType] `json:"grant_types"`
LogoUri param.Field[string] `json:"logo_uri" format:"uri"`
PolicyUri param.Field[string] `json:"policy_uri" format:"uri"`
ResponseTypes param.Field[[]Oauth2RegisterNewParamsResponseType] `json:"response_types"`
Scope param.Field[string] `json:"scope"`
TokenEndpointAuthMethod param.Field[Oauth2RegisterNewParamsTokenEndpointAuthMethod] `json:"token_endpoint_auth_method"`
TosUri param.Field[string] `json:"tos_uri" format:"uri"`
}
func (Oauth2RegisterNewParams) MarshalJSON ¶
func (r Oauth2RegisterNewParams) MarshalJSON() (data []byte, err error)
type Oauth2RegisterNewParamsGrantType ¶
type Oauth2RegisterNewParamsGrantType string
const ( Oauth2RegisterNewParamsGrantTypeAuthorizationCode Oauth2RegisterNewParamsGrantType = "authorization_code" Oauth2RegisterNewParamsGrantTypeRefreshToken Oauth2RegisterNewParamsGrantType = "refresh_token" )
func (Oauth2RegisterNewParamsGrantType) IsKnown ¶
func (r Oauth2RegisterNewParamsGrantType) IsKnown() bool
type Oauth2RegisterNewParamsResponseType ¶
type Oauth2RegisterNewParamsResponseType string
const (
Oauth2RegisterNewParamsResponseTypeCode Oauth2RegisterNewParamsResponseType = "code"
)
func (Oauth2RegisterNewParamsResponseType) IsKnown ¶
func (r Oauth2RegisterNewParamsResponseType) IsKnown() bool
type Oauth2RegisterNewParamsTokenEndpointAuthMethod ¶
type Oauth2RegisterNewParamsTokenEndpointAuthMethod string
const ( Oauth2RegisterNewParamsTokenEndpointAuthMethodClientSecretBasic Oauth2RegisterNewParamsTokenEndpointAuthMethod = "client_secret_basic" Oauth2RegisterNewParamsTokenEndpointAuthMethodClientSecretPost Oauth2RegisterNewParamsTokenEndpointAuthMethod = "client_secret_post" Oauth2RegisterNewParamsTokenEndpointAuthMethodNone Oauth2RegisterNewParamsTokenEndpointAuthMethod = "none" )
func (Oauth2RegisterNewParamsTokenEndpointAuthMethod) IsKnown ¶
func (r Oauth2RegisterNewParamsTokenEndpointAuthMethod) IsKnown() bool
type Oauth2RegisterNewResponse ¶
type Oauth2RegisterNewResponse = interface{}
type Oauth2RegisterService ¶
type Oauth2RegisterService struct {
Options []option.RequestOption
}
Oauth2RegisterService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOauth2RegisterService method instead.
func NewOauth2RegisterService ¶
func NewOauth2RegisterService(opts ...option.RequestOption) (r *Oauth2RegisterService)
NewOauth2RegisterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*Oauth2RegisterService) Delete ¶
func (r *Oauth2RegisterService) Delete(ctx context.Context, clientID string, opts ...option.RequestOption) (res *Oauth2RegisterDeleteResponse, err error)
Delete an OAuth2 client.
func (*Oauth2RegisterService) Get ¶
func (r *Oauth2RegisterService) Get(ctx context.Context, clientID string, opts ...option.RequestOption) (res *Oauth2RegisterGetResponse, err error)
Get an OAuth2 client by Client ID.
func (*Oauth2RegisterService) New ¶
func (r *Oauth2RegisterService) New(ctx context.Context, body Oauth2RegisterNewParams, opts ...option.RequestOption) (res *Oauth2RegisterNewResponse, err error)
Create an OAuth2 client.
func (*Oauth2RegisterService) Update ¶
func (r *Oauth2RegisterService) Update(ctx context.Context, params Oauth2RegisterUpdateParams, opts ...option.RequestOption) (res *Oauth2RegisterUpdateResponse, err error)
Update an OAuth2 client.
type Oauth2RegisterUpdateParams ¶
type Oauth2RegisterUpdateParams struct {
PathClientID param.Field[string] `path:"client_id,required"`
BodyClientID param.Field[string] `json:"client_id,required"`
ClientName param.Field[string] `json:"client_name,required"`
RedirectUris param.Field[[]string] `json:"redirect_uris,required" format:"uri"`
ClientUri param.Field[string] `json:"client_uri"`
GrantTypes param.Field[[]Oauth2RegisterUpdateParamsGrantType] `json:"grant_types"`
LogoUri param.Field[string] `json:"logo_uri" format:"uri"`
PolicyUri param.Field[string] `json:"policy_uri" format:"uri"`
ResponseTypes param.Field[[]Oauth2RegisterUpdateParamsResponseType] `json:"response_types"`
Scope param.Field[string] `json:"scope"`
TokenEndpointAuthMethod param.Field[Oauth2RegisterUpdateParamsTokenEndpointAuthMethod] `json:"token_endpoint_auth_method"`
TosUri param.Field[string] `json:"tos_uri" format:"uri"`
}
func (Oauth2RegisterUpdateParams) MarshalJSON ¶
func (r Oauth2RegisterUpdateParams) MarshalJSON() (data []byte, err error)
type Oauth2RegisterUpdateParamsGrantType ¶
type Oauth2RegisterUpdateParamsGrantType string
const ( Oauth2RegisterUpdateParamsGrantTypeAuthorizationCode Oauth2RegisterUpdateParamsGrantType = "authorization_code" Oauth2RegisterUpdateParamsGrantTypeRefreshToken Oauth2RegisterUpdateParamsGrantType = "refresh_token" )
func (Oauth2RegisterUpdateParamsGrantType) IsKnown ¶
func (r Oauth2RegisterUpdateParamsGrantType) IsKnown() bool
type Oauth2RegisterUpdateParamsResponseType ¶
type Oauth2RegisterUpdateParamsResponseType string
const (
Oauth2RegisterUpdateParamsResponseTypeCode Oauth2RegisterUpdateParamsResponseType = "code"
)
func (Oauth2RegisterUpdateParamsResponseType) IsKnown ¶
func (r Oauth2RegisterUpdateParamsResponseType) IsKnown() bool
type Oauth2RegisterUpdateParamsTokenEndpointAuthMethod ¶
type Oauth2RegisterUpdateParamsTokenEndpointAuthMethod string
const ( Oauth2RegisterUpdateParamsTokenEndpointAuthMethodClientSecretBasic Oauth2RegisterUpdateParamsTokenEndpointAuthMethod = "client_secret_basic" Oauth2RegisterUpdateParamsTokenEndpointAuthMethodClientSecretPost Oauth2RegisterUpdateParamsTokenEndpointAuthMethod = "client_secret_post" Oauth2RegisterUpdateParamsTokenEndpointAuthMethodNone Oauth2RegisterUpdateParamsTokenEndpointAuthMethod = "none" )
func (Oauth2RegisterUpdateParamsTokenEndpointAuthMethod) IsKnown ¶
func (r Oauth2RegisterUpdateParamsTokenEndpointAuthMethod) IsKnown() bool
type Oauth2RegisterUpdateResponse ¶
type Oauth2RegisterUpdateResponse = interface{}
type Oauth2RevokeParams ¶
type Oauth2RevokeParams struct {
Token param.Field[string] `json:"token,required"`
ClientID param.Field[string] `json:"client_id,required"`
ClientSecret param.Field[string] `json:"client_secret,required"`
TokenTypeHint param.Field[Oauth2RevokeParamsTokenTypeHint] `json:"token_type_hint"`
}
func (Oauth2RevokeParams) MarshalJSON ¶
func (r Oauth2RevokeParams) MarshalJSON() (data []byte, err error)
type Oauth2RevokeParamsTokenTypeHint ¶
type Oauth2RevokeParamsTokenTypeHint string
const ( Oauth2RevokeParamsTokenTypeHintAccessToken Oauth2RevokeParamsTokenTypeHint = "access_token" Oauth2RevokeParamsTokenTypeHintRefreshToken Oauth2RevokeParamsTokenTypeHint = "refresh_token" )
func (Oauth2RevokeParamsTokenTypeHint) IsKnown ¶
func (r Oauth2RevokeParamsTokenTypeHint) IsKnown() bool
type Oauth2Service ¶
type Oauth2Service struct {
Options []option.RequestOption
Register *Oauth2RegisterService
Userinfo *Oauth2UserinfoService
}
Oauth2Service contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOauth2Service method instead.
func NewOauth2Service ¶
func NewOauth2Service(opts ...option.RequestOption) (r *Oauth2Service)
NewOauth2Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*Oauth2Service) Authorize ¶
func (r *Oauth2Service) Authorize(ctx context.Context, opts ...option.RequestOption) (res *Oauth2AuthorizeResponse, err error)
Authorize
func (*Oauth2Service) Introspect ¶
func (r *Oauth2Service) Introspect(ctx context.Context, body Oauth2IntrospectParams, opts ...option.RequestOption) (res *IntrospectTokenResponse, err error)
Get information about an access token.
func (*Oauth2Service) List ¶
func (r *Oauth2Service) List(ctx context.Context, query Oauth2ListParams, opts ...option.RequestOption) (res *Oauth2ListResponse, err error)
List OAuth2 clients.
func (*Oauth2Service) Revoke ¶
func (r *Oauth2Service) Revoke(ctx context.Context, body Oauth2RevokeParams, opts ...option.RequestOption) (res *RevokeTokenResponse, err error)
Revoke an access token or a refresh token.
func (*Oauth2Service) Token ¶
func (r *Oauth2Service) Token(ctx context.Context, body Oauth2TokenParams, opts ...option.RequestOption) (res *TokenResponse, err error)
Request an access token using a valid grant.
type Oauth2TokenParams ¶
type Oauth2TokenParams struct {
Body Oauth2TokenParamsBodyUnion `json:"body,required"`
}
func (Oauth2TokenParams) MarshalJSON ¶
func (r Oauth2TokenParams) MarshalJSON() (data []byte, err error)
type Oauth2TokenParamsBodyUnion ¶
type Oauth2TokenParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by [Oauth2TokenParamsBodyUnknown], [Oauth2TokenParamsBodyUnknown].
type Oauth2UserinfoGetResponse ¶
type Oauth2UserinfoGetResponse struct {
Sub string `json:"sub,required"`
Name string `json:"name,nullable"`
Email string `json:"email,nullable"`
EmailVerified bool `json:"email_verified,nullable"`
JSON oauth2UserinfoGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (Oauth2UserinfoGetResponse) AsUnion ¶
func (r Oauth2UserinfoGetResponse) AsUnion() Oauth2UserinfoGetResponseUnion
AsUnion returns a Oauth2UserinfoGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserInfoUser, UserInfoOrganization.
func (*Oauth2UserinfoGetResponse) UnmarshalJSON ¶
func (r *Oauth2UserinfoGetResponse) UnmarshalJSON(data []byte) (err error)
type Oauth2UserinfoGetResponseUnion ¶
type Oauth2UserinfoGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by UserInfoUser or UserInfoOrganization.
type Oauth2UserinfoNewResponse ¶
type Oauth2UserinfoNewResponse struct {
Sub string `json:"sub,required"`
Name string `json:"name,nullable"`
Email string `json:"email,nullable"`
EmailVerified bool `json:"email_verified,nullable"`
JSON oauth2UserinfoNewResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (Oauth2UserinfoNewResponse) AsUnion ¶
func (r Oauth2UserinfoNewResponse) AsUnion() Oauth2UserinfoNewResponseUnion
AsUnion returns a Oauth2UserinfoNewResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserInfoUser, UserInfoOrganization.
func (*Oauth2UserinfoNewResponse) UnmarshalJSON ¶
func (r *Oauth2UserinfoNewResponse) UnmarshalJSON(data []byte) (err error)
type Oauth2UserinfoNewResponseUnion ¶
type Oauth2UserinfoNewResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by UserInfoUser or UserInfoOrganization.
type Oauth2UserinfoService ¶
type Oauth2UserinfoService struct {
Options []option.RequestOption
}
Oauth2UserinfoService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOauth2UserinfoService method instead.
func NewOauth2UserinfoService ¶
func NewOauth2UserinfoService(opts ...option.RequestOption) (r *Oauth2UserinfoService)
NewOauth2UserinfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*Oauth2UserinfoService) Get ¶
func (r *Oauth2UserinfoService) Get(ctx context.Context, opts ...option.RequestOption) (res *Oauth2UserinfoGetResponse, err error)
Get information about the authenticated user.
func (*Oauth2UserinfoService) New ¶
func (r *Oauth2UserinfoService) New(ctx context.Context, opts ...option.RequestOption) (res *Oauth2UserinfoNewResponse, err error)
Get information about the authenticated user.
type OrderInvoice ¶
type OrderInvoice struct {
// The URL to the invoice.
URL string `json:"url,required"`
JSON orderInvoiceJSON `json:"-"`
}
Order's invoice data.
func (*OrderInvoice) UnmarshalJSON ¶
func (r *OrderInvoice) UnmarshalJSON(data []byte) (err error)
type OrderInvoiceService ¶
type OrderInvoiceService struct {
Options []option.RequestOption
}
OrderInvoiceService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrderInvoiceService method instead.
func NewOrderInvoiceService ¶
func NewOrderInvoiceService(opts ...option.RequestOption) (r *OrderInvoiceService)
NewOrderInvoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrderInvoiceService) Get ¶
func (r *OrderInvoiceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderInvoice, err error)
Get an order's invoice data.
type OrderListParams ¶
type OrderListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[OrderListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by product ID.
ProductID param.Field[OrderListParamsProductIDUnion] `query:"product_id" format:"uuid4"`
// Filter by product price type. `recurring` will return orders corresponding to
// subscriptions creations or renewals. `one_time` will return orders corresponding
// to one-time purchases.
ProductPriceType param.Field[OrderListParamsProductPriceTypeUnion] `query:"product_price_type"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
// Filter by customer's user ID.
UserID param.Field[OrderListParamsUserIDUnion] `query:"user_id" format:"uuid4"`
}
func (OrderListParams) URLQuery ¶
func (r OrderListParams) URLQuery() (v url.Values)
URLQuery serializes OrderListParams's query parameters as `url.Values`.
type OrderListParamsOrganizationIDArray ¶
type OrderListParamsOrganizationIDArray []string
func (OrderListParamsOrganizationIDArray) ImplementsOrderListParamsOrganizationIDUnion ¶
func (r OrderListParamsOrganizationIDArray) ImplementsOrderListParamsOrganizationIDUnion()
type OrderListParamsOrganizationIDUnion ¶
type OrderListParamsOrganizationIDUnion interface {
ImplementsOrderListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], OrderListParamsOrganizationIDArray.
type OrderListParamsProductIDArray ¶
type OrderListParamsProductIDArray []string
func (OrderListParamsProductIDArray) ImplementsOrderListParamsProductIDUnion ¶
func (r OrderListParamsProductIDArray) ImplementsOrderListParamsProductIDUnion()
type OrderListParamsProductIDUnion ¶
type OrderListParamsProductIDUnion interface {
ImplementsOrderListParamsProductIDUnion()
}
Filter by product ID.
Satisfied by [shared.UnionString], OrderListParamsProductIDArray.
type OrderListParamsProductPriceTypeArray ¶
type OrderListParamsProductPriceTypeArray []OrderListParamsProductPriceTypeArray
type OrderListParamsProductPriceTypeProductPriceType ¶
type OrderListParamsProductPriceTypeProductPriceType string
const ( OrderListParamsProductPriceTypeProductPriceTypeOneTime OrderListParamsProductPriceTypeProductPriceType = "one_time" OrderListParamsProductPriceTypeProductPriceTypeRecurring OrderListParamsProductPriceTypeProductPriceType = "recurring" )
func (OrderListParamsProductPriceTypeProductPriceType) IsKnown ¶
func (r OrderListParamsProductPriceTypeProductPriceType) IsKnown() bool
type OrderListParamsProductPriceTypeUnion ¶
type OrderListParamsProductPriceTypeUnion interface {
// contains filtered or unexported methods
}
Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases.
Satisfied by OrderListParamsProductPriceTypeProductPriceType, OrderListParamsProductPriceTypeArray.
type OrderListParamsUserIDArray ¶
type OrderListParamsUserIDArray []string
func (OrderListParamsUserIDArray) ImplementsOrderListParamsUserIDUnion ¶
func (r OrderListParamsUserIDArray) ImplementsOrderListParamsUserIDUnion()
type OrderListParamsUserIDUnion ¶
type OrderListParamsUserIDUnion interface {
ImplementsOrderListParamsUserIDUnion()
}
Filter by customer's user ID.
Satisfied by [shared.UnionString], OrderListParamsUserIDArray.
type OrderOutput ¶
type OrderOutput struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
Product OrderOutputProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
ProductPrice OrderOutputProductPrice `json:"product_price,required"`
ProductPriceID string `json:"product_price_id,required" format:"uuid4"`
TaxAmount int64 `json:"tax_amount,required"`
User OrderOutputUser `json:"user,required"`
UserID string `json:"user_id,required" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Subscription OrderOutputSubscription `json:"subscription,nullable"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON orderOutputJSON `json:"-"`
}
func (*OrderOutput) UnmarshalJSON ¶
func (r *OrderOutput) UnmarshalJSON(data []byte) (err error)
type OrderOutputProduct ¶
type OrderOutputProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type OrderOutputProductType `json:"type,nullable"`
JSON orderOutputProductJSON `json:"-"`
}
func (*OrderOutputProduct) UnmarshalJSON ¶
func (r *OrderOutputProduct) UnmarshalJSON(data []byte) (err error)
type OrderOutputProductPrice ¶
type OrderOutputProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type OrderOutputProductPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval OrderOutputProductPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON orderOutputProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (OrderOutputProductPrice) AsUnion ¶
func (r OrderOutputProductPrice) AsUnion() OrderOutputProductPriceUnion
AsUnion returns a OrderOutputProductPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are OrderOutputProductPriceProductPriceRecurring, OrderOutputProductPriceProductPriceOneTime.
func (*OrderOutputProductPrice) UnmarshalJSON ¶
func (r *OrderOutputProductPrice) UnmarshalJSON(data []byte) (err error)
type OrderOutputProductPriceProductPriceOneTime ¶
type OrderOutputProductPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type OrderOutputProductPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON orderOutputProductPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*OrderOutputProductPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *OrderOutputProductPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type OrderOutputProductPriceProductPriceOneTimeType ¶
type OrderOutputProductPriceProductPriceOneTimeType string
The type of the price.
const (
OrderOutputProductPriceProductPriceOneTimeTypeOneTime OrderOutputProductPriceProductPriceOneTimeType = "one_time"
)
func (OrderOutputProductPriceProductPriceOneTimeType) IsKnown ¶
func (r OrderOutputProductPriceProductPriceOneTimeType) IsKnown() bool
type OrderOutputProductPriceProductPriceRecurring ¶
type OrderOutputProductPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type OrderOutputProductPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval OrderOutputProductPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON orderOutputProductPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*OrderOutputProductPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *OrderOutputProductPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type OrderOutputProductPriceProductPriceRecurringRecurringInterval ¶
type OrderOutputProductPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( OrderOutputProductPriceProductPriceRecurringRecurringIntervalMonth OrderOutputProductPriceProductPriceRecurringRecurringInterval = "month" OrderOutputProductPriceProductPriceRecurringRecurringIntervalYear OrderOutputProductPriceProductPriceRecurringRecurringInterval = "year" )
func (OrderOutputProductPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r OrderOutputProductPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type OrderOutputProductPriceProductPriceRecurringType ¶
type OrderOutputProductPriceProductPriceRecurringType string
The type of the price.
const (
OrderOutputProductPriceProductPriceRecurringTypeRecurring OrderOutputProductPriceProductPriceRecurringType = "recurring"
)
func (OrderOutputProductPriceProductPriceRecurringType) IsKnown ¶
func (r OrderOutputProductPriceProductPriceRecurringType) IsKnown() bool
type OrderOutputProductPriceRecurringInterval ¶
type OrderOutputProductPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( OrderOutputProductPriceRecurringIntervalMonth OrderOutputProductPriceRecurringInterval = "month" OrderOutputProductPriceRecurringIntervalYear OrderOutputProductPriceRecurringInterval = "year" )
func (OrderOutputProductPriceRecurringInterval) IsKnown ¶
func (r OrderOutputProductPriceRecurringInterval) IsKnown() bool
type OrderOutputProductPriceType ¶
type OrderOutputProductPriceType string
The type of the price.
const ( OrderOutputProductPriceTypeRecurring OrderOutputProductPriceType = "recurring" OrderOutputProductPriceTypeOneTime OrderOutputProductPriceType = "one_time" )
func (OrderOutputProductPriceType) IsKnown ¶
func (r OrderOutputProductPriceType) IsKnown() bool
type OrderOutputProductPriceUnion ¶
type OrderOutputProductPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by OrderOutputProductPriceProductPriceRecurring or OrderOutputProductPriceProductPriceOneTime.
type OrderOutputProductType ¶
type OrderOutputProductType string
const ( OrderOutputProductTypeFree OrderOutputProductType = "free" OrderOutputProductTypeIndividual OrderOutputProductType = "individual" OrderOutputProductTypeBusiness OrderOutputProductType = "business" )
func (OrderOutputProductType) IsKnown ¶
func (r OrderOutputProductType) IsKnown() bool
type OrderOutputSubscription ¶
type OrderOutputSubscription struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status OrderOutputSubscriptionStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON orderOutputSubscriptionJSON `json:"-"`
}
func (*OrderOutputSubscription) UnmarshalJSON ¶
func (r *OrderOutputSubscription) UnmarshalJSON(data []byte) (err error)
type OrderOutputSubscriptionStatus ¶
type OrderOutputSubscriptionStatus string
const ( OrderOutputSubscriptionStatusIncomplete OrderOutputSubscriptionStatus = "incomplete" OrderOutputSubscriptionStatusIncompleteExpired OrderOutputSubscriptionStatus = "incomplete_expired" OrderOutputSubscriptionStatusTrialing OrderOutputSubscriptionStatus = "trialing" OrderOutputSubscriptionStatusActive OrderOutputSubscriptionStatus = "active" OrderOutputSubscriptionStatusPastDue OrderOutputSubscriptionStatus = "past_due" OrderOutputSubscriptionStatusCanceled OrderOutputSubscriptionStatus = "canceled" OrderOutputSubscriptionStatusUnpaid OrderOutputSubscriptionStatus = "unpaid" )
func (OrderOutputSubscriptionStatus) IsKnown ¶
func (r OrderOutputSubscriptionStatus) IsKnown() bool
type OrderOutputUser ¶
type OrderOutputUser struct {
ID string `json:"id,required" format:"uuid4"`
Email string `json:"email,required"`
PublicName string `json:"public_name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON orderOutputUserJSON `json:"-"`
}
func (*OrderOutputUser) UnmarshalJSON ¶
func (r *OrderOutputUser) UnmarshalJSON(data []byte) (err error)
type OrderService ¶
type OrderService struct {
Options []option.RequestOption
Invoice *OrderInvoiceService
}
OrderService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrderService method instead.
func NewOrderService ¶
func NewOrderService(opts ...option.RequestOption) (r *OrderService)
NewOrderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrderService) Get ¶
func (r *OrderService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderOutput, err error)
Get an order by ID.
func (*OrderService) List ¶
func (r *OrderService) List(ctx context.Context, query OrderListParams, opts ...option.RequestOption) (res *ListResourceOrder, err error)
List orders.
type OrganizationAvatarFileRead ¶
type OrganizationAvatarFileRead struct {
ID string `json:"id,required" format:"uuid4"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IsUploaded bool `json:"is_uploaded,required"`
MimeType string `json:"mime_type,required"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Path string `json:"path,required"`
PublicURL string `json:"public_url,required"`
Service OrganizationAvatarFileReadService `json:"service,required"`
Size int64 `json:"size,required"`
SizeReadable string `json:"size_readable,required"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
StorageVersion string `json:"storage_version,nullable"`
Version string `json:"version,nullable"`
JSON organizationAvatarFileReadJSON `json:"-"`
}
File to be used as an organization avatar.
func (*OrganizationAvatarFileRead) UnmarshalJSON ¶
func (r *OrganizationAvatarFileRead) UnmarshalJSON(data []byte) (err error)
type OrganizationAvatarFileReadService ¶
type OrganizationAvatarFileReadService string
const (
OrganizationAvatarFileReadServiceOrganizationAvatar OrganizationAvatarFileReadService = "organization_avatar"
)
func (OrganizationAvatarFileReadService) IsKnown ¶
func (r OrganizationAvatarFileReadService) IsKnown() bool
type OrganizationCustomerListParams ¶
type OrganizationCustomerListParams struct {
// Filter by the type of purchase the customer made.
CustomerTypes param.Field[[]OrganizationCustomerListParamsCustomerType] `query:"customer_types"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (OrganizationCustomerListParams) URLQuery ¶
func (r OrganizationCustomerListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationCustomerListParams's query parameters as `url.Values`.
type OrganizationCustomerListParamsCustomerType ¶
type OrganizationCustomerListParamsCustomerType string
const ( OrganizationCustomerListParamsCustomerTypeFreeSubscription OrganizationCustomerListParamsCustomerType = "free_subscription" OrganizationCustomerListParamsCustomerTypePaidSubscription OrganizationCustomerListParamsCustomerType = "paid_subscription" OrganizationCustomerListParamsCustomerTypeOrder OrganizationCustomerListParamsCustomerType = "order" OrganizationCustomerListParamsCustomerTypeDonation OrganizationCustomerListParamsCustomerType = "donation" )
func (OrganizationCustomerListParamsCustomerType) IsKnown ¶
func (r OrganizationCustomerListParamsCustomerType) IsKnown() bool
type OrganizationCustomerListResponse ¶
type OrganizationCustomerListResponse struct {
Pagination OrganizationCustomerListResponsePagination `json:"pagination,required"`
Items []OrganizationCustomerListResponseItem `json:"items"`
JSON organizationCustomerListResponseJSON `json:"-"`
}
func (*OrganizationCustomerListResponse) UnmarshalJSON ¶
func (r *OrganizationCustomerListResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationCustomerListResponseItem ¶
type OrganizationCustomerListResponseItem struct {
PublicName string `json:"public_name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON organizationCustomerListResponseItemJSON `json:"-"`
}
func (*OrganizationCustomerListResponseItem) UnmarshalJSON ¶
func (r *OrganizationCustomerListResponseItem) UnmarshalJSON(data []byte) (err error)
type OrganizationCustomerListResponsePagination ¶
type OrganizationCustomerListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON organizationCustomerListResponsePaginationJSON `json:"-"`
}
func (*OrganizationCustomerListResponsePagination) UnmarshalJSON ¶
func (r *OrganizationCustomerListResponsePagination) UnmarshalJSON(data []byte) (err error)
type OrganizationCustomerService ¶
type OrganizationCustomerService struct {
Options []option.RequestOption
}
OrganizationCustomerService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationCustomerService method instead.
func NewOrganizationCustomerService ¶
func NewOrganizationCustomerService(opts ...option.RequestOption) (r *OrganizationCustomerService)
NewOrganizationCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationCustomerService) List ¶
func (r *OrganizationCustomerService) List(ctx context.Context, id string, query OrganizationCustomerListParams, opts ...option.RequestOption) (res *OrganizationCustomerListResponse, err error)
List organization customers.
type OrganizationGetResponse ¶
type OrganizationGetResponse struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings OrganizationGetResponseFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings OrganizationGetResponseProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON organizationGetResponseJSON `json:"-"`
}
func (*OrganizationGetResponse) UnmarshalJSON ¶
func (r *OrganizationGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseFeatureSettings ¶
type OrganizationGetResponseFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON organizationGetResponseFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*OrganizationGetResponseFeatureSettings) UnmarshalJSON ¶
func (r *OrganizationGetResponseFeatureSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseProfileSettings ¶
type OrganizationGetResponseProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe OrganizationGetResponseProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON organizationGetResponseProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*OrganizationGetResponseProfileSettings) UnmarshalJSON ¶
func (r *OrganizationGetResponseProfileSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseProfileSettingsSubscribe ¶
type OrganizationGetResponseProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON organizationGetResponseProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*OrganizationGetResponseProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *OrganizationGetResponseProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type OrganizationListParams ¶
type OrganizationListParams struct {
// Filter by membership. If `true`, only organizations the user is a member of are
// returned. If `false`, only organizations the user is not a member of are
// returned.
IsMember param.Field[bool] `query:"is_member"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by slug.
Slug param.Field[string] `query:"slug"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListResponse ¶
type OrganizationListResponse struct {
Pagination OrganizationListResponsePagination `json:"pagination,required"`
Items []OrganizationListResponseItem `json:"items"`
JSON organizationListResponseJSON `json:"-"`
}
func (*OrganizationListResponse) UnmarshalJSON ¶
func (r *OrganizationListResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationListResponseItem ¶
type OrganizationListResponseItem struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings OrganizationListResponseItemsFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings OrganizationListResponseItemsProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON organizationListResponseItemJSON `json:"-"`
}
func (*OrganizationListResponseItem) UnmarshalJSON ¶
func (r *OrganizationListResponseItem) UnmarshalJSON(data []byte) (err error)
type OrganizationListResponseItemsFeatureSettings ¶
type OrganizationListResponseItemsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON organizationListResponseItemsFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*OrganizationListResponseItemsFeatureSettings) UnmarshalJSON ¶
func (r *OrganizationListResponseItemsFeatureSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationListResponseItemsProfileSettings ¶
type OrganizationListResponseItemsProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe OrganizationListResponseItemsProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON organizationListResponseItemsProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*OrganizationListResponseItemsProfileSettings) UnmarshalJSON ¶
func (r *OrganizationListResponseItemsProfileSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationListResponseItemsProfileSettingsSubscribe ¶
type OrganizationListResponseItemsProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON organizationListResponseItemsProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*OrganizationListResponseItemsProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *OrganizationListResponseItemsProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type OrganizationListResponsePagination ¶
type OrganizationListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON organizationListResponsePaginationJSON `json:"-"`
}
func (*OrganizationListResponsePagination) UnmarshalJSON ¶
func (r *OrganizationListResponsePagination) UnmarshalJSON(data []byte) (err error)
type OrganizationNewParams ¶
type OrganizationNewParams struct {
Name param.Field[string] `json:"name,required"`
Slug param.Field[string] `json:"slug,required"`
AvatarURL param.Field[string] `json:"avatar_url" format:"uri"`
DonationsEnabled param.Field[bool] `json:"donations_enabled"`
FeatureSettings param.Field[OrganizationNewParamsFeatureSettings] `json:"feature_settings"`
}
func (OrganizationNewParams) MarshalJSON ¶
func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)
type OrganizationNewParamsFeatureSettings ¶
type OrganizationNewParamsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled param.Field[bool] `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled param.Field[bool] `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled param.Field[bool] `json:"subscriptions_enabled"`
}
func (OrganizationNewParamsFeatureSettings) MarshalJSON ¶
func (r OrganizationNewParamsFeatureSettings) MarshalJSON() (data []byte, err error)
type OrganizationNewResponse ¶
type OrganizationNewResponse struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings OrganizationNewResponseFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings OrganizationNewResponseProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON organizationNewResponseJSON `json:"-"`
}
func (*OrganizationNewResponse) UnmarshalJSON ¶
func (r *OrganizationNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseFeatureSettings ¶
type OrganizationNewResponseFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON organizationNewResponseFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*OrganizationNewResponseFeatureSettings) UnmarshalJSON ¶
func (r *OrganizationNewResponseFeatureSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseProfileSettings ¶
type OrganizationNewResponseProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe OrganizationNewResponseProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON organizationNewResponseProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*OrganizationNewResponseProfileSettings) UnmarshalJSON ¶
func (r *OrganizationNewResponseProfileSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseProfileSettingsSubscribe ¶
type OrganizationNewResponseProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON organizationNewResponseProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*OrganizationNewResponseProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *OrganizationNewResponseProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type OrganizationService ¶
type OrganizationService struct {
Options []option.RequestOption
Customers *OrganizationCustomerService
}
OrganizationService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationService) Get ¶
func (r *OrganizationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
Get an organization by ID.
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *OrganizationListResponse, err error)
List organizations.
func (*OrganizationService) New ¶
func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
Create an organization.
func (*OrganizationService) Update ¶
func (r *OrganizationService) Update(ctx context.Context, id string, body OrganizationUpdateParams, opts ...option.RequestOption) (res *OrganizationUpdateResponse, err error)
Update an organization.
type OrganizationUpdateParams ¶
type OrganizationUpdateParams struct {
AvatarURL param.Field[string] `json:"avatar_url" format:"uri"`
BillingEmail param.Field[string] `json:"billing_email"`
DefaultBadgeCustomContent param.Field[string] `json:"default_badge_custom_content"`
DefaultUpfrontSplitToContributors param.Field[int64] `json:"default_upfront_split_to_contributors"`
DonationsEnabled param.Field[bool] `json:"donations_enabled"`
FeatureSettings param.Field[OrganizationUpdateParamsFeatureSettings] `json:"feature_settings"`
Name param.Field[string] `json:"name"`
PerUserMonthlySpendingLimit param.Field[int64] `json:"per_user_monthly_spending_limit"`
PledgeBadgeShowAmount param.Field[bool] `json:"pledge_badge_show_amount"`
PledgeMinimumAmount param.Field[int64] `json:"pledge_minimum_amount"`
ProfileSettings param.Field[OrganizationUpdateParamsProfileSettings] `json:"profile_settings"`
TotalMonthlySpendingLimit param.Field[int64] `json:"total_monthly_spending_limit"`
}
func (OrganizationUpdateParams) MarshalJSON ¶
func (r OrganizationUpdateParams) MarshalJSON() (data []byte, err error)
type OrganizationUpdateParamsFeatureSettings ¶
type OrganizationUpdateParamsFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled param.Field[bool] `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled param.Field[bool] `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled param.Field[bool] `json:"subscriptions_enabled"`
}
func (OrganizationUpdateParamsFeatureSettings) MarshalJSON ¶
func (r OrganizationUpdateParamsFeatureSettings) MarshalJSON() (data []byte, err error)
type OrganizationUpdateParamsProfileSettings ¶
type OrganizationUpdateParamsProfileSettings struct {
// A description of the organization
Description param.Field[string] `json:"description"`
// A list of featured organizations
FeaturedOrganizations param.Field[[]string] `json:"featured_organizations" format:"uuid4"`
// A list of featured projects
FeaturedProjects param.Field[[]string] `json:"featured_projects" format:"uuid4"`
// A list of links associated with the organization
Links param.Field[[]string] `json:"links" format:"uri"`
// Subscription promotion settings
Subscribe param.Field[OrganizationUpdateParamsProfileSettingsSubscribe] `json:"subscribe"`
}
func (OrganizationUpdateParamsProfileSettings) MarshalJSON ¶
func (r OrganizationUpdateParamsProfileSettings) MarshalJSON() (data []byte, err error)
type OrganizationUpdateParamsProfileSettingsSubscribe ¶
type OrganizationUpdateParamsProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree param.Field[bool] `json:"count_free"`
// Promote email subscription (free)
Promote param.Field[bool] `json:"promote"`
// Show subscription count publicly
ShowCount param.Field[bool] `json:"show_count"`
}
Subscription promotion settings
func (OrganizationUpdateParamsProfileSettingsSubscribe) MarshalJSON ¶
func (r OrganizationUpdateParamsProfileSettingsSubscribe) MarshalJSON() (data []byte, err error)
type OrganizationUpdateResponse ¶
type OrganizationUpdateResponse struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings OrganizationUpdateResponseFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings OrganizationUpdateResponseProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON organizationUpdateResponseJSON `json:"-"`
}
func (*OrganizationUpdateResponse) UnmarshalJSON ¶
func (r *OrganizationUpdateResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationUpdateResponseFeatureSettings ¶
type OrganizationUpdateResponseFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON organizationUpdateResponseFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*OrganizationUpdateResponseFeatureSettings) UnmarshalJSON ¶
func (r *OrganizationUpdateResponseFeatureSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationUpdateResponseProfileSettings ¶
type OrganizationUpdateResponseProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe OrganizationUpdateResponseProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON organizationUpdateResponseProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*OrganizationUpdateResponseProfileSettings) UnmarshalJSON ¶
func (r *OrganizationUpdateResponseProfileSettings) UnmarshalJSON(data []byte) (err error)
type OrganizationUpdateResponseProfileSettingsSubscribe ¶
type OrganizationUpdateResponseProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON organizationUpdateResponseProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*OrganizationUpdateResponseProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *OrganizationUpdateResponseProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type PayoutEstimate ¶
type PayoutEstimate struct {
AccountID string `json:"account_id,required" format:"uuid4"`
FeesAmount int64 `json:"fees_amount,required"`
GrossAmount int64 `json:"gross_amount,required"`
NetAmount int64 `json:"net_amount,required"`
JSON payoutEstimateJSON `json:"-"`
}
func (*PayoutEstimate) UnmarshalJSON ¶
func (r *PayoutEstimate) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponse ¶
type PledgeGetResponse struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
// Amount pledged towards the issue
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
// The issue that the pledge was made towards
Issue PledgeGetResponseIssue `json:"issue,required"`
// Current state of the pledge
State PledgeGetResponseState `json:"state,required"`
// Type of pledge
Type PledgeGetResponseType `json:"type,required"`
// If the currently authenticated subject can perform admin actions on behalf of
// the receiver of the peldge
AuthedCanAdminReceived bool `json:"authed_can_admin_received"`
// If the currently authenticated subject can perform admin actions on behalf of
// the maker of the peldge
AuthedCanAdminSender bool `json:"authed_can_admin_sender"`
// For pledges made by an organization, or on behalf of an organization. This is
// the user that made the pledge. Only visible for members of said organization.
CreatedBy PledgeGetResponseCreatedBy `json:"created_by,nullable"`
// URL of invoice for this pledge
HostedInvoiceURL string `json:"hosted_invoice_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The user or organization that made this pledge
Pledger PledgeGetResponsePledger `json:"pledger,nullable"`
// If and when the pledge was refunded to the pledger
RefundedAt time.Time `json:"refunded_at,nullable" format:"date-time"`
// When the payout is scheduled to be made to the maintainers behind the issue.
// Disputes must be made before this date.
ScheduledPayoutAt time.Time `json:"scheduled_payout_at,nullable" format:"date-time"`
JSON pledgeGetResponseJSON `json:"-"`
}
func (*PledgeGetResponse) UnmarshalJSON ¶
func (r *PledgeGetResponse) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseCreatedBy ¶
type PledgeGetResponseCreatedBy struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON pledgeGetResponseCreatedByJSON `json:"-"`
}
For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization.
func (*PledgeGetResponseCreatedBy) UnmarshalJSON ¶
func (r *PledgeGetResponseCreatedBy) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssue ¶
type PledgeGetResponseIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding PledgeGetResponseIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform PledgeGetResponseIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository PledgeGetResponseIssueRepository `json:"repository,required"`
State PledgeGetResponseIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []PledgeGetResponseIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author PledgeGetResponseIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []PledgeGetResponseIssueLabel `json:"labels"`
// GitHub reactions
Reactions PledgeGetResponseIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON pledgeGetResponseIssueJSON `json:"-"`
}
The issue that the pledge was made towards
func (*PledgeGetResponseIssue) UnmarshalJSON ¶
func (r *PledgeGetResponseIssue) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueAssignee ¶
type PledgeGetResponseIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON pledgeGetResponseIssueAssigneeJSON `json:"-"`
}
func (*PledgeGetResponseIssueAssignee) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueAssignee) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueAuthor ¶
type PledgeGetResponseIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON pledgeGetResponseIssueAuthorJSON `json:"-"`
}
GitHub author
func (*PledgeGetResponseIssueAuthor) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueAuthor) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueFunding ¶
type PledgeGetResponseIssueFunding struct {
FundingGoal PledgeGetResponseIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum PledgeGetResponseIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON pledgeGetResponseIssueFundingJSON `json:"-"`
}
func (*PledgeGetResponseIssueFunding) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueFunding) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueFundingFundingGoal ¶
type PledgeGetResponseIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeGetResponseIssueFundingFundingGoalJSON `json:"-"`
}
func (*PledgeGetResponseIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueFundingPledgesSum ¶
type PledgeGetResponseIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeGetResponseIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*PledgeGetResponseIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueLabel ¶
type PledgeGetResponseIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON pledgeGetResponseIssueLabelJSON `json:"-"`
}
func (*PledgeGetResponseIssueLabel) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueLabel) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssuePlatform ¶
type PledgeGetResponseIssuePlatform string
Issue platform (currently always GitHub)
const (
PledgeGetResponseIssuePlatformGitHub PledgeGetResponseIssuePlatform = "github"
)
func (PledgeGetResponseIssuePlatform) IsKnown ¶
func (r PledgeGetResponseIssuePlatform) IsKnown() bool
type PledgeGetResponseIssueReactions ¶
type PledgeGetResponseIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON pledgeGetResponseIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*PledgeGetResponseIssueReactions) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueReactions) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueRepository ¶
type PledgeGetResponseIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization PledgeGetResponseIssueRepositoryOrganization `json:"organization,required"`
Platform PledgeGetResponseIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings PledgeGetResponseIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON pledgeGetResponseIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*PledgeGetResponseIssueRepository) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueRepository) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueRepositoryOrganization ¶
type PledgeGetResponseIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform PledgeGetResponseIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON pledgeGetResponseIssueRepositoryOrganizationJSON `json:"-"`
}
func (*PledgeGetResponseIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueRepositoryOrganizationPlatform ¶
type PledgeGetResponseIssueRepositoryOrganizationPlatform string
const (
PledgeGetResponseIssueRepositoryOrganizationPlatformGitHub PledgeGetResponseIssueRepositoryOrganizationPlatform = "github"
)
func (PledgeGetResponseIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r PledgeGetResponseIssueRepositoryOrganizationPlatform) IsKnown() bool
type PledgeGetResponseIssueRepositoryPlatform ¶
type PledgeGetResponseIssueRepositoryPlatform string
const (
PledgeGetResponseIssueRepositoryPlatformGitHub PledgeGetResponseIssueRepositoryPlatform = "github"
)
func (PledgeGetResponseIssueRepositoryPlatform) IsKnown ¶
func (r PledgeGetResponseIssueRepositoryPlatform) IsKnown() bool
type PledgeGetResponseIssueRepositoryProfileSettings ¶
type PledgeGetResponseIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON pledgeGetResponseIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*PledgeGetResponseIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *PledgeGetResponseIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseIssueState ¶
type PledgeGetResponseIssueState string
const ( PledgeGetResponseIssueStateOpen PledgeGetResponseIssueState = "open" PledgeGetResponseIssueStateClosed PledgeGetResponseIssueState = "closed" )
func (PledgeGetResponseIssueState) IsKnown ¶
func (r PledgeGetResponseIssueState) IsKnown() bool
type PledgeGetResponsePledger ¶
type PledgeGetResponsePledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON pledgeGetResponsePledgerJSON `json:"-"`
}
The user or organization that made this pledge
func (*PledgeGetResponsePledger) UnmarshalJSON ¶
func (r *PledgeGetResponsePledger) UnmarshalJSON(data []byte) (err error)
type PledgeGetResponseState ¶
type PledgeGetResponseState string
Current state of the pledge
const ( PledgeGetResponseStateInitiated PledgeGetResponseState = "initiated" PledgeGetResponseStateCreated PledgeGetResponseState = "created" PledgeGetResponseStatePending PledgeGetResponseState = "pending" PledgeGetResponseStateRefunded PledgeGetResponseState = "refunded" PledgeGetResponseStateDisputed PledgeGetResponseState = "disputed" PledgeGetResponseStateChargeDisputed PledgeGetResponseState = "charge_disputed" PledgeGetResponseStateCancelled PledgeGetResponseState = "cancelled" )
func (PledgeGetResponseState) IsKnown ¶
func (r PledgeGetResponseState) IsKnown() bool
type PledgeGetResponseType ¶
type PledgeGetResponseType string
Type of pledge
const ( PledgeGetResponseTypePayUpfront PledgeGetResponseType = "pay_upfront" PledgeGetResponseTypePayOnCompletion PledgeGetResponseType = "pay_on_completion" PledgeGetResponseTypePayDirectly PledgeGetResponseType = "pay_directly" )
func (PledgeGetResponseType) IsKnown ¶
func (r PledgeGetResponseType) IsKnown() bool
type PledgeSearchParams ¶
type PledgeSearchParams struct {
// Search pledges made by this organization.
ByOrganizationID param.Field[string] `query:"by_organization_id" format:"uuid"`
// Search pledges made by this user.
ByUserID param.Field[string] `query:"by_user_id" format:"uuid"`
// Search pledges to this issue
IssueID param.Field[string] `query:"issue_id" format:"uuid"`
// The organization ID.
OrganizationID param.Field[string] `query:"organization_id" format:"uuid4"`
// Search pledges in the repository with this name. Can only be used if
// organization_name is set.
RepositoryName param.Field[string] `query:"repository_name"`
}
func (PledgeSearchParams) URLQuery ¶
func (r PledgeSearchParams) URLQuery() (v url.Values)
URLQuery serializes PledgeSearchParams's query parameters as `url.Values`.
type PledgeSearchResponse ¶
type PledgeSearchResponse struct {
Pagination PledgeSearchResponsePagination `json:"pagination,required"`
Items []PledgeSearchResponseItem `json:"items"`
JSON pledgeSearchResponseJSON `json:"-"`
}
func (*PledgeSearchResponse) UnmarshalJSON ¶
func (r *PledgeSearchResponse) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItem ¶
type PledgeSearchResponseItem struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
// Amount pledged towards the issue
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
// The issue that the pledge was made towards
Issue PledgeSearchResponseItemsIssue `json:"issue,required"`
// Current state of the pledge
State PledgeSearchResponseItemsState `json:"state,required"`
// Type of pledge
Type PledgeSearchResponseItemsType `json:"type,required"`
// If the currently authenticated subject can perform admin actions on behalf of
// the receiver of the peldge
AuthedCanAdminReceived bool `json:"authed_can_admin_received"`
// If the currently authenticated subject can perform admin actions on behalf of
// the maker of the peldge
AuthedCanAdminSender bool `json:"authed_can_admin_sender"`
// For pledges made by an organization, or on behalf of an organization. This is
// the user that made the pledge. Only visible for members of said organization.
CreatedBy PledgeSearchResponseItemsCreatedBy `json:"created_by,nullable"`
// URL of invoice for this pledge
HostedInvoiceURL string `json:"hosted_invoice_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The user or organization that made this pledge
Pledger PledgeSearchResponseItemsPledger `json:"pledger,nullable"`
// If and when the pledge was refunded to the pledger
RefundedAt time.Time `json:"refunded_at,nullable" format:"date-time"`
// When the payout is scheduled to be made to the maintainers behind the issue.
// Disputes must be made before this date.
ScheduledPayoutAt time.Time `json:"scheduled_payout_at,nullable" format:"date-time"`
JSON pledgeSearchResponseItemJSON `json:"-"`
}
func (*PledgeSearchResponseItem) UnmarshalJSON ¶
func (r *PledgeSearchResponseItem) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsCreatedBy ¶
type PledgeSearchResponseItemsCreatedBy struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON pledgeSearchResponseItemsCreatedByJSON `json:"-"`
}
For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization.
func (*PledgeSearchResponseItemsCreatedBy) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsCreatedBy) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssue ¶
type PledgeSearchResponseItemsIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding PledgeSearchResponseItemsIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform PledgeSearchResponseItemsIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository PledgeSearchResponseItemsIssueRepository `json:"repository,required"`
State PledgeSearchResponseItemsIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []PledgeSearchResponseItemsIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author PledgeSearchResponseItemsIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []PledgeSearchResponseItemsIssueLabel `json:"labels"`
// GitHub reactions
Reactions PledgeSearchResponseItemsIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON pledgeSearchResponseItemsIssueJSON `json:"-"`
}
The issue that the pledge was made towards
func (*PledgeSearchResponseItemsIssue) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssue) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueAssignee ¶
type PledgeSearchResponseItemsIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON pledgeSearchResponseItemsIssueAssigneeJSON `json:"-"`
}
func (*PledgeSearchResponseItemsIssueAssignee) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueAssignee) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueAuthor ¶
type PledgeSearchResponseItemsIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON pledgeSearchResponseItemsIssueAuthorJSON `json:"-"`
}
GitHub author
func (*PledgeSearchResponseItemsIssueAuthor) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueAuthor) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueFunding ¶
type PledgeSearchResponseItemsIssueFunding struct {
FundingGoal PledgeSearchResponseItemsIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum PledgeSearchResponseItemsIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON pledgeSearchResponseItemsIssueFundingJSON `json:"-"`
}
func (*PledgeSearchResponseItemsIssueFunding) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueFunding) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueFundingFundingGoal ¶
type PledgeSearchResponseItemsIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeSearchResponseItemsIssueFundingFundingGoalJSON `json:"-"`
}
func (*PledgeSearchResponseItemsIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueFundingPledgesSum ¶
type PledgeSearchResponseItemsIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeSearchResponseItemsIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*PledgeSearchResponseItemsIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueLabel ¶
type PledgeSearchResponseItemsIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON pledgeSearchResponseItemsIssueLabelJSON `json:"-"`
}
func (*PledgeSearchResponseItemsIssueLabel) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueLabel) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssuePlatform ¶
type PledgeSearchResponseItemsIssuePlatform string
Issue platform (currently always GitHub)
const (
PledgeSearchResponseItemsIssuePlatformGitHub PledgeSearchResponseItemsIssuePlatform = "github"
)
func (PledgeSearchResponseItemsIssuePlatform) IsKnown ¶
func (r PledgeSearchResponseItemsIssuePlatform) IsKnown() bool
type PledgeSearchResponseItemsIssueReactions ¶
type PledgeSearchResponseItemsIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON pledgeSearchResponseItemsIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*PledgeSearchResponseItemsIssueReactions) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueReactions) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueRepository ¶
type PledgeSearchResponseItemsIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization PledgeSearchResponseItemsIssueRepositoryOrganization `json:"organization,required"`
Platform PledgeSearchResponseItemsIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings PledgeSearchResponseItemsIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON pledgeSearchResponseItemsIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*PledgeSearchResponseItemsIssueRepository) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueRepository) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueRepositoryOrganization ¶
type PledgeSearchResponseItemsIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON pledgeSearchResponseItemsIssueRepositoryOrganizationJSON `json:"-"`
}
func (*PledgeSearchResponseItemsIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform ¶
type PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform string
const (
PledgeSearchResponseItemsIssueRepositoryOrganizationPlatformGitHub PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform = "github"
)
func (PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r PledgeSearchResponseItemsIssueRepositoryOrganizationPlatform) IsKnown() bool
type PledgeSearchResponseItemsIssueRepositoryPlatform ¶
type PledgeSearchResponseItemsIssueRepositoryPlatform string
const (
PledgeSearchResponseItemsIssueRepositoryPlatformGitHub PledgeSearchResponseItemsIssueRepositoryPlatform = "github"
)
func (PledgeSearchResponseItemsIssueRepositoryPlatform) IsKnown ¶
func (r PledgeSearchResponseItemsIssueRepositoryPlatform) IsKnown() bool
type PledgeSearchResponseItemsIssueRepositoryProfileSettings ¶
type PledgeSearchResponseItemsIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON pledgeSearchResponseItemsIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*PledgeSearchResponseItemsIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsIssueState ¶
type PledgeSearchResponseItemsIssueState string
const ( PledgeSearchResponseItemsIssueStateOpen PledgeSearchResponseItemsIssueState = "open" PledgeSearchResponseItemsIssueStateClosed PledgeSearchResponseItemsIssueState = "closed" )
func (PledgeSearchResponseItemsIssueState) IsKnown ¶
func (r PledgeSearchResponseItemsIssueState) IsKnown() bool
type PledgeSearchResponseItemsPledger ¶
type PledgeSearchResponseItemsPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON pledgeSearchResponseItemsPledgerJSON `json:"-"`
}
The user or organization that made this pledge
func (*PledgeSearchResponseItemsPledger) UnmarshalJSON ¶
func (r *PledgeSearchResponseItemsPledger) UnmarshalJSON(data []byte) (err error)
type PledgeSearchResponseItemsState ¶
type PledgeSearchResponseItemsState string
Current state of the pledge
const ( PledgeSearchResponseItemsStateInitiated PledgeSearchResponseItemsState = "initiated" PledgeSearchResponseItemsStateCreated PledgeSearchResponseItemsState = "created" PledgeSearchResponseItemsStatePending PledgeSearchResponseItemsState = "pending" PledgeSearchResponseItemsStateRefunded PledgeSearchResponseItemsState = "refunded" PledgeSearchResponseItemsStateDisputed PledgeSearchResponseItemsState = "disputed" PledgeSearchResponseItemsStateChargeDisputed PledgeSearchResponseItemsState = "charge_disputed" PledgeSearchResponseItemsStateCancelled PledgeSearchResponseItemsState = "cancelled" )
func (PledgeSearchResponseItemsState) IsKnown ¶
func (r PledgeSearchResponseItemsState) IsKnown() bool
type PledgeSearchResponseItemsType ¶
type PledgeSearchResponseItemsType string
Type of pledge
const ( PledgeSearchResponseItemsTypePayUpfront PledgeSearchResponseItemsType = "pay_upfront" PledgeSearchResponseItemsTypePayOnCompletion PledgeSearchResponseItemsType = "pay_on_completion" PledgeSearchResponseItemsTypePayDirectly PledgeSearchResponseItemsType = "pay_directly" )
func (PledgeSearchResponseItemsType) IsKnown ¶
func (r PledgeSearchResponseItemsType) IsKnown() bool
type PledgeSearchResponsePagination ¶
type PledgeSearchResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON pledgeSearchResponsePaginationJSON `json:"-"`
}
func (*PledgeSearchResponsePagination) UnmarshalJSON ¶
func (r *PledgeSearchResponsePagination) UnmarshalJSON(data []byte) (err error)
type PledgeService ¶
type PledgeService struct {
Options []option.RequestOption
Summary *PledgeSummaryService
}
PledgeService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPledgeService method instead.
func NewPledgeService ¶
func NewPledgeService(opts ...option.RequestOption) (r *PledgeService)
NewPledgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PledgeService) Get ¶
func (r *PledgeService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PledgeGetResponse, err error)
Get a pledge. Requires authentication.
func (*PledgeService) Search ¶
func (r *PledgeService) Search(ctx context.Context, query PledgeSearchParams, opts ...option.RequestOption) (res *PledgeSearchResponse, err error)
Search pledges. Requires authentication. The user can only read pledges that they have made (personally or via an organization) or received (to organizations that they are a member of).
func (*PledgeService) Spending ¶
func (r *PledgeService) Spending(ctx context.Context, query PledgeSpendingParams, opts ...option.RequestOption) (res *PledgeSpendingResponse, err error)
Get current user spending in the current period. Used together with spending limits.
type PledgeSpendingParams ¶
type PledgeSpendingParams struct {
// Spending in this organization. Required.
OrganizationID param.Field[string] `query:"organization_id,required" format:"uuid"`
}
func (PledgeSpendingParams) URLQuery ¶
func (r PledgeSpendingParams) URLQuery() (v url.Values)
URLQuery serializes PledgeSpendingParams's query parameters as `url.Values`.
type PledgeSpendingResponse ¶
type PledgeSpendingResponse struct {
Amount int64 `json:"amount,required"`
Currency string `json:"currency,required"`
JSON pledgeSpendingResponseJSON `json:"-"`
}
func (*PledgeSpendingResponse) UnmarshalJSON ¶
func (r *PledgeSpendingResponse) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetParams ¶
type PledgeSummaryGetParams struct {
IssueID param.Field[string] `query:"issue_id,required" format:"uuid"`
}
func (PledgeSummaryGetParams) URLQuery ¶
func (r PledgeSummaryGetParams) URLQuery() (v url.Values)
URLQuery serializes PledgeSummaryGetParams's query parameters as `url.Values`.
type PledgeSummaryGetResponse ¶
type PledgeSummaryGetResponse struct {
Funding PledgeSummaryGetResponseFunding `json:"funding,required"`
Pledges []PledgeSummaryGetResponsePledge `json:"pledges,required"`
JSON pledgeSummaryGetResponseJSON `json:"-"`
}
func (*PledgeSummaryGetResponse) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponse) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponseFunding ¶
type PledgeSummaryGetResponseFunding struct {
FundingGoal PledgeSummaryGetResponseFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum PledgeSummaryGetResponseFundingPledgesSum `json:"pledges_sum,nullable"`
JSON pledgeSummaryGetResponseFundingJSON `json:"-"`
}
func (*PledgeSummaryGetResponseFunding) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponseFunding) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponseFundingFundingGoal ¶
type PledgeSummaryGetResponseFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeSummaryGetResponseFundingFundingGoalJSON `json:"-"`
}
func (*PledgeSummaryGetResponseFundingFundingGoal) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponseFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponseFundingPledgesSum ¶
type PledgeSummaryGetResponseFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON pledgeSummaryGetResponseFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*PledgeSummaryGetResponseFundingPledgesSum) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponseFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponsePledge ¶
type PledgeSummaryGetResponsePledge struct {
// Type of pledge
Type PledgeSummaryGetResponsePledgesType `json:"type,required"`
Pledger PledgeSummaryGetResponsePledgesPledger `json:"pledger,nullable"`
JSON pledgeSummaryGetResponsePledgeJSON `json:"-"`
}
func (*PledgeSummaryGetResponsePledge) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponsePledge) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponsePledgesPledger ¶
type PledgeSummaryGetResponsePledgesPledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON pledgeSummaryGetResponsePledgesPledgerJSON `json:"-"`
}
func (*PledgeSummaryGetResponsePledgesPledger) UnmarshalJSON ¶
func (r *PledgeSummaryGetResponsePledgesPledger) UnmarshalJSON(data []byte) (err error)
type PledgeSummaryGetResponsePledgesType ¶
type PledgeSummaryGetResponsePledgesType string
Type of pledge
const ( PledgeSummaryGetResponsePledgesTypePayUpfront PledgeSummaryGetResponsePledgesType = "pay_upfront" PledgeSummaryGetResponsePledgesTypePayOnCompletion PledgeSummaryGetResponsePledgesType = "pay_on_completion" PledgeSummaryGetResponsePledgesTypePayDirectly PledgeSummaryGetResponsePledgesType = "pay_directly" )
func (PledgeSummaryGetResponsePledgesType) IsKnown ¶
func (r PledgeSummaryGetResponsePledgesType) IsKnown() bool
type PledgeSummaryService ¶
type PledgeSummaryService struct {
Options []option.RequestOption
}
PledgeSummaryService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPledgeSummaryService method instead.
func NewPledgeSummaryService ¶
func NewPledgeSummaryService(opts ...option.RequestOption) (r *PledgeSummaryService)
NewPledgeSummaryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PledgeSummaryService) Get ¶
func (r *PledgeSummaryService) Get(ctx context.Context, query PledgeSummaryGetParams, opts ...option.RequestOption) (res *PledgeSummaryGetResponse, err error)
Get summary of pledges for resource.
type ProductBenefitService ¶
type ProductBenefitService struct {
Options []option.RequestOption
}
ProductBenefitService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductBenefitService method instead.
func NewProductBenefitService ¶
func NewProductBenefitService(opts ...option.RequestOption) (r *ProductBenefitService)
NewProductBenefitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProductBenefitService) Update ¶
func (r *ProductBenefitService) Update(ctx context.Context, id string, body ProductBenefitUpdateParams, opts ...option.RequestOption) (res *ProductOutput, err error)
Update benefits granted by a product.
type ProductBenefitUpdateParams ¶
type ProductBenefitUpdateParams struct {
// List of benefit IDs. Each one must be on the same organization as the product.
Benefits param.Field[[]string] `json:"benefits,required" format:"uuid4"`
}
func (ProductBenefitUpdateParams) MarshalJSON ¶
func (r ProductBenefitUpdateParams) MarshalJSON() (data []byte, err error)
type ProductListParams ¶
type ProductListParams struct {
// Filter products granting specific benefit.
BenefitID param.Field[ProductListParamsBenefitIDUnion] `query:"benefit_id" format:"uuid4"`
// Filter on archived products.
IsArchived param.Field[bool] `query:"is_archived"`
// Filter on recurring products. If `true`, only subscriptions tiers are returned.
// If `false`, only one-time purchase products are returned.
IsRecurring param.Field[bool] `query:"is_recurring"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[ProductListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by subscription tier type.
Type param.Field[ProductListParamsTypeUnion] `query:"type"`
}
func (ProductListParams) URLQuery ¶
func (r ProductListParams) URLQuery() (v url.Values)
URLQuery serializes ProductListParams's query parameters as `url.Values`.
type ProductListParamsBenefitIDArray ¶
type ProductListParamsBenefitIDArray []string
func (ProductListParamsBenefitIDArray) ImplementsProductListParamsBenefitIDUnion ¶
func (r ProductListParamsBenefitIDArray) ImplementsProductListParamsBenefitIDUnion()
type ProductListParamsBenefitIDUnion ¶
type ProductListParamsBenefitIDUnion interface {
ImplementsProductListParamsBenefitIDUnion()
}
Filter products granting specific benefit.
Satisfied by [shared.UnionString], ProductListParamsBenefitIDArray.
type ProductListParamsOrganizationIDArray ¶
type ProductListParamsOrganizationIDArray []string
func (ProductListParamsOrganizationIDArray) ImplementsProductListParamsOrganizationIDUnion ¶
func (r ProductListParamsOrganizationIDArray) ImplementsProductListParamsOrganizationIDUnion()
type ProductListParamsOrganizationIDUnion ¶
type ProductListParamsOrganizationIDUnion interface {
ImplementsProductListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], ProductListParamsOrganizationIDArray.
type ProductListParamsTypeArray ¶
type ProductListParamsTypeArray []ProductListParamsTypeArray
type ProductListParamsTypeSubscriptionTierType ¶
type ProductListParamsTypeSubscriptionTierType string
const ( ProductListParamsTypeSubscriptionTierTypeFree ProductListParamsTypeSubscriptionTierType = "free" ProductListParamsTypeSubscriptionTierTypeIndividual ProductListParamsTypeSubscriptionTierType = "individual" ProductListParamsTypeSubscriptionTierTypeBusiness ProductListParamsTypeSubscriptionTierType = "business" )
func (ProductListParamsTypeSubscriptionTierType) IsKnown ¶
func (r ProductListParamsTypeSubscriptionTierType) IsKnown() bool
type ProductListParamsTypeUnion ¶
type ProductListParamsTypeUnion interface {
// contains filtered or unexported methods
}
Filter by subscription tier type.
Satisfied by ProductListParamsTypeSubscriptionTierType, ProductListParamsTypeArray.
type ProductMediaFileReadOutput ¶
type ProductMediaFileReadOutput struct {
ID string `json:"id,required" format:"uuid4"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IsUploaded bool `json:"is_uploaded,required"`
MimeType string `json:"mime_type,required"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Path string `json:"path,required"`
PublicURL string `json:"public_url,required"`
Service ProductMediaFileReadOutputService `json:"service,required"`
Size int64 `json:"size,required"`
SizeReadable string `json:"size_readable,required"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
StorageVersion string `json:"storage_version,nullable"`
Version string `json:"version,nullable"`
JSON productMediaFileReadOutputJSON `json:"-"`
}
File to be used as a product media file.
func (*ProductMediaFileReadOutput) UnmarshalJSON ¶
func (r *ProductMediaFileReadOutput) UnmarshalJSON(data []byte) (err error)
type ProductMediaFileReadOutputService ¶
type ProductMediaFileReadOutputService string
const (
ProductMediaFileReadOutputServiceProductMedia ProductMediaFileReadOutputService = "product_media"
)
func (ProductMediaFileReadOutputService) IsKnown ¶
func (r ProductMediaFileReadOutputService) IsKnown() bool
type ProductNewParams ¶
type ProductNewParams struct {
// Schema to create a recurring product, i.e. a subscription.
Body ProductNewParamsBodyUnion `json:"body,required"`
}
func (ProductNewParams) MarshalJSON ¶
func (r ProductNewParams) MarshalJSON() (data []byte, err error)
type ProductNewParamsBody ¶
type ProductNewParamsBody struct {
// The name of the product.
Name param.Field[string] `json:"name,required"`
// The description of the product.
Description param.Field[string] `json:"description"`
Prices param.Field[interface{}] `json:"prices"`
Medias param.Field[interface{}] `json:"medias,required"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
Type param.Field[ProductNewParamsBodyType] `json:"type"`
IsHighlighted param.Field[bool] `json:"is_highlighted"`
}
Schema to create a recurring product, i.e. a subscription.
func (ProductNewParamsBody) MarshalJSON ¶
func (r ProductNewParamsBody) MarshalJSON() (data []byte, err error)
type ProductNewParamsBodyProductOneTimeCreate ¶
type ProductNewParamsBodyProductOneTimeCreate struct {
// The name of the product.
Name param.Field[string] `json:"name,required"`
// List of available prices for this product.
Prices param.Field[[]ProductNewParamsBodyProductOneTimeCreatePrice] `json:"prices,required"`
// The description of the product.
Description param.Field[string] `json:"description"`
// List of file IDs. Each one must be on the same organization as the product, of
// type `product_media` and correctly uploaded.
Medias param.Field[[]string] `json:"medias" format:"uuid4"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
Schema to create a one-time product.
func (ProductNewParamsBodyProductOneTimeCreate) MarshalJSON ¶
func (r ProductNewParamsBodyProductOneTimeCreate) MarshalJSON() (data []byte, err error)
type ProductNewParamsBodyProductOneTimeCreatePrice ¶
type ProductNewParamsBodyProductOneTimeCreatePrice struct {
// The price in cents.
PriceAmount param.Field[int64] `json:"price_amount,required"`
Type param.Field[ProductNewParamsBodyProductOneTimeCreatePricesType] `json:"type,required"`
// The currency. Currently, only `usd` is supported.
PriceCurrency param.Field[string] `json:"price_currency"`
}
Schema to create a one-time product price.
func (ProductNewParamsBodyProductOneTimeCreatePrice) MarshalJSON ¶
func (r ProductNewParamsBodyProductOneTimeCreatePrice) MarshalJSON() (data []byte, err error)
type ProductNewParamsBodyProductOneTimeCreatePricesType ¶
type ProductNewParamsBodyProductOneTimeCreatePricesType string
const (
ProductNewParamsBodyProductOneTimeCreatePricesTypeOneTime ProductNewParamsBodyProductOneTimeCreatePricesType = "one_time"
)
func (ProductNewParamsBodyProductOneTimeCreatePricesType) IsKnown ¶
func (r ProductNewParamsBodyProductOneTimeCreatePricesType) IsKnown() bool
type ProductNewParamsBodyProductRecurringCreate ¶
type ProductNewParamsBodyProductRecurringCreate struct {
// The name of the product.
Name param.Field[string] `json:"name,required"`
// List of available prices for this product.
Prices param.Field[[]ProductNewParamsBodyProductRecurringCreatePrice] `json:"prices,required"`
Type param.Field[ProductNewParamsBodyProductRecurringCreateType] `json:"type,required"`
// The description of the product.
Description param.Field[string] `json:"description"`
IsHighlighted param.Field[bool] `json:"is_highlighted"`
// List of file IDs. Each one must be on the same organization as the product, of
// type `product_media` and correctly uploaded.
Medias param.Field[[]string] `json:"medias" format:"uuid4"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
Schema to create a recurring product, i.e. a subscription.
func (ProductNewParamsBodyProductRecurringCreate) MarshalJSON ¶
func (r ProductNewParamsBodyProductRecurringCreate) MarshalJSON() (data []byte, err error)
type ProductNewParamsBodyProductRecurringCreatePrice ¶
type ProductNewParamsBodyProductRecurringCreatePrice struct {
// The price in cents.
PriceAmount param.Field[int64] `json:"price_amount,required"`
// The recurring interval of the price.
RecurringInterval param.Field[ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval] `json:"recurring_interval,required"`
Type param.Field[ProductNewParamsBodyProductRecurringCreatePricesType] `json:"type,required"`
// The currency. Currently, only `usd` is supported.
PriceCurrency param.Field[string] `json:"price_currency"`
}
Schema to create a recurring product price, i.e. a subscription.
func (ProductNewParamsBodyProductRecurringCreatePrice) MarshalJSON ¶
func (r ProductNewParamsBodyProductRecurringCreatePrice) MarshalJSON() (data []byte, err error)
type ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval ¶
type ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval string
The recurring interval of the price.
const ( ProductNewParamsBodyProductRecurringCreatePricesRecurringIntervalMonth ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval = "month" ProductNewParamsBodyProductRecurringCreatePricesRecurringIntervalYear ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval = "year" )
func (ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval) IsKnown ¶
func (r ProductNewParamsBodyProductRecurringCreatePricesRecurringInterval) IsKnown() bool
type ProductNewParamsBodyProductRecurringCreatePricesType ¶
type ProductNewParamsBodyProductRecurringCreatePricesType string
const (
ProductNewParamsBodyProductRecurringCreatePricesTypeRecurring ProductNewParamsBodyProductRecurringCreatePricesType = "recurring"
)
func (ProductNewParamsBodyProductRecurringCreatePricesType) IsKnown ¶
func (r ProductNewParamsBodyProductRecurringCreatePricesType) IsKnown() bool
type ProductNewParamsBodyProductRecurringCreateType ¶
type ProductNewParamsBodyProductRecurringCreateType string
const ( ProductNewParamsBodyProductRecurringCreateTypeIndividual ProductNewParamsBodyProductRecurringCreateType = "individual" ProductNewParamsBodyProductRecurringCreateTypeBusiness ProductNewParamsBodyProductRecurringCreateType = "business" )
func (ProductNewParamsBodyProductRecurringCreateType) IsKnown ¶
func (r ProductNewParamsBodyProductRecurringCreateType) IsKnown() bool
type ProductNewParamsBodyType ¶
type ProductNewParamsBodyType string
const ( ProductNewParamsBodyTypeIndividual ProductNewParamsBodyType = "individual" ProductNewParamsBodyTypeBusiness ProductNewParamsBodyType = "business" )
func (ProductNewParamsBodyType) IsKnown ¶
func (r ProductNewParamsBodyType) IsKnown() bool
type ProductNewParamsBodyUnion ¶
type ProductNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Schema to create a recurring product, i.e. a subscription.
Satisfied by ProductNewParamsBodyProductRecurringCreate, ProductNewParamsBodyProductOneTimeCreate, ProductNewParamsBody.
type ProductOutput ¶
type ProductOutput struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []ProductOutputBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []ProductOutputPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type ProductOutputType `json:"type,nullable"`
JSON productOutputJSON `json:"-"`
}
A product.
func (*ProductOutput) UnmarshalJSON ¶
func (r *ProductOutput) UnmarshalJSON(data []byte) (err error)
type ProductOutputBenefit ¶
type ProductOutputBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type ProductOutputBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [ProductOutputBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON productOutputBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (ProductOutputBenefit) AsUnion ¶
func (r ProductOutputBenefit) AsUnion() ProductOutputBenefitsUnion
AsUnion returns a ProductOutputBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ProductOutputBenefitsBenefitBase, ProductOutputBenefitsBenefitArticles.
func (*ProductOutputBenefit) UnmarshalJSON ¶
func (r *ProductOutputBenefit) UnmarshalJSON(data []byte) (err error)
type ProductOutputBenefitsBenefitArticles ¶
type ProductOutputBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties ProductOutputBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type ProductOutputBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON productOutputBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*ProductOutputBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *ProductOutputBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type ProductOutputBenefitsBenefitArticlesProperties ¶
type ProductOutputBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON productOutputBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*ProductOutputBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *ProductOutputBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type ProductOutputBenefitsBenefitArticlesType ¶
type ProductOutputBenefitsBenefitArticlesType string
const (
ProductOutputBenefitsBenefitArticlesTypeArticles ProductOutputBenefitsBenefitArticlesType = "articles"
)
func (ProductOutputBenefitsBenefitArticlesType) IsKnown ¶
func (r ProductOutputBenefitsBenefitArticlesType) IsKnown() bool
type ProductOutputBenefitsBenefitBase ¶
type ProductOutputBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type ProductOutputBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON productOutputBenefitsBenefitBaseJSON `json:"-"`
}
func (*ProductOutputBenefitsBenefitBase) UnmarshalJSON ¶
func (r *ProductOutputBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type ProductOutputBenefitsBenefitBaseType ¶
type ProductOutputBenefitsBenefitBaseType string
The type of the benefit.
const ( ProductOutputBenefitsBenefitBaseTypeCustom ProductOutputBenefitsBenefitBaseType = "custom" ProductOutputBenefitsBenefitBaseTypeArticles ProductOutputBenefitsBenefitBaseType = "articles" ProductOutputBenefitsBenefitBaseTypeAds ProductOutputBenefitsBenefitBaseType = "ads" ProductOutputBenefitsBenefitBaseTypeDiscord ProductOutputBenefitsBenefitBaseType = "discord" ProductOutputBenefitsBenefitBaseTypeGitHubRepository ProductOutputBenefitsBenefitBaseType = "github_repository" ProductOutputBenefitsBenefitBaseTypeDownloadables ProductOutputBenefitsBenefitBaseType = "downloadables" )
func (ProductOutputBenefitsBenefitBaseType) IsKnown ¶
func (r ProductOutputBenefitsBenefitBaseType) IsKnown() bool
type ProductOutputBenefitsType ¶
type ProductOutputBenefitsType string
The type of the benefit.
const ( ProductOutputBenefitsTypeCustom ProductOutputBenefitsType = "custom" ProductOutputBenefitsTypeArticles ProductOutputBenefitsType = "articles" ProductOutputBenefitsTypeAds ProductOutputBenefitsType = "ads" ProductOutputBenefitsTypeDiscord ProductOutputBenefitsType = "discord" ProductOutputBenefitsTypeGitHubRepository ProductOutputBenefitsType = "github_repository" ProductOutputBenefitsTypeDownloadables ProductOutputBenefitsType = "downloadables" )
func (ProductOutputBenefitsType) IsKnown ¶
func (r ProductOutputBenefitsType) IsKnown() bool
type ProductOutputBenefitsUnion ¶
type ProductOutputBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by ProductOutputBenefitsBenefitBase or ProductOutputBenefitsBenefitArticles.
type ProductOutputPrice ¶
type ProductOutputPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type ProductOutputPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval ProductOutputPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON productOutputPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (ProductOutputPrice) AsUnion ¶
func (r ProductOutputPrice) AsUnion() ProductOutputPricesUnion
AsUnion returns a ProductOutputPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ProductOutputPricesProductPriceRecurring, ProductOutputPricesProductPriceOneTime.
func (*ProductOutputPrice) UnmarshalJSON ¶
func (r *ProductOutputPrice) UnmarshalJSON(data []byte) (err error)
type ProductOutputPricesProductPriceOneTime ¶
type ProductOutputPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type ProductOutputPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON productOutputPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*ProductOutputPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *ProductOutputPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type ProductOutputPricesProductPriceOneTimeType ¶
type ProductOutputPricesProductPriceOneTimeType string
The type of the price.
const (
ProductOutputPricesProductPriceOneTimeTypeOneTime ProductOutputPricesProductPriceOneTimeType = "one_time"
)
func (ProductOutputPricesProductPriceOneTimeType) IsKnown ¶
func (r ProductOutputPricesProductPriceOneTimeType) IsKnown() bool
type ProductOutputPricesProductPriceRecurring ¶
type ProductOutputPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type ProductOutputPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval ProductOutputPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON productOutputPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*ProductOutputPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *ProductOutputPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type ProductOutputPricesProductPriceRecurringRecurringInterval ¶
type ProductOutputPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( ProductOutputPricesProductPriceRecurringRecurringIntervalMonth ProductOutputPricesProductPriceRecurringRecurringInterval = "month" ProductOutputPricesProductPriceRecurringRecurringIntervalYear ProductOutputPricesProductPriceRecurringRecurringInterval = "year" )
func (ProductOutputPricesProductPriceRecurringRecurringInterval) IsKnown ¶
func (r ProductOutputPricesProductPriceRecurringRecurringInterval) IsKnown() bool
type ProductOutputPricesProductPriceRecurringType ¶
type ProductOutputPricesProductPriceRecurringType string
The type of the price.
const (
ProductOutputPricesProductPriceRecurringTypeRecurring ProductOutputPricesProductPriceRecurringType = "recurring"
)
func (ProductOutputPricesProductPriceRecurringType) IsKnown ¶
func (r ProductOutputPricesProductPriceRecurringType) IsKnown() bool
type ProductOutputPricesRecurringInterval ¶
type ProductOutputPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( ProductOutputPricesRecurringIntervalMonth ProductOutputPricesRecurringInterval = "month" ProductOutputPricesRecurringIntervalYear ProductOutputPricesRecurringInterval = "year" )
func (ProductOutputPricesRecurringInterval) IsKnown ¶
func (r ProductOutputPricesRecurringInterval) IsKnown() bool
type ProductOutputPricesType ¶
type ProductOutputPricesType string
The type of the price.
const ( ProductOutputPricesTypeRecurring ProductOutputPricesType = "recurring" ProductOutputPricesTypeOneTime ProductOutputPricesType = "one_time" )
func (ProductOutputPricesType) IsKnown ¶
func (r ProductOutputPricesType) IsKnown() bool
type ProductOutputPricesUnion ¶
type ProductOutputPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by ProductOutputPricesProductPriceRecurring or ProductOutputPricesProductPriceOneTime.
type ProductOutputType ¶
type ProductOutputType string
const ( ProductOutputTypeFree ProductOutputType = "free" ProductOutputTypeIndividual ProductOutputType = "individual" ProductOutputTypeBusiness ProductOutputType = "business" )
func (ProductOutputType) IsKnown ¶
func (r ProductOutputType) IsKnown() bool
type ProductService ¶
type ProductService struct {
Options []option.RequestOption
Benefits *ProductBenefitService
}
ProductService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductService method instead.
func NewProductService ¶
func NewProductService(opts ...option.RequestOption) (r *ProductService)
NewProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProductService) Get ¶
func (r *ProductService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductOutput, err error)
Get a product by ID.
func (*ProductService) List ¶
func (r *ProductService) List(ctx context.Context, query ProductListParams, opts ...option.RequestOption) (res *ListResourceProduct, err error)
List products.
func (*ProductService) New ¶
func (r *ProductService) New(ctx context.Context, body ProductNewParams, opts ...option.RequestOption) (res *ProductOutput, err error)
Create a product.
func (*ProductService) Update ¶
func (r *ProductService) Update(ctx context.Context, id string, body ProductUpdateParams, opts ...option.RequestOption) (res *ProductOutput, err error)
Update a product.
type ProductUpdateParams ¶
type ProductUpdateParams struct {
// The description of the product.
Description param.Field[string] `json:"description"`
// Whether the product is archived. If `true`, the product won't be available for
// purchase anymore. Existing customers will still have access to their benefits,
// and subscriptions will continue normally.
IsArchived param.Field[bool] `json:"is_archived"`
IsHighlighted param.Field[bool] `json:"is_highlighted"`
// List of file IDs. Each one must be on the same organization as the product, of
// type `product_media` and correctly uploaded.
Medias param.Field[[]string] `json:"medias" format:"uuid4"`
// The name of the product.
Name param.Field[string] `json:"name"`
// List of available prices for this product. If you want to keep existing prices,
// include them in the list as an `ExistingProductPrice` object.
Prices param.Field[[]ProductUpdateParamsPriceUnion] `json:"prices"`
}
func (ProductUpdateParams) MarshalJSON ¶
func (r ProductUpdateParams) MarshalJSON() (data []byte, err error)
type ProductUpdateParamsPrice ¶
type ProductUpdateParamsPrice struct {
ID param.Field[string] `json:"id" format:"uuid4"`
Type param.Field[ProductUpdateParamsPricesType] `json:"type"`
// The recurring interval of the price.
RecurringInterval param.Field[ProductUpdateParamsPricesRecurringInterval] `json:"recurring_interval"`
// The price in cents.
PriceAmount param.Field[int64] `json:"price_amount"`
// The currency. Currently, only `usd` is supported.
PriceCurrency param.Field[string] `json:"price_currency"`
}
A price that already exists for this product.
Useful when updating a product if you want to keep an existing price.
func (ProductUpdateParamsPrice) MarshalJSON ¶
func (r ProductUpdateParamsPrice) MarshalJSON() (data []byte, err error)
type ProductUpdateParamsPriceUnion ¶
type ProductUpdateParamsPriceUnion interface {
// contains filtered or unexported methods
}
A price that already exists for this product.
Useful when updating a product if you want to keep an existing price.
Satisfied by ProductUpdateParamsPricesExistingProductPrice, ProductUpdateParamsPricesProductPriceRecurringCreate, ProductUpdateParamsPricesProductPriceOneTimeCreate, ProductUpdateParamsPrice.
type ProductUpdateParamsPricesExistingProductPrice ¶
type ProductUpdateParamsPricesExistingProductPrice struct {
ID param.Field[string] `json:"id,required" format:"uuid4"`
}
A price that already exists for this product.
Useful when updating a product if you want to keep an existing price.
func (ProductUpdateParamsPricesExistingProductPrice) MarshalJSON ¶
func (r ProductUpdateParamsPricesExistingProductPrice) MarshalJSON() (data []byte, err error)
type ProductUpdateParamsPricesProductPriceOneTimeCreate ¶
type ProductUpdateParamsPricesProductPriceOneTimeCreate struct {
// The price in cents.
PriceAmount param.Field[int64] `json:"price_amount,required"`
Type param.Field[ProductUpdateParamsPricesProductPriceOneTimeCreateType] `json:"type,required"`
// The currency. Currently, only `usd` is supported.
PriceCurrency param.Field[string] `json:"price_currency"`
}
Schema to create a one-time product price.
func (ProductUpdateParamsPricesProductPriceOneTimeCreate) MarshalJSON ¶
func (r ProductUpdateParamsPricesProductPriceOneTimeCreate) MarshalJSON() (data []byte, err error)
type ProductUpdateParamsPricesProductPriceOneTimeCreateType ¶
type ProductUpdateParamsPricesProductPriceOneTimeCreateType string
const (
ProductUpdateParamsPricesProductPriceOneTimeCreateTypeOneTime ProductUpdateParamsPricesProductPriceOneTimeCreateType = "one_time"
)
func (ProductUpdateParamsPricesProductPriceOneTimeCreateType) IsKnown ¶
func (r ProductUpdateParamsPricesProductPriceOneTimeCreateType) IsKnown() bool
type ProductUpdateParamsPricesProductPriceRecurringCreate ¶
type ProductUpdateParamsPricesProductPriceRecurringCreate struct {
// The price in cents.
PriceAmount param.Field[int64] `json:"price_amount,required"`
// The recurring interval of the price.
RecurringInterval param.Field[ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval] `json:"recurring_interval,required"`
Type param.Field[ProductUpdateParamsPricesProductPriceRecurringCreateType] `json:"type,required"`
// The currency. Currently, only `usd` is supported.
PriceCurrency param.Field[string] `json:"price_currency"`
}
Schema to create a recurring product price, i.e. a subscription.
func (ProductUpdateParamsPricesProductPriceRecurringCreate) MarshalJSON ¶
func (r ProductUpdateParamsPricesProductPriceRecurringCreate) MarshalJSON() (data []byte, err error)
type ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval ¶
type ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval string
The recurring interval of the price.
const ( ProductUpdateParamsPricesProductPriceRecurringCreateRecurringIntervalMonth ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval = "month" ProductUpdateParamsPricesProductPriceRecurringCreateRecurringIntervalYear ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval = "year" )
func (ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval) IsKnown ¶
func (r ProductUpdateParamsPricesProductPriceRecurringCreateRecurringInterval) IsKnown() bool
type ProductUpdateParamsPricesProductPriceRecurringCreateType ¶
type ProductUpdateParamsPricesProductPriceRecurringCreateType string
const (
ProductUpdateParamsPricesProductPriceRecurringCreateTypeRecurring ProductUpdateParamsPricesProductPriceRecurringCreateType = "recurring"
)
func (ProductUpdateParamsPricesProductPriceRecurringCreateType) IsKnown ¶
func (r ProductUpdateParamsPricesProductPriceRecurringCreateType) IsKnown() bool
type ProductUpdateParamsPricesRecurringInterval ¶
type ProductUpdateParamsPricesRecurringInterval string
The recurring interval of the price.
const ( ProductUpdateParamsPricesRecurringIntervalMonth ProductUpdateParamsPricesRecurringInterval = "month" ProductUpdateParamsPricesRecurringIntervalYear ProductUpdateParamsPricesRecurringInterval = "year" )
func (ProductUpdateParamsPricesRecurringInterval) IsKnown ¶
func (r ProductUpdateParamsPricesRecurringInterval) IsKnown() bool
type ProductUpdateParamsPricesType ¶
type ProductUpdateParamsPricesType string
const ( ProductUpdateParamsPricesTypeRecurring ProductUpdateParamsPricesType = "recurring" ProductUpdateParamsPricesTypeOneTime ProductUpdateParamsPricesType = "one_time" )
func (ProductUpdateParamsPricesType) IsKnown ¶
func (r ProductUpdateParamsPricesType) IsKnown() bool
type PullRequestSearchParams ¶
type PullRequestSearchParams struct {
// Search pull requests that are mentioning this issue
ReferencesIssueID param.Field[string] `query:"references_issue_id" format:"uuid"`
}
func (PullRequestSearchParams) URLQuery ¶
func (r PullRequestSearchParams) URLQuery() (v url.Values)
URLQuery serializes PullRequestSearchParams's query parameters as `url.Values`.
type PullRequestSearchResponse ¶
type PullRequestSearchResponse struct {
Pagination PullRequestSearchResponsePagination `json:"pagination,required"`
Items []PullRequestSearchResponseItem `json:"items"`
JSON pullRequestSearchResponseJSON `json:"-"`
}
func (*PullRequestSearchResponse) UnmarshalJSON ¶
func (r *PullRequestSearchResponse) UnmarshalJSON(data []byte) (err error)
type PullRequestSearchResponseItem ¶
type PullRequestSearchResponseItem struct {
ID string `json:"id,required" format:"uuid"`
Additions int64 `json:"additions,required"`
Deletions int64 `json:"deletions,required"`
IsClosed bool `json:"is_closed,required"`
IsMerged bool `json:"is_merged,required"`
Number int64 `json:"number,required"`
Title string `json:"title,required"`
Author PullRequestSearchResponseItemsAuthor `json:"author,nullable"`
JSON pullRequestSearchResponseItemJSON `json:"-"`
}
func (*PullRequestSearchResponseItem) UnmarshalJSON ¶
func (r *PullRequestSearchResponseItem) UnmarshalJSON(data []byte) (err error)
type PullRequestSearchResponseItemsAuthor ¶
type PullRequestSearchResponseItemsAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON pullRequestSearchResponseItemsAuthorJSON `json:"-"`
}
func (*PullRequestSearchResponseItemsAuthor) UnmarshalJSON ¶
func (r *PullRequestSearchResponseItemsAuthor) UnmarshalJSON(data []byte) (err error)
type PullRequestSearchResponsePagination ¶
type PullRequestSearchResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON pullRequestSearchResponsePaginationJSON `json:"-"`
}
func (*PullRequestSearchResponsePagination) UnmarshalJSON ¶
func (r *PullRequestSearchResponsePagination) UnmarshalJSON(data []byte) (err error)
type PullRequestService ¶
type PullRequestService struct {
Options []option.RequestOption
}
PullRequestService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPullRequestService method instead.
func NewPullRequestService ¶
func NewPullRequestService(opts ...option.RequestOption) (r *PullRequestService)
NewPullRequestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PullRequestService) Search ¶
func (r *PullRequestService) Search(ctx context.Context, query PullRequestSearchParams, opts ...option.RequestOption) (res *PullRequestSearchResponse, err error)
Search pull requests.
type RepositoryGetResponse ¶
type RepositoryGetResponse struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization RepositoryGetResponseOrganization `json:"organization,required"`
Platform RepositoryGetResponsePlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings RepositoryGetResponseProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON repositoryGetResponseJSON `json:"-"`
}
func (*RepositoryGetResponse) UnmarshalJSON ¶
func (r *RepositoryGetResponse) UnmarshalJSON(data []byte) (err error)
type RepositoryGetResponseOrganization ¶
type RepositoryGetResponseOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform RepositoryGetResponseOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON repositoryGetResponseOrganizationJSON `json:"-"`
}
func (*RepositoryGetResponseOrganization) UnmarshalJSON ¶
func (r *RepositoryGetResponseOrganization) UnmarshalJSON(data []byte) (err error)
type RepositoryGetResponseOrganizationPlatform ¶
type RepositoryGetResponseOrganizationPlatform string
const (
RepositoryGetResponseOrganizationPlatformGitHub RepositoryGetResponseOrganizationPlatform = "github"
)
func (RepositoryGetResponseOrganizationPlatform) IsKnown ¶
func (r RepositoryGetResponseOrganizationPlatform) IsKnown() bool
type RepositoryGetResponsePlatform ¶
type RepositoryGetResponsePlatform string
const (
RepositoryGetResponsePlatformGitHub RepositoryGetResponsePlatform = "github"
)
func (RepositoryGetResponsePlatform) IsKnown ¶
func (r RepositoryGetResponsePlatform) IsKnown() bool
type RepositoryGetResponseProfileSettings ¶
type RepositoryGetResponseProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON repositoryGetResponseProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*RepositoryGetResponseProfileSettings) UnmarshalJSON ¶
func (r *RepositoryGetResponseProfileSettings) UnmarshalJSON(data []byte) (err error)
type RepositoryListParams ¶
type RepositoryListParams struct {
// Filter by external organization name.
ExternalOrganizationName param.Field[RepositoryListParamsExternalOrganizationNameUnion] `query:"external_organization_name"`
// Filter by private status.
IsPrivate param.Field[bool] `query:"is_private"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by name.
Name param.Field[RepositoryListParamsNameUnion] `query:"name"`
// Filter by organization ID.
OrganizationID param.Field[RepositoryListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by platform.
Platform param.Field[RepositoryListParamsPlatformUnion] `query:"platform"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (RepositoryListParams) URLQuery ¶
func (r RepositoryListParams) URLQuery() (v url.Values)
URLQuery serializes RepositoryListParams's query parameters as `url.Values`.
type RepositoryListParamsExternalOrganizationNameArray ¶
type RepositoryListParamsExternalOrganizationNameArray []string
func (RepositoryListParamsExternalOrganizationNameArray) ImplementsRepositoryListParamsExternalOrganizationNameUnion ¶
func (r RepositoryListParamsExternalOrganizationNameArray) ImplementsRepositoryListParamsExternalOrganizationNameUnion()
type RepositoryListParamsExternalOrganizationNameUnion ¶
type RepositoryListParamsExternalOrganizationNameUnion interface {
ImplementsRepositoryListParamsExternalOrganizationNameUnion()
}
Filter by external organization name.
Satisfied by [shared.UnionString], RepositoryListParamsExternalOrganizationNameArray.
type RepositoryListParamsNameArray ¶
type RepositoryListParamsNameArray []string
func (RepositoryListParamsNameArray) ImplementsRepositoryListParamsNameUnion ¶
func (r RepositoryListParamsNameArray) ImplementsRepositoryListParamsNameUnion()
type RepositoryListParamsNameUnion ¶
type RepositoryListParamsNameUnion interface {
ImplementsRepositoryListParamsNameUnion()
}
Filter by name.
Satisfied by [shared.UnionString], RepositoryListParamsNameArray.
type RepositoryListParamsOrganizationIDArray ¶
type RepositoryListParamsOrganizationIDArray []string
func (RepositoryListParamsOrganizationIDArray) ImplementsRepositoryListParamsOrganizationIDUnion ¶
func (r RepositoryListParamsOrganizationIDArray) ImplementsRepositoryListParamsOrganizationIDUnion()
type RepositoryListParamsOrganizationIDUnion ¶
type RepositoryListParamsOrganizationIDUnion interface {
ImplementsRepositoryListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], RepositoryListParamsOrganizationIDArray.
type RepositoryListParamsPlatformArray ¶
type RepositoryListParamsPlatformArray []RepositoryListParamsPlatformArray
type RepositoryListParamsPlatformPlatforms ¶
type RepositoryListParamsPlatformPlatforms string
const (
RepositoryListParamsPlatformPlatformsGitHub RepositoryListParamsPlatformPlatforms = "github"
)
func (RepositoryListParamsPlatformPlatforms) IsKnown ¶
func (r RepositoryListParamsPlatformPlatforms) IsKnown() bool
type RepositoryListParamsPlatformUnion ¶
type RepositoryListParamsPlatformUnion interface {
// contains filtered or unexported methods
}
Filter by platform.
Satisfied by RepositoryListParamsPlatformPlatforms, RepositoryListParamsPlatformArray.
type RepositoryListResponse ¶
type RepositoryListResponse struct {
Pagination RepositoryListResponsePagination `json:"pagination,required"`
Items []RepositoryListResponseItem `json:"items"`
JSON repositoryListResponseJSON `json:"-"`
}
func (*RepositoryListResponse) UnmarshalJSON ¶
func (r *RepositoryListResponse) UnmarshalJSON(data []byte) (err error)
type RepositoryListResponseItem ¶
type RepositoryListResponseItem struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization RepositoryListResponseItemsOrganization `json:"organization,required"`
Platform RepositoryListResponseItemsPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings RepositoryListResponseItemsProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON repositoryListResponseItemJSON `json:"-"`
}
func (*RepositoryListResponseItem) UnmarshalJSON ¶
func (r *RepositoryListResponseItem) UnmarshalJSON(data []byte) (err error)
type RepositoryListResponseItemsOrganization ¶
type RepositoryListResponseItemsOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform RepositoryListResponseItemsOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON repositoryListResponseItemsOrganizationJSON `json:"-"`
}
func (*RepositoryListResponseItemsOrganization) UnmarshalJSON ¶
func (r *RepositoryListResponseItemsOrganization) UnmarshalJSON(data []byte) (err error)
type RepositoryListResponseItemsOrganizationPlatform ¶
type RepositoryListResponseItemsOrganizationPlatform string
const (
RepositoryListResponseItemsOrganizationPlatformGitHub RepositoryListResponseItemsOrganizationPlatform = "github"
)
func (RepositoryListResponseItemsOrganizationPlatform) IsKnown ¶
func (r RepositoryListResponseItemsOrganizationPlatform) IsKnown() bool
type RepositoryListResponseItemsPlatform ¶
type RepositoryListResponseItemsPlatform string
const (
RepositoryListResponseItemsPlatformGitHub RepositoryListResponseItemsPlatform = "github"
)
func (RepositoryListResponseItemsPlatform) IsKnown ¶
func (r RepositoryListResponseItemsPlatform) IsKnown() bool
type RepositoryListResponseItemsProfileSettings ¶
type RepositoryListResponseItemsProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON repositoryListResponseItemsProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*RepositoryListResponseItemsProfileSettings) UnmarshalJSON ¶
func (r *RepositoryListResponseItemsProfileSettings) UnmarshalJSON(data []byte) (err error)
type RepositoryListResponsePagination ¶
type RepositoryListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON repositoryListResponsePaginationJSON `json:"-"`
}
func (*RepositoryListResponsePagination) UnmarshalJSON ¶
func (r *RepositoryListResponsePagination) UnmarshalJSON(data []byte) (err error)
type RepositoryService ¶
type RepositoryService struct {
Options []option.RequestOption
}
RepositoryService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRepositoryService method instead.
func NewRepositoryService ¶
func NewRepositoryService(opts ...option.RequestOption) (r *RepositoryService)
NewRepositoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RepositoryService) Get ¶
func (r *RepositoryService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *RepositoryGetResponse, err error)
Get a repository by ID.
func (*RepositoryService) List ¶
func (r *RepositoryService) List(ctx context.Context, query RepositoryListParams, opts ...option.RequestOption) (res *RepositoryListResponse, err error)
List repositories.
func (*RepositoryService) Update ¶
func (r *RepositoryService) Update(ctx context.Context, id string, body RepositoryUpdateParams, opts ...option.RequestOption) (res *RepositoryUpdateResponse, err error)
Update a repository.
type RepositoryUpdateParams ¶
type RepositoryUpdateParams struct {
ProfileSettings param.Field[RepositoryUpdateParamsProfileSettings] `json:"profile_settings"`
}
func (RepositoryUpdateParams) MarshalJSON ¶
func (r RepositoryUpdateParams) MarshalJSON() (data []byte, err error)
type RepositoryUpdateParamsProfileSettings ¶
type RepositoryUpdateParamsProfileSettings struct {
CoverImageURL param.Field[string] `json:"cover_image_url"`
Description param.Field[string] `json:"description"`
FeaturedOrganizations param.Field[[]string] `json:"featured_organizations" format:"uuid4"`
HighlightedSubscriptionTiers param.Field[[]string] `json:"highlighted_subscription_tiers" format:"uuid4"`
Links param.Field[[]string] `json:"links" format:"uri"`
SetCoverImageURL param.Field[bool] `json:"set_cover_image_url"`
SetDescription param.Field[bool] `json:"set_description"`
}
func (RepositoryUpdateParamsProfileSettings) MarshalJSON ¶
func (r RepositoryUpdateParamsProfileSettings) MarshalJSON() (data []byte, err error)
type RepositoryUpdateResponse ¶
type RepositoryUpdateResponse struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization RepositoryUpdateResponseOrganization `json:"organization,required"`
Platform RepositoryUpdateResponsePlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings RepositoryUpdateResponseProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON repositoryUpdateResponseJSON `json:"-"`
}
func (*RepositoryUpdateResponse) UnmarshalJSON ¶
func (r *RepositoryUpdateResponse) UnmarshalJSON(data []byte) (err error)
type RepositoryUpdateResponseOrganization ¶
type RepositoryUpdateResponseOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform RepositoryUpdateResponseOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON repositoryUpdateResponseOrganizationJSON `json:"-"`
}
func (*RepositoryUpdateResponseOrganization) UnmarshalJSON ¶
func (r *RepositoryUpdateResponseOrganization) UnmarshalJSON(data []byte) (err error)
type RepositoryUpdateResponseOrganizationPlatform ¶
type RepositoryUpdateResponseOrganizationPlatform string
const (
RepositoryUpdateResponseOrganizationPlatformGitHub RepositoryUpdateResponseOrganizationPlatform = "github"
)
func (RepositoryUpdateResponseOrganizationPlatform) IsKnown ¶
func (r RepositoryUpdateResponseOrganizationPlatform) IsKnown() bool
type RepositoryUpdateResponsePlatform ¶
type RepositoryUpdateResponsePlatform string
const (
RepositoryUpdateResponsePlatformGitHub RepositoryUpdateResponsePlatform = "github"
)
func (RepositoryUpdateResponsePlatform) IsKnown ¶
func (r RepositoryUpdateResponsePlatform) IsKnown() bool
type RepositoryUpdateResponseProfileSettings ¶
type RepositoryUpdateResponseProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON repositoryUpdateResponseProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*RepositoryUpdateResponseProfileSettings) UnmarshalJSON ¶
func (r *RepositoryUpdateResponseProfileSettings) UnmarshalJSON(data []byte) (err error)
type RevokeTokenResponse ¶
type RevokeTokenResponse = interface{}
type RewardSearchParams ¶
type RewardSearchParams struct {
// Search rewards for pledges in this organization.
PledgesToOrganization param.Field[string] `query:"pledges_to_organization" format:"uuid"`
// Search rewards to organization.
RewardsToOrg param.Field[string] `query:"rewards_to_org" format:"uuid"`
// Search rewards to user.
RewardsToUser param.Field[string] `query:"rewards_to_user" format:"uuid"`
}
func (RewardSearchParams) URLQuery ¶
func (r RewardSearchParams) URLQuery() (v url.Values)
URLQuery serializes RewardSearchParams's query parameters as `url.Values`.
type RewardSearchResponse ¶
type RewardSearchResponse struct {
Pagination RewardSearchResponsePagination `json:"pagination,required"`
Items []RewardSearchResponseItem `json:"items"`
JSON rewardSearchResponseJSON `json:"-"`
}
func (*RewardSearchResponse) UnmarshalJSON ¶
func (r *RewardSearchResponse) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItem ¶
type RewardSearchResponseItem struct {
Amount RewardSearchResponseItemsAmount `json:"amount,required"`
// The pledge that the reward was split from
Pledge RewardSearchResponseItemsPledge `json:"pledge,required"`
State RewardSearchResponseItemsState `json:"state,required"`
// The organization that received the reward (if any)
Organization RewardSearchResponseItemsOrganization `json:"organization,nullable"`
// If and when the reward was paid out.
PaidAt time.Time `json:"paid_at,nullable" format:"date-time"`
// The user that received the reward (if any)
User RewardSearchResponseItemsUser `json:"user,nullable"`
JSON rewardSearchResponseItemJSON `json:"-"`
}
func (*RewardSearchResponseItem) UnmarshalJSON ¶
func (r *RewardSearchResponseItem) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsAmount ¶
type RewardSearchResponseItemsAmount struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON rewardSearchResponseItemsAmountJSON `json:"-"`
}
func (*RewardSearchResponseItemsAmount) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsAmount) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsOrganization ¶
type RewardSearchResponseItemsOrganization struct {
// The organization ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// If this organizations accepts donations
DonationsEnabled bool `json:"donations_enabled,required"`
// Settings for the organization features
FeatureSettings RewardSearchResponseItemsOrganizationFeatureSettings `json:"feature_settings,required,nullable"`
Name string `json:"name,required"`
PledgeBadgeShowAmount bool `json:"pledge_badge_show_amount,required"`
PledgeMinimumAmount int64 `json:"pledge_minimum_amount,required"`
// Settings for the organization profile
ProfileSettings RewardSearchResponseItemsOrganizationProfileSettings `json:"profile_settings,required,nullable"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
DefaultUpfrontSplitToContributors int64 `json:"default_upfront_split_to_contributors,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON rewardSearchResponseItemsOrganizationJSON `json:"-"`
}
The organization that received the reward (if any)
func (*RewardSearchResponseItemsOrganization) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsOrganization) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsOrganizationFeatureSettings ¶
type RewardSearchResponseItemsOrganizationFeatureSettings struct {
// If this organization has articles enabled
ArticlesEnabled bool `json:"articles_enabled"`
// If this organization has issue funding enabled
IssueFundingEnabled bool `json:"issue_funding_enabled"`
// If this organization has subscriptions enabled
SubscriptionsEnabled bool `json:"subscriptions_enabled"`
JSON rewardSearchResponseItemsOrganizationFeatureSettingsJSON `json:"-"`
}
Settings for the organization features
func (*RewardSearchResponseItemsOrganizationFeatureSettings) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsOrganizationFeatureSettings) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsOrganizationProfileSettings ¶
type RewardSearchResponseItemsOrganizationProfileSettings struct {
// A description of the organization
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of featured projects
FeaturedProjects []string `json:"featured_projects,nullable" format:"uuid4"`
// A list of links associated with the organization
Links []string `json:"links,nullable" format:"uri"`
// Subscription promotion settings
Subscribe RewardSearchResponseItemsOrganizationProfileSettingsSubscribe `json:"subscribe,nullable"`
JSON rewardSearchResponseItemsOrganizationProfileSettingsJSON `json:"-"`
}
Settings for the organization profile
func (*RewardSearchResponseItemsOrganizationProfileSettings) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsOrganizationProfileSettings) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsOrganizationProfileSettingsSubscribe ¶
type RewardSearchResponseItemsOrganizationProfileSettingsSubscribe struct {
// Include free subscribers in total count
CountFree bool `json:"count_free"`
// Promote email subscription (free)
Promote bool `json:"promote"`
// Show subscription count publicly
ShowCount bool `json:"show_count"`
JSON rewardSearchResponseItemsOrganizationProfileSettingsSubscribeJSON `json:"-"`
}
Subscription promotion settings
func (*RewardSearchResponseItemsOrganizationProfileSettingsSubscribe) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsOrganizationProfileSettingsSubscribe) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledge ¶
type RewardSearchResponseItemsPledge struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
// Amount pledged towards the issue
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
// The issue that the pledge was made towards
Issue RewardSearchResponseItemsPledgeIssue `json:"issue,required"`
// Current state of the pledge
State RewardSearchResponseItemsPledgeState `json:"state,required"`
// Type of pledge
Type RewardSearchResponseItemsPledgeType `json:"type,required"`
// If the currently authenticated subject can perform admin actions on behalf of
// the receiver of the peldge
AuthedCanAdminReceived bool `json:"authed_can_admin_received"`
// If the currently authenticated subject can perform admin actions on behalf of
// the maker of the peldge
AuthedCanAdminSender bool `json:"authed_can_admin_sender"`
// For pledges made by an organization, or on behalf of an organization. This is
// the user that made the pledge. Only visible for members of said organization.
CreatedBy RewardSearchResponseItemsPledgeCreatedBy `json:"created_by,nullable"`
// URL of invoice for this pledge
HostedInvoiceURL string `json:"hosted_invoice_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The user or organization that made this pledge
Pledger RewardSearchResponseItemsPledgePledger `json:"pledger,nullable"`
// If and when the pledge was refunded to the pledger
RefundedAt time.Time `json:"refunded_at,nullable" format:"date-time"`
// When the payout is scheduled to be made to the maintainers behind the issue.
// Disputes must be made before this date.
ScheduledPayoutAt time.Time `json:"scheduled_payout_at,nullable" format:"date-time"`
JSON rewardSearchResponseItemsPledgeJSON `json:"-"`
}
The pledge that the reward was split from
func (*RewardSearchResponseItemsPledge) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledge) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeCreatedBy ¶
type RewardSearchResponseItemsPledgeCreatedBy struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON rewardSearchResponseItemsPledgeCreatedByJSON `json:"-"`
}
For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization.
func (*RewardSearchResponseItemsPledgeCreatedBy) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeCreatedBy) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssue ¶
type RewardSearchResponseItemsPledgeIssue struct {
ID string `json:"id,required" format:"uuid"`
Funding RewardSearchResponseItemsPledgeIssueFunding `json:"funding,required"`
IssueCreatedAt time.Time `json:"issue_created_at,required" format:"date-time"`
// If a maintainer needs to mark this issue as solved
NeedsConfirmationSolved bool `json:"needs_confirmation_solved,required"`
// GitHub #number
Number int64 `json:"number,required"`
// Issue platform (currently always GitHub)
Platform RewardSearchResponseItemsPledgeIssuePlatform `json:"platform,required"`
// If this issue currently has the Polar badge SVG embedded
PledgeBadgeCurrentlyEmbedded bool `json:"pledge_badge_currently_embedded,required"`
// The repository that the issue is in
Repository RewardSearchResponseItemsPledgeIssueRepository `json:"repository,required"`
State RewardSearchResponseItemsPledgeIssueState `json:"state,required"`
// GitHub issue title
Title string `json:"title,required"`
// GitHub assignees
Assignees []RewardSearchResponseItemsPledgeIssueAssignee `json:"assignees,nullable"`
// GitHub author
Author RewardSearchResponseItemsPledgeIssueAuthor `json:"author,nullable"`
// Optional custom badge SVG promotional content
BadgeCustomContent string `json:"badge_custom_content,nullable"`
// GitHub issue body
Body string `json:"body,nullable"`
// Number of GitHub comments made on the issue
Comments int64 `json:"comments,nullable"`
// If this issue has been marked as confirmed solved through Polar
ConfirmedSolvedAt time.Time `json:"confirmed_solved_at,nullable" format:"date-time"`
IssueClosedAt time.Time `json:"issue_closed_at,nullable" format:"date-time"`
IssueModifiedAt time.Time `json:"issue_modified_at,nullable" format:"date-time"`
Labels []RewardSearchResponseItemsPledgeIssueLabel `json:"labels"`
// GitHub reactions
Reactions RewardSearchResponseItemsPledgeIssueReactions `json:"reactions,nullable"`
// Share of rewrads that will be rewarded to contributors of this issue. A number
// between 0 and 100 (inclusive).
UpfrontSplitToContributors int64 `json:"upfront_split_to_contributors,nullable"`
JSON rewardSearchResponseItemsPledgeIssueJSON `json:"-"`
}
The issue that the pledge was made towards
func (*RewardSearchResponseItemsPledgeIssue) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssue) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueAssignee ¶
type RewardSearchResponseItemsPledgeIssueAssignee struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON rewardSearchResponseItemsPledgeIssueAssigneeJSON `json:"-"`
}
func (*RewardSearchResponseItemsPledgeIssueAssignee) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueAssignee) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueAuthor ¶
type RewardSearchResponseItemsPledgeIssueAuthor struct {
ID int64 `json:"id,required"`
AvatarURL string `json:"avatar_url,required" format:"uri"`
HTMLURL string `json:"html_url,required" format:"uri"`
Login string `json:"login,required"`
JSON rewardSearchResponseItemsPledgeIssueAuthorJSON `json:"-"`
}
GitHub author
func (*RewardSearchResponseItemsPledgeIssueAuthor) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueAuthor) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueFunding ¶
type RewardSearchResponseItemsPledgeIssueFunding struct {
FundingGoal RewardSearchResponseItemsPledgeIssueFundingFundingGoal `json:"funding_goal,nullable"`
// Sum of pledges to this isuse (including currently open pledges and pledges that
// have been paid out). Always in USD.
PledgesSum RewardSearchResponseItemsPledgeIssueFundingPledgesSum `json:"pledges_sum,nullable"`
JSON rewardSearchResponseItemsPledgeIssueFundingJSON `json:"-"`
}
func (*RewardSearchResponseItemsPledgeIssueFunding) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueFunding) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueFundingFundingGoal ¶
type RewardSearchResponseItemsPledgeIssueFundingFundingGoal struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON rewardSearchResponseItemsPledgeIssueFundingFundingGoalJSON `json:"-"`
}
func (*RewardSearchResponseItemsPledgeIssueFundingFundingGoal) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueFundingFundingGoal) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueFundingPledgesSum ¶
type RewardSearchResponseItemsPledgeIssueFundingPledgesSum struct {
// Amount in the currencies smallest unit (cents if currency is USD)
Amount int64 `json:"amount,required"`
// Three letter currency code (eg: USD)
Currency string `json:"currency,required"`
JSON rewardSearchResponseItemsPledgeIssueFundingPledgesSumJSON `json:"-"`
}
Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD.
func (*RewardSearchResponseItemsPledgeIssueFundingPledgesSum) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueFundingPledgesSum) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueLabel ¶
type RewardSearchResponseItemsPledgeIssueLabel struct {
Color string `json:"color,required"`
Name string `json:"name,required"`
JSON rewardSearchResponseItemsPledgeIssueLabelJSON `json:"-"`
}
func (*RewardSearchResponseItemsPledgeIssueLabel) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueLabel) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssuePlatform ¶
type RewardSearchResponseItemsPledgeIssuePlatform string
Issue platform (currently always GitHub)
const (
RewardSearchResponseItemsPledgeIssuePlatformGitHub RewardSearchResponseItemsPledgeIssuePlatform = "github"
)
func (RewardSearchResponseItemsPledgeIssuePlatform) IsKnown ¶
func (r RewardSearchResponseItemsPledgeIssuePlatform) IsKnown() bool
type RewardSearchResponseItemsPledgeIssueReactions ¶
type RewardSearchResponseItemsPledgeIssueReactions struct {
Confused int64 `json:"confused,required"`
Eyes int64 `json:"eyes,required"`
Heart int64 `json:"heart,required"`
Hooray int64 `json:"hooray,required"`
Laugh int64 `json:"laugh,required"`
MinusOne int64 `json:"minus_one,required"`
PlusOne int64 `json:"plus_one,required"`
Rocket int64 `json:"rocket,required"`
TotalCount int64 `json:"total_count,required"`
JSON rewardSearchResponseItemsPledgeIssueReactionsJSON `json:"-"`
}
GitHub reactions
func (*RewardSearchResponseItemsPledgeIssueReactions) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueReactions) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueRepository ¶
type RewardSearchResponseItemsPledgeIssueRepository struct {
ID string `json:"id,required" format:"uuid"`
IsPrivate bool `json:"is_private,required"`
Name string `json:"name,required"`
Organization RewardSearchResponseItemsPledgeIssueRepositoryOrganization `json:"organization,required"`
Platform RewardSearchResponseItemsPledgeIssueRepositoryPlatform `json:"platform,required"`
// Settings for the repository profile
ProfileSettings RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings `json:"profile_settings,required,nullable"`
Description string `json:"description,nullable"`
Homepage string `json:"homepage,nullable"`
License string `json:"license,nullable"`
Stars int64 `json:"stars,nullable"`
JSON rewardSearchResponseItemsPledgeIssueRepositoryJSON `json:"-"`
}
The repository that the issue is in
func (*RewardSearchResponseItemsPledgeIssueRepository) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueRepository) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueRepositoryOrganization ¶
type RewardSearchResponseItemsPledgeIssueRepositoryOrganization struct {
ID string `json:"id,required" format:"uuid"`
AvatarURL string `json:"avatar_url,required"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform `json:"platform,required"`
Bio string `json:"bio,nullable"`
Blog string `json:"blog,nullable"`
Company string `json:"company,nullable"`
Email string `json:"email,nullable"`
Location string `json:"location,nullable"`
// The organization ID.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
PrettyName string `json:"pretty_name,nullable"`
TwitterUsername string `json:"twitter_username,nullable"`
JSON rewardSearchResponseItemsPledgeIssueRepositoryOrganizationJSON `json:"-"`
}
func (*RewardSearchResponseItemsPledgeIssueRepositoryOrganization) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueRepositoryOrganization) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform ¶
type RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform string
const (
RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatformGitHub RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform = "github"
)
func (RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform) IsKnown ¶
func (r RewardSearchResponseItemsPledgeIssueRepositoryOrganizationPlatform) IsKnown() bool
type RewardSearchResponseItemsPledgeIssueRepositoryPlatform ¶
type RewardSearchResponseItemsPledgeIssueRepositoryPlatform string
const (
RewardSearchResponseItemsPledgeIssueRepositoryPlatformGitHub RewardSearchResponseItemsPledgeIssueRepositoryPlatform = "github"
)
func (RewardSearchResponseItemsPledgeIssueRepositoryPlatform) IsKnown ¶
func (r RewardSearchResponseItemsPledgeIssueRepositoryPlatform) IsKnown() bool
type RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings ¶
type RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings struct {
// A URL to a cover image
CoverImageURL string `json:"cover_image_url,nullable"`
// A description of the repository
Description string `json:"description,nullable"`
// A list of featured organizations
FeaturedOrganizations []string `json:"featured_organizations,nullable" format:"uuid4"`
// A list of highlighted subscription tiers
HighlightedSubscriptionTiers []string `json:"highlighted_subscription_tiers,nullable" format:"uuid4"`
// A list of links related to the repository
Links []string `json:"links,nullable" format:"uri"`
JSON rewardSearchResponseItemsPledgeIssueRepositoryProfileSettingsJSON `json:"-"`
}
Settings for the repository profile
func (*RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgeIssueRepositoryProfileSettings) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeIssueState ¶
type RewardSearchResponseItemsPledgeIssueState string
const ( RewardSearchResponseItemsPledgeIssueStateOpen RewardSearchResponseItemsPledgeIssueState = "open" RewardSearchResponseItemsPledgeIssueStateClosed RewardSearchResponseItemsPledgeIssueState = "closed" )
func (RewardSearchResponseItemsPledgeIssueState) IsKnown ¶
func (r RewardSearchResponseItemsPledgeIssueState) IsKnown() bool
type RewardSearchResponseItemsPledgePledger ¶
type RewardSearchResponseItemsPledgePledger struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON rewardSearchResponseItemsPledgePledgerJSON `json:"-"`
}
The user or organization that made this pledge
func (*RewardSearchResponseItemsPledgePledger) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsPledgePledger) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponseItemsPledgeState ¶
type RewardSearchResponseItemsPledgeState string
Current state of the pledge
const ( RewardSearchResponseItemsPledgeStateInitiated RewardSearchResponseItemsPledgeState = "initiated" RewardSearchResponseItemsPledgeStateCreated RewardSearchResponseItemsPledgeState = "created" RewardSearchResponseItemsPledgeStatePending RewardSearchResponseItemsPledgeState = "pending" RewardSearchResponseItemsPledgeStateRefunded RewardSearchResponseItemsPledgeState = "refunded" RewardSearchResponseItemsPledgeStateDisputed RewardSearchResponseItemsPledgeState = "disputed" RewardSearchResponseItemsPledgeStateChargeDisputed RewardSearchResponseItemsPledgeState = "charge_disputed" RewardSearchResponseItemsPledgeStateCancelled RewardSearchResponseItemsPledgeState = "cancelled" )
func (RewardSearchResponseItemsPledgeState) IsKnown ¶
func (r RewardSearchResponseItemsPledgeState) IsKnown() bool
type RewardSearchResponseItemsPledgeType ¶
type RewardSearchResponseItemsPledgeType string
Type of pledge
const ( RewardSearchResponseItemsPledgeTypePayUpfront RewardSearchResponseItemsPledgeType = "pay_upfront" RewardSearchResponseItemsPledgeTypePayOnCompletion RewardSearchResponseItemsPledgeType = "pay_on_completion" RewardSearchResponseItemsPledgeTypePayDirectly RewardSearchResponseItemsPledgeType = "pay_directly" )
func (RewardSearchResponseItemsPledgeType) IsKnown ¶
func (r RewardSearchResponseItemsPledgeType) IsKnown() bool
type RewardSearchResponseItemsState ¶
type RewardSearchResponseItemsState string
const ( RewardSearchResponseItemsStatePending RewardSearchResponseItemsState = "pending" RewardSearchResponseItemsStatePaid RewardSearchResponseItemsState = "paid" )
func (RewardSearchResponseItemsState) IsKnown ¶
func (r RewardSearchResponseItemsState) IsKnown() bool
type RewardSearchResponseItemsUser ¶
type RewardSearchResponseItemsUser struct {
AvatarURL string `json:"avatar_url,required"`
Username string `json:"username,required"`
JSON rewardSearchResponseItemsUserJSON `json:"-"`
}
The user that received the reward (if any)
func (*RewardSearchResponseItemsUser) UnmarshalJSON ¶
func (r *RewardSearchResponseItemsUser) UnmarshalJSON(data []byte) (err error)
type RewardSearchResponsePagination ¶
type RewardSearchResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON rewardSearchResponsePaginationJSON `json:"-"`
}
func (*RewardSearchResponsePagination) UnmarshalJSON ¶
func (r *RewardSearchResponsePagination) UnmarshalJSON(data []byte) (err error)
type RewardService ¶
type RewardService struct {
Options []option.RequestOption
}
RewardService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRewardService method instead.
func NewRewardService ¶
func NewRewardService(opts ...option.RequestOption) (r *RewardService)
NewRewardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RewardService) Search ¶
func (r *RewardService) Search(ctx context.Context, query RewardSearchParams, opts ...option.RequestOption) (res *RewardSearchResponse, err error)
Search rewards.
func (*RewardService) Summary ¶
func (r *RewardService) Summary(ctx context.Context, query RewardSummaryParams, opts ...option.RequestOption) (res *RewardSummaryResponse, err error)
Get summary of rewards for resource.
type RewardSummaryParams ¶
type RewardSummaryParams struct {
IssueID param.Field[string] `query:"issue_id,required" format:"uuid"`
}
func (RewardSummaryParams) URLQuery ¶
func (r RewardSummaryParams) URLQuery() (v url.Values)
URLQuery serializes RewardSummaryParams's query parameters as `url.Values`.
type RewardSummaryResponse ¶
type RewardSummaryResponse struct {
Receivers []RewardSummaryResponseReceiver `json:"receivers,required"`
JSON rewardSummaryResponseJSON `json:"-"`
}
func (*RewardSummaryResponse) UnmarshalJSON ¶
func (r *RewardSummaryResponse) UnmarshalJSON(data []byte) (err error)
type RewardSummaryResponseReceiver ¶
type RewardSummaryResponseReceiver struct {
Name string `json:"name,required"`
AvatarURL string `json:"avatar_url,nullable"`
JSON rewardSummaryResponseReceiverJSON `json:"-"`
}
func (*RewardSummaryResponseReceiver) UnmarshalJSON ¶
func (r *RewardSummaryResponseReceiver) UnmarshalJSON(data []byte) (err error)
type SubscriptionExportParams ¶
type SubscriptionExportParams struct {
// Filter by organization ID.
OrganizationID param.Field[SubscriptionExportParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
}
func (SubscriptionExportParams) URLQuery ¶
func (r SubscriptionExportParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionExportParams's query parameters as `url.Values`.
type SubscriptionExportParamsOrganizationIDArray ¶
type SubscriptionExportParamsOrganizationIDArray []string
func (SubscriptionExportParamsOrganizationIDArray) ImplementsSubscriptionExportParamsOrganizationIDUnion ¶
func (r SubscriptionExportParamsOrganizationIDArray) ImplementsSubscriptionExportParamsOrganizationIDUnion()
type SubscriptionExportParamsOrganizationIDUnion ¶
type SubscriptionExportParamsOrganizationIDUnion interface {
ImplementsSubscriptionExportParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], SubscriptionExportParamsOrganizationIDArray.
type SubscriptionExportResponse ¶
type SubscriptionExportResponse = interface{}
type SubscriptionImportParams ¶
type SubscriptionImportParams struct {
// CSV file with emails.
File param.Field[io.Reader] `json:"file,required" format:"binary"`
// The organization ID on which to import the subscriptions.
OrganizationID param.Field[string] `json:"organization_id,required" format:"uuid4"`
}
func (SubscriptionImportParams) MarshalMultipart ¶
func (r SubscriptionImportParams) MarshalMultipart() (data []byte, contentType string, err error)
type SubscriptionImportResponse ¶
type SubscriptionImportResponse struct {
Count int64 `json:"count,required"`
JSON subscriptionImportResponseJSON `json:"-"`
}
Result of a subscription import operation.
func (*SubscriptionImportResponse) UnmarshalJSON ¶
func (r *SubscriptionImportResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionListParams ¶
type SubscriptionListParams struct {
// Filter by active or inactive subscription.
Active param.Field[bool] `query:"active"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[SubscriptionListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by product ID.
ProductID param.Field[SubscriptionListParamsProductIDUnion] `query:"product_id" format:"uuid4"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
// Filter by subscription tier type.
Type param.Field[SubscriptionListParamsTypeUnion] `query:"type"`
}
func (SubscriptionListParams) URLQuery ¶
func (r SubscriptionListParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionListParams's query parameters as `url.Values`.
type SubscriptionListParamsOrganizationIDArray ¶
type SubscriptionListParamsOrganizationIDArray []string
func (SubscriptionListParamsOrganizationIDArray) ImplementsSubscriptionListParamsOrganizationIDUnion ¶
func (r SubscriptionListParamsOrganizationIDArray) ImplementsSubscriptionListParamsOrganizationIDUnion()
type SubscriptionListParamsOrganizationIDUnion ¶
type SubscriptionListParamsOrganizationIDUnion interface {
ImplementsSubscriptionListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], SubscriptionListParamsOrganizationIDArray.
type SubscriptionListParamsProductIDArray ¶
type SubscriptionListParamsProductIDArray []string
func (SubscriptionListParamsProductIDArray) ImplementsSubscriptionListParamsProductIDUnion ¶
func (r SubscriptionListParamsProductIDArray) ImplementsSubscriptionListParamsProductIDUnion()
type SubscriptionListParamsProductIDUnion ¶
type SubscriptionListParamsProductIDUnion interface {
ImplementsSubscriptionListParamsProductIDUnion()
}
Filter by product ID.
Satisfied by [shared.UnionString], SubscriptionListParamsProductIDArray.
type SubscriptionListParamsTypeArray ¶
type SubscriptionListParamsTypeArray []SubscriptionListParamsTypeArray
type SubscriptionListParamsTypeSubscriptionTierType ¶
type SubscriptionListParamsTypeSubscriptionTierType string
const ( SubscriptionListParamsTypeSubscriptionTierTypeFree SubscriptionListParamsTypeSubscriptionTierType = "free" SubscriptionListParamsTypeSubscriptionTierTypeIndividual SubscriptionListParamsTypeSubscriptionTierType = "individual" SubscriptionListParamsTypeSubscriptionTierTypeBusiness SubscriptionListParamsTypeSubscriptionTierType = "business" )
func (SubscriptionListParamsTypeSubscriptionTierType) IsKnown ¶
func (r SubscriptionListParamsTypeSubscriptionTierType) IsKnown() bool
type SubscriptionListParamsTypeUnion ¶
type SubscriptionListParamsTypeUnion interface {
// contains filtered or unexported methods
}
Filter by subscription tier type.
Satisfied by SubscriptionListParamsTypeSubscriptionTierType, SubscriptionListParamsTypeArray.
type SubscriptionListResponse ¶
type SubscriptionListResponse struct {
Pagination SubscriptionListResponsePagination `json:"pagination,required"`
Items []SubscriptionListResponseItem `json:"items"`
JSON subscriptionListResponseJSON `json:"-"`
}
func (*SubscriptionListResponse) UnmarshalJSON ¶
func (r *SubscriptionListResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponseItem ¶
type SubscriptionListResponseItem struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
// A product.
Product ProductOutput `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status SubscriptionListResponseItemsStatus `json:"status,required"`
User SubscriptionListResponseItemsUser `json:"user,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// A recurring price for a product, i.e. a subscription.
Price SubscriptionListResponseItemsPrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON subscriptionListResponseItemJSON `json:"-"`
}
func (*SubscriptionListResponseItem) UnmarshalJSON ¶
func (r *SubscriptionListResponseItem) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponseItemsPrice ¶
type SubscriptionListResponseItemsPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type SubscriptionListResponseItemsPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval SubscriptionListResponseItemsPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON subscriptionListResponseItemsPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (SubscriptionListResponseItemsPrice) AsUnion ¶
func (r SubscriptionListResponseItemsPrice) AsUnion() SubscriptionListResponseItemsPriceUnion
AsUnion returns a SubscriptionListResponseItemsPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SubscriptionListResponseItemsPriceProductPriceRecurring, SubscriptionListResponseItemsPriceProductPriceOneTime.
func (*SubscriptionListResponseItemsPrice) UnmarshalJSON ¶
func (r *SubscriptionListResponseItemsPrice) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponseItemsPriceProductPriceOneTime ¶
type SubscriptionListResponseItemsPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type SubscriptionListResponseItemsPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON subscriptionListResponseItemsPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*SubscriptionListResponseItemsPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *SubscriptionListResponseItemsPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponseItemsPriceProductPriceOneTimeType ¶
type SubscriptionListResponseItemsPriceProductPriceOneTimeType string
The type of the price.
const (
SubscriptionListResponseItemsPriceProductPriceOneTimeTypeOneTime SubscriptionListResponseItemsPriceProductPriceOneTimeType = "one_time"
)
func (SubscriptionListResponseItemsPriceProductPriceOneTimeType) IsKnown ¶
func (r SubscriptionListResponseItemsPriceProductPriceOneTimeType) IsKnown() bool
type SubscriptionListResponseItemsPriceProductPriceRecurring ¶
type SubscriptionListResponseItemsPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type SubscriptionListResponseItemsPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON subscriptionListResponseItemsPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*SubscriptionListResponseItemsPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *SubscriptionListResponseItemsPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval ¶
type SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( SubscriptionListResponseItemsPriceProductPriceRecurringRecurringIntervalMonth SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval = "month" SubscriptionListResponseItemsPriceProductPriceRecurringRecurringIntervalYear SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval = "year" )
func (SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r SubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type SubscriptionListResponseItemsPriceProductPriceRecurringType ¶
type SubscriptionListResponseItemsPriceProductPriceRecurringType string
The type of the price.
const (
SubscriptionListResponseItemsPriceProductPriceRecurringTypeRecurring SubscriptionListResponseItemsPriceProductPriceRecurringType = "recurring"
)
func (SubscriptionListResponseItemsPriceProductPriceRecurringType) IsKnown ¶
func (r SubscriptionListResponseItemsPriceProductPriceRecurringType) IsKnown() bool
type SubscriptionListResponseItemsPriceRecurringInterval ¶
type SubscriptionListResponseItemsPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( SubscriptionListResponseItemsPriceRecurringIntervalMonth SubscriptionListResponseItemsPriceRecurringInterval = "month" SubscriptionListResponseItemsPriceRecurringIntervalYear SubscriptionListResponseItemsPriceRecurringInterval = "year" )
func (SubscriptionListResponseItemsPriceRecurringInterval) IsKnown ¶
func (r SubscriptionListResponseItemsPriceRecurringInterval) IsKnown() bool
type SubscriptionListResponseItemsPriceType ¶
type SubscriptionListResponseItemsPriceType string
The type of the price.
const ( SubscriptionListResponseItemsPriceTypeRecurring SubscriptionListResponseItemsPriceType = "recurring" SubscriptionListResponseItemsPriceTypeOneTime SubscriptionListResponseItemsPriceType = "one_time" )
func (SubscriptionListResponseItemsPriceType) IsKnown ¶
func (r SubscriptionListResponseItemsPriceType) IsKnown() bool
type SubscriptionListResponseItemsPriceUnion ¶
type SubscriptionListResponseItemsPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by SubscriptionListResponseItemsPriceProductPriceRecurring or SubscriptionListResponseItemsPriceProductPriceOneTime.
type SubscriptionListResponseItemsStatus ¶
type SubscriptionListResponseItemsStatus string
const ( SubscriptionListResponseItemsStatusIncomplete SubscriptionListResponseItemsStatus = "incomplete" SubscriptionListResponseItemsStatusIncompleteExpired SubscriptionListResponseItemsStatus = "incomplete_expired" SubscriptionListResponseItemsStatusTrialing SubscriptionListResponseItemsStatus = "trialing" SubscriptionListResponseItemsStatusActive SubscriptionListResponseItemsStatus = "active" SubscriptionListResponseItemsStatusPastDue SubscriptionListResponseItemsStatus = "past_due" SubscriptionListResponseItemsStatusCanceled SubscriptionListResponseItemsStatus = "canceled" SubscriptionListResponseItemsStatusUnpaid SubscriptionListResponseItemsStatus = "unpaid" )
func (SubscriptionListResponseItemsStatus) IsKnown ¶
func (r SubscriptionListResponseItemsStatus) IsKnown() bool
type SubscriptionListResponseItemsUser ¶
type SubscriptionListResponseItemsUser struct {
Email string `json:"email,required"`
PublicName string `json:"public_name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON subscriptionListResponseItemsUserJSON `json:"-"`
}
func (*SubscriptionListResponseItemsUser) UnmarshalJSON ¶
func (r *SubscriptionListResponseItemsUser) UnmarshalJSON(data []byte) (err error)
type SubscriptionListResponsePagination ¶
type SubscriptionListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON subscriptionListResponsePaginationJSON `json:"-"`
}
func (*SubscriptionListResponsePagination) UnmarshalJSON ¶
func (r *SubscriptionListResponsePagination) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewParams ¶
type SubscriptionNewParams struct {
// The email address of the user.
Email param.Field[string] `json:"email,required" format:"email"`
// The ID of the product. **Must be the free subscription tier**.
ProductID param.Field[string] `json:"product_id,required" format:"uuid4"`
}
func (SubscriptionNewParams) MarshalJSON ¶
func (r SubscriptionNewParams) MarshalJSON() (data []byte, err error)
type SubscriptionNewResponse ¶
type SubscriptionNewResponse struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
// A product.
Product ProductOutput `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status SubscriptionNewResponseStatus `json:"status,required"`
User SubscriptionNewResponseUser `json:"user,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// A recurring price for a product, i.e. a subscription.
Price SubscriptionNewResponsePrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON subscriptionNewResponseJSON `json:"-"`
}
func (*SubscriptionNewResponse) UnmarshalJSON ¶
func (r *SubscriptionNewResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewResponsePrice ¶
type SubscriptionNewResponsePrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type SubscriptionNewResponsePriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval SubscriptionNewResponsePriceRecurringInterval `json:"recurring_interval,nullable"`
JSON subscriptionNewResponsePriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (SubscriptionNewResponsePrice) AsUnion ¶
func (r SubscriptionNewResponsePrice) AsUnion() SubscriptionNewResponsePriceUnion
AsUnion returns a SubscriptionNewResponsePriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SubscriptionNewResponsePriceProductPriceRecurring, SubscriptionNewResponsePriceProductPriceOneTime.
func (*SubscriptionNewResponsePrice) UnmarshalJSON ¶
func (r *SubscriptionNewResponsePrice) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewResponsePriceProductPriceOneTime ¶
type SubscriptionNewResponsePriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type SubscriptionNewResponsePriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON subscriptionNewResponsePriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*SubscriptionNewResponsePriceProductPriceOneTime) UnmarshalJSON ¶
func (r *SubscriptionNewResponsePriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewResponsePriceProductPriceOneTimeType ¶
type SubscriptionNewResponsePriceProductPriceOneTimeType string
The type of the price.
const (
SubscriptionNewResponsePriceProductPriceOneTimeTypeOneTime SubscriptionNewResponsePriceProductPriceOneTimeType = "one_time"
)
func (SubscriptionNewResponsePriceProductPriceOneTimeType) IsKnown ¶
func (r SubscriptionNewResponsePriceProductPriceOneTimeType) IsKnown() bool
type SubscriptionNewResponsePriceProductPriceRecurring ¶
type SubscriptionNewResponsePriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type SubscriptionNewResponsePriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON subscriptionNewResponsePriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*SubscriptionNewResponsePriceProductPriceRecurring) UnmarshalJSON ¶
func (r *SubscriptionNewResponsePriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval ¶
type SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( SubscriptionNewResponsePriceProductPriceRecurringRecurringIntervalMonth SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval = "month" SubscriptionNewResponsePriceProductPriceRecurringRecurringIntervalYear SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval = "year" )
func (SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r SubscriptionNewResponsePriceProductPriceRecurringRecurringInterval) IsKnown() bool
type SubscriptionNewResponsePriceProductPriceRecurringType ¶
type SubscriptionNewResponsePriceProductPriceRecurringType string
The type of the price.
const (
SubscriptionNewResponsePriceProductPriceRecurringTypeRecurring SubscriptionNewResponsePriceProductPriceRecurringType = "recurring"
)
func (SubscriptionNewResponsePriceProductPriceRecurringType) IsKnown ¶
func (r SubscriptionNewResponsePriceProductPriceRecurringType) IsKnown() bool
type SubscriptionNewResponsePriceRecurringInterval ¶
type SubscriptionNewResponsePriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( SubscriptionNewResponsePriceRecurringIntervalMonth SubscriptionNewResponsePriceRecurringInterval = "month" SubscriptionNewResponsePriceRecurringIntervalYear SubscriptionNewResponsePriceRecurringInterval = "year" )
func (SubscriptionNewResponsePriceRecurringInterval) IsKnown ¶
func (r SubscriptionNewResponsePriceRecurringInterval) IsKnown() bool
type SubscriptionNewResponsePriceType ¶
type SubscriptionNewResponsePriceType string
The type of the price.
const ( SubscriptionNewResponsePriceTypeRecurring SubscriptionNewResponsePriceType = "recurring" SubscriptionNewResponsePriceTypeOneTime SubscriptionNewResponsePriceType = "one_time" )
func (SubscriptionNewResponsePriceType) IsKnown ¶
func (r SubscriptionNewResponsePriceType) IsKnown() bool
type SubscriptionNewResponsePriceUnion ¶
type SubscriptionNewResponsePriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by SubscriptionNewResponsePriceProductPriceRecurring or SubscriptionNewResponsePriceProductPriceOneTime.
type SubscriptionNewResponseStatus ¶
type SubscriptionNewResponseStatus string
const ( SubscriptionNewResponseStatusIncomplete SubscriptionNewResponseStatus = "incomplete" SubscriptionNewResponseStatusIncompleteExpired SubscriptionNewResponseStatus = "incomplete_expired" SubscriptionNewResponseStatusTrialing SubscriptionNewResponseStatus = "trialing" SubscriptionNewResponseStatusActive SubscriptionNewResponseStatus = "active" SubscriptionNewResponseStatusPastDue SubscriptionNewResponseStatus = "past_due" SubscriptionNewResponseStatusCanceled SubscriptionNewResponseStatus = "canceled" SubscriptionNewResponseStatusUnpaid SubscriptionNewResponseStatus = "unpaid" )
func (SubscriptionNewResponseStatus) IsKnown ¶
func (r SubscriptionNewResponseStatus) IsKnown() bool
type SubscriptionNewResponseUser ¶
type SubscriptionNewResponseUser struct {
Email string `json:"email,required"`
PublicName string `json:"public_name,required"`
AvatarURL string `json:"avatar_url,nullable"`
GitHubUsername string `json:"github_username,nullable"`
JSON subscriptionNewResponseUserJSON `json:"-"`
}
func (*SubscriptionNewResponseUser) UnmarshalJSON ¶
func (r *SubscriptionNewResponseUser) UnmarshalJSON(data []byte) (err error)
type SubscriptionService ¶
type SubscriptionService struct {
Options []option.RequestOption
}
SubscriptionService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.
func NewSubscriptionService ¶
func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)
NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SubscriptionService) Export ¶
func (r *SubscriptionService) Export(ctx context.Context, query SubscriptionExportParams, opts ...option.RequestOption) (res *SubscriptionExportResponse, err error)
Export subscriptions as a CSV file.
func (*SubscriptionService) Import ¶
func (r *SubscriptionService) Import(ctx context.Context, body SubscriptionImportParams, opts ...option.RequestOption) (res *SubscriptionImportResponse, err error)
Import subscriptions from a CSV file.
func (*SubscriptionService) List ¶
func (r *SubscriptionService) List(ctx context.Context, query SubscriptionListParams, opts ...option.RequestOption) (res *SubscriptionListResponse, err error)
List subscriptions.
func (*SubscriptionService) New ¶
func (r *SubscriptionService) New(ctx context.Context, body SubscriptionNewParams, opts ...option.RequestOption) (res *SubscriptionNewResponse, err error)
Create a subscription on the free tier for a given email.
type TokenResponse ¶
type TokenResponse struct {
AccessToken string `json:"access_token,required"`
ExpiresIn int64 `json:"expires_in,required"`
IDToken string `json:"id_token,required"`
Scope string `json:"scope,required"`
TokenType TokenResponseTokenType `json:"token_type,required"`
RefreshToken string `json:"refresh_token,nullable"`
JSON tokenResponseJSON `json:"-"`
}
func (*TokenResponse) UnmarshalJSON ¶
func (r *TokenResponse) UnmarshalJSON(data []byte) (err error)
type TokenResponseTokenType ¶
type TokenResponseTokenType string
const (
TokenResponseTokenTypeBearer TokenResponseTokenType = "Bearer"
)
func (TokenResponseTokenType) IsKnown ¶
func (r TokenResponseTokenType) IsKnown() bool
type Transaction ¶
type Transaction struct {
ID string `json:"id,required" format:"uuid4"`
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
AccountIncurredTransactions []TransactionAccountIncurredTransaction `json:"account_incurred_transactions,required"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
GrossAmount int64 `json:"gross_amount,required"`
IncurredAmount int64 `json:"incurred_amount,required"`
NetAmount int64 `json:"net_amount,required"`
// Type of transactions.
Type TransactionType `json:"type,required"`
Donation TransactionDonation `json:"donation,nullable"`
IncurredByTransactionID string `json:"incurred_by_transaction_id,nullable" format:"uuid4"`
IssueReward TransactionIssueReward `json:"issue_reward,nullable"`
IssueRewardID string `json:"issue_reward_id,nullable" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Order TransactionOrder `json:"order,nullable"`
PayoutTransactionID string `json:"payout_transaction_id,nullable" format:"uuid4"`
// Type of fees applied by Polar, and billed to the users.
PlatformFeeType TransactionPlatformFeeType `json:"platform_fee_type,nullable"`
Pledge TransactionPledge `json:"pledge,nullable"`
PledgeID string `json:"pledge_id,nullable" format:"uuid4"`
// Supported payment processors.
Processor TransactionProcessor `json:"processor,nullable"`
ProductPriceID string `json:"product_price_id,nullable" format:"uuid4"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionJSON `json:"-"`
}
func (*Transaction) UnmarshalJSON ¶
func (r *Transaction) UnmarshalJSON(data []byte) (err error)
type TransactionAccountIncurredTransaction ¶
type TransactionAccountIncurredTransaction struct {
ID string `json:"id,required" format:"uuid4"`
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
// Type of transactions.
Type TransactionAccountIncurredTransactionsType `json:"type,required"`
IncurredByTransactionID string `json:"incurred_by_transaction_id,nullable" format:"uuid4"`
IssueRewardID string `json:"issue_reward_id,nullable" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PayoutTransactionID string `json:"payout_transaction_id,nullable" format:"uuid4"`
// Type of fees applied by Polar, and billed to the users.
PlatformFeeType TransactionAccountIncurredTransactionsPlatformFeeType `json:"platform_fee_type,nullable"`
PledgeID string `json:"pledge_id,nullable" format:"uuid4"`
// Supported payment processors.
Processor TransactionAccountIncurredTransactionsProcessor `json:"processor,nullable"`
ProductPriceID string `json:"product_price_id,nullable" format:"uuid4"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionAccountIncurredTransactionJSON `json:"-"`
}
func (*TransactionAccountIncurredTransaction) UnmarshalJSON ¶
func (r *TransactionAccountIncurredTransaction) UnmarshalJSON(data []byte) (err error)
type TransactionAccountIncurredTransactionsPlatformFeeType ¶
type TransactionAccountIncurredTransactionsPlatformFeeType string
Type of fees applied by Polar, and billed to the users.
const ( TransactionAccountIncurredTransactionsPlatformFeeTypePlatform TransactionAccountIncurredTransactionsPlatformFeeType = "platform" TransactionAccountIncurredTransactionsPlatformFeeTypePayment TransactionAccountIncurredTransactionsPlatformFeeType = "payment" TransactionAccountIncurredTransactionsPlatformFeeTypeSubscription TransactionAccountIncurredTransactionsPlatformFeeType = "subscription" TransactionAccountIncurredTransactionsPlatformFeeTypeInvoice TransactionAccountIncurredTransactionsPlatformFeeType = "invoice" TransactionAccountIncurredTransactionsPlatformFeeTypeCrossBorderTransfer TransactionAccountIncurredTransactionsPlatformFeeType = "cross_border_transfer" TransactionAccountIncurredTransactionsPlatformFeeTypePayout TransactionAccountIncurredTransactionsPlatformFeeType = "payout" TransactionAccountIncurredTransactionsPlatformFeeTypeAccount TransactionAccountIncurredTransactionsPlatformFeeType = "account" )
func (TransactionAccountIncurredTransactionsPlatformFeeType) IsKnown ¶
func (r TransactionAccountIncurredTransactionsPlatformFeeType) IsKnown() bool
type TransactionAccountIncurredTransactionsProcessor ¶
type TransactionAccountIncurredTransactionsProcessor string
Supported payment processors.
const ( TransactionAccountIncurredTransactionsProcessorStripe TransactionAccountIncurredTransactionsProcessor = "stripe" TransactionAccountIncurredTransactionsProcessorOpenCollective TransactionAccountIncurredTransactionsProcessor = "open_collective" )
func (TransactionAccountIncurredTransactionsProcessor) IsKnown ¶
func (r TransactionAccountIncurredTransactionsProcessor) IsKnown() bool
type TransactionAccountIncurredTransactionsType ¶
type TransactionAccountIncurredTransactionsType string
Type of transactions.
const ( TransactionAccountIncurredTransactionsTypePayment TransactionAccountIncurredTransactionsType = "payment" TransactionAccountIncurredTransactionsTypeProcessorFee TransactionAccountIncurredTransactionsType = "processor_fee" TransactionAccountIncurredTransactionsTypeRefund TransactionAccountIncurredTransactionsType = "refund" TransactionAccountIncurredTransactionsTypeDispute TransactionAccountIncurredTransactionsType = "dispute" TransactionAccountIncurredTransactionsTypeDisputeReversal TransactionAccountIncurredTransactionsType = "dispute_reversal" TransactionAccountIncurredTransactionsTypeBalance TransactionAccountIncurredTransactionsType = "balance" TransactionAccountIncurredTransactionsTypePayout TransactionAccountIncurredTransactionsType = "payout" )
func (TransactionAccountIncurredTransactionsType) IsKnown ¶
func (r TransactionAccountIncurredTransactionsType) IsKnown() bool
type TransactionDetails ¶
type TransactionDetails struct {
ID string `json:"id,required" format:"uuid4"`
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
AccountIncurredTransactions []TransactionDetailsAccountIncurredTransaction `json:"account_incurred_transactions,required"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
GrossAmount int64 `json:"gross_amount,required"`
IncurredAmount int64 `json:"incurred_amount,required"`
NetAmount int64 `json:"net_amount,required"`
PaidTransactions []Transaction `json:"paid_transactions,required"`
// Type of transactions.
Type TransactionDetailsType `json:"type,required"`
Donation TransactionDetailsDonation `json:"donation,nullable"`
IncurredByTransactionID string `json:"incurred_by_transaction_id,nullable" format:"uuid4"`
IssueReward TransactionDetailsIssueReward `json:"issue_reward,nullable"`
IssueRewardID string `json:"issue_reward_id,nullable" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Order TransactionDetailsOrder `json:"order,nullable"`
PayoutTransactionID string `json:"payout_transaction_id,nullable" format:"uuid4"`
// Type of fees applied by Polar, and billed to the users.
PlatformFeeType TransactionDetailsPlatformFeeType `json:"platform_fee_type,nullable"`
Pledge TransactionDetailsPledge `json:"pledge,nullable"`
PledgeID string `json:"pledge_id,nullable" format:"uuid4"`
// Supported payment processors.
Processor TransactionDetailsProcessor `json:"processor,nullable"`
ProductPriceID string `json:"product_price_id,nullable" format:"uuid4"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionDetailsJSON `json:"-"`
}
func (*TransactionDetails) UnmarshalJSON ¶
func (r *TransactionDetails) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsAccountIncurredTransaction ¶
type TransactionDetailsAccountIncurredTransaction struct {
ID string `json:"id,required" format:"uuid4"`
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
// Type of transactions.
Type TransactionDetailsAccountIncurredTransactionsType `json:"type,required"`
IncurredByTransactionID string `json:"incurred_by_transaction_id,nullable" format:"uuid4"`
IssueRewardID string `json:"issue_reward_id,nullable" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PayoutTransactionID string `json:"payout_transaction_id,nullable" format:"uuid4"`
// Type of fees applied by Polar, and billed to the users.
PlatformFeeType TransactionDetailsAccountIncurredTransactionsPlatformFeeType `json:"platform_fee_type,nullable"`
PledgeID string `json:"pledge_id,nullable" format:"uuid4"`
// Supported payment processors.
Processor TransactionDetailsAccountIncurredTransactionsProcessor `json:"processor,nullable"`
ProductPriceID string `json:"product_price_id,nullable" format:"uuid4"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionDetailsAccountIncurredTransactionJSON `json:"-"`
}
func (*TransactionDetailsAccountIncurredTransaction) UnmarshalJSON ¶
func (r *TransactionDetailsAccountIncurredTransaction) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsAccountIncurredTransactionsPlatformFeeType ¶
type TransactionDetailsAccountIncurredTransactionsPlatformFeeType string
Type of fees applied by Polar, and billed to the users.
const ( TransactionDetailsAccountIncurredTransactionsPlatformFeeTypePlatform TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "platform" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypePayment TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "payment" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypeSubscription TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "subscription" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypeInvoice TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "invoice" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypeCrossBorderTransfer TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "cross_border_transfer" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypePayout TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "payout" TransactionDetailsAccountIncurredTransactionsPlatformFeeTypeAccount TransactionDetailsAccountIncurredTransactionsPlatformFeeType = "account" )
func (TransactionDetailsAccountIncurredTransactionsPlatformFeeType) IsKnown ¶
func (r TransactionDetailsAccountIncurredTransactionsPlatformFeeType) IsKnown() bool
type TransactionDetailsAccountIncurredTransactionsProcessor ¶
type TransactionDetailsAccountIncurredTransactionsProcessor string
Supported payment processors.
const ( TransactionDetailsAccountIncurredTransactionsProcessorStripe TransactionDetailsAccountIncurredTransactionsProcessor = "stripe" TransactionDetailsAccountIncurredTransactionsProcessorOpenCollective TransactionDetailsAccountIncurredTransactionsProcessor = "open_collective" )
func (TransactionDetailsAccountIncurredTransactionsProcessor) IsKnown ¶
func (r TransactionDetailsAccountIncurredTransactionsProcessor) IsKnown() bool
type TransactionDetailsAccountIncurredTransactionsType ¶
type TransactionDetailsAccountIncurredTransactionsType string
Type of transactions.
const ( TransactionDetailsAccountIncurredTransactionsTypePayment TransactionDetailsAccountIncurredTransactionsType = "payment" TransactionDetailsAccountIncurredTransactionsTypeProcessorFee TransactionDetailsAccountIncurredTransactionsType = "processor_fee" TransactionDetailsAccountIncurredTransactionsTypeRefund TransactionDetailsAccountIncurredTransactionsType = "refund" TransactionDetailsAccountIncurredTransactionsTypeDispute TransactionDetailsAccountIncurredTransactionsType = "dispute" TransactionDetailsAccountIncurredTransactionsTypeDisputeReversal TransactionDetailsAccountIncurredTransactionsType = "dispute_reversal" TransactionDetailsAccountIncurredTransactionsTypeBalance TransactionDetailsAccountIncurredTransactionsType = "balance" TransactionDetailsAccountIncurredTransactionsTypePayout TransactionDetailsAccountIncurredTransactionsType = "payout" )
func (TransactionDetailsAccountIncurredTransactionsType) IsKnown ¶
func (r TransactionDetailsAccountIncurredTransactionsType) IsKnown() bool
type TransactionDetailsDonation ¶
type TransactionDetailsDonation struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
ToOrganization TransactionDetailsDonationToOrganization `json:"to_organization,nullable"`
JSON transactionDetailsDonationJSON `json:"-"`
}
func (*TransactionDetailsDonation) UnmarshalJSON ¶
func (r *TransactionDetailsDonation) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsDonationToOrganization ¶
type TransactionDetailsDonationToOrganization struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsDonationToOrganizationJSON `json:"-"`
}
func (*TransactionDetailsDonationToOrganization) UnmarshalJSON ¶
func (r *TransactionDetailsDonationToOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsIssueReward ¶
type TransactionDetailsIssueReward struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IssueID string `json:"issue_id,required" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsIssueRewardJSON `json:"-"`
}
func (*TransactionDetailsIssueReward) UnmarshalJSON ¶
func (r *TransactionDetailsIssueReward) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrder ¶
type TransactionDetailsOrder struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Product TransactionDetailsOrderProduct `json:"product,required"`
// A recurring price for a product, i.e. a subscription.
ProductPrice TransactionDetailsOrderProductPrice `json:"product_price,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionDetailsOrderJSON `json:"-"`
}
func (*TransactionDetailsOrder) UnmarshalJSON ¶
func (r *TransactionDetailsOrder) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProduct ¶
type TransactionDetailsOrderProduct struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Organization TransactionDetailsOrderProductOrganization `json:"organization,nullable"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
Type TransactionDetailsOrderProductType `json:"type,nullable"`
JSON transactionDetailsOrderProductJSON `json:"-"`
}
func (*TransactionDetailsOrderProduct) UnmarshalJSON ¶
func (r *TransactionDetailsOrderProduct) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProductOrganization ¶
type TransactionDetailsOrderProductOrganization struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsOrderProductOrganizationJSON `json:"-"`
}
func (*TransactionDetailsOrderProductOrganization) UnmarshalJSON ¶
func (r *TransactionDetailsOrderProductOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProductPrice ¶
type TransactionDetailsOrderProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type TransactionDetailsOrderProductPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval TransactionDetailsOrderProductPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON transactionDetailsOrderProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (TransactionDetailsOrderProductPrice) AsUnion ¶
func (r TransactionDetailsOrderProductPrice) AsUnion() TransactionDetailsOrderProductPriceUnion
AsUnion returns a TransactionDetailsOrderProductPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TransactionDetailsOrderProductPriceProductPriceRecurring, TransactionDetailsOrderProductPriceProductPriceOneTime.
func (*TransactionDetailsOrderProductPrice) UnmarshalJSON ¶
func (r *TransactionDetailsOrderProductPrice) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProductPriceProductPriceOneTime ¶
type TransactionDetailsOrderProductPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type TransactionDetailsOrderProductPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsOrderProductPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*TransactionDetailsOrderProductPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *TransactionDetailsOrderProductPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProductPriceProductPriceOneTimeType ¶
type TransactionDetailsOrderProductPriceProductPriceOneTimeType string
The type of the price.
const (
TransactionDetailsOrderProductPriceProductPriceOneTimeTypeOneTime TransactionDetailsOrderProductPriceProductPriceOneTimeType = "one_time"
)
func (TransactionDetailsOrderProductPriceProductPriceOneTimeType) IsKnown ¶
func (r TransactionDetailsOrderProductPriceProductPriceOneTimeType) IsKnown() bool
type TransactionDetailsOrderProductPriceProductPriceRecurring ¶
type TransactionDetailsOrderProductPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type TransactionDetailsOrderProductPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON transactionDetailsOrderProductPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*TransactionDetailsOrderProductPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *TransactionDetailsOrderProductPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval ¶
type TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( TransactionDetailsOrderProductPriceProductPriceRecurringRecurringIntervalMonth TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval = "month" TransactionDetailsOrderProductPriceProductPriceRecurringRecurringIntervalYear TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval = "year" )
func (TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r TransactionDetailsOrderProductPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type TransactionDetailsOrderProductPriceProductPriceRecurringType ¶
type TransactionDetailsOrderProductPriceProductPriceRecurringType string
The type of the price.
const (
TransactionDetailsOrderProductPriceProductPriceRecurringTypeRecurring TransactionDetailsOrderProductPriceProductPriceRecurringType = "recurring"
)
func (TransactionDetailsOrderProductPriceProductPriceRecurringType) IsKnown ¶
func (r TransactionDetailsOrderProductPriceProductPriceRecurringType) IsKnown() bool
type TransactionDetailsOrderProductPriceRecurringInterval ¶
type TransactionDetailsOrderProductPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( TransactionDetailsOrderProductPriceRecurringIntervalMonth TransactionDetailsOrderProductPriceRecurringInterval = "month" TransactionDetailsOrderProductPriceRecurringIntervalYear TransactionDetailsOrderProductPriceRecurringInterval = "year" )
func (TransactionDetailsOrderProductPriceRecurringInterval) IsKnown ¶
func (r TransactionDetailsOrderProductPriceRecurringInterval) IsKnown() bool
type TransactionDetailsOrderProductPriceType ¶
type TransactionDetailsOrderProductPriceType string
The type of the price.
const ( TransactionDetailsOrderProductPriceTypeRecurring TransactionDetailsOrderProductPriceType = "recurring" TransactionDetailsOrderProductPriceTypeOneTime TransactionDetailsOrderProductPriceType = "one_time" )
func (TransactionDetailsOrderProductPriceType) IsKnown ¶
func (r TransactionDetailsOrderProductPriceType) IsKnown() bool
type TransactionDetailsOrderProductPriceUnion ¶
type TransactionDetailsOrderProductPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by TransactionDetailsOrderProductPriceProductPriceRecurring or TransactionDetailsOrderProductPriceProductPriceOneTime.
type TransactionDetailsOrderProductType ¶
type TransactionDetailsOrderProductType string
const ( TransactionDetailsOrderProductTypeFree TransactionDetailsOrderProductType = "free" TransactionDetailsOrderProductTypeIndividual TransactionDetailsOrderProductType = "individual" TransactionDetailsOrderProductTypeBusiness TransactionDetailsOrderProductType = "business" )
func (TransactionDetailsOrderProductType) IsKnown ¶
func (r TransactionDetailsOrderProductType) IsKnown() bool
type TransactionDetailsPlatformFeeType ¶
type TransactionDetailsPlatformFeeType string
Type of fees applied by Polar, and billed to the users.
const ( TransactionDetailsPlatformFeeTypePlatform TransactionDetailsPlatformFeeType = "platform" TransactionDetailsPlatformFeeTypePayment TransactionDetailsPlatformFeeType = "payment" TransactionDetailsPlatformFeeTypeSubscription TransactionDetailsPlatformFeeType = "subscription" TransactionDetailsPlatformFeeTypeInvoice TransactionDetailsPlatformFeeType = "invoice" TransactionDetailsPlatformFeeTypeCrossBorderTransfer TransactionDetailsPlatformFeeType = "cross_border_transfer" TransactionDetailsPlatformFeeTypePayout TransactionDetailsPlatformFeeType = "payout" TransactionDetailsPlatformFeeTypeAccount TransactionDetailsPlatformFeeType = "account" )
func (TransactionDetailsPlatformFeeType) IsKnown ¶
func (r TransactionDetailsPlatformFeeType) IsKnown() bool
type TransactionDetailsPledge ¶
type TransactionDetailsPledge struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Issue TransactionDetailsPledgeIssue `json:"issue,required"`
State TransactionDetailsPledgeState `json:"state,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsPledgeJSON `json:"-"`
}
func (*TransactionDetailsPledge) UnmarshalJSON ¶
func (r *TransactionDetailsPledge) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsPledgeIssue ¶
type TransactionDetailsPledgeIssue struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Number int64 `json:"number,required"`
Organization TransactionDetailsPledgeIssueOrganization `json:"organization,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Platform TransactionDetailsPledgeIssuePlatform `json:"platform,required"`
Repository TransactionDetailsPledgeIssueRepository `json:"repository,required"`
RepositoryID string `json:"repository_id,required" format:"uuid4"`
Title string `json:"title,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsPledgeIssueJSON `json:"-"`
}
func (*TransactionDetailsPledgeIssue) UnmarshalJSON ¶
func (r *TransactionDetailsPledgeIssue) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsPledgeIssueOrganization ¶
type TransactionDetailsPledgeIssueOrganization struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform TransactionDetailsPledgeIssueOrganizationPlatform `json:"platform,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsPledgeIssueOrganizationJSON `json:"-"`
}
func (*TransactionDetailsPledgeIssueOrganization) UnmarshalJSON ¶
func (r *TransactionDetailsPledgeIssueOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsPledgeIssueOrganizationPlatform ¶
type TransactionDetailsPledgeIssueOrganizationPlatform string
const (
TransactionDetailsPledgeIssueOrganizationPlatformGitHub TransactionDetailsPledgeIssueOrganizationPlatform = "github"
)
func (TransactionDetailsPledgeIssueOrganizationPlatform) IsKnown ¶
func (r TransactionDetailsPledgeIssueOrganizationPlatform) IsKnown() bool
type TransactionDetailsPledgeIssuePlatform ¶
type TransactionDetailsPledgeIssuePlatform string
const (
TransactionDetailsPledgeIssuePlatformGitHub TransactionDetailsPledgeIssuePlatform = "github"
)
func (TransactionDetailsPledgeIssuePlatform) IsKnown ¶
func (r TransactionDetailsPledgeIssuePlatform) IsKnown() bool
type TransactionDetailsPledgeIssueRepository ¶
type TransactionDetailsPledgeIssueRepository struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Platform TransactionDetailsPledgeIssueRepositoryPlatform `json:"platform,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDetailsPledgeIssueRepositoryJSON `json:"-"`
}
func (*TransactionDetailsPledgeIssueRepository) UnmarshalJSON ¶
func (r *TransactionDetailsPledgeIssueRepository) UnmarshalJSON(data []byte) (err error)
type TransactionDetailsPledgeIssueRepositoryPlatform ¶
type TransactionDetailsPledgeIssueRepositoryPlatform string
const (
TransactionDetailsPledgeIssueRepositoryPlatformGitHub TransactionDetailsPledgeIssueRepositoryPlatform = "github"
)
func (TransactionDetailsPledgeIssueRepositoryPlatform) IsKnown ¶
func (r TransactionDetailsPledgeIssueRepositoryPlatform) IsKnown() bool
type TransactionDetailsPledgeState ¶
type TransactionDetailsPledgeState string
const ( TransactionDetailsPledgeStateInitiated TransactionDetailsPledgeState = "initiated" TransactionDetailsPledgeStateCreated TransactionDetailsPledgeState = "created" TransactionDetailsPledgeStatePending TransactionDetailsPledgeState = "pending" TransactionDetailsPledgeStateRefunded TransactionDetailsPledgeState = "refunded" TransactionDetailsPledgeStateDisputed TransactionDetailsPledgeState = "disputed" TransactionDetailsPledgeStateChargeDisputed TransactionDetailsPledgeState = "charge_disputed" TransactionDetailsPledgeStateCancelled TransactionDetailsPledgeState = "cancelled" )
func (TransactionDetailsPledgeState) IsKnown ¶
func (r TransactionDetailsPledgeState) IsKnown() bool
type TransactionDetailsProcessor ¶
type TransactionDetailsProcessor string
Supported payment processors.
const ( TransactionDetailsProcessorStripe TransactionDetailsProcessor = "stripe" TransactionDetailsProcessorOpenCollective TransactionDetailsProcessor = "open_collective" )
func (TransactionDetailsProcessor) IsKnown ¶
func (r TransactionDetailsProcessor) IsKnown() bool
type TransactionDetailsType ¶
type TransactionDetailsType string
Type of transactions.
const ( TransactionDetailsTypePayment TransactionDetailsType = "payment" TransactionDetailsTypeProcessorFee TransactionDetailsType = "processor_fee" TransactionDetailsTypeRefund TransactionDetailsType = "refund" TransactionDetailsTypeDispute TransactionDetailsType = "dispute" TransactionDetailsTypeDisputeReversal TransactionDetailsType = "dispute_reversal" TransactionDetailsTypeBalance TransactionDetailsType = "balance" TransactionDetailsTypePayout TransactionDetailsType = "payout" )
func (TransactionDetailsType) IsKnown ¶
func (r TransactionDetailsType) IsKnown() bool
type TransactionDonation ¶
type TransactionDonation struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
ToOrganization TransactionDonationToOrganization `json:"to_organization,nullable"`
JSON transactionDonationJSON `json:"-"`
}
func (*TransactionDonation) UnmarshalJSON ¶
func (r *TransactionDonation) UnmarshalJSON(data []byte) (err error)
type TransactionDonationToOrganization ¶
type TransactionDonationToOrganization struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionDonationToOrganizationJSON `json:"-"`
}
func (*TransactionDonationToOrganization) UnmarshalJSON ¶
func (r *TransactionDonationToOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionIssueReward ¶
type TransactionIssueReward struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IssueID string `json:"issue_id,required" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionIssueRewardJSON `json:"-"`
}
func (*TransactionIssueReward) UnmarshalJSON ¶
func (r *TransactionIssueReward) UnmarshalJSON(data []byte) (err error)
type TransactionLookupParams ¶
type TransactionLookupParams struct {
TransactionID param.Field[string] `query:"transaction_id,required" format:"uuid4"`
}
func (TransactionLookupParams) URLQuery ¶
func (r TransactionLookupParams) URLQuery() (v url.Values)
URLQuery serializes TransactionLookupParams's query parameters as `url.Values`.
type TransactionOrder ¶
type TransactionOrder struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Product TransactionOrderProduct `json:"product,required"`
// A recurring price for a product, i.e. a subscription.
ProductPrice TransactionOrderProductPrice `json:"product_price,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON transactionOrderJSON `json:"-"`
}
func (*TransactionOrder) UnmarshalJSON ¶
func (r *TransactionOrder) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProduct ¶
type TransactionOrderProduct struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Organization TransactionOrderProductOrganization `json:"organization,nullable"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
Type TransactionOrderProductType `json:"type,nullable"`
JSON transactionOrderProductJSON `json:"-"`
}
func (*TransactionOrderProduct) UnmarshalJSON ¶
func (r *TransactionOrderProduct) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProductOrganization ¶
type TransactionOrderProductOrganization struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
Slug string `json:"slug,required"`
AvatarURL string `json:"avatar_url,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionOrderProductOrganizationJSON `json:"-"`
}
func (*TransactionOrderProductOrganization) UnmarshalJSON ¶
func (r *TransactionOrderProductOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProductPrice ¶
type TransactionOrderProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type TransactionOrderProductPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval TransactionOrderProductPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON transactionOrderProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (TransactionOrderProductPrice) AsUnion ¶
func (r TransactionOrderProductPrice) AsUnion() TransactionOrderProductPriceUnion
AsUnion returns a TransactionOrderProductPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TransactionOrderProductPriceProductPriceRecurring, TransactionOrderProductPriceProductPriceOneTime.
func (*TransactionOrderProductPrice) UnmarshalJSON ¶
func (r *TransactionOrderProductPrice) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProductPriceProductPriceOneTime ¶
type TransactionOrderProductPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type TransactionOrderProductPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionOrderProductPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*TransactionOrderProductPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *TransactionOrderProductPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProductPriceProductPriceOneTimeType ¶
type TransactionOrderProductPriceProductPriceOneTimeType string
The type of the price.
const (
TransactionOrderProductPriceProductPriceOneTimeTypeOneTime TransactionOrderProductPriceProductPriceOneTimeType = "one_time"
)
func (TransactionOrderProductPriceProductPriceOneTimeType) IsKnown ¶
func (r TransactionOrderProductPriceProductPriceOneTimeType) IsKnown() bool
type TransactionOrderProductPriceProductPriceRecurring ¶
type TransactionOrderProductPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type TransactionOrderProductPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval TransactionOrderProductPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON transactionOrderProductPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*TransactionOrderProductPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *TransactionOrderProductPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type TransactionOrderProductPriceProductPriceRecurringRecurringInterval ¶
type TransactionOrderProductPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( TransactionOrderProductPriceProductPriceRecurringRecurringIntervalMonth TransactionOrderProductPriceProductPriceRecurringRecurringInterval = "month" TransactionOrderProductPriceProductPriceRecurringRecurringIntervalYear TransactionOrderProductPriceProductPriceRecurringRecurringInterval = "year" )
func (TransactionOrderProductPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r TransactionOrderProductPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type TransactionOrderProductPriceProductPriceRecurringType ¶
type TransactionOrderProductPriceProductPriceRecurringType string
The type of the price.
const (
TransactionOrderProductPriceProductPriceRecurringTypeRecurring TransactionOrderProductPriceProductPriceRecurringType = "recurring"
)
func (TransactionOrderProductPriceProductPriceRecurringType) IsKnown ¶
func (r TransactionOrderProductPriceProductPriceRecurringType) IsKnown() bool
type TransactionOrderProductPriceRecurringInterval ¶
type TransactionOrderProductPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( TransactionOrderProductPriceRecurringIntervalMonth TransactionOrderProductPriceRecurringInterval = "month" TransactionOrderProductPriceRecurringIntervalYear TransactionOrderProductPriceRecurringInterval = "year" )
func (TransactionOrderProductPriceRecurringInterval) IsKnown ¶
func (r TransactionOrderProductPriceRecurringInterval) IsKnown() bool
type TransactionOrderProductPriceType ¶
type TransactionOrderProductPriceType string
The type of the price.
const ( TransactionOrderProductPriceTypeRecurring TransactionOrderProductPriceType = "recurring" TransactionOrderProductPriceTypeOneTime TransactionOrderProductPriceType = "one_time" )
func (TransactionOrderProductPriceType) IsKnown ¶
func (r TransactionOrderProductPriceType) IsKnown() bool
type TransactionOrderProductPriceUnion ¶
type TransactionOrderProductPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by TransactionOrderProductPriceProductPriceRecurring or TransactionOrderProductPriceProductPriceOneTime.
type TransactionOrderProductType ¶
type TransactionOrderProductType string
const ( TransactionOrderProductTypeFree TransactionOrderProductType = "free" TransactionOrderProductTypeIndividual TransactionOrderProductType = "individual" TransactionOrderProductTypeBusiness TransactionOrderProductType = "business" )
func (TransactionOrderProductType) IsKnown ¶
func (r TransactionOrderProductType) IsKnown() bool
type TransactionPayoutCsvResponse ¶
type TransactionPayoutCsvResponse = interface{}
type TransactionPayoutListParams ¶
type TransactionPayoutListParams struct {
AccountID param.Field[string] `query:"account_id,required" format:"uuid4"`
}
func (TransactionPayoutListParams) URLQuery ¶
func (r TransactionPayoutListParams) URLQuery() (v url.Values)
URLQuery serializes TransactionPayoutListParams's query parameters as `url.Values`.
type TransactionPayoutNewParams ¶
type TransactionPayoutNewParams struct {
AccountID param.Field[string] `json:"account_id,required" format:"uuid4"`
}
func (TransactionPayoutNewParams) MarshalJSON ¶
func (r TransactionPayoutNewParams) MarshalJSON() (data []byte, err error)
type TransactionPayoutService ¶
type TransactionPayoutService struct {
Options []option.RequestOption
}
TransactionPayoutService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionPayoutService method instead.
func NewTransactionPayoutService ¶
func NewTransactionPayoutService(opts ...option.RequestOption) (r *TransactionPayoutService)
NewTransactionPayoutService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionPayoutService) Csv ¶
func (r *TransactionPayoutService) Csv(ctx context.Context, id string, opts ...option.RequestOption) (res *TransactionPayoutCsvResponse, err error)
Get Payout Csv
func (*TransactionPayoutService) List ¶
func (r *TransactionPayoutService) List(ctx context.Context, query TransactionPayoutListParams, opts ...option.RequestOption) (res *PayoutEstimate, err error)
Get Payout Estimate
func (*TransactionPayoutService) New ¶
func (r *TransactionPayoutService) New(ctx context.Context, body TransactionPayoutNewParams, opts ...option.RequestOption) (res *Transaction, err error)
Create Payout
type TransactionPlatformFeeType ¶
type TransactionPlatformFeeType string
Type of fees applied by Polar, and billed to the users.
const ( TransactionPlatformFeeTypePlatform TransactionPlatformFeeType = "platform" TransactionPlatformFeeTypePayment TransactionPlatformFeeType = "payment" TransactionPlatformFeeTypeSubscription TransactionPlatformFeeType = "subscription" TransactionPlatformFeeTypeInvoice TransactionPlatformFeeType = "invoice" TransactionPlatformFeeTypeCrossBorderTransfer TransactionPlatformFeeType = "cross_border_transfer" TransactionPlatformFeeTypePayout TransactionPlatformFeeType = "payout" TransactionPlatformFeeTypeAccount TransactionPlatformFeeType = "account" )
func (TransactionPlatformFeeType) IsKnown ¶
func (r TransactionPlatformFeeType) IsKnown() bool
type TransactionPledge ¶
type TransactionPledge struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Issue TransactionPledgeIssue `json:"issue,required"`
State TransactionPledgeState `json:"state,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionPledgeJSON `json:"-"`
}
func (*TransactionPledge) UnmarshalJSON ¶
func (r *TransactionPledge) UnmarshalJSON(data []byte) (err error)
type TransactionPledgeIssue ¶
type TransactionPledgeIssue struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Number int64 `json:"number,required"`
Organization TransactionPledgeIssueOrganization `json:"organization,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Platform TransactionPledgeIssuePlatform `json:"platform,required"`
Repository TransactionPledgeIssueRepository `json:"repository,required"`
RepositoryID string `json:"repository_id,required" format:"uuid4"`
Title string `json:"title,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionPledgeIssueJSON `json:"-"`
}
func (*TransactionPledgeIssue) UnmarshalJSON ¶
func (r *TransactionPledgeIssue) UnmarshalJSON(data []byte) (err error)
type TransactionPledgeIssueOrganization ¶
type TransactionPledgeIssueOrganization struct {
ID string `json:"id,required" format:"uuid4"`
AvatarURL string `json:"avatar_url,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
IsPersonal bool `json:"is_personal,required"`
Name string `json:"name,required"`
Platform TransactionPledgeIssueOrganizationPlatform `json:"platform,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionPledgeIssueOrganizationJSON `json:"-"`
}
func (*TransactionPledgeIssueOrganization) UnmarshalJSON ¶
func (r *TransactionPledgeIssueOrganization) UnmarshalJSON(data []byte) (err error)
type TransactionPledgeIssueOrganizationPlatform ¶
type TransactionPledgeIssueOrganizationPlatform string
const (
TransactionPledgeIssueOrganizationPlatformGitHub TransactionPledgeIssueOrganizationPlatform = "github"
)
func (TransactionPledgeIssueOrganizationPlatform) IsKnown ¶
func (r TransactionPledgeIssueOrganizationPlatform) IsKnown() bool
type TransactionPledgeIssuePlatform ¶
type TransactionPledgeIssuePlatform string
const (
TransactionPledgeIssuePlatformGitHub TransactionPledgeIssuePlatform = "github"
)
func (TransactionPledgeIssuePlatform) IsKnown ¶
func (r TransactionPledgeIssuePlatform) IsKnown() bool
type TransactionPledgeIssueRepository ¶
type TransactionPledgeIssueRepository struct {
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Platform TransactionPledgeIssueRepositoryPlatform `json:"platform,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON transactionPledgeIssueRepositoryJSON `json:"-"`
}
func (*TransactionPledgeIssueRepository) UnmarshalJSON ¶
func (r *TransactionPledgeIssueRepository) UnmarshalJSON(data []byte) (err error)
type TransactionPledgeIssueRepositoryPlatform ¶
type TransactionPledgeIssueRepositoryPlatform string
const (
TransactionPledgeIssueRepositoryPlatformGitHub TransactionPledgeIssueRepositoryPlatform = "github"
)
func (TransactionPledgeIssueRepositoryPlatform) IsKnown ¶
func (r TransactionPledgeIssueRepositoryPlatform) IsKnown() bool
type TransactionPledgeState ¶
type TransactionPledgeState string
const ( TransactionPledgeStateInitiated TransactionPledgeState = "initiated" TransactionPledgeStateCreated TransactionPledgeState = "created" TransactionPledgeStatePending TransactionPledgeState = "pending" TransactionPledgeStateRefunded TransactionPledgeState = "refunded" TransactionPledgeStateDisputed TransactionPledgeState = "disputed" TransactionPledgeStateChargeDisputed TransactionPledgeState = "charge_disputed" TransactionPledgeStateCancelled TransactionPledgeState = "cancelled" )
func (TransactionPledgeState) IsKnown ¶
func (r TransactionPledgeState) IsKnown() bool
type TransactionProcessor ¶
type TransactionProcessor string
Supported payment processors.
const ( TransactionProcessorStripe TransactionProcessor = "stripe" TransactionProcessorOpenCollective TransactionProcessor = "open_collective" )
func (TransactionProcessor) IsKnown ¶
func (r TransactionProcessor) IsKnown() bool
type TransactionSearchParams ¶
type TransactionSearchParams struct {
AccountID param.Field[string] `query:"account_id" format:"uuid4"`
ExcludePlatformFees param.Field[bool] `query:"exclude_platform_fees"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
PaymentOrganizationID param.Field[string] `query:"payment_organization_id" format:"uuid4"`
PaymentUserID param.Field[string] `query:"payment_user_id" format:"uuid4"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
// Type of transactions.
Type param.Field[TransactionSearchParamsType] `query:"type"`
}
func (TransactionSearchParams) URLQuery ¶
func (r TransactionSearchParams) URLQuery() (v url.Values)
URLQuery serializes TransactionSearchParams's query parameters as `url.Values`.
type TransactionSearchParamsType ¶
type TransactionSearchParamsType string
Type of transactions.
const ( TransactionSearchParamsTypePayment TransactionSearchParamsType = "payment" TransactionSearchParamsTypeProcessorFee TransactionSearchParamsType = "processor_fee" TransactionSearchParamsTypeRefund TransactionSearchParamsType = "refund" TransactionSearchParamsTypeDispute TransactionSearchParamsType = "dispute" TransactionSearchParamsTypeDisputeReversal TransactionSearchParamsType = "dispute_reversal" TransactionSearchParamsTypeBalance TransactionSearchParamsType = "balance" TransactionSearchParamsTypePayout TransactionSearchParamsType = "payout" )
func (TransactionSearchParamsType) IsKnown ¶
func (r TransactionSearchParamsType) IsKnown() bool
type TransactionService ¶
type TransactionService struct {
Options []option.RequestOption
Payouts *TransactionPayoutService
}
TransactionService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionService method instead.
func NewTransactionService ¶
func NewTransactionService(opts ...option.RequestOption) (r *TransactionService)
NewTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionService) Lookup ¶
func (r *TransactionService) Lookup(ctx context.Context, query TransactionLookupParams, opts ...option.RequestOption) (res *TransactionDetails, err error)
Lookup Transaction
func (*TransactionService) Search ¶
func (r *TransactionService) Search(ctx context.Context, query TransactionSearchParams, opts ...option.RequestOption) (res *ListResourceTransaction, err error)
Search Transactions
func (*TransactionService) Summary ¶
func (r *TransactionService) Summary(ctx context.Context, query TransactionSummaryParams, opts ...option.RequestOption) (res *TransactionsSummary, err error)
Get Summary
type TransactionSummaryParams ¶
type TransactionSummaryParams struct {
AccountID param.Field[string] `query:"account_id,required" format:"uuid4"`
}
func (TransactionSummaryParams) URLQuery ¶
func (r TransactionSummaryParams) URLQuery() (v url.Values)
URLQuery serializes TransactionSummaryParams's query parameters as `url.Values`.
type TransactionType ¶
type TransactionType string
Type of transactions.
const ( TransactionTypePayment TransactionType = "payment" TransactionTypeProcessorFee TransactionType = "processor_fee" TransactionTypeRefund TransactionType = "refund" TransactionTypeDispute TransactionType = "dispute" TransactionTypeDisputeReversal TransactionType = "dispute_reversal" TransactionTypeBalance TransactionType = "balance" TransactionTypePayout TransactionType = "payout" )
func (TransactionType) IsKnown ¶
func (r TransactionType) IsKnown() bool
type TransactionsSummary ¶
type TransactionsSummary struct {
Balance TransactionsSummaryBalance `json:"balance,required"`
Payout TransactionsSummaryPayout `json:"payout,required"`
JSON transactionsSummaryJSON `json:"-"`
}
func (*TransactionsSummary) UnmarshalJSON ¶
func (r *TransactionsSummary) UnmarshalJSON(data []byte) (err error)
type TransactionsSummaryBalance ¶
type TransactionsSummaryBalance struct {
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
Amount int64 `json:"amount,required"`
Currency string `json:"currency,required"`
JSON transactionsSummaryBalanceJSON `json:"-"`
}
func (*TransactionsSummaryBalance) UnmarshalJSON ¶
func (r *TransactionsSummaryBalance) UnmarshalJSON(data []byte) (err error)
type TransactionsSummaryPayout ¶
type TransactionsSummaryPayout struct {
AccountAmount int64 `json:"account_amount,required"`
AccountCurrency string `json:"account_currency,required"`
Amount int64 `json:"amount,required"`
Currency string `json:"currency,required"`
JSON transactionsSummaryPayoutJSON `json:"-"`
}
func (*TransactionsSummaryPayout) UnmarshalJSON ¶
func (r *TransactionsSummaryPayout) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementDeleteResponse ¶
type UserAdvertisementDeleteResponse = interface{}
type UserAdvertisementEnableParams ¶
type UserAdvertisementEnableParams struct {
// The benefit ID.
BenefitID param.Field[string] `json:"benefit_id,required" format:"uuid4"`
}
func (UserAdvertisementEnableParams) MarshalJSON ¶
func (r UserAdvertisementEnableParams) MarshalJSON() (data []byte, err error)
type UserAdvertisementGetResponse ¶
type UserAdvertisementGetResponse struct {
ID string `json:"id,required" format:"uuid4"`
Clicks int64 `json:"clicks,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ImageURL string `json:"image_url,required" format:"uri"`
LinkURL string `json:"link_url,required" format:"uri"`
Text string `json:"text,required"`
UserID string `json:"user_id,required" format:"uuid4"`
Views int64 `json:"views,required"`
ImageURLDark string `json:"image_url_dark,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userAdvertisementGetResponseJSON `json:"-"`
}
func (*UserAdvertisementGetResponse) UnmarshalJSON ¶
func (r *UserAdvertisementGetResponse) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementListParams ¶
type UserAdvertisementListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (UserAdvertisementListParams) URLQuery ¶
func (r UserAdvertisementListParams) URLQuery() (v url.Values)
URLQuery serializes UserAdvertisementListParams's query parameters as `url.Values`.
type UserAdvertisementListResponse ¶
type UserAdvertisementListResponse struct {
Pagination UserAdvertisementListResponsePagination `json:"pagination,required"`
Items []UserAdvertisementListResponseItem `json:"items"`
JSON userAdvertisementListResponseJSON `json:"-"`
}
func (*UserAdvertisementListResponse) UnmarshalJSON ¶
func (r *UserAdvertisementListResponse) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementListResponseItem ¶
type UserAdvertisementListResponseItem struct {
ID string `json:"id,required" format:"uuid4"`
Clicks int64 `json:"clicks,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ImageURL string `json:"image_url,required" format:"uri"`
LinkURL string `json:"link_url,required" format:"uri"`
Text string `json:"text,required"`
UserID string `json:"user_id,required" format:"uuid4"`
Views int64 `json:"views,required"`
ImageURLDark string `json:"image_url_dark,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userAdvertisementListResponseItemJSON `json:"-"`
}
func (*UserAdvertisementListResponseItem) UnmarshalJSON ¶
func (r *UserAdvertisementListResponseItem) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementListResponsePagination ¶
type UserAdvertisementListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON userAdvertisementListResponsePaginationJSON `json:"-"`
}
func (*UserAdvertisementListResponsePagination) UnmarshalJSON ¶
func (r *UserAdvertisementListResponsePagination) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementNewParams ¶
type UserAdvertisementNewParams struct {
ImageURL param.Field[string] `json:"image_url,required" format:"uri"`
LinkURL param.Field[string] `json:"link_url,required" format:"uri"`
Text param.Field[string] `json:"text,required"`
ImageURLDark param.Field[string] `json:"image_url_dark" format:"uri"`
}
func (UserAdvertisementNewParams) MarshalJSON ¶
func (r UserAdvertisementNewParams) MarshalJSON() (data []byte, err error)
type UserAdvertisementNewResponse ¶
type UserAdvertisementNewResponse struct {
ID string `json:"id,required" format:"uuid4"`
Clicks int64 `json:"clicks,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ImageURL string `json:"image_url,required" format:"uri"`
LinkURL string `json:"link_url,required" format:"uri"`
Text string `json:"text,required"`
UserID string `json:"user_id,required" format:"uuid4"`
Views int64 `json:"views,required"`
ImageURLDark string `json:"image_url_dark,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userAdvertisementNewResponseJSON `json:"-"`
}
func (*UserAdvertisementNewResponse) UnmarshalJSON ¶
func (r *UserAdvertisementNewResponse) UnmarshalJSON(data []byte) (err error)
type UserAdvertisementService ¶
type UserAdvertisementService struct {
Options []option.RequestOption
}
UserAdvertisementService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserAdvertisementService method instead.
func NewUserAdvertisementService ¶
func NewUserAdvertisementService(opts ...option.RequestOption) (r *UserAdvertisementService)
NewUserAdvertisementService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserAdvertisementService) Delete ¶
func (r *UserAdvertisementService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *UserAdvertisementDeleteResponse, err error)
Delete an advertisement campaign.
It'll be automatically disabled on all granted benefits.
func (*UserAdvertisementService) Enable ¶
func (r *UserAdvertisementService) Enable(ctx context.Context, id string, body UserAdvertisementEnableParams, opts ...option.RequestOption) (err error)
Enable an advertisement campaign on a granted benefit.
func (*UserAdvertisementService) Get ¶
func (r *UserAdvertisementService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserAdvertisementGetResponse, err error)
Get an advertisement campaign by ID.
func (*UserAdvertisementService) List ¶
func (r *UserAdvertisementService) List(ctx context.Context, query UserAdvertisementListParams, opts ...option.RequestOption) (res *UserAdvertisementListResponse, err error)
List advertisement campaigns.
func (*UserAdvertisementService) New ¶
func (r *UserAdvertisementService) New(ctx context.Context, body UserAdvertisementNewParams, opts ...option.RequestOption) (res *UserAdvertisementNewResponse, err error)
Create an advertisement campaign.
func (*UserAdvertisementService) Update ¶
func (r *UserAdvertisementService) Update(ctx context.Context, id string, body UserAdvertisementUpdateParams, opts ...option.RequestOption) (res *UserAdvertisementUpdateResponse, err error)
Update an advertisement campaign.
type UserAdvertisementUpdateParams ¶
type UserAdvertisementUpdateParams struct {
ImageURL param.Field[string] `json:"image_url" format:"uri"`
ImageURLDark param.Field[string] `json:"image_url_dark" format:"uri"`
LinkURL param.Field[string] `json:"link_url" format:"uri"`
Text param.Field[string] `json:"text"`
}
func (UserAdvertisementUpdateParams) MarshalJSON ¶
func (r UserAdvertisementUpdateParams) MarshalJSON() (data []byte, err error)
type UserAdvertisementUpdateResponse ¶
type UserAdvertisementUpdateResponse struct {
ID string `json:"id,required" format:"uuid4"`
Clicks int64 `json:"clicks,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
ImageURL string `json:"image_url,required" format:"uri"`
LinkURL string `json:"link_url,required" format:"uri"`
Text string `json:"text,required"`
UserID string `json:"user_id,required" format:"uuid4"`
Views int64 `json:"views,required"`
ImageURLDark string `json:"image_url_dark,nullable" format:"uri"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userAdvertisementUpdateResponseJSON `json:"-"`
}
func (*UserAdvertisementUpdateResponse) UnmarshalJSON ¶
func (r *UserAdvertisementUpdateResponse) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponse ¶
type UserBenefitGetResponse struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type UserBenefitGetResponseType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserBenefitGetResponseBenefitArticlesSubscriberProperties],
// [UserBenefitGetResponseBenefitAdsSubscriberProperties],
// [UserBenefitGetResponseBenefitDiscordSubscriberProperties],
// [UserBenefitGetResponseBenefitCustomSubscriberProperties],
// [UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties],
// [UserBenefitGetResponseBenefitDownloadablesSubscriberProperties].
Properties interface{} `json:"properties"`
// This field can have the runtime type of
// [[]UserBenefitGetResponseBenefitAdsSubscriberGrant],
// [[]UserBenefitGetResponseBenefitCustomSubscriberGrant].
Grants interface{} `json:"grants,required"`
JSON userBenefitGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (UserBenefitGetResponse) AsUnion ¶
func (r UserBenefitGetResponse) AsUnion() UserBenefitGetResponseUnion
AsUnion returns a UserBenefitGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserBenefitGetResponseBenefitArticlesSubscriber, UserBenefitGetResponseBenefitAdsSubscriber, UserBenefitGetResponseBenefitDiscordSubscriber, UserBenefitGetResponseBenefitCustomSubscriber, UserBenefitGetResponseBenefitGitHubRepositorySubscriber, UserBenefitGetResponseBenefitDownloadablesSubscriber.
func (*UserBenefitGetResponse) UnmarshalJSON ¶
func (r *UserBenefitGetResponse) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitAdsSubscriber ¶
type UserBenefitGetResponseBenefitAdsSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
Grants []UserBenefitGetResponseBenefitAdsSubscriberGrant `json:"grants,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties UserBenefitGetResponseBenefitAdsSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitAdsSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitAdsSubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitAdsSubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitAdsSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitAdsSubscriberGrant ¶
type UserBenefitGetResponseBenefitAdsSubscriberGrant struct {
// The ID of the grant.
ID string `json:"id,required" format:"uuid4"`
// The ID of the benefit concerned by this grant.
BenefitID string `json:"benefit_id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is granted.
IsGranted bool `json:"is_granted,required"`
// Whether the benefit is revoked.
IsRevoked bool `json:"is_revoked,required"`
Properties UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties `json:"properties,required"`
// The ID of the user concerned by this grant.
UserID string `json:"user_id,required" format:"uuid4"`
// The timestamp when the benefit was granted. If `None`, the benefit is not
// granted.
GrantedAt time.Time `json:"granted_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the order that granted this benefit.
OrderID string `json:"order_id,nullable" format:"uuid4"`
// The timestamp when the benefit was revoked. If `None`, the benefit is not
// revoked.
RevokedAt time.Time `json:"revoked_at,nullable" format:"date-time"`
// The ID of the subscription that granted this benefit.
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userBenefitGetResponseBenefitAdsSubscriberGrantJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitAdsSubscriberGrant) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitAdsSubscriberGrant) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties ¶
type UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties struct {
// The ID of the enabled advertisement campaign for this benefit grant.
AdvertisementCampaignID string `json:"advertisement_campaign_id,nullable" format:"uuid4"`
JSON userBenefitGetResponseBenefitAdsSubscriberGrantsPropertiesJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitAdsSubscriberGrantsProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitAdsSubscriberProperties ¶
type UserBenefitGetResponseBenefitAdsSubscriberProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON userBenefitGetResponseBenefitAdsSubscriberPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*UserBenefitGetResponseBenefitAdsSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitAdsSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitAdsSubscriberType ¶
type UserBenefitGetResponseBenefitAdsSubscriberType string
const (
UserBenefitGetResponseBenefitAdsSubscriberTypeAds UserBenefitGetResponseBenefitAdsSubscriberType = "ads"
)
func (UserBenefitGetResponseBenefitAdsSubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitAdsSubscriberType) IsKnown() bool
type UserBenefitGetResponseBenefitArticlesSubscriber ¶
type UserBenefitGetResponseBenefitArticlesSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `articles`.
Properties UserBenefitGetResponseBenefitArticlesSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitArticlesSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitArticlesSubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitArticlesSubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitArticlesSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitArticlesSubscriberProperties ¶
type UserBenefitGetResponseBenefitArticlesSubscriberProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userBenefitGetResponseBenefitArticlesSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `articles`.
func (*UserBenefitGetResponseBenefitArticlesSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitArticlesSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitArticlesSubscriberType ¶
type UserBenefitGetResponseBenefitArticlesSubscriberType string
const (
UserBenefitGetResponseBenefitArticlesSubscriberTypeArticles UserBenefitGetResponseBenefitArticlesSubscriberType = "articles"
)
func (UserBenefitGetResponseBenefitArticlesSubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitArticlesSubscriberType) IsKnown() bool
type UserBenefitGetResponseBenefitCustomSubscriber ¶
type UserBenefitGetResponseBenefitCustomSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
Grants []UserBenefitGetResponseBenefitCustomSubscriberGrant `json:"grants,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `custom`.
Properties UserBenefitGetResponseBenefitCustomSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitCustomSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitCustomSubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitCustomSubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitCustomSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitCustomSubscriberGrant ¶
type UserBenefitGetResponseBenefitCustomSubscriberGrant struct {
// The ID of the grant.
ID string `json:"id,required" format:"uuid4"`
// The ID of the benefit concerned by this grant.
BenefitID string `json:"benefit_id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is granted.
IsGranted bool `json:"is_granted,required"`
// Whether the benefit is revoked.
IsRevoked bool `json:"is_revoked,required"`
// Properties for a benefit grant.
Properties interface{} `json:"properties,required"`
// The ID of the user concerned by this grant.
UserID string `json:"user_id,required" format:"uuid4"`
// The timestamp when the benefit was granted. If `None`, the benefit is not
// granted.
GrantedAt time.Time `json:"granted_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the order that granted this benefit.
OrderID string `json:"order_id,nullable" format:"uuid4"`
// The timestamp when the benefit was revoked. If `None`, the benefit is not
// revoked.
RevokedAt time.Time `json:"revoked_at,nullable" format:"date-time"`
// The ID of the subscription that granted this benefit.
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userBenefitGetResponseBenefitCustomSubscriberGrantJSON `json:"-"`
}
A grant of a benefit to a user.
func (*UserBenefitGetResponseBenefitCustomSubscriberGrant) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitCustomSubscriberGrant) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitCustomSubscriberProperties ¶
type UserBenefitGetResponseBenefitCustomSubscriberProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON userBenefitGetResponseBenefitCustomSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `custom`.
func (*UserBenefitGetResponseBenefitCustomSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitCustomSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitCustomSubscriberType ¶
type UserBenefitGetResponseBenefitCustomSubscriberType string
const (
UserBenefitGetResponseBenefitCustomSubscriberTypeCustom UserBenefitGetResponseBenefitCustomSubscriberType = "custom"
)
func (UserBenefitGetResponseBenefitCustomSubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitCustomSubscriberType) IsKnown() bool
type UserBenefitGetResponseBenefitDiscordSubscriber ¶
type UserBenefitGetResponseBenefitDiscordSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `discord`.
Properties UserBenefitGetResponseBenefitDiscordSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitDiscordSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitDiscordSubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitDiscordSubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitDiscordSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitDiscordSubscriberProperties ¶
type UserBenefitGetResponseBenefitDiscordSubscriberProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
JSON userBenefitGetResponseBenefitDiscordSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `discord`.
func (*UserBenefitGetResponseBenefitDiscordSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitDiscordSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitDiscordSubscriberType ¶
type UserBenefitGetResponseBenefitDiscordSubscriberType string
const (
UserBenefitGetResponseBenefitDiscordSubscriberTypeDiscord UserBenefitGetResponseBenefitDiscordSubscriberType = "discord"
)
func (UserBenefitGetResponseBenefitDiscordSubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitDiscordSubscriberType) IsKnown() bool
type UserBenefitGetResponseBenefitDownloadablesSubscriber ¶
type UserBenefitGetResponseBenefitDownloadablesSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties UserBenefitGetResponseBenefitDownloadablesSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitDownloadablesSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitDownloadablesSubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitDownloadablesSubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitDownloadablesSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitDownloadablesSubscriberProperties ¶
type UserBenefitGetResponseBenefitDownloadablesSubscriberProperties struct {
ActiveFiles []string `json:"active_files,required" format:"uuid4"`
JSON userBenefitGetResponseBenefitDownloadablesSubscriberPropertiesJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitDownloadablesSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitDownloadablesSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitDownloadablesSubscriberType ¶
type UserBenefitGetResponseBenefitDownloadablesSubscriberType string
const (
UserBenefitGetResponseBenefitDownloadablesSubscriberTypeDownloadables UserBenefitGetResponseBenefitDownloadablesSubscriberType = "downloadables"
)
func (UserBenefitGetResponseBenefitDownloadablesSubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitDownloadablesSubscriberType) IsKnown() bool
type UserBenefitGetResponseBenefitGitHubRepositorySubscriber ¶
type UserBenefitGetResponseBenefitGitHubRepositorySubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `github_repository`.
Properties UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitGetResponseBenefitGitHubRepositorySubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitGetResponseBenefitGitHubRepositorySubscriberJSON `json:"-"`
}
func (*UserBenefitGetResponseBenefitGitHubRepositorySubscriber) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitGitHubRepositorySubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties ¶
type UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties struct {
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
JSON userBenefitGetResponseBenefitGitHubRepositorySubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `github_repository`.
func (*UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitGetResponseBenefitGitHubRepositorySubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitGetResponseBenefitGitHubRepositorySubscriberType ¶
type UserBenefitGetResponseBenefitGitHubRepositorySubscriberType string
const (
UserBenefitGetResponseBenefitGitHubRepositorySubscriberTypeGitHubRepository UserBenefitGetResponseBenefitGitHubRepositorySubscriberType = "github_repository"
)
func (UserBenefitGetResponseBenefitGitHubRepositorySubscriberType) IsKnown ¶
func (r UserBenefitGetResponseBenefitGitHubRepositorySubscriberType) IsKnown() bool
type UserBenefitGetResponseType ¶
type UserBenefitGetResponseType string
const ( UserBenefitGetResponseTypeArticles UserBenefitGetResponseType = "articles" UserBenefitGetResponseTypeAds UserBenefitGetResponseType = "ads" UserBenefitGetResponseTypeDiscord UserBenefitGetResponseType = "discord" UserBenefitGetResponseTypeCustom UserBenefitGetResponseType = "custom" UserBenefitGetResponseTypeGitHubRepository UserBenefitGetResponseType = "github_repository" UserBenefitGetResponseTypeDownloadables UserBenefitGetResponseType = "downloadables" )
func (UserBenefitGetResponseType) IsKnown ¶
func (r UserBenefitGetResponseType) IsKnown() bool
type UserBenefitGetResponseUnion ¶
type UserBenefitGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by UserBenefitGetResponseBenefitArticlesSubscriber, UserBenefitGetResponseBenefitAdsSubscriber, UserBenefitGetResponseBenefitDiscordSubscriber, UserBenefitGetResponseBenefitCustomSubscriber, UserBenefitGetResponseBenefitGitHubRepositorySubscriber or UserBenefitGetResponseBenefitDownloadablesSubscriber.
type UserBenefitListParams ¶
type UserBenefitListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by order ID.
OrderID param.Field[UserBenefitListParamsOrderIDUnion] `query:"order_id" format:"uuid4"`
// Filter by organization ID.
OrganizationID param.Field[UserBenefitListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
// Filter by subscription ID.
SubscriptionID param.Field[UserBenefitListParamsSubscriptionIDUnion] `query:"subscription_id" format:"uuid4"`
// Filter by benefit type.
Type param.Field[UserBenefitListParamsTypeUnion] `query:"type"`
}
func (UserBenefitListParams) URLQuery ¶
func (r UserBenefitListParams) URLQuery() (v url.Values)
URLQuery serializes UserBenefitListParams's query parameters as `url.Values`.
type UserBenefitListParamsOrderIDArray ¶
type UserBenefitListParamsOrderIDArray []string
func (UserBenefitListParamsOrderIDArray) ImplementsUserBenefitListParamsOrderIDUnion ¶
func (r UserBenefitListParamsOrderIDArray) ImplementsUserBenefitListParamsOrderIDUnion()
type UserBenefitListParamsOrderIDUnion ¶
type UserBenefitListParamsOrderIDUnion interface {
ImplementsUserBenefitListParamsOrderIDUnion()
}
Filter by order ID.
Satisfied by [shared.UnionString], UserBenefitListParamsOrderIDArray.
type UserBenefitListParamsOrganizationIDArray ¶
type UserBenefitListParamsOrganizationIDArray []string
func (UserBenefitListParamsOrganizationIDArray) ImplementsUserBenefitListParamsOrganizationIDUnion ¶
func (r UserBenefitListParamsOrganizationIDArray) ImplementsUserBenefitListParamsOrganizationIDUnion()
type UserBenefitListParamsOrganizationIDUnion ¶
type UserBenefitListParamsOrganizationIDUnion interface {
ImplementsUserBenefitListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], UserBenefitListParamsOrganizationIDArray.
type UserBenefitListParamsSubscriptionIDArray ¶
type UserBenefitListParamsSubscriptionIDArray []string
func (UserBenefitListParamsSubscriptionIDArray) ImplementsUserBenefitListParamsSubscriptionIDUnion ¶
func (r UserBenefitListParamsSubscriptionIDArray) ImplementsUserBenefitListParamsSubscriptionIDUnion()
type UserBenefitListParamsSubscriptionIDUnion ¶
type UserBenefitListParamsSubscriptionIDUnion interface {
ImplementsUserBenefitListParamsSubscriptionIDUnion()
}
Filter by subscription ID.
Satisfied by [shared.UnionString], UserBenefitListParamsSubscriptionIDArray.
type UserBenefitListParamsTypeArray ¶
type UserBenefitListParamsTypeArray []UserBenefitListParamsTypeArray
type UserBenefitListParamsTypeBenefitType ¶
type UserBenefitListParamsTypeBenefitType string
const ( UserBenefitListParamsTypeBenefitTypeCustom UserBenefitListParamsTypeBenefitType = "custom" UserBenefitListParamsTypeBenefitTypeArticles UserBenefitListParamsTypeBenefitType = "articles" UserBenefitListParamsTypeBenefitTypeAds UserBenefitListParamsTypeBenefitType = "ads" UserBenefitListParamsTypeBenefitTypeDiscord UserBenefitListParamsTypeBenefitType = "discord" UserBenefitListParamsTypeBenefitTypeGitHubRepository UserBenefitListParamsTypeBenefitType = "github_repository" UserBenefitListParamsTypeBenefitTypeDownloadables UserBenefitListParamsTypeBenefitType = "downloadables" )
func (UserBenefitListParamsTypeBenefitType) IsKnown ¶
func (r UserBenefitListParamsTypeBenefitType) IsKnown() bool
type UserBenefitListParamsTypeUnion ¶
type UserBenefitListParamsTypeUnion interface {
// contains filtered or unexported methods
}
Filter by benefit type.
Satisfied by UserBenefitListParamsTypeBenefitType, UserBenefitListParamsTypeArray.
type UserBenefitListResponse ¶
type UserBenefitListResponse struct {
Pagination UserBenefitListResponsePagination `json:"pagination,required"`
Items []UserBenefitListResponseItem `json:"items"`
JSON userBenefitListResponseJSON `json:"-"`
}
func (*UserBenefitListResponse) UnmarshalJSON ¶
func (r *UserBenefitListResponse) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItem ¶
type UserBenefitListResponseItem struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
Type UserBenefitListResponseItemsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserBenefitListResponseItemsBenefitArticlesSubscriberProperties],
// [UserBenefitListResponseItemsBenefitAdsSubscriberProperties],
// [UserBenefitListResponseItemsBenefitDiscordSubscriberProperties],
// [UserBenefitListResponseItemsBenefitCustomSubscriberProperties],
// [UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties],
// [UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties].
Properties interface{} `json:"properties"`
// This field can have the runtime type of
// [[]UserBenefitListResponseItemsBenefitAdsSubscriberGrant],
// [[]UserBenefitListResponseItemsBenefitCustomSubscriberGrant].
Grants interface{} `json:"grants,required"`
JSON userBenefitListResponseItemJSON `json:"-"`
// contains filtered or unexported fields
}
func (UserBenefitListResponseItem) AsUnion ¶
func (r UserBenefitListResponseItem) AsUnion() UserBenefitListResponseItemsUnion
AsUnion returns a UserBenefitListResponseItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserBenefitListResponseItemsBenefitArticlesSubscriber, UserBenefitListResponseItemsBenefitAdsSubscriber, UserBenefitListResponseItemsBenefitDiscordSubscriber, UserBenefitListResponseItemsBenefitCustomSubscriber, UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber, UserBenefitListResponseItemsBenefitDownloadablesSubscriber.
func (*UserBenefitListResponseItem) UnmarshalJSON ¶
func (r *UserBenefitListResponseItem) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitAdsSubscriber ¶
type UserBenefitListResponseItemsBenefitAdsSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
Grants []UserBenefitListResponseItemsBenefitAdsSubscriberGrant `json:"grants,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `ads`.
Properties UserBenefitListResponseItemsBenefitAdsSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitAdsSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitAdsSubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitAdsSubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitAdsSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitAdsSubscriberGrant ¶
type UserBenefitListResponseItemsBenefitAdsSubscriberGrant struct {
// The ID of the grant.
ID string `json:"id,required" format:"uuid4"`
// The ID of the benefit concerned by this grant.
BenefitID string `json:"benefit_id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is granted.
IsGranted bool `json:"is_granted,required"`
// Whether the benefit is revoked.
IsRevoked bool `json:"is_revoked,required"`
Properties UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties `json:"properties,required"`
// The ID of the user concerned by this grant.
UserID string `json:"user_id,required" format:"uuid4"`
// The timestamp when the benefit was granted. If `None`, the benefit is not
// granted.
GrantedAt time.Time `json:"granted_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the order that granted this benefit.
OrderID string `json:"order_id,nullable" format:"uuid4"`
// The timestamp when the benefit was revoked. If `None`, the benefit is not
// revoked.
RevokedAt time.Time `json:"revoked_at,nullable" format:"date-time"`
// The ID of the subscription that granted this benefit.
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userBenefitListResponseItemsBenefitAdsSubscriberGrantJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitAdsSubscriberGrant) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitAdsSubscriberGrant) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties ¶
type UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties struct {
// The ID of the enabled advertisement campaign for this benefit grant.
AdvertisementCampaignID string `json:"advertisement_campaign_id,nullable" format:"uuid4"`
JSON userBenefitListResponseItemsBenefitAdsSubscriberGrantsPropertiesJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitAdsSubscriberGrantsProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitAdsSubscriberProperties ¶
type UserBenefitListResponseItemsBenefitAdsSubscriberProperties struct {
// The height of the displayed ad.
ImageHeight int64 `json:"image_height"`
// The width of the displayed ad.
ImageWidth int64 `json:"image_width"`
JSON userBenefitListResponseItemsBenefitAdsSubscriberPropertiesJSON `json:"-"`
}
Properties for a benefit of type `ads`.
func (*UserBenefitListResponseItemsBenefitAdsSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitAdsSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitAdsSubscriberType ¶
type UserBenefitListResponseItemsBenefitAdsSubscriberType string
const (
UserBenefitListResponseItemsBenefitAdsSubscriberTypeAds UserBenefitListResponseItemsBenefitAdsSubscriberType = "ads"
)
func (UserBenefitListResponseItemsBenefitAdsSubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitAdsSubscriberType) IsKnown() bool
type UserBenefitListResponseItemsBenefitArticlesSubscriber ¶
type UserBenefitListResponseItemsBenefitArticlesSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `articles`.
Properties UserBenefitListResponseItemsBenefitArticlesSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitArticlesSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitArticlesSubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitArticlesSubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitArticlesSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitArticlesSubscriberProperties ¶
type UserBenefitListResponseItemsBenefitArticlesSubscriberProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userBenefitListResponseItemsBenefitArticlesSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `articles`.
func (*UserBenefitListResponseItemsBenefitArticlesSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitArticlesSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitArticlesSubscriberType ¶
type UserBenefitListResponseItemsBenefitArticlesSubscriberType string
const (
UserBenefitListResponseItemsBenefitArticlesSubscriberTypeArticles UserBenefitListResponseItemsBenefitArticlesSubscriberType = "articles"
)
func (UserBenefitListResponseItemsBenefitArticlesSubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitArticlesSubscriberType) IsKnown() bool
type UserBenefitListResponseItemsBenefitCustomSubscriber ¶
type UserBenefitListResponseItemsBenefitCustomSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
Grants []UserBenefitListResponseItemsBenefitCustomSubscriberGrant `json:"grants,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `custom`.
Properties UserBenefitListResponseItemsBenefitCustomSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitCustomSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitCustomSubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitCustomSubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitCustomSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitCustomSubscriberGrant ¶
type UserBenefitListResponseItemsBenefitCustomSubscriberGrant struct {
// The ID of the grant.
ID string `json:"id,required" format:"uuid4"`
// The ID of the benefit concerned by this grant.
BenefitID string `json:"benefit_id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is granted.
IsGranted bool `json:"is_granted,required"`
// Whether the benefit is revoked.
IsRevoked bool `json:"is_revoked,required"`
// Properties for a benefit grant.
Properties interface{} `json:"properties,required"`
// The ID of the user concerned by this grant.
UserID string `json:"user_id,required" format:"uuid4"`
// The timestamp when the benefit was granted. If `None`, the benefit is not
// granted.
GrantedAt time.Time `json:"granted_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the order that granted this benefit.
OrderID string `json:"order_id,nullable" format:"uuid4"`
// The timestamp when the benefit was revoked. If `None`, the benefit is not
// revoked.
RevokedAt time.Time `json:"revoked_at,nullable" format:"date-time"`
// The ID of the subscription that granted this benefit.
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userBenefitListResponseItemsBenefitCustomSubscriberGrantJSON `json:"-"`
}
A grant of a benefit to a user.
func (*UserBenefitListResponseItemsBenefitCustomSubscriberGrant) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitCustomSubscriberGrant) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitCustomSubscriberProperties ¶
type UserBenefitListResponseItemsBenefitCustomSubscriberProperties struct {
// Private note to be shared with users who have this benefit granted.
Note string `json:"note,nullable"`
JSON userBenefitListResponseItemsBenefitCustomSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `custom`.
func (*UserBenefitListResponseItemsBenefitCustomSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitCustomSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitCustomSubscriberType ¶
type UserBenefitListResponseItemsBenefitCustomSubscriberType string
const (
UserBenefitListResponseItemsBenefitCustomSubscriberTypeCustom UserBenefitListResponseItemsBenefitCustomSubscriberType = "custom"
)
func (UserBenefitListResponseItemsBenefitCustomSubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitCustomSubscriberType) IsKnown() bool
type UserBenefitListResponseItemsBenefitDiscordSubscriber ¶
type UserBenefitListResponseItemsBenefitDiscordSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `discord`.
Properties UserBenefitListResponseItemsBenefitDiscordSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitDiscordSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitDiscordSubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitDiscordSubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitDiscordSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitDiscordSubscriberProperties ¶
type UserBenefitListResponseItemsBenefitDiscordSubscriberProperties struct {
// The ID of the Discord server.
GuildID string `json:"guild_id,required"`
JSON userBenefitListResponseItemsBenefitDiscordSubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `discord`.
func (*UserBenefitListResponseItemsBenefitDiscordSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitDiscordSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitDiscordSubscriberType ¶
type UserBenefitListResponseItemsBenefitDiscordSubscriberType string
const (
UserBenefitListResponseItemsBenefitDiscordSubscriberTypeDiscord UserBenefitListResponseItemsBenefitDiscordSubscriberType = "discord"
)
func (UserBenefitListResponseItemsBenefitDiscordSubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitDiscordSubscriberType) IsKnown() bool
type UserBenefitListResponseItemsBenefitDownloadablesSubscriber ¶
type UserBenefitListResponseItemsBenefitDownloadablesSubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Properties UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitDownloadablesSubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitDownloadablesSubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitDownloadablesSubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitDownloadablesSubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties ¶
type UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties struct {
ActiveFiles []string `json:"active_files,required" format:"uuid4"`
JSON userBenefitListResponseItemsBenefitDownloadablesSubscriberPropertiesJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitDownloadablesSubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitDownloadablesSubscriberType ¶
type UserBenefitListResponseItemsBenefitDownloadablesSubscriberType string
const (
UserBenefitListResponseItemsBenefitDownloadablesSubscriberTypeDownloadables UserBenefitListResponseItemsBenefitDownloadablesSubscriberType = "downloadables"
)
func (UserBenefitListResponseItemsBenefitDownloadablesSubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitDownloadablesSubscriberType) IsKnown() bool
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber ¶
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties available to subscribers for a benefit of type `github_repository`.
Properties UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userBenefitListResponseItemsBenefitGitHubRepositorySubscriberJSON `json:"-"`
}
func (*UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties ¶
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties struct {
// The name of the repository.
RepositoryName string `json:"repository_name,required"`
// The owner of the repository.
RepositoryOwner string `json:"repository_owner,required"`
JSON userBenefitListResponseItemsBenefitGitHubRepositorySubscriberPropertiesJSON `json:"-"`
}
Properties available to subscribers for a benefit of type `github_repository`.
func (*UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties) UnmarshalJSON ¶
func (r *UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberProperties) UnmarshalJSON(data []byte) (err error)
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType ¶
type UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType string
const (
UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberTypeGitHubRepository UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType = "github_repository"
)
func (UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType) IsKnown ¶
func (r UserBenefitListResponseItemsBenefitGitHubRepositorySubscriberType) IsKnown() bool
type UserBenefitListResponseItemsType ¶
type UserBenefitListResponseItemsType string
const ( UserBenefitListResponseItemsTypeArticles UserBenefitListResponseItemsType = "articles" UserBenefitListResponseItemsTypeAds UserBenefitListResponseItemsType = "ads" UserBenefitListResponseItemsTypeDiscord UserBenefitListResponseItemsType = "discord" UserBenefitListResponseItemsTypeCustom UserBenefitListResponseItemsType = "custom" UserBenefitListResponseItemsTypeGitHubRepository UserBenefitListResponseItemsType = "github_repository" UserBenefitListResponseItemsTypeDownloadables UserBenefitListResponseItemsType = "downloadables" )
func (UserBenefitListResponseItemsType) IsKnown ¶
func (r UserBenefitListResponseItemsType) IsKnown() bool
type UserBenefitListResponseItemsUnion ¶
type UserBenefitListResponseItemsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by UserBenefitListResponseItemsBenefitArticlesSubscriber, UserBenefitListResponseItemsBenefitAdsSubscriber, UserBenefitListResponseItemsBenefitDiscordSubscriber, UserBenefitListResponseItemsBenefitCustomSubscriber, UserBenefitListResponseItemsBenefitGitHubRepositorySubscriber or UserBenefitListResponseItemsBenefitDownloadablesSubscriber.
type UserBenefitListResponsePagination ¶
type UserBenefitListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON userBenefitListResponsePaginationJSON `json:"-"`
}
func (*UserBenefitListResponsePagination) UnmarshalJSON ¶
func (r *UserBenefitListResponsePagination) UnmarshalJSON(data []byte) (err error)
type UserBenefitService ¶
type UserBenefitService struct {
Options []option.RequestOption
}
UserBenefitService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserBenefitService method instead.
func NewUserBenefitService ¶
func NewUserBenefitService(opts ...option.RequestOption) (r *UserBenefitService)
NewUserBenefitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserBenefitService) Get ¶
func (r *UserBenefitService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserBenefitGetResponse, err error)
Get a granted benefit by ID.
func (*UserBenefitService) List ¶
func (r *UserBenefitService) List(ctx context.Context, query UserBenefitListParams, opts ...option.RequestOption) (res *UserBenefitListResponse, err error)
List my granted benefits.
type UserDownloadableGetResponse ¶
type UserDownloadableGetResponse = interface{}
type UserDownloadableListParams ¶
type UserDownloadableListParams struct {
// Filter by given benefit ID.
BenefitID param.Field[UserDownloadableListParamsBenefitIDUnion] `query:"benefit_id" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[UserDownloadableListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (UserDownloadableListParams) URLQuery ¶
func (r UserDownloadableListParams) URLQuery() (v url.Values)
URLQuery serializes UserDownloadableListParams's query parameters as `url.Values`.
type UserDownloadableListParamsBenefitIDArray ¶
type UserDownloadableListParamsBenefitIDArray []string
func (UserDownloadableListParamsBenefitIDArray) ImplementsUserDownloadableListParamsBenefitIDUnion ¶
func (r UserDownloadableListParamsBenefitIDArray) ImplementsUserDownloadableListParamsBenefitIDUnion()
type UserDownloadableListParamsBenefitIDUnion ¶
type UserDownloadableListParamsBenefitIDUnion interface {
ImplementsUserDownloadableListParamsBenefitIDUnion()
}
Filter by given benefit ID.
Satisfied by [shared.UnionString], UserDownloadableListParamsBenefitIDArray.
type UserDownloadableListParamsOrganizationIDArray ¶
type UserDownloadableListParamsOrganizationIDArray []string
func (UserDownloadableListParamsOrganizationIDArray) ImplementsUserDownloadableListParamsOrganizationIDUnion ¶
func (r UserDownloadableListParamsOrganizationIDArray) ImplementsUserDownloadableListParamsOrganizationIDUnion()
type UserDownloadableListParamsOrganizationIDUnion ¶
type UserDownloadableListParamsOrganizationIDUnion interface {
ImplementsUserDownloadableListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], UserDownloadableListParamsOrganizationIDArray.
type UserDownloadableListResponse ¶
type UserDownloadableListResponse struct {
Pagination UserDownloadableListResponsePagination `json:"pagination,required"`
Items []UserDownloadableListResponseItem `json:"items"`
JSON userDownloadableListResponseJSON `json:"-"`
}
func (*UserDownloadableListResponse) UnmarshalJSON ¶
func (r *UserDownloadableListResponse) UnmarshalJSON(data []byte) (err error)
type UserDownloadableListResponseItem ¶
type UserDownloadableListResponseItem struct {
ID string `json:"id,required" format:"uuid4"`
BenefitID string `json:"benefit_id,required" format:"uuid4"`
File UserDownloadableListResponseItemsFile `json:"file,required"`
JSON userDownloadableListResponseItemJSON `json:"-"`
}
func (*UserDownloadableListResponseItem) UnmarshalJSON ¶
func (r *UserDownloadableListResponseItem) UnmarshalJSON(data []byte) (err error)
type UserDownloadableListResponseItemsFile ¶
type UserDownloadableListResponseItemsFile struct {
ID string `json:"id,required" format:"uuid4"`
Download UserDownloadableListResponseItemsFileDownload `json:"download,required"`
IsUploaded bool `json:"is_uploaded,required"`
MimeType string `json:"mime_type,required"`
Name string `json:"name,required"`
OrganizationID string `json:"organization_id,required" format:"uuid4"`
Path string `json:"path,required"`
Service UserDownloadableListResponseItemsFileService `json:"service,required"`
Size int64 `json:"size,required"`
SizeReadable string `json:"size_readable,required"`
Version string `json:"version,required,nullable"`
ChecksumEtag string `json:"checksum_etag,nullable"`
ChecksumSha256Base64 string `json:"checksum_sha256_base64,nullable"`
ChecksumSha256Hex string `json:"checksum_sha256_hex,nullable"`
LastModifiedAt time.Time `json:"last_modified_at,nullable" format:"date-time"`
StorageVersion string `json:"storage_version,nullable"`
JSON userDownloadableListResponseItemsFileJSON `json:"-"`
}
func (*UserDownloadableListResponseItemsFile) UnmarshalJSON ¶
func (r *UserDownloadableListResponseItemsFile) UnmarshalJSON(data []byte) (err error)
type UserDownloadableListResponseItemsFileDownload ¶
type UserDownloadableListResponseItemsFileDownload struct {
ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
URL string `json:"url,required"`
Headers map[string]string `json:"headers"`
JSON userDownloadableListResponseItemsFileDownloadJSON `json:"-"`
}
func (*UserDownloadableListResponseItemsFileDownload) UnmarshalJSON ¶
func (r *UserDownloadableListResponseItemsFileDownload) UnmarshalJSON(data []byte) (err error)
type UserDownloadableListResponseItemsFileService ¶
type UserDownloadableListResponseItemsFileService string
const ( UserDownloadableListResponseItemsFileServiceDownloadable UserDownloadableListResponseItemsFileService = "downloadable" UserDownloadableListResponseItemsFileServiceProductMedia UserDownloadableListResponseItemsFileService = "product_media" UserDownloadableListResponseItemsFileServiceOrganizationAvatar UserDownloadableListResponseItemsFileService = "organization_avatar" )
func (UserDownloadableListResponseItemsFileService) IsKnown ¶
func (r UserDownloadableListResponseItemsFileService) IsKnown() bool
type UserDownloadableListResponsePagination ¶
type UserDownloadableListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON userDownloadableListResponsePaginationJSON `json:"-"`
}
func (*UserDownloadableListResponsePagination) UnmarshalJSON ¶
func (r *UserDownloadableListResponsePagination) UnmarshalJSON(data []byte) (err error)
type UserDownloadableService ¶
type UserDownloadableService struct {
Options []option.RequestOption
}
UserDownloadableService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserDownloadableService method instead.
func NewUserDownloadableService ¶
func NewUserDownloadableService(opts ...option.RequestOption) (r *UserDownloadableService)
NewUserDownloadableService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserDownloadableService) Get ¶
func (r *UserDownloadableService) Get(ctx context.Context, token string, opts ...option.RequestOption) (res *UserDownloadableGetResponse, err error)
Get Downloadable
func (*UserDownloadableService) List ¶
func (r *UserDownloadableService) List(ctx context.Context, query UserDownloadableListParams, opts ...option.RequestOption) (res *UserDownloadableListResponse, err error)
List Downloadables
type UserInfoOrganization ¶
type UserInfoOrganization struct {
Sub string `json:"sub,required"`
Name string `json:"name,nullable"`
JSON userInfoOrganizationJSON `json:"-"`
}
func (*UserInfoOrganization) UnmarshalJSON ¶
func (r *UserInfoOrganization) UnmarshalJSON(data []byte) (err error)
type UserInfoUser ¶
type UserInfoUser struct {
Sub string `json:"sub,required"`
Email string `json:"email,nullable"`
EmailVerified bool `json:"email_verified,nullable"`
Name string `json:"name,nullable"`
JSON userInfoUserJSON `json:"-"`
}
func (*UserInfoUser) UnmarshalJSON ¶
func (r *UserInfoUser) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponse ¶
type UserOrderGetResponse struct {
ID string `json:"id,required" format:"uuid4"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
Product UserOrderGetResponseProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
ProductPrice UserOrderGetResponseProductPrice `json:"product_price,required"`
ProductPriceID string `json:"product_price_id,required" format:"uuid4"`
TaxAmount int64 `json:"tax_amount,required"`
UserID string `json:"user_id,required" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Subscription UserOrderGetResponseSubscription `json:"subscription,nullable"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userOrderGetResponseJSON `json:"-"`
}
func (*UserOrderGetResponse) UnmarshalJSON ¶
func (r *UserOrderGetResponse) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProduct ¶
type UserOrderGetResponseProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserOrderGetResponseProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserOrderGetResponseProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserOrderGetResponseProductType `json:"type,nullable"`
JSON userOrderGetResponseProductJSON `json:"-"`
}
func (*UserOrderGetResponseProduct) UnmarshalJSON ¶
func (r *UserOrderGetResponseProduct) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductBenefit ¶
type UserOrderGetResponseProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserOrderGetResponseProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserOrderGetResponseProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userOrderGetResponseProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserOrderGetResponseProductBenefit) AsUnion ¶
func (r UserOrderGetResponseProductBenefit) AsUnion() UserOrderGetResponseProductBenefitsUnion
AsUnion returns a UserOrderGetResponseProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserOrderGetResponseProductBenefitsBenefitBase, UserOrderGetResponseProductBenefitsBenefitArticles.
func (*UserOrderGetResponseProductBenefit) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductBenefitsBenefitArticles ¶
type UserOrderGetResponseProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserOrderGetResponseProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserOrderGetResponseProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderGetResponseProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserOrderGetResponseProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductBenefitsBenefitArticlesProperties ¶
type UserOrderGetResponseProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userOrderGetResponseProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserOrderGetResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductBenefitsBenefitArticlesType ¶
type UserOrderGetResponseProductBenefitsBenefitArticlesType string
const (
UserOrderGetResponseProductBenefitsBenefitArticlesTypeArticles UserOrderGetResponseProductBenefitsBenefitArticlesType = "articles"
)
func (UserOrderGetResponseProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserOrderGetResponseProductBenefitsBenefitArticlesType) IsKnown() bool
type UserOrderGetResponseProductBenefitsBenefitBase ¶
type UserOrderGetResponseProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserOrderGetResponseProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderGetResponseProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserOrderGetResponseProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductBenefitsBenefitBaseType ¶
type UserOrderGetResponseProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserOrderGetResponseProductBenefitsBenefitBaseTypeCustom UserOrderGetResponseProductBenefitsBenefitBaseType = "custom" UserOrderGetResponseProductBenefitsBenefitBaseTypeArticles UserOrderGetResponseProductBenefitsBenefitBaseType = "articles" UserOrderGetResponseProductBenefitsBenefitBaseTypeAds UserOrderGetResponseProductBenefitsBenefitBaseType = "ads" UserOrderGetResponseProductBenefitsBenefitBaseTypeDiscord UserOrderGetResponseProductBenefitsBenefitBaseType = "discord" UserOrderGetResponseProductBenefitsBenefitBaseTypeGitHubRepository UserOrderGetResponseProductBenefitsBenefitBaseType = "github_repository" UserOrderGetResponseProductBenefitsBenefitBaseTypeDownloadables UserOrderGetResponseProductBenefitsBenefitBaseType = "downloadables" )
func (UserOrderGetResponseProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserOrderGetResponseProductBenefitsBenefitBaseType) IsKnown() bool
type UserOrderGetResponseProductBenefitsType ¶
type UserOrderGetResponseProductBenefitsType string
The type of the benefit.
const ( UserOrderGetResponseProductBenefitsTypeCustom UserOrderGetResponseProductBenefitsType = "custom" UserOrderGetResponseProductBenefitsTypeArticles UserOrderGetResponseProductBenefitsType = "articles" UserOrderGetResponseProductBenefitsTypeAds UserOrderGetResponseProductBenefitsType = "ads" UserOrderGetResponseProductBenefitsTypeDiscord UserOrderGetResponseProductBenefitsType = "discord" UserOrderGetResponseProductBenefitsTypeGitHubRepository UserOrderGetResponseProductBenefitsType = "github_repository" UserOrderGetResponseProductBenefitsTypeDownloadables UserOrderGetResponseProductBenefitsType = "downloadables" )
func (UserOrderGetResponseProductBenefitsType) IsKnown ¶
func (r UserOrderGetResponseProductBenefitsType) IsKnown() bool
type UserOrderGetResponseProductBenefitsUnion ¶
type UserOrderGetResponseProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserOrderGetResponseProductBenefitsBenefitBase or UserOrderGetResponseProductBenefitsBenefitArticles.
type UserOrderGetResponseProductPrice ¶
type UserOrderGetResponseProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserOrderGetResponseProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserOrderGetResponseProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userOrderGetResponseProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserOrderGetResponseProductPrice) AsUnion ¶
func (r UserOrderGetResponseProductPrice) AsUnion() UserOrderGetResponseProductPricesUnion
AsUnion returns a UserOrderGetResponseProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserOrderGetResponseProductPricesProductPriceRecurring, UserOrderGetResponseProductPricesProductPriceOneTime.
func (*UserOrderGetResponseProductPrice) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductPrice) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductPricesProductPriceOneTime ¶
type UserOrderGetResponseProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserOrderGetResponseProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderGetResponseProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserOrderGetResponseProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductPricesProductPriceOneTimeType ¶
type UserOrderGetResponseProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserOrderGetResponseProductPricesProductPriceOneTimeTypeOneTime UserOrderGetResponseProductPricesProductPriceOneTimeType = "one_time"
)
func (UserOrderGetResponseProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserOrderGetResponseProductPricesProductPriceOneTimeType) IsKnown() bool
type UserOrderGetResponseProductPricesProductPriceRecurring ¶
type UserOrderGetResponseProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserOrderGetResponseProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userOrderGetResponseProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserOrderGetResponseProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserOrderGetResponseProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval ¶
type UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserOrderGetResponseProductPricesProductPriceRecurringRecurringIntervalMonth UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval = "month" UserOrderGetResponseProductPricesProductPriceRecurringRecurringIntervalYear UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval = "year" )
func (UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserOrderGetResponseProductPricesProductPriceRecurringRecurringInterval) IsKnown() bool
type UserOrderGetResponseProductPricesProductPriceRecurringType ¶
type UserOrderGetResponseProductPricesProductPriceRecurringType string
The type of the price.
const (
UserOrderGetResponseProductPricesProductPriceRecurringTypeRecurring UserOrderGetResponseProductPricesProductPriceRecurringType = "recurring"
)
func (UserOrderGetResponseProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserOrderGetResponseProductPricesProductPriceRecurringType) IsKnown() bool
type UserOrderGetResponseProductPricesRecurringInterval ¶
type UserOrderGetResponseProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserOrderGetResponseProductPricesRecurringIntervalMonth UserOrderGetResponseProductPricesRecurringInterval = "month" UserOrderGetResponseProductPricesRecurringIntervalYear UserOrderGetResponseProductPricesRecurringInterval = "year" )
func (UserOrderGetResponseProductPricesRecurringInterval) IsKnown ¶
func (r UserOrderGetResponseProductPricesRecurringInterval) IsKnown() bool
type UserOrderGetResponseProductPricesType ¶
type UserOrderGetResponseProductPricesType string
The type of the price.
const ( UserOrderGetResponseProductPricesTypeRecurring UserOrderGetResponseProductPricesType = "recurring" UserOrderGetResponseProductPricesTypeOneTime UserOrderGetResponseProductPricesType = "one_time" )
func (UserOrderGetResponseProductPricesType) IsKnown ¶
func (r UserOrderGetResponseProductPricesType) IsKnown() bool
type UserOrderGetResponseProductPricesUnion ¶
type UserOrderGetResponseProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserOrderGetResponseProductPricesProductPriceRecurring or UserOrderGetResponseProductPricesProductPriceOneTime.
type UserOrderGetResponseProductType ¶
type UserOrderGetResponseProductType string
const ( UserOrderGetResponseProductTypeFree UserOrderGetResponseProductType = "free" UserOrderGetResponseProductTypeIndividual UserOrderGetResponseProductType = "individual" UserOrderGetResponseProductTypeBusiness UserOrderGetResponseProductType = "business" )
func (UserOrderGetResponseProductType) IsKnown ¶
func (r UserOrderGetResponseProductType) IsKnown() bool
type UserOrderGetResponseSubscription ¶
type UserOrderGetResponseSubscription struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserOrderGetResponseSubscriptionStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userOrderGetResponseSubscriptionJSON `json:"-"`
}
func (*UserOrderGetResponseSubscription) UnmarshalJSON ¶
func (r *UserOrderGetResponseSubscription) UnmarshalJSON(data []byte) (err error)
type UserOrderGetResponseSubscriptionStatus ¶
type UserOrderGetResponseSubscriptionStatus string
const ( UserOrderGetResponseSubscriptionStatusIncomplete UserOrderGetResponseSubscriptionStatus = "incomplete" UserOrderGetResponseSubscriptionStatusIncompleteExpired UserOrderGetResponseSubscriptionStatus = "incomplete_expired" UserOrderGetResponseSubscriptionStatusTrialing UserOrderGetResponseSubscriptionStatus = "trialing" UserOrderGetResponseSubscriptionStatusActive UserOrderGetResponseSubscriptionStatus = "active" UserOrderGetResponseSubscriptionStatusPastDue UserOrderGetResponseSubscriptionStatus = "past_due" UserOrderGetResponseSubscriptionStatusCanceled UserOrderGetResponseSubscriptionStatus = "canceled" UserOrderGetResponseSubscriptionStatusUnpaid UserOrderGetResponseSubscriptionStatus = "unpaid" )
func (UserOrderGetResponseSubscriptionStatus) IsKnown ¶
func (r UserOrderGetResponseSubscriptionStatus) IsKnown() bool
type UserOrderInvoiceResponse ¶
type UserOrderInvoiceResponse struct {
// The URL to the invoice.
URL string `json:"url,required"`
JSON userOrderInvoiceResponseJSON `json:"-"`
}
Order's invoice data.
func (*UserOrderInvoiceResponse) UnmarshalJSON ¶
func (r *UserOrderInvoiceResponse) UnmarshalJSON(data []byte) (err error)
type UserOrderListParams ¶
type UserOrderListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[UserOrderListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by product ID.
ProductID param.Field[UserOrderListParamsProductIDUnion] `query:"product_id" format:"uuid4"`
// Filter by product price type. `recurring` will return orders corresponding to
// subscriptions creations or renewals. `one_time` will return orders corresponding
// to one-time purchases.
ProductPriceType param.Field[UserOrderListParamsProductPriceTypeUnion] `query:"product_price_type"`
// Search by product or organization name.
Query param.Field[string] `query:"query"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
// Filter by subscription ID.
SubscriptionID param.Field[UserOrderListParamsSubscriptionIDUnion] `query:"subscription_id" format:"uuid4"`
}
func (UserOrderListParams) URLQuery ¶
func (r UserOrderListParams) URLQuery() (v url.Values)
URLQuery serializes UserOrderListParams's query parameters as `url.Values`.
type UserOrderListParamsOrganizationIDArray ¶
type UserOrderListParamsOrganizationIDArray []string
func (UserOrderListParamsOrganizationIDArray) ImplementsUserOrderListParamsOrganizationIDUnion ¶
func (r UserOrderListParamsOrganizationIDArray) ImplementsUserOrderListParamsOrganizationIDUnion()
type UserOrderListParamsOrganizationIDUnion ¶
type UserOrderListParamsOrganizationIDUnion interface {
ImplementsUserOrderListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], UserOrderListParamsOrganizationIDArray.
type UserOrderListParamsProductIDArray ¶
type UserOrderListParamsProductIDArray []string
func (UserOrderListParamsProductIDArray) ImplementsUserOrderListParamsProductIDUnion ¶
func (r UserOrderListParamsProductIDArray) ImplementsUserOrderListParamsProductIDUnion()
type UserOrderListParamsProductIDUnion ¶
type UserOrderListParamsProductIDUnion interface {
ImplementsUserOrderListParamsProductIDUnion()
}
Filter by product ID.
Satisfied by [shared.UnionString], UserOrderListParamsProductIDArray.
type UserOrderListParamsProductPriceTypeArray ¶
type UserOrderListParamsProductPriceTypeArray []UserOrderListParamsProductPriceTypeArray
type UserOrderListParamsProductPriceTypeProductPriceType ¶
type UserOrderListParamsProductPriceTypeProductPriceType string
const ( UserOrderListParamsProductPriceTypeProductPriceTypeOneTime UserOrderListParamsProductPriceTypeProductPriceType = "one_time" UserOrderListParamsProductPriceTypeProductPriceTypeRecurring UserOrderListParamsProductPriceTypeProductPriceType = "recurring" )
func (UserOrderListParamsProductPriceTypeProductPriceType) IsKnown ¶
func (r UserOrderListParamsProductPriceTypeProductPriceType) IsKnown() bool
type UserOrderListParamsProductPriceTypeUnion ¶
type UserOrderListParamsProductPriceTypeUnion interface {
// contains filtered or unexported methods
}
Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases.
Satisfied by UserOrderListParamsProductPriceTypeProductPriceType, UserOrderListParamsProductPriceTypeArray.
type UserOrderListParamsSubscriptionIDArray ¶
type UserOrderListParamsSubscriptionIDArray []string
func (UserOrderListParamsSubscriptionIDArray) ImplementsUserOrderListParamsSubscriptionIDUnion ¶
func (r UserOrderListParamsSubscriptionIDArray) ImplementsUserOrderListParamsSubscriptionIDUnion()
type UserOrderListParamsSubscriptionIDUnion ¶
type UserOrderListParamsSubscriptionIDUnion interface {
ImplementsUserOrderListParamsSubscriptionIDUnion()
}
Filter by subscription ID.
Satisfied by [shared.UnionString], UserOrderListParamsSubscriptionIDArray.
type UserOrderListResponse ¶
type UserOrderListResponse struct {
Pagination UserOrderListResponsePagination `json:"pagination,required"`
Items []UserOrderListResponseItem `json:"items"`
JSON userOrderListResponseJSON `json:"-"`
}
func (*UserOrderListResponse) UnmarshalJSON ¶
func (r *UserOrderListResponse) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItem ¶
type UserOrderListResponseItem struct {
ID string `json:"id,required" format:"uuid4"`
Amount int64 `json:"amount,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Currency string `json:"currency,required"`
Product UserOrderListResponseItemsProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
ProductPrice UserOrderListResponseItemsProductPrice `json:"product_price,required"`
ProductPriceID string `json:"product_price_id,required" format:"uuid4"`
TaxAmount int64 `json:"tax_amount,required"`
UserID string `json:"user_id,required" format:"uuid4"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Subscription UserOrderListResponseItemsSubscription `json:"subscription,nullable"`
SubscriptionID string `json:"subscription_id,nullable" format:"uuid4"`
JSON userOrderListResponseItemJSON `json:"-"`
}
func (*UserOrderListResponseItem) UnmarshalJSON ¶
func (r *UserOrderListResponseItem) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProduct ¶
type UserOrderListResponseItemsProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserOrderListResponseItemsProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserOrderListResponseItemsProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserOrderListResponseItemsProductType `json:"type,nullable"`
JSON userOrderListResponseItemsProductJSON `json:"-"`
}
func (*UserOrderListResponseItemsProduct) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProduct) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductBenefit ¶
type UserOrderListResponseItemsProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserOrderListResponseItemsProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userOrderListResponseItemsProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserOrderListResponseItemsProductBenefit) AsUnion ¶
func (r UserOrderListResponseItemsProductBenefit) AsUnion() UserOrderListResponseItemsProductBenefitsUnion
AsUnion returns a UserOrderListResponseItemsProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserOrderListResponseItemsProductBenefitsBenefitBase, UserOrderListResponseItemsProductBenefitsBenefitArticles.
func (*UserOrderListResponseItemsProductBenefit) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductBenefitsBenefitArticles ¶
type UserOrderListResponseItemsProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserOrderListResponseItemsProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderListResponseItemsProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserOrderListResponseItemsProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties ¶
type UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userOrderListResponseItemsProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductBenefitsBenefitArticlesType ¶
type UserOrderListResponseItemsProductBenefitsBenefitArticlesType string
const (
UserOrderListResponseItemsProductBenefitsBenefitArticlesTypeArticles UserOrderListResponseItemsProductBenefitsBenefitArticlesType = "articles"
)
func (UserOrderListResponseItemsProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserOrderListResponseItemsProductBenefitsBenefitArticlesType) IsKnown() bool
type UserOrderListResponseItemsProductBenefitsBenefitBase ¶
type UserOrderListResponseItemsProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserOrderListResponseItemsProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderListResponseItemsProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserOrderListResponseItemsProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductBenefitsBenefitBaseType ¶
type UserOrderListResponseItemsProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserOrderListResponseItemsProductBenefitsBenefitBaseTypeCustom UserOrderListResponseItemsProductBenefitsBenefitBaseType = "custom" UserOrderListResponseItemsProductBenefitsBenefitBaseTypeArticles UserOrderListResponseItemsProductBenefitsBenefitBaseType = "articles" UserOrderListResponseItemsProductBenefitsBenefitBaseTypeAds UserOrderListResponseItemsProductBenefitsBenefitBaseType = "ads" UserOrderListResponseItemsProductBenefitsBenefitBaseTypeDiscord UserOrderListResponseItemsProductBenefitsBenefitBaseType = "discord" UserOrderListResponseItemsProductBenefitsBenefitBaseTypeGitHubRepository UserOrderListResponseItemsProductBenefitsBenefitBaseType = "github_repository" UserOrderListResponseItemsProductBenefitsBenefitBaseTypeDownloadables UserOrderListResponseItemsProductBenefitsBenefitBaseType = "downloadables" )
func (UserOrderListResponseItemsProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserOrderListResponseItemsProductBenefitsBenefitBaseType) IsKnown() bool
type UserOrderListResponseItemsProductBenefitsType ¶
type UserOrderListResponseItemsProductBenefitsType string
The type of the benefit.
const ( UserOrderListResponseItemsProductBenefitsTypeCustom UserOrderListResponseItemsProductBenefitsType = "custom" UserOrderListResponseItemsProductBenefitsTypeArticles UserOrderListResponseItemsProductBenefitsType = "articles" UserOrderListResponseItemsProductBenefitsTypeAds UserOrderListResponseItemsProductBenefitsType = "ads" UserOrderListResponseItemsProductBenefitsTypeDiscord UserOrderListResponseItemsProductBenefitsType = "discord" UserOrderListResponseItemsProductBenefitsTypeGitHubRepository UserOrderListResponseItemsProductBenefitsType = "github_repository" UserOrderListResponseItemsProductBenefitsTypeDownloadables UserOrderListResponseItemsProductBenefitsType = "downloadables" )
func (UserOrderListResponseItemsProductBenefitsType) IsKnown ¶
func (r UserOrderListResponseItemsProductBenefitsType) IsKnown() bool
type UserOrderListResponseItemsProductBenefitsUnion ¶
type UserOrderListResponseItemsProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserOrderListResponseItemsProductBenefitsBenefitBase or UserOrderListResponseItemsProductBenefitsBenefitArticles.
type UserOrderListResponseItemsProductPrice ¶
type UserOrderListResponseItemsProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserOrderListResponseItemsProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserOrderListResponseItemsProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userOrderListResponseItemsProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserOrderListResponseItemsProductPrice) AsUnion ¶
func (r UserOrderListResponseItemsProductPrice) AsUnion() UserOrderListResponseItemsProductPricesUnion
AsUnion returns a UserOrderListResponseItemsProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserOrderListResponseItemsProductPricesProductPriceRecurring, UserOrderListResponseItemsProductPricesProductPriceOneTime.
func (*UserOrderListResponseItemsProductPrice) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductPrice) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductPricesProductPriceOneTime ¶
type UserOrderListResponseItemsProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserOrderListResponseItemsProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userOrderListResponseItemsProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserOrderListResponseItemsProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductPricesProductPriceOneTimeType ¶
type UserOrderListResponseItemsProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserOrderListResponseItemsProductPricesProductPriceOneTimeTypeOneTime UserOrderListResponseItemsProductPricesProductPriceOneTimeType = "one_time"
)
func (UserOrderListResponseItemsProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserOrderListResponseItemsProductPricesProductPriceOneTimeType) IsKnown() bool
type UserOrderListResponseItemsProductPricesProductPriceRecurring ¶
type UserOrderListResponseItemsProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserOrderListResponseItemsProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userOrderListResponseItemsProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserOrderListResponseItemsProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval ¶
type UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringIntervalMonth UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval = "month" UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringIntervalYear UserOrderListResponseItemsProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserOrderListResponseItemsProductPricesProductPriceRecurringType ¶
type UserOrderListResponseItemsProductPricesProductPriceRecurringType string
The type of the price.
const (
UserOrderListResponseItemsProductPricesProductPriceRecurringTypeRecurring UserOrderListResponseItemsProductPricesProductPriceRecurringType = "recurring"
)
func (UserOrderListResponseItemsProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserOrderListResponseItemsProductPricesProductPriceRecurringType) IsKnown() bool
type UserOrderListResponseItemsProductPricesRecurringInterval ¶
type UserOrderListResponseItemsProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserOrderListResponseItemsProductPricesRecurringIntervalMonth UserOrderListResponseItemsProductPricesRecurringInterval = "month" UserOrderListResponseItemsProductPricesRecurringIntervalYear UserOrderListResponseItemsProductPricesRecurringInterval = "year" )
func (UserOrderListResponseItemsProductPricesRecurringInterval) IsKnown ¶
func (r UserOrderListResponseItemsProductPricesRecurringInterval) IsKnown() bool
type UserOrderListResponseItemsProductPricesType ¶
type UserOrderListResponseItemsProductPricesType string
The type of the price.
const ( UserOrderListResponseItemsProductPricesTypeRecurring UserOrderListResponseItemsProductPricesType = "recurring" UserOrderListResponseItemsProductPricesTypeOneTime UserOrderListResponseItemsProductPricesType = "one_time" )
func (UserOrderListResponseItemsProductPricesType) IsKnown ¶
func (r UserOrderListResponseItemsProductPricesType) IsKnown() bool
type UserOrderListResponseItemsProductPricesUnion ¶
type UserOrderListResponseItemsProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserOrderListResponseItemsProductPricesProductPriceRecurring or UserOrderListResponseItemsProductPricesProductPriceOneTime.
type UserOrderListResponseItemsProductType ¶
type UserOrderListResponseItemsProductType string
const ( UserOrderListResponseItemsProductTypeFree UserOrderListResponseItemsProductType = "free" UserOrderListResponseItemsProductTypeIndividual UserOrderListResponseItemsProductType = "individual" UserOrderListResponseItemsProductTypeBusiness UserOrderListResponseItemsProductType = "business" )
func (UserOrderListResponseItemsProductType) IsKnown ¶
func (r UserOrderListResponseItemsProductType) IsKnown() bool
type UserOrderListResponseItemsSubscription ¶
type UserOrderListResponseItemsSubscription struct {
// The ID of the object.
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserOrderListResponseItemsSubscriptionStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userOrderListResponseItemsSubscriptionJSON `json:"-"`
}
func (*UserOrderListResponseItemsSubscription) UnmarshalJSON ¶
func (r *UserOrderListResponseItemsSubscription) UnmarshalJSON(data []byte) (err error)
type UserOrderListResponseItemsSubscriptionStatus ¶
type UserOrderListResponseItemsSubscriptionStatus string
const ( UserOrderListResponseItemsSubscriptionStatusIncomplete UserOrderListResponseItemsSubscriptionStatus = "incomplete" UserOrderListResponseItemsSubscriptionStatusIncompleteExpired UserOrderListResponseItemsSubscriptionStatus = "incomplete_expired" UserOrderListResponseItemsSubscriptionStatusTrialing UserOrderListResponseItemsSubscriptionStatus = "trialing" UserOrderListResponseItemsSubscriptionStatusActive UserOrderListResponseItemsSubscriptionStatus = "active" UserOrderListResponseItemsSubscriptionStatusPastDue UserOrderListResponseItemsSubscriptionStatus = "past_due" UserOrderListResponseItemsSubscriptionStatusCanceled UserOrderListResponseItemsSubscriptionStatus = "canceled" UserOrderListResponseItemsSubscriptionStatusUnpaid UserOrderListResponseItemsSubscriptionStatus = "unpaid" )
func (UserOrderListResponseItemsSubscriptionStatus) IsKnown ¶
func (r UserOrderListResponseItemsSubscriptionStatus) IsKnown() bool
type UserOrderListResponsePagination ¶
type UserOrderListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON userOrderListResponsePaginationJSON `json:"-"`
}
func (*UserOrderListResponsePagination) UnmarshalJSON ¶
func (r *UserOrderListResponsePagination) UnmarshalJSON(data []byte) (err error)
type UserOrderService ¶
type UserOrderService struct {
Options []option.RequestOption
}
UserOrderService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserOrderService method instead.
func NewUserOrderService ¶
func NewUserOrderService(opts ...option.RequestOption) (r *UserOrderService)
NewUserOrderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserOrderService) Get ¶
func (r *UserOrderService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserOrderGetResponse, err error)
Get an order by ID.
func (*UserOrderService) Invoice ¶
func (r *UserOrderService) Invoice(ctx context.Context, id string, opts ...option.RequestOption) (res *UserOrderInvoiceResponse, err error)
Get an order's invoice data.
func (*UserOrderService) List ¶
func (r *UserOrderService) List(ctx context.Context, query UserOrderListParams, opts ...option.RequestOption) (res *UserOrderListResponse, err error)
List my orders.
type UserService ¶
type UserService struct {
Options []option.RequestOption
Benefits *UserBenefitService
Orders *UserOrderService
Subscriptions *UserSubscriptionService
Advertisements *UserAdvertisementService
Downloadables *UserDownloadableService
}
UserService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r *UserService)
NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type UserSubscriptionDeleteResponse ¶
type UserSubscriptionDeleteResponse struct {
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
Product UserSubscriptionDeleteResponseProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserSubscriptionDeleteResponseStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
Price UserSubscriptionDeleteResponsePrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userSubscriptionDeleteResponseJSON `json:"-"`
}
func (*UserSubscriptionDeleteResponse) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponse) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponsePrice ¶
type UserSubscriptionDeleteResponsePrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionDeleteResponsePriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionDeleteResponsePriceRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionDeleteResponsePriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionDeleteResponsePrice) AsUnion ¶
func (r UserSubscriptionDeleteResponsePrice) AsUnion() UserSubscriptionDeleteResponsePriceUnion
AsUnion returns a UserSubscriptionDeleteResponsePriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionDeleteResponsePriceProductPriceRecurring, UserSubscriptionDeleteResponsePriceProductPriceOneTime.
func (*UserSubscriptionDeleteResponsePrice) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponsePrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponsePriceProductPriceOneTime ¶
type UserSubscriptionDeleteResponsePriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionDeleteResponsePriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionDeleteResponsePriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionDeleteResponsePriceProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponsePriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponsePriceProductPriceOneTimeType ¶
type UserSubscriptionDeleteResponsePriceProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionDeleteResponsePriceProductPriceOneTimeTypeOneTime UserSubscriptionDeleteResponsePriceProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionDeleteResponsePriceProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionDeleteResponsePriceProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionDeleteResponsePriceProductPriceRecurring ¶
type UserSubscriptionDeleteResponsePriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionDeleteResponsePriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionDeleteResponsePriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionDeleteResponsePriceProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponsePriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval ¶
type UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringIntervalMonth UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval = "month" UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringIntervalYear UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval = "year" )
func (UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserSubscriptionDeleteResponsePriceProductPriceRecurringRecurringInterval) IsKnown() bool
type UserSubscriptionDeleteResponsePriceProductPriceRecurringType ¶
type UserSubscriptionDeleteResponsePriceProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionDeleteResponsePriceProductPriceRecurringTypeRecurring UserSubscriptionDeleteResponsePriceProductPriceRecurringType = "recurring"
)
func (UserSubscriptionDeleteResponsePriceProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionDeleteResponsePriceProductPriceRecurringType) IsKnown() bool
type UserSubscriptionDeleteResponsePriceRecurringInterval ¶
type UserSubscriptionDeleteResponsePriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionDeleteResponsePriceRecurringIntervalMonth UserSubscriptionDeleteResponsePriceRecurringInterval = "month" UserSubscriptionDeleteResponsePriceRecurringIntervalYear UserSubscriptionDeleteResponsePriceRecurringInterval = "year" )
func (UserSubscriptionDeleteResponsePriceRecurringInterval) IsKnown ¶
func (r UserSubscriptionDeleteResponsePriceRecurringInterval) IsKnown() bool
type UserSubscriptionDeleteResponsePriceType ¶
type UserSubscriptionDeleteResponsePriceType string
The type of the price.
const ( UserSubscriptionDeleteResponsePriceTypeRecurring UserSubscriptionDeleteResponsePriceType = "recurring" UserSubscriptionDeleteResponsePriceTypeOneTime UserSubscriptionDeleteResponsePriceType = "one_time" )
func (UserSubscriptionDeleteResponsePriceType) IsKnown ¶
func (r UserSubscriptionDeleteResponsePriceType) IsKnown() bool
type UserSubscriptionDeleteResponsePriceUnion ¶
type UserSubscriptionDeleteResponsePriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionDeleteResponsePriceProductPriceRecurring or UserSubscriptionDeleteResponsePriceProductPriceOneTime.
type UserSubscriptionDeleteResponseProduct ¶
type UserSubscriptionDeleteResponseProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserSubscriptionDeleteResponseProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserSubscriptionDeleteResponseProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserSubscriptionDeleteResponseProductType `json:"type,nullable"`
JSON userSubscriptionDeleteResponseProductJSON `json:"-"`
}
func (*UserSubscriptionDeleteResponseProduct) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProduct) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductBenefit ¶
type UserSubscriptionDeleteResponseProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserSubscriptionDeleteResponseProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userSubscriptionDeleteResponseProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserSubscriptionDeleteResponseProductBenefit) AsUnion ¶
func (r UserSubscriptionDeleteResponseProductBenefit) AsUnion() UserSubscriptionDeleteResponseProductBenefitsUnion
AsUnion returns a UserSubscriptionDeleteResponseProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionDeleteResponseProductBenefitsBenefitBase, UserSubscriptionDeleteResponseProductBenefitsBenefitArticles.
func (*UserSubscriptionDeleteResponseProductBenefit) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticles ¶
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionDeleteResponseProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserSubscriptionDeleteResponseProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties ¶
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userSubscriptionDeleteResponseProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType ¶
type UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType string
const (
UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesTypeArticles UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType = "articles"
)
func (UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductBenefitsBenefitArticlesType) IsKnown() bool
type UserSubscriptionDeleteResponseProductBenefitsBenefitBase ¶
type UserSubscriptionDeleteResponseProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionDeleteResponseProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserSubscriptionDeleteResponseProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType ¶
type UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeCustom UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "custom" UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeArticles UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "articles" UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeAds UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "ads" UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeDiscord UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "discord" UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeGitHubRepository UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "github_repository" UserSubscriptionDeleteResponseProductBenefitsBenefitBaseTypeDownloadables UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType = "downloadables" )
func (UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductBenefitsBenefitBaseType) IsKnown() bool
type UserSubscriptionDeleteResponseProductBenefitsType ¶
type UserSubscriptionDeleteResponseProductBenefitsType string
The type of the benefit.
const ( UserSubscriptionDeleteResponseProductBenefitsTypeCustom UserSubscriptionDeleteResponseProductBenefitsType = "custom" UserSubscriptionDeleteResponseProductBenefitsTypeArticles UserSubscriptionDeleteResponseProductBenefitsType = "articles" UserSubscriptionDeleteResponseProductBenefitsTypeAds UserSubscriptionDeleteResponseProductBenefitsType = "ads" UserSubscriptionDeleteResponseProductBenefitsTypeDiscord UserSubscriptionDeleteResponseProductBenefitsType = "discord" UserSubscriptionDeleteResponseProductBenefitsTypeGitHubRepository UserSubscriptionDeleteResponseProductBenefitsType = "github_repository" UserSubscriptionDeleteResponseProductBenefitsTypeDownloadables UserSubscriptionDeleteResponseProductBenefitsType = "downloadables" )
func (UserSubscriptionDeleteResponseProductBenefitsType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductBenefitsType) IsKnown() bool
type UserSubscriptionDeleteResponseProductBenefitsUnion ¶
type UserSubscriptionDeleteResponseProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserSubscriptionDeleteResponseProductBenefitsBenefitBase or UserSubscriptionDeleteResponseProductBenefitsBenefitArticles.
type UserSubscriptionDeleteResponseProductPrice ¶
type UserSubscriptionDeleteResponseProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionDeleteResponseProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionDeleteResponseProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionDeleteResponseProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionDeleteResponseProductPrice) AsUnion ¶
func (r UserSubscriptionDeleteResponseProductPrice) AsUnion() UserSubscriptionDeleteResponseProductPricesUnion
AsUnion returns a UserSubscriptionDeleteResponseProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionDeleteResponseProductPricesProductPriceRecurring, UserSubscriptionDeleteResponseProductPricesProductPriceOneTime.
func (*UserSubscriptionDeleteResponseProductPrice) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductPricesProductPriceOneTime ¶
type UserSubscriptionDeleteResponseProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionDeleteResponseProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionDeleteResponseProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType ¶
type UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeTypeOneTime UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductPricesProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurring ¶
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionDeleteResponseProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionDeleteResponseProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionDeleteResponseProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval ¶
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringIntervalMonth UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval = "month" UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringIntervalYear UserSubscriptionDeleteResponseProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType ¶
type UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionDeleteResponseProductPricesProductPriceRecurringTypeRecurring UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType = "recurring"
)
func (UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductPricesProductPriceRecurringType) IsKnown() bool
type UserSubscriptionDeleteResponseProductPricesRecurringInterval ¶
type UserSubscriptionDeleteResponseProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionDeleteResponseProductPricesRecurringIntervalMonth UserSubscriptionDeleteResponseProductPricesRecurringInterval = "month" UserSubscriptionDeleteResponseProductPricesRecurringIntervalYear UserSubscriptionDeleteResponseProductPricesRecurringInterval = "year" )
func (UserSubscriptionDeleteResponseProductPricesRecurringInterval) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductPricesRecurringInterval) IsKnown() bool
type UserSubscriptionDeleteResponseProductPricesType ¶
type UserSubscriptionDeleteResponseProductPricesType string
The type of the price.
const ( UserSubscriptionDeleteResponseProductPricesTypeRecurring UserSubscriptionDeleteResponseProductPricesType = "recurring" UserSubscriptionDeleteResponseProductPricesTypeOneTime UserSubscriptionDeleteResponseProductPricesType = "one_time" )
func (UserSubscriptionDeleteResponseProductPricesType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductPricesType) IsKnown() bool
type UserSubscriptionDeleteResponseProductPricesUnion ¶
type UserSubscriptionDeleteResponseProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionDeleteResponseProductPricesProductPriceRecurring or UserSubscriptionDeleteResponseProductPricesProductPriceOneTime.
type UserSubscriptionDeleteResponseProductType ¶
type UserSubscriptionDeleteResponseProductType string
const ( UserSubscriptionDeleteResponseProductTypeFree UserSubscriptionDeleteResponseProductType = "free" UserSubscriptionDeleteResponseProductTypeIndividual UserSubscriptionDeleteResponseProductType = "individual" UserSubscriptionDeleteResponseProductTypeBusiness UserSubscriptionDeleteResponseProductType = "business" )
func (UserSubscriptionDeleteResponseProductType) IsKnown ¶
func (r UserSubscriptionDeleteResponseProductType) IsKnown() bool
type UserSubscriptionDeleteResponseStatus ¶
type UserSubscriptionDeleteResponseStatus string
const ( UserSubscriptionDeleteResponseStatusIncomplete UserSubscriptionDeleteResponseStatus = "incomplete" UserSubscriptionDeleteResponseStatusIncompleteExpired UserSubscriptionDeleteResponseStatus = "incomplete_expired" UserSubscriptionDeleteResponseStatusTrialing UserSubscriptionDeleteResponseStatus = "trialing" UserSubscriptionDeleteResponseStatusActive UserSubscriptionDeleteResponseStatus = "active" UserSubscriptionDeleteResponseStatusPastDue UserSubscriptionDeleteResponseStatus = "past_due" UserSubscriptionDeleteResponseStatusCanceled UserSubscriptionDeleteResponseStatus = "canceled" UserSubscriptionDeleteResponseStatusUnpaid UserSubscriptionDeleteResponseStatus = "unpaid" )
func (UserSubscriptionDeleteResponseStatus) IsKnown ¶
func (r UserSubscriptionDeleteResponseStatus) IsKnown() bool
type UserSubscriptionGetResponse ¶
type UserSubscriptionGetResponse struct {
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
Product UserSubscriptionGetResponseProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserSubscriptionGetResponseStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
Price UserSubscriptionGetResponsePrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userSubscriptionGetResponseJSON `json:"-"`
}
func (*UserSubscriptionGetResponse) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponse) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponsePrice ¶
type UserSubscriptionGetResponsePrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionGetResponsePriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionGetResponsePriceRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionGetResponsePriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionGetResponsePrice) AsUnion ¶
func (r UserSubscriptionGetResponsePrice) AsUnion() UserSubscriptionGetResponsePriceUnion
AsUnion returns a UserSubscriptionGetResponsePriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionGetResponsePriceProductPriceRecurring, UserSubscriptionGetResponsePriceProductPriceOneTime.
func (*UserSubscriptionGetResponsePrice) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponsePrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponsePriceProductPriceOneTime ¶
type UserSubscriptionGetResponsePriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionGetResponsePriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionGetResponsePriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionGetResponsePriceProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponsePriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponsePriceProductPriceOneTimeType ¶
type UserSubscriptionGetResponsePriceProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionGetResponsePriceProductPriceOneTimeTypeOneTime UserSubscriptionGetResponsePriceProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionGetResponsePriceProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionGetResponsePriceProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionGetResponsePriceProductPriceRecurring ¶
type UserSubscriptionGetResponsePriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionGetResponsePriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionGetResponsePriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionGetResponsePriceProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponsePriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval ¶
type UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionGetResponsePriceProductPriceRecurringRecurringIntervalMonth UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval = "month" UserSubscriptionGetResponsePriceProductPriceRecurringRecurringIntervalYear UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval = "year" )
func (UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserSubscriptionGetResponsePriceProductPriceRecurringRecurringInterval) IsKnown() bool
type UserSubscriptionGetResponsePriceProductPriceRecurringType ¶
type UserSubscriptionGetResponsePriceProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionGetResponsePriceProductPriceRecurringTypeRecurring UserSubscriptionGetResponsePriceProductPriceRecurringType = "recurring"
)
func (UserSubscriptionGetResponsePriceProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionGetResponsePriceProductPriceRecurringType) IsKnown() bool
type UserSubscriptionGetResponsePriceRecurringInterval ¶
type UserSubscriptionGetResponsePriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionGetResponsePriceRecurringIntervalMonth UserSubscriptionGetResponsePriceRecurringInterval = "month" UserSubscriptionGetResponsePriceRecurringIntervalYear UserSubscriptionGetResponsePriceRecurringInterval = "year" )
func (UserSubscriptionGetResponsePriceRecurringInterval) IsKnown ¶
func (r UserSubscriptionGetResponsePriceRecurringInterval) IsKnown() bool
type UserSubscriptionGetResponsePriceType ¶
type UserSubscriptionGetResponsePriceType string
The type of the price.
const ( UserSubscriptionGetResponsePriceTypeRecurring UserSubscriptionGetResponsePriceType = "recurring" UserSubscriptionGetResponsePriceTypeOneTime UserSubscriptionGetResponsePriceType = "one_time" )
func (UserSubscriptionGetResponsePriceType) IsKnown ¶
func (r UserSubscriptionGetResponsePriceType) IsKnown() bool
type UserSubscriptionGetResponsePriceUnion ¶
type UserSubscriptionGetResponsePriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionGetResponsePriceProductPriceRecurring or UserSubscriptionGetResponsePriceProductPriceOneTime.
type UserSubscriptionGetResponseProduct ¶
type UserSubscriptionGetResponseProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserSubscriptionGetResponseProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserSubscriptionGetResponseProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserSubscriptionGetResponseProductType `json:"type,nullable"`
JSON userSubscriptionGetResponseProductJSON `json:"-"`
}
func (*UserSubscriptionGetResponseProduct) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProduct) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductBenefit ¶
type UserSubscriptionGetResponseProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserSubscriptionGetResponseProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userSubscriptionGetResponseProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserSubscriptionGetResponseProductBenefit) AsUnion ¶
func (r UserSubscriptionGetResponseProductBenefit) AsUnion() UserSubscriptionGetResponseProductBenefitsUnion
AsUnion returns a UserSubscriptionGetResponseProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionGetResponseProductBenefitsBenefitBase, UserSubscriptionGetResponseProductBenefitsBenefitArticles.
func (*UserSubscriptionGetResponseProductBenefit) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductBenefitsBenefitArticles ¶
type UserSubscriptionGetResponseProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserSubscriptionGetResponseProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionGetResponseProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserSubscriptionGetResponseProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties ¶
type UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userSubscriptionGetResponseProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductBenefitsBenefitArticlesType ¶
type UserSubscriptionGetResponseProductBenefitsBenefitArticlesType string
const (
UserSubscriptionGetResponseProductBenefitsBenefitArticlesTypeArticles UserSubscriptionGetResponseProductBenefitsBenefitArticlesType = "articles"
)
func (UserSubscriptionGetResponseProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserSubscriptionGetResponseProductBenefitsBenefitArticlesType) IsKnown() bool
type UserSubscriptionGetResponseProductBenefitsBenefitBase ¶
type UserSubscriptionGetResponseProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserSubscriptionGetResponseProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionGetResponseProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserSubscriptionGetResponseProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductBenefitsBenefitBaseType ¶
type UserSubscriptionGetResponseProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeCustom UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "custom" UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeArticles UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "articles" UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeAds UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "ads" UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeDiscord UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "discord" UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeGitHubRepository UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "github_repository" UserSubscriptionGetResponseProductBenefitsBenefitBaseTypeDownloadables UserSubscriptionGetResponseProductBenefitsBenefitBaseType = "downloadables" )
func (UserSubscriptionGetResponseProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserSubscriptionGetResponseProductBenefitsBenefitBaseType) IsKnown() bool
type UserSubscriptionGetResponseProductBenefitsType ¶
type UserSubscriptionGetResponseProductBenefitsType string
The type of the benefit.
const ( UserSubscriptionGetResponseProductBenefitsTypeCustom UserSubscriptionGetResponseProductBenefitsType = "custom" UserSubscriptionGetResponseProductBenefitsTypeArticles UserSubscriptionGetResponseProductBenefitsType = "articles" UserSubscriptionGetResponseProductBenefitsTypeAds UserSubscriptionGetResponseProductBenefitsType = "ads" UserSubscriptionGetResponseProductBenefitsTypeDiscord UserSubscriptionGetResponseProductBenefitsType = "discord" UserSubscriptionGetResponseProductBenefitsTypeGitHubRepository UserSubscriptionGetResponseProductBenefitsType = "github_repository" UserSubscriptionGetResponseProductBenefitsTypeDownloadables UserSubscriptionGetResponseProductBenefitsType = "downloadables" )
func (UserSubscriptionGetResponseProductBenefitsType) IsKnown ¶
func (r UserSubscriptionGetResponseProductBenefitsType) IsKnown() bool
type UserSubscriptionGetResponseProductBenefitsUnion ¶
type UserSubscriptionGetResponseProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserSubscriptionGetResponseProductBenefitsBenefitBase or UserSubscriptionGetResponseProductBenefitsBenefitArticles.
type UserSubscriptionGetResponseProductPrice ¶
type UserSubscriptionGetResponseProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionGetResponseProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionGetResponseProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionGetResponseProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionGetResponseProductPrice) AsUnion ¶
func (r UserSubscriptionGetResponseProductPrice) AsUnion() UserSubscriptionGetResponseProductPricesUnion
AsUnion returns a UserSubscriptionGetResponseProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionGetResponseProductPricesProductPriceRecurring, UserSubscriptionGetResponseProductPricesProductPriceOneTime.
func (*UserSubscriptionGetResponseProductPrice) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductPricesProductPriceOneTime ¶
type UserSubscriptionGetResponseProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionGetResponseProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionGetResponseProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionGetResponseProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductPricesProductPriceOneTimeType ¶
type UserSubscriptionGetResponseProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionGetResponseProductPricesProductPriceOneTimeTypeOneTime UserSubscriptionGetResponseProductPricesProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionGetResponseProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionGetResponseProductPricesProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionGetResponseProductPricesProductPriceRecurring ¶
type UserSubscriptionGetResponseProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionGetResponseProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionGetResponseProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionGetResponseProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionGetResponseProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval ¶
type UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringIntervalMonth UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval = "month" UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringIntervalYear UserSubscriptionGetResponseProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserSubscriptionGetResponseProductPricesProductPriceRecurringType ¶
type UserSubscriptionGetResponseProductPricesProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionGetResponseProductPricesProductPriceRecurringTypeRecurring UserSubscriptionGetResponseProductPricesProductPriceRecurringType = "recurring"
)
func (UserSubscriptionGetResponseProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionGetResponseProductPricesProductPriceRecurringType) IsKnown() bool
type UserSubscriptionGetResponseProductPricesRecurringInterval ¶
type UserSubscriptionGetResponseProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionGetResponseProductPricesRecurringIntervalMonth UserSubscriptionGetResponseProductPricesRecurringInterval = "month" UserSubscriptionGetResponseProductPricesRecurringIntervalYear UserSubscriptionGetResponseProductPricesRecurringInterval = "year" )
func (UserSubscriptionGetResponseProductPricesRecurringInterval) IsKnown ¶
func (r UserSubscriptionGetResponseProductPricesRecurringInterval) IsKnown() bool
type UserSubscriptionGetResponseProductPricesType ¶
type UserSubscriptionGetResponseProductPricesType string
The type of the price.
const ( UserSubscriptionGetResponseProductPricesTypeRecurring UserSubscriptionGetResponseProductPricesType = "recurring" UserSubscriptionGetResponseProductPricesTypeOneTime UserSubscriptionGetResponseProductPricesType = "one_time" )
func (UserSubscriptionGetResponseProductPricesType) IsKnown ¶
func (r UserSubscriptionGetResponseProductPricesType) IsKnown() bool
type UserSubscriptionGetResponseProductPricesUnion ¶
type UserSubscriptionGetResponseProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionGetResponseProductPricesProductPriceRecurring or UserSubscriptionGetResponseProductPricesProductPriceOneTime.
type UserSubscriptionGetResponseProductType ¶
type UserSubscriptionGetResponseProductType string
const ( UserSubscriptionGetResponseProductTypeFree UserSubscriptionGetResponseProductType = "free" UserSubscriptionGetResponseProductTypeIndividual UserSubscriptionGetResponseProductType = "individual" UserSubscriptionGetResponseProductTypeBusiness UserSubscriptionGetResponseProductType = "business" )
func (UserSubscriptionGetResponseProductType) IsKnown ¶
func (r UserSubscriptionGetResponseProductType) IsKnown() bool
type UserSubscriptionGetResponseStatus ¶
type UserSubscriptionGetResponseStatus string
const ( UserSubscriptionGetResponseStatusIncomplete UserSubscriptionGetResponseStatus = "incomplete" UserSubscriptionGetResponseStatusIncompleteExpired UserSubscriptionGetResponseStatus = "incomplete_expired" UserSubscriptionGetResponseStatusTrialing UserSubscriptionGetResponseStatus = "trialing" UserSubscriptionGetResponseStatusActive UserSubscriptionGetResponseStatus = "active" UserSubscriptionGetResponseStatusPastDue UserSubscriptionGetResponseStatus = "past_due" UserSubscriptionGetResponseStatusCanceled UserSubscriptionGetResponseStatus = "canceled" UserSubscriptionGetResponseStatusUnpaid UserSubscriptionGetResponseStatus = "unpaid" )
func (UserSubscriptionGetResponseStatus) IsKnown ¶
func (r UserSubscriptionGetResponseStatus) IsKnown() bool
type UserSubscriptionListParams ¶
type UserSubscriptionListParams struct {
// Filter by active or cancelled subscription.
Active param.Field[bool] `query:"active"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Filter by organization ID.
OrganizationID param.Field[UserSubscriptionListParamsOrganizationIDUnion] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by product ID.
ProductID param.Field[UserSubscriptionListParamsProductIDUnion] `query:"product_id" format:"uuid4"`
// Search by product or organization name.
Query param.Field[string] `query:"query"`
// Sorting criterion. Several criteria can be used simultaneously and will be
// applied in order. Add a minus sign `-` before the criteria name to sort by
// descending order.
Sorting param.Field[[]string] `query:"sorting"`
}
func (UserSubscriptionListParams) URLQuery ¶
func (r UserSubscriptionListParams) URLQuery() (v url.Values)
URLQuery serializes UserSubscriptionListParams's query parameters as `url.Values`.
type UserSubscriptionListParamsOrganizationIDArray ¶
type UserSubscriptionListParamsOrganizationIDArray []string
func (UserSubscriptionListParamsOrganizationIDArray) ImplementsUserSubscriptionListParamsOrganizationIDUnion ¶
func (r UserSubscriptionListParamsOrganizationIDArray) ImplementsUserSubscriptionListParamsOrganizationIDUnion()
type UserSubscriptionListParamsOrganizationIDUnion ¶
type UserSubscriptionListParamsOrganizationIDUnion interface {
ImplementsUserSubscriptionListParamsOrganizationIDUnion()
}
Filter by organization ID.
Satisfied by [shared.UnionString], UserSubscriptionListParamsOrganizationIDArray.
type UserSubscriptionListParamsProductIDArray ¶
type UserSubscriptionListParamsProductIDArray []string
func (UserSubscriptionListParamsProductIDArray) ImplementsUserSubscriptionListParamsProductIDUnion ¶
func (r UserSubscriptionListParamsProductIDArray) ImplementsUserSubscriptionListParamsProductIDUnion()
type UserSubscriptionListParamsProductIDUnion ¶
type UserSubscriptionListParamsProductIDUnion interface {
ImplementsUserSubscriptionListParamsProductIDUnion()
}
Filter by product ID.
Satisfied by [shared.UnionString], UserSubscriptionListParamsProductIDArray.
type UserSubscriptionListResponse ¶
type UserSubscriptionListResponse struct {
Pagination UserSubscriptionListResponsePagination `json:"pagination,required"`
Items []UserSubscriptionListResponseItem `json:"items"`
JSON userSubscriptionListResponseJSON `json:"-"`
}
func (*UserSubscriptionListResponse) UnmarshalJSON ¶
func (r *UserSubscriptionListResponse) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItem ¶
type UserSubscriptionListResponseItem struct {
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
Product UserSubscriptionListResponseItemsProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserSubscriptionListResponseItemsStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
Price UserSubscriptionListResponseItemsPrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userSubscriptionListResponseItemJSON `json:"-"`
}
func (*UserSubscriptionListResponseItem) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItem) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsPrice ¶
type UserSubscriptionListResponseItemsPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsPriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionListResponseItemsPriceRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionListResponseItemsPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionListResponseItemsPrice) AsUnion ¶
func (r UserSubscriptionListResponseItemsPrice) AsUnion() UserSubscriptionListResponseItemsPriceUnion
AsUnion returns a UserSubscriptionListResponseItemsPriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionListResponseItemsPriceProductPriceRecurring, UserSubscriptionListResponseItemsPriceProductPriceOneTime.
func (*UserSubscriptionListResponseItemsPrice) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsPriceProductPriceOneTime ¶
type UserSubscriptionListResponseItemsPriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsPriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionListResponseItemsPriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionListResponseItemsPriceProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsPriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsPriceProductPriceOneTimeType ¶
type UserSubscriptionListResponseItemsPriceProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionListResponseItemsPriceProductPriceOneTimeTypeOneTime UserSubscriptionListResponseItemsPriceProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionListResponseItemsPriceProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionListResponseItemsPriceProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionListResponseItemsPriceProductPriceRecurring ¶
type UserSubscriptionListResponseItemsPriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsPriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionListResponseItemsPriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionListResponseItemsPriceProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsPriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval ¶
type UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringIntervalMonth UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval = "month" UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringIntervalYear UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval = "year" )
func (UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserSubscriptionListResponseItemsPriceProductPriceRecurringRecurringInterval) IsKnown() bool
type UserSubscriptionListResponseItemsPriceProductPriceRecurringType ¶
type UserSubscriptionListResponseItemsPriceProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionListResponseItemsPriceProductPriceRecurringTypeRecurring UserSubscriptionListResponseItemsPriceProductPriceRecurringType = "recurring"
)
func (UserSubscriptionListResponseItemsPriceProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionListResponseItemsPriceProductPriceRecurringType) IsKnown() bool
type UserSubscriptionListResponseItemsPriceRecurringInterval ¶
type UserSubscriptionListResponseItemsPriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionListResponseItemsPriceRecurringIntervalMonth UserSubscriptionListResponseItemsPriceRecurringInterval = "month" UserSubscriptionListResponseItemsPriceRecurringIntervalYear UserSubscriptionListResponseItemsPriceRecurringInterval = "year" )
func (UserSubscriptionListResponseItemsPriceRecurringInterval) IsKnown ¶
func (r UserSubscriptionListResponseItemsPriceRecurringInterval) IsKnown() bool
type UserSubscriptionListResponseItemsPriceType ¶
type UserSubscriptionListResponseItemsPriceType string
The type of the price.
const ( UserSubscriptionListResponseItemsPriceTypeRecurring UserSubscriptionListResponseItemsPriceType = "recurring" UserSubscriptionListResponseItemsPriceTypeOneTime UserSubscriptionListResponseItemsPriceType = "one_time" )
func (UserSubscriptionListResponseItemsPriceType) IsKnown ¶
func (r UserSubscriptionListResponseItemsPriceType) IsKnown() bool
type UserSubscriptionListResponseItemsPriceUnion ¶
type UserSubscriptionListResponseItemsPriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionListResponseItemsPriceProductPriceRecurring or UserSubscriptionListResponseItemsPriceProductPriceOneTime.
type UserSubscriptionListResponseItemsProduct ¶
type UserSubscriptionListResponseItemsProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserSubscriptionListResponseItemsProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserSubscriptionListResponseItemsProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserSubscriptionListResponseItemsProductType `json:"type,nullable"`
JSON userSubscriptionListResponseItemsProductJSON `json:"-"`
}
func (*UserSubscriptionListResponseItemsProduct) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProduct) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductBenefit ¶
type UserSubscriptionListResponseItemsProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserSubscriptionListResponseItemsProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userSubscriptionListResponseItemsProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserSubscriptionListResponseItemsProductBenefit) AsUnion ¶
func (r UserSubscriptionListResponseItemsProductBenefit) AsUnion() UserSubscriptionListResponseItemsProductBenefitsUnion
AsUnion returns a UserSubscriptionListResponseItemsProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionListResponseItemsProductBenefitsBenefitBase, UserSubscriptionListResponseItemsProductBenefitsBenefitArticles.
func (*UserSubscriptionListResponseItemsProductBenefit) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticles ¶
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionListResponseItemsProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserSubscriptionListResponseItemsProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties ¶
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userSubscriptionListResponseItemsProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType ¶
type UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType string
const (
UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesTypeArticles UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType = "articles"
)
func (UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductBenefitsBenefitArticlesType) IsKnown() bool
type UserSubscriptionListResponseItemsProductBenefitsBenefitBase ¶
type UserSubscriptionListResponseItemsProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionListResponseItemsProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserSubscriptionListResponseItemsProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType ¶
type UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeCustom UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "custom" UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeArticles UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "articles" UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeAds UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "ads" UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeDiscord UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "discord" UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeGitHubRepository UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "github_repository" UserSubscriptionListResponseItemsProductBenefitsBenefitBaseTypeDownloadables UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType = "downloadables" )
func (UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductBenefitsBenefitBaseType) IsKnown() bool
type UserSubscriptionListResponseItemsProductBenefitsType ¶
type UserSubscriptionListResponseItemsProductBenefitsType string
The type of the benefit.
const ( UserSubscriptionListResponseItemsProductBenefitsTypeCustom UserSubscriptionListResponseItemsProductBenefitsType = "custom" UserSubscriptionListResponseItemsProductBenefitsTypeArticles UserSubscriptionListResponseItemsProductBenefitsType = "articles" UserSubscriptionListResponseItemsProductBenefitsTypeAds UserSubscriptionListResponseItemsProductBenefitsType = "ads" UserSubscriptionListResponseItemsProductBenefitsTypeDiscord UserSubscriptionListResponseItemsProductBenefitsType = "discord" UserSubscriptionListResponseItemsProductBenefitsTypeGitHubRepository UserSubscriptionListResponseItemsProductBenefitsType = "github_repository" UserSubscriptionListResponseItemsProductBenefitsTypeDownloadables UserSubscriptionListResponseItemsProductBenefitsType = "downloadables" )
func (UserSubscriptionListResponseItemsProductBenefitsType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductBenefitsType) IsKnown() bool
type UserSubscriptionListResponseItemsProductBenefitsUnion ¶
type UserSubscriptionListResponseItemsProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserSubscriptionListResponseItemsProductBenefitsBenefitBase or UserSubscriptionListResponseItemsProductBenefitsBenefitArticles.
type UserSubscriptionListResponseItemsProductPrice ¶
type UserSubscriptionListResponseItemsProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionListResponseItemsProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionListResponseItemsProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionListResponseItemsProductPrice) AsUnion ¶
func (r UserSubscriptionListResponseItemsProductPrice) AsUnion() UserSubscriptionListResponseItemsProductPricesUnion
AsUnion returns a UserSubscriptionListResponseItemsProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionListResponseItemsProductPricesProductPriceRecurring, UserSubscriptionListResponseItemsProductPricesProductPriceOneTime.
func (*UserSubscriptionListResponseItemsProductPrice) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductPricesProductPriceOneTime ¶
type UserSubscriptionListResponseItemsProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionListResponseItemsProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionListResponseItemsProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType ¶
type UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeTypeOneTime UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductPricesProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurring ¶
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionListResponseItemsProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionListResponseItemsProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionListResponseItemsProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval ¶
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringIntervalMonth UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval = "month" UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringIntervalYear UserSubscriptionListResponseItemsProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType ¶
type UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionListResponseItemsProductPricesProductPriceRecurringTypeRecurring UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType = "recurring"
)
func (UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductPricesProductPriceRecurringType) IsKnown() bool
type UserSubscriptionListResponseItemsProductPricesRecurringInterval ¶
type UserSubscriptionListResponseItemsProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionListResponseItemsProductPricesRecurringIntervalMonth UserSubscriptionListResponseItemsProductPricesRecurringInterval = "month" UserSubscriptionListResponseItemsProductPricesRecurringIntervalYear UserSubscriptionListResponseItemsProductPricesRecurringInterval = "year" )
func (UserSubscriptionListResponseItemsProductPricesRecurringInterval) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductPricesRecurringInterval) IsKnown() bool
type UserSubscriptionListResponseItemsProductPricesType ¶
type UserSubscriptionListResponseItemsProductPricesType string
The type of the price.
const ( UserSubscriptionListResponseItemsProductPricesTypeRecurring UserSubscriptionListResponseItemsProductPricesType = "recurring" UserSubscriptionListResponseItemsProductPricesTypeOneTime UserSubscriptionListResponseItemsProductPricesType = "one_time" )
func (UserSubscriptionListResponseItemsProductPricesType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductPricesType) IsKnown() bool
type UserSubscriptionListResponseItemsProductPricesUnion ¶
type UserSubscriptionListResponseItemsProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionListResponseItemsProductPricesProductPriceRecurring or UserSubscriptionListResponseItemsProductPricesProductPriceOneTime.
type UserSubscriptionListResponseItemsProductType ¶
type UserSubscriptionListResponseItemsProductType string
const ( UserSubscriptionListResponseItemsProductTypeFree UserSubscriptionListResponseItemsProductType = "free" UserSubscriptionListResponseItemsProductTypeIndividual UserSubscriptionListResponseItemsProductType = "individual" UserSubscriptionListResponseItemsProductTypeBusiness UserSubscriptionListResponseItemsProductType = "business" )
func (UserSubscriptionListResponseItemsProductType) IsKnown ¶
func (r UserSubscriptionListResponseItemsProductType) IsKnown() bool
type UserSubscriptionListResponseItemsStatus ¶
type UserSubscriptionListResponseItemsStatus string
const ( UserSubscriptionListResponseItemsStatusIncomplete UserSubscriptionListResponseItemsStatus = "incomplete" UserSubscriptionListResponseItemsStatusIncompleteExpired UserSubscriptionListResponseItemsStatus = "incomplete_expired" UserSubscriptionListResponseItemsStatusTrialing UserSubscriptionListResponseItemsStatus = "trialing" UserSubscriptionListResponseItemsStatusActive UserSubscriptionListResponseItemsStatus = "active" UserSubscriptionListResponseItemsStatusPastDue UserSubscriptionListResponseItemsStatus = "past_due" UserSubscriptionListResponseItemsStatusCanceled UserSubscriptionListResponseItemsStatus = "canceled" UserSubscriptionListResponseItemsStatusUnpaid UserSubscriptionListResponseItemsStatus = "unpaid" )
func (UserSubscriptionListResponseItemsStatus) IsKnown ¶
func (r UserSubscriptionListResponseItemsStatus) IsKnown() bool
type UserSubscriptionListResponsePagination ¶
type UserSubscriptionListResponsePagination struct {
MaxPage int64 `json:"max_page,required"`
TotalCount int64 `json:"total_count,required"`
JSON userSubscriptionListResponsePaginationJSON `json:"-"`
}
func (*UserSubscriptionListResponsePagination) UnmarshalJSON ¶
func (r *UserSubscriptionListResponsePagination) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewParams ¶
type UserSubscriptionNewParams struct {
// ID of the free tier to subscribe to.
ProductID param.Field[string] `json:"product_id,required" format:"uuid4"`
// Email of the customer. This field is required if the API is called outside the
// Polar app.
CustomerEmail param.Field[string] `json:"customer_email" format:"email"`
}
func (UserSubscriptionNewParams) MarshalJSON ¶
func (r UserSubscriptionNewParams) MarshalJSON() (data []byte, err error)
type UserSubscriptionNewResponse ¶
type UserSubscriptionNewResponse struct {
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
Product UserSubscriptionNewResponseProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserSubscriptionNewResponseStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
Price UserSubscriptionNewResponsePrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userSubscriptionNewResponseJSON `json:"-"`
}
func (*UserSubscriptionNewResponse) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponse) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponsePrice ¶
type UserSubscriptionNewResponsePrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionNewResponsePriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionNewResponsePriceRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionNewResponsePriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionNewResponsePrice) AsUnion ¶
func (r UserSubscriptionNewResponsePrice) AsUnion() UserSubscriptionNewResponsePriceUnion
AsUnion returns a UserSubscriptionNewResponsePriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionNewResponsePriceProductPriceRecurring, UserSubscriptionNewResponsePriceProductPriceOneTime.
func (*UserSubscriptionNewResponsePrice) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponsePrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponsePriceProductPriceOneTime ¶
type UserSubscriptionNewResponsePriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionNewResponsePriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionNewResponsePriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionNewResponsePriceProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponsePriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponsePriceProductPriceOneTimeType ¶
type UserSubscriptionNewResponsePriceProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionNewResponsePriceProductPriceOneTimeTypeOneTime UserSubscriptionNewResponsePriceProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionNewResponsePriceProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionNewResponsePriceProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionNewResponsePriceProductPriceRecurring ¶
type UserSubscriptionNewResponsePriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionNewResponsePriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionNewResponsePriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionNewResponsePriceProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponsePriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval ¶
type UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionNewResponsePriceProductPriceRecurringRecurringIntervalMonth UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval = "month" UserSubscriptionNewResponsePriceProductPriceRecurringRecurringIntervalYear UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval = "year" )
func (UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserSubscriptionNewResponsePriceProductPriceRecurringRecurringInterval) IsKnown() bool
type UserSubscriptionNewResponsePriceProductPriceRecurringType ¶
type UserSubscriptionNewResponsePriceProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionNewResponsePriceProductPriceRecurringTypeRecurring UserSubscriptionNewResponsePriceProductPriceRecurringType = "recurring"
)
func (UserSubscriptionNewResponsePriceProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionNewResponsePriceProductPriceRecurringType) IsKnown() bool
type UserSubscriptionNewResponsePriceRecurringInterval ¶
type UserSubscriptionNewResponsePriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionNewResponsePriceRecurringIntervalMonth UserSubscriptionNewResponsePriceRecurringInterval = "month" UserSubscriptionNewResponsePriceRecurringIntervalYear UserSubscriptionNewResponsePriceRecurringInterval = "year" )
func (UserSubscriptionNewResponsePriceRecurringInterval) IsKnown ¶
func (r UserSubscriptionNewResponsePriceRecurringInterval) IsKnown() bool
type UserSubscriptionNewResponsePriceType ¶
type UserSubscriptionNewResponsePriceType string
The type of the price.
const ( UserSubscriptionNewResponsePriceTypeRecurring UserSubscriptionNewResponsePriceType = "recurring" UserSubscriptionNewResponsePriceTypeOneTime UserSubscriptionNewResponsePriceType = "one_time" )
func (UserSubscriptionNewResponsePriceType) IsKnown ¶
func (r UserSubscriptionNewResponsePriceType) IsKnown() bool
type UserSubscriptionNewResponsePriceUnion ¶
type UserSubscriptionNewResponsePriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionNewResponsePriceProductPriceRecurring or UserSubscriptionNewResponsePriceProductPriceOneTime.
type UserSubscriptionNewResponseProduct ¶
type UserSubscriptionNewResponseProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserSubscriptionNewResponseProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserSubscriptionNewResponseProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserSubscriptionNewResponseProductType `json:"type,nullable"`
JSON userSubscriptionNewResponseProductJSON `json:"-"`
}
func (*UserSubscriptionNewResponseProduct) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProduct) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductBenefit ¶
type UserSubscriptionNewResponseProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserSubscriptionNewResponseProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userSubscriptionNewResponseProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserSubscriptionNewResponseProductBenefit) AsUnion ¶
func (r UserSubscriptionNewResponseProductBenefit) AsUnion() UserSubscriptionNewResponseProductBenefitsUnion
AsUnion returns a UserSubscriptionNewResponseProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionNewResponseProductBenefitsBenefitBase, UserSubscriptionNewResponseProductBenefitsBenefitArticles.
func (*UserSubscriptionNewResponseProductBenefit) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductBenefitsBenefitArticles ¶
type UserSubscriptionNewResponseProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserSubscriptionNewResponseProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionNewResponseProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserSubscriptionNewResponseProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties ¶
type UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userSubscriptionNewResponseProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductBenefitsBenefitArticlesType ¶
type UserSubscriptionNewResponseProductBenefitsBenefitArticlesType string
const (
UserSubscriptionNewResponseProductBenefitsBenefitArticlesTypeArticles UserSubscriptionNewResponseProductBenefitsBenefitArticlesType = "articles"
)
func (UserSubscriptionNewResponseProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserSubscriptionNewResponseProductBenefitsBenefitArticlesType) IsKnown() bool
type UserSubscriptionNewResponseProductBenefitsBenefitBase ¶
type UserSubscriptionNewResponseProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserSubscriptionNewResponseProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionNewResponseProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserSubscriptionNewResponseProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductBenefitsBenefitBaseType ¶
type UserSubscriptionNewResponseProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeCustom UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "custom" UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeArticles UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "articles" UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeAds UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "ads" UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeDiscord UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "discord" UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeGitHubRepository UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "github_repository" UserSubscriptionNewResponseProductBenefitsBenefitBaseTypeDownloadables UserSubscriptionNewResponseProductBenefitsBenefitBaseType = "downloadables" )
func (UserSubscriptionNewResponseProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserSubscriptionNewResponseProductBenefitsBenefitBaseType) IsKnown() bool
type UserSubscriptionNewResponseProductBenefitsType ¶
type UserSubscriptionNewResponseProductBenefitsType string
The type of the benefit.
const ( UserSubscriptionNewResponseProductBenefitsTypeCustom UserSubscriptionNewResponseProductBenefitsType = "custom" UserSubscriptionNewResponseProductBenefitsTypeArticles UserSubscriptionNewResponseProductBenefitsType = "articles" UserSubscriptionNewResponseProductBenefitsTypeAds UserSubscriptionNewResponseProductBenefitsType = "ads" UserSubscriptionNewResponseProductBenefitsTypeDiscord UserSubscriptionNewResponseProductBenefitsType = "discord" UserSubscriptionNewResponseProductBenefitsTypeGitHubRepository UserSubscriptionNewResponseProductBenefitsType = "github_repository" UserSubscriptionNewResponseProductBenefitsTypeDownloadables UserSubscriptionNewResponseProductBenefitsType = "downloadables" )
func (UserSubscriptionNewResponseProductBenefitsType) IsKnown ¶
func (r UserSubscriptionNewResponseProductBenefitsType) IsKnown() bool
type UserSubscriptionNewResponseProductBenefitsUnion ¶
type UserSubscriptionNewResponseProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserSubscriptionNewResponseProductBenefitsBenefitBase or UserSubscriptionNewResponseProductBenefitsBenefitArticles.
type UserSubscriptionNewResponseProductPrice ¶
type UserSubscriptionNewResponseProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionNewResponseProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionNewResponseProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionNewResponseProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionNewResponseProductPrice) AsUnion ¶
func (r UserSubscriptionNewResponseProductPrice) AsUnion() UserSubscriptionNewResponseProductPricesUnion
AsUnion returns a UserSubscriptionNewResponseProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionNewResponseProductPricesProductPriceRecurring, UserSubscriptionNewResponseProductPricesProductPriceOneTime.
func (*UserSubscriptionNewResponseProductPrice) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductPricesProductPriceOneTime ¶
type UserSubscriptionNewResponseProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionNewResponseProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionNewResponseProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionNewResponseProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductPricesProductPriceOneTimeType ¶
type UserSubscriptionNewResponseProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionNewResponseProductPricesProductPriceOneTimeTypeOneTime UserSubscriptionNewResponseProductPricesProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionNewResponseProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionNewResponseProductPricesProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionNewResponseProductPricesProductPriceRecurring ¶
type UserSubscriptionNewResponseProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionNewResponseProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionNewResponseProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionNewResponseProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionNewResponseProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval ¶
type UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringIntervalMonth UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval = "month" UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringIntervalYear UserSubscriptionNewResponseProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserSubscriptionNewResponseProductPricesProductPriceRecurringType ¶
type UserSubscriptionNewResponseProductPricesProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionNewResponseProductPricesProductPriceRecurringTypeRecurring UserSubscriptionNewResponseProductPricesProductPriceRecurringType = "recurring"
)
func (UserSubscriptionNewResponseProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionNewResponseProductPricesProductPriceRecurringType) IsKnown() bool
type UserSubscriptionNewResponseProductPricesRecurringInterval ¶
type UserSubscriptionNewResponseProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionNewResponseProductPricesRecurringIntervalMonth UserSubscriptionNewResponseProductPricesRecurringInterval = "month" UserSubscriptionNewResponseProductPricesRecurringIntervalYear UserSubscriptionNewResponseProductPricesRecurringInterval = "year" )
func (UserSubscriptionNewResponseProductPricesRecurringInterval) IsKnown ¶
func (r UserSubscriptionNewResponseProductPricesRecurringInterval) IsKnown() bool
type UserSubscriptionNewResponseProductPricesType ¶
type UserSubscriptionNewResponseProductPricesType string
The type of the price.
const ( UserSubscriptionNewResponseProductPricesTypeRecurring UserSubscriptionNewResponseProductPricesType = "recurring" UserSubscriptionNewResponseProductPricesTypeOneTime UserSubscriptionNewResponseProductPricesType = "one_time" )
func (UserSubscriptionNewResponseProductPricesType) IsKnown ¶
func (r UserSubscriptionNewResponseProductPricesType) IsKnown() bool
type UserSubscriptionNewResponseProductPricesUnion ¶
type UserSubscriptionNewResponseProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionNewResponseProductPricesProductPriceRecurring or UserSubscriptionNewResponseProductPricesProductPriceOneTime.
type UserSubscriptionNewResponseProductType ¶
type UserSubscriptionNewResponseProductType string
const ( UserSubscriptionNewResponseProductTypeFree UserSubscriptionNewResponseProductType = "free" UserSubscriptionNewResponseProductTypeIndividual UserSubscriptionNewResponseProductType = "individual" UserSubscriptionNewResponseProductTypeBusiness UserSubscriptionNewResponseProductType = "business" )
func (UserSubscriptionNewResponseProductType) IsKnown ¶
func (r UserSubscriptionNewResponseProductType) IsKnown() bool
type UserSubscriptionNewResponseStatus ¶
type UserSubscriptionNewResponseStatus string
const ( UserSubscriptionNewResponseStatusIncomplete UserSubscriptionNewResponseStatus = "incomplete" UserSubscriptionNewResponseStatusIncompleteExpired UserSubscriptionNewResponseStatus = "incomplete_expired" UserSubscriptionNewResponseStatusTrialing UserSubscriptionNewResponseStatus = "trialing" UserSubscriptionNewResponseStatusActive UserSubscriptionNewResponseStatus = "active" UserSubscriptionNewResponseStatusPastDue UserSubscriptionNewResponseStatus = "past_due" UserSubscriptionNewResponseStatusCanceled UserSubscriptionNewResponseStatus = "canceled" UserSubscriptionNewResponseStatusUnpaid UserSubscriptionNewResponseStatus = "unpaid" )
func (UserSubscriptionNewResponseStatus) IsKnown ¶
func (r UserSubscriptionNewResponseStatus) IsKnown() bool
type UserSubscriptionService ¶
type UserSubscriptionService struct {
Options []option.RequestOption
}
UserSubscriptionService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserSubscriptionService method instead.
func NewUserSubscriptionService ¶
func NewUserSubscriptionService(opts ...option.RequestOption) (r *UserSubscriptionService)
NewUserSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserSubscriptionService) Delete ¶
func (r *UserSubscriptionService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *UserSubscriptionDeleteResponse, err error)
Cancel a subscription.
func (*UserSubscriptionService) Get ¶
func (r *UserSubscriptionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *UserSubscriptionGetResponse, err error)
Get a subscription by ID.
func (*UserSubscriptionService) List ¶
func (r *UserSubscriptionService) List(ctx context.Context, query UserSubscriptionListParams, opts ...option.RequestOption) (res *UserSubscriptionListResponse, err error)
List my subscriptions.
func (*UserSubscriptionService) New ¶
func (r *UserSubscriptionService) New(ctx context.Context, body UserSubscriptionNewParams, opts ...option.RequestOption) (res *UserSubscriptionNewResponse, err error)
Create a subscription on a **free** tier.
If you want to subscribe to a paid tier, you need to create a checkout session.
func (*UserSubscriptionService) Update ¶
func (r *UserSubscriptionService) Update(ctx context.Context, id string, body UserSubscriptionUpdateParams, opts ...option.RequestOption) (res *UserSubscriptionUpdateResponse, err error)
Update a subscription.
type UserSubscriptionUpdateParams ¶
type UserSubscriptionUpdateParams struct {
ProductPriceID param.Field[string] `json:"product_price_id,required" format:"uuid4"`
}
func (UserSubscriptionUpdateParams) MarshalJSON ¶
func (r UserSubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type UserSubscriptionUpdateResponse ¶
type UserSubscriptionUpdateResponse struct {
ID string `json:"id,required" format:"uuid4"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CurrentPeriodStart time.Time `json:"current_period_start,required" format:"date-time"`
Product UserSubscriptionUpdateResponseProduct `json:"product,required"`
ProductID string `json:"product_id,required" format:"uuid4"`
Status UserSubscriptionUpdateResponseStatus `json:"status,required"`
UserID string `json:"user_id,required" format:"uuid4"`
CurrentPeriodEnd time.Time `json:"current_period_end,nullable" format:"date-time"`
EndedAt time.Time `json:"ended_at,nullable" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// A recurring price for a product, i.e. a subscription.
Price UserSubscriptionUpdateResponsePrice `json:"price,nullable"`
PriceID string `json:"price_id,nullable" format:"uuid4"`
StartedAt time.Time `json:"started_at,nullable" format:"date-time"`
JSON userSubscriptionUpdateResponseJSON `json:"-"`
}
func (*UserSubscriptionUpdateResponse) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponse) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponsePrice ¶
type UserSubscriptionUpdateResponsePrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionUpdateResponsePriceType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionUpdateResponsePriceRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionUpdateResponsePriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionUpdateResponsePrice) AsUnion ¶
func (r UserSubscriptionUpdateResponsePrice) AsUnion() UserSubscriptionUpdateResponsePriceUnion
AsUnion returns a UserSubscriptionUpdateResponsePriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionUpdateResponsePriceProductPriceRecurring, UserSubscriptionUpdateResponsePriceProductPriceOneTime.
func (*UserSubscriptionUpdateResponsePrice) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponsePrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponsePriceProductPriceOneTime ¶
type UserSubscriptionUpdateResponsePriceProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionUpdateResponsePriceProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionUpdateResponsePriceProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionUpdateResponsePriceProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponsePriceProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponsePriceProductPriceOneTimeType ¶
type UserSubscriptionUpdateResponsePriceProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionUpdateResponsePriceProductPriceOneTimeTypeOneTime UserSubscriptionUpdateResponsePriceProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionUpdateResponsePriceProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionUpdateResponsePriceProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionUpdateResponsePriceProductPriceRecurring ¶
type UserSubscriptionUpdateResponsePriceProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionUpdateResponsePriceProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionUpdateResponsePriceProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionUpdateResponsePriceProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponsePriceProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval ¶
type UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringIntervalMonth UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval = "month" UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringIntervalYear UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval = "year" )
func (UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval) IsKnown ¶
func (r UserSubscriptionUpdateResponsePriceProductPriceRecurringRecurringInterval) IsKnown() bool
type UserSubscriptionUpdateResponsePriceProductPriceRecurringType ¶
type UserSubscriptionUpdateResponsePriceProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionUpdateResponsePriceProductPriceRecurringTypeRecurring UserSubscriptionUpdateResponsePriceProductPriceRecurringType = "recurring"
)
func (UserSubscriptionUpdateResponsePriceProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionUpdateResponsePriceProductPriceRecurringType) IsKnown() bool
type UserSubscriptionUpdateResponsePriceRecurringInterval ¶
type UserSubscriptionUpdateResponsePriceRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionUpdateResponsePriceRecurringIntervalMonth UserSubscriptionUpdateResponsePriceRecurringInterval = "month" UserSubscriptionUpdateResponsePriceRecurringIntervalYear UserSubscriptionUpdateResponsePriceRecurringInterval = "year" )
func (UserSubscriptionUpdateResponsePriceRecurringInterval) IsKnown ¶
func (r UserSubscriptionUpdateResponsePriceRecurringInterval) IsKnown() bool
type UserSubscriptionUpdateResponsePriceType ¶
type UserSubscriptionUpdateResponsePriceType string
The type of the price.
const ( UserSubscriptionUpdateResponsePriceTypeRecurring UserSubscriptionUpdateResponsePriceType = "recurring" UserSubscriptionUpdateResponsePriceTypeOneTime UserSubscriptionUpdateResponsePriceType = "one_time" )
func (UserSubscriptionUpdateResponsePriceType) IsKnown ¶
func (r UserSubscriptionUpdateResponsePriceType) IsKnown() bool
type UserSubscriptionUpdateResponsePriceUnion ¶
type UserSubscriptionUpdateResponsePriceUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionUpdateResponsePriceProductPriceRecurring or UserSubscriptionUpdateResponsePriceProductPriceOneTime.
type UserSubscriptionUpdateResponseProduct ¶
type UserSubscriptionUpdateResponseProduct struct {
// The ID of the product.
ID string `json:"id,required" format:"uuid4"`
// The benefits granted by the product.
Benefits []UserSubscriptionUpdateResponseProductBenefit `json:"benefits,required"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the product is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// Whether the product is a subscription tier.
IsRecurring bool `json:"is_recurring,required"`
// The medias associated to the product.
Medias []ProductMediaFileReadOutput `json:"medias,required"`
// The name of the product.
Name string `json:"name,required"`
// The ID of the organization owning the product.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// List of available prices for this product.
Prices []UserSubscriptionUpdateResponseProductPrice `json:"prices,required"`
// The description of the product.
Description string `json:"description,nullable"`
IsHighlighted bool `json:"is_highlighted,nullable"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
Type UserSubscriptionUpdateResponseProductType `json:"type,nullable"`
JSON userSubscriptionUpdateResponseProductJSON `json:"-"`
}
func (*UserSubscriptionUpdateResponseProduct) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProduct) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductBenefit ¶
type UserSubscriptionUpdateResponseProductBenefit struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// The type of the benefit.
Type UserSubscriptionUpdateResponseProductBenefitsType `json:"type,required"`
// The description of the benefit.
Description string `json:"description,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// This field can have the runtime type of
// [UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties].
Properties interface{} `json:"properties,required"`
JSON userSubscriptionUpdateResponseProductBenefitJSON `json:"-"`
// contains filtered or unexported fields
}
A benefit of type `articles`.
Use it to grant access to posts.
func (UserSubscriptionUpdateResponseProductBenefit) AsUnion ¶
func (r UserSubscriptionUpdateResponseProductBenefit) AsUnion() UserSubscriptionUpdateResponseProductBenefitsUnion
AsUnion returns a UserSubscriptionUpdateResponseProductBenefitsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionUpdateResponseProductBenefitsBenefitBase, UserSubscriptionUpdateResponseProductBenefitsBenefitArticles.
func (*UserSubscriptionUpdateResponseProductBenefit) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductBenefit) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticles ¶
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticles struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Properties for a benefit of type `articles`.
Properties UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties `json:"properties,required"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
Type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionUpdateResponseProductBenefitsBenefitArticlesJSON `json:"-"`
}
A benefit of type `articles`.
Use it to grant access to posts.
func (*UserSubscriptionUpdateResponseProductBenefitsBenefitArticles) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductBenefitsBenefitArticles) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties ¶
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties struct {
// Whether the user can access paid articles.
PaidArticles bool `json:"paid_articles,required"`
JSON userSubscriptionUpdateResponseProductBenefitsBenefitArticlesPropertiesJSON `json:"-"`
}
Properties for a benefit of type `articles`.
func (*UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesProperties) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType ¶
type UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType string
const (
UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesTypeArticles UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType = "articles"
)
func (UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductBenefitsBenefitArticlesType) IsKnown() bool
type UserSubscriptionUpdateResponseProductBenefitsBenefitBase ¶
type UserSubscriptionUpdateResponseProductBenefitsBenefitBase struct {
// The ID of the benefit.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the benefit is deletable.
Deletable bool `json:"deletable,required"`
// The description of the benefit.
Description string `json:"description,required"`
// The ID of the organization owning the benefit.
OrganizationID string `json:"organization_id,required" format:"uuid4"`
// Whether the benefit is selectable when creating a product.
Selectable bool `json:"selectable,required"`
// The type of the benefit.
Type UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionUpdateResponseProductBenefitsBenefitBaseJSON `json:"-"`
}
func (*UserSubscriptionUpdateResponseProductBenefitsBenefitBase) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductBenefitsBenefitBase) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType ¶
type UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType string
The type of the benefit.
const ( UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeCustom UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "custom" UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeArticles UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "articles" UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeAds UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "ads" UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeDiscord UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "discord" UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeGitHubRepository UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "github_repository" UserSubscriptionUpdateResponseProductBenefitsBenefitBaseTypeDownloadables UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType = "downloadables" )
func (UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductBenefitsBenefitBaseType) IsKnown() bool
type UserSubscriptionUpdateResponseProductBenefitsType ¶
type UserSubscriptionUpdateResponseProductBenefitsType string
The type of the benefit.
const ( UserSubscriptionUpdateResponseProductBenefitsTypeCustom UserSubscriptionUpdateResponseProductBenefitsType = "custom" UserSubscriptionUpdateResponseProductBenefitsTypeArticles UserSubscriptionUpdateResponseProductBenefitsType = "articles" UserSubscriptionUpdateResponseProductBenefitsTypeAds UserSubscriptionUpdateResponseProductBenefitsType = "ads" UserSubscriptionUpdateResponseProductBenefitsTypeDiscord UserSubscriptionUpdateResponseProductBenefitsType = "discord" UserSubscriptionUpdateResponseProductBenefitsTypeGitHubRepository UserSubscriptionUpdateResponseProductBenefitsType = "github_repository" UserSubscriptionUpdateResponseProductBenefitsTypeDownloadables UserSubscriptionUpdateResponseProductBenefitsType = "downloadables" )
func (UserSubscriptionUpdateResponseProductBenefitsType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductBenefitsType) IsKnown() bool
type UserSubscriptionUpdateResponseProductBenefitsUnion ¶
type UserSubscriptionUpdateResponseProductBenefitsUnion interface {
// contains filtered or unexported methods
}
A benefit of type `articles`.
Use it to grant access to posts.
Union satisfied by UserSubscriptionUpdateResponseProductBenefitsBenefitBase or UserSubscriptionUpdateResponseProductBenefitsBenefitArticles.
type UserSubscriptionUpdateResponseProductPrice ¶
type UserSubscriptionUpdateResponseProductPrice struct {
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The type of the price.
Type UserSubscriptionUpdateResponseProductPricesType `json:"type,required"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionUpdateResponseProductPricesRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionUpdateResponseProductPriceJSON `json:"-"`
// contains filtered or unexported fields
}
A recurring price for a product, i.e. a subscription.
func (UserSubscriptionUpdateResponseProductPrice) AsUnion ¶
func (r UserSubscriptionUpdateResponseProductPrice) AsUnion() UserSubscriptionUpdateResponseProductPricesUnion
AsUnion returns a UserSubscriptionUpdateResponseProductPricesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserSubscriptionUpdateResponseProductPricesProductPriceRecurring, UserSubscriptionUpdateResponseProductPricesProductPriceOneTime.
func (*UserSubscriptionUpdateResponseProductPrice) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductPrice) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductPricesProductPriceOneTime ¶
type UserSubscriptionUpdateResponseProductPricesProductPriceOneTime struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
JSON userSubscriptionUpdateResponseProductPricesProductPriceOneTimeJSON `json:"-"`
}
A one-time price for a product.
func (*UserSubscriptionUpdateResponseProductPricesProductPriceOneTime) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductPricesProductPriceOneTime) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType ¶
type UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType string
The type of the price.
const (
UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeTypeOneTime UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType = "one_time"
)
func (UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductPricesProductPriceOneTimeType) IsKnown() bool
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurring ¶
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurring struct {
// The ID of the price.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Whether the price is archived and no longer available.
IsArchived bool `json:"is_archived,required"`
// The price in cents.
PriceAmount int64 `json:"price_amount,required"`
// The currency.
PriceCurrency string `json:"price_currency,required"`
// The type of the price.
Type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType `json:"type,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The recurring interval of the price, if type is `recurring`.
RecurringInterval UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval `json:"recurring_interval,nullable"`
JSON userSubscriptionUpdateResponseProductPricesProductPriceRecurringJSON `json:"-"`
}
A recurring price for a product, i.e. a subscription.
func (*UserSubscriptionUpdateResponseProductPricesProductPriceRecurring) UnmarshalJSON ¶
func (r *UserSubscriptionUpdateResponseProductPricesProductPriceRecurring) UnmarshalJSON(data []byte) (err error)
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval ¶
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringIntervalMonth UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval = "month" UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringIntervalYear UserSubscriptionUpdateResponseProductPricesProductPriceRecurringRecurringInterval = "year" )
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType ¶
type UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType string
The type of the price.
const (
UserSubscriptionUpdateResponseProductPricesProductPriceRecurringTypeRecurring UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType = "recurring"
)
func (UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductPricesProductPriceRecurringType) IsKnown() bool
type UserSubscriptionUpdateResponseProductPricesRecurringInterval ¶
type UserSubscriptionUpdateResponseProductPricesRecurringInterval string
The recurring interval of the price, if type is `recurring`.
const ( UserSubscriptionUpdateResponseProductPricesRecurringIntervalMonth UserSubscriptionUpdateResponseProductPricesRecurringInterval = "month" UserSubscriptionUpdateResponseProductPricesRecurringIntervalYear UserSubscriptionUpdateResponseProductPricesRecurringInterval = "year" )
func (UserSubscriptionUpdateResponseProductPricesRecurringInterval) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductPricesRecurringInterval) IsKnown() bool
type UserSubscriptionUpdateResponseProductPricesType ¶
type UserSubscriptionUpdateResponseProductPricesType string
The type of the price.
const ( UserSubscriptionUpdateResponseProductPricesTypeRecurring UserSubscriptionUpdateResponseProductPricesType = "recurring" UserSubscriptionUpdateResponseProductPricesTypeOneTime UserSubscriptionUpdateResponseProductPricesType = "one_time" )
func (UserSubscriptionUpdateResponseProductPricesType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductPricesType) IsKnown() bool
type UserSubscriptionUpdateResponseProductPricesUnion ¶
type UserSubscriptionUpdateResponseProductPricesUnion interface {
// contains filtered or unexported methods
}
A recurring price for a product, i.e. a subscription.
Union satisfied by UserSubscriptionUpdateResponseProductPricesProductPriceRecurring or UserSubscriptionUpdateResponseProductPricesProductPriceOneTime.
type UserSubscriptionUpdateResponseProductType ¶
type UserSubscriptionUpdateResponseProductType string
const ( UserSubscriptionUpdateResponseProductTypeFree UserSubscriptionUpdateResponseProductType = "free" UserSubscriptionUpdateResponseProductTypeIndividual UserSubscriptionUpdateResponseProductType = "individual" UserSubscriptionUpdateResponseProductTypeBusiness UserSubscriptionUpdateResponseProductType = "business" )
func (UserSubscriptionUpdateResponseProductType) IsKnown ¶
func (r UserSubscriptionUpdateResponseProductType) IsKnown() bool
type UserSubscriptionUpdateResponseStatus ¶
type UserSubscriptionUpdateResponseStatus string
const ( UserSubscriptionUpdateResponseStatusIncomplete UserSubscriptionUpdateResponseStatus = "incomplete" UserSubscriptionUpdateResponseStatusIncompleteExpired UserSubscriptionUpdateResponseStatus = "incomplete_expired" UserSubscriptionUpdateResponseStatusTrialing UserSubscriptionUpdateResponseStatus = "trialing" UserSubscriptionUpdateResponseStatusActive UserSubscriptionUpdateResponseStatus = "active" UserSubscriptionUpdateResponseStatusPastDue UserSubscriptionUpdateResponseStatus = "past_due" UserSubscriptionUpdateResponseStatusCanceled UserSubscriptionUpdateResponseStatus = "canceled" UserSubscriptionUpdateResponseStatusUnpaid UserSubscriptionUpdateResponseStatus = "unpaid" )
func (UserSubscriptionUpdateResponseStatus) IsKnown ¶
func (r UserSubscriptionUpdateResponseStatus) IsKnown() bool
type WebhookDeliveryListParams ¶
type WebhookDeliveryListParams struct {
// Filter by webhook endpoint ID.
EndpointID param.Field[string] `query:"endpoint_id" format:"uuid4"`
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
}
func (WebhookDeliveryListParams) URLQuery ¶
func (r WebhookDeliveryListParams) URLQuery() (v url.Values)
URLQuery serializes WebhookDeliveryListParams's query parameters as `url.Values`.
type WebhookDeliveryService ¶
type WebhookDeliveryService struct {
Options []option.RequestOption
}
WebhookDeliveryService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookDeliveryService method instead.
func NewWebhookDeliveryService ¶
func NewWebhookDeliveryService(opts ...option.RequestOption) (r *WebhookDeliveryService)
NewWebhookDeliveryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookDeliveryService) List ¶
func (r *WebhookDeliveryService) List(ctx context.Context, query WebhookDeliveryListParams, opts ...option.RequestOption) (res *ListResourceWebhookDelivery, err error)
List webhook deliveries.
Deliveries are all the attempts to deliver a webhook event to an endpoint.
type WebhookEndpoint ¶
type WebhookEndpoint struct {
// The webhook endpoint ID.
ID string `json:"id,required" format:"uuid4"`
// Creation timestamp of the object.
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// The events that will trigger the webhook.
Events []WebhookEndpointEvent `json:"events,required"`
// The format of the webhook payload.
Format WebhookEndpointFormat `json:"format,required"`
// The URL where the webhook events will be sent.
URL string `json:"url,required"`
// Last modification timestamp of the object.
ModifiedAt time.Time `json:"modified_at,nullable" format:"date-time"`
// The organization ID associated with the webhook endpoint.
OrganizationID string `json:"organization_id,nullable" format:"uuid4"`
// The user ID associated with the webhook endpoint.
UserID string `json:"user_id,nullable" format:"uuid4"`
JSON webhookEndpointJSON `json:"-"`
}
A webhook endpoint.
func (*WebhookEndpoint) UnmarshalJSON ¶
func (r *WebhookEndpoint) UnmarshalJSON(data []byte) (err error)
type WebhookEndpointEvent ¶
type WebhookEndpointEvent string
const ( WebhookEndpointEventOrderCreated WebhookEndpointEvent = "order.created" WebhookEndpointEventSubscriptionCreated WebhookEndpointEvent = "subscription.created" WebhookEndpointEventSubscriptionUpdated WebhookEndpointEvent = "subscription.updated" WebhookEndpointEventProductCreated WebhookEndpointEvent = "product.created" WebhookEndpointEventProductUpdated WebhookEndpointEvent = "product.updated" WebhookEndpointEventBenefitCreated WebhookEndpointEvent = "benefit.created" WebhookEndpointEventBenefitUpdated WebhookEndpointEvent = "benefit.updated" WebhookEndpointEventOrganizationUpdated WebhookEndpointEvent = "organization.updated" WebhookEndpointEventPledgeCreated WebhookEndpointEvent = "pledge.created" WebhookEndpointEventPledgeUpdated WebhookEndpointEvent = "pledge.updated" WebhookEndpointEventDonationCreated WebhookEndpointEvent = "donation.created" )
func (WebhookEndpointEvent) IsKnown ¶
func (r WebhookEndpointEvent) IsKnown() bool
type WebhookEndpointFormat ¶
type WebhookEndpointFormat string
The format of the webhook payload.
const ( WebhookEndpointFormatRaw WebhookEndpointFormat = "raw" WebhookEndpointFormatDiscord WebhookEndpointFormat = "discord" WebhookEndpointFormatSlack WebhookEndpointFormat = "slack" )
func (WebhookEndpointFormat) IsKnown ¶
func (r WebhookEndpointFormat) IsKnown() bool
type WebhookEndpointListParams ¶
type WebhookEndpointListParams struct {
// Size of a page, defaults to 10. Maximum is 100.
Limit param.Field[int64] `query:"limit"`
// The organization ID.
OrganizationID param.Field[string] `query:"organization_id" format:"uuid4"`
// Page number, defaults to 1.
Page param.Field[int64] `query:"page"`
// Filter by user ID.
UserID param.Field[string] `query:"user_id" format:"uuid4"`
}
func (WebhookEndpointListParams) URLQuery ¶
func (r WebhookEndpointListParams) URLQuery() (v url.Values)
URLQuery serializes WebhookEndpointListParams's query parameters as `url.Values`.
type WebhookEndpointNewParams ¶
type WebhookEndpointNewParams struct {
// The events that will trigger the webhook.
Events param.Field[[]WebhookEndpointNewParamsEvent] `json:"events,required"`
// The format of the webhook payload.
Format param.Field[WebhookEndpointNewParamsFormat] `json:"format,required"`
// The secret used to sign the webhook events.
Secret param.Field[string] `json:"secret,required"`
// The URL where the webhook events will be sent.
URL param.Field[string] `json:"url,required" format:"uri"`
// The organization ID.
OrganizationID param.Field[string] `json:"organization_id" format:"uuid4"`
}
func (WebhookEndpointNewParams) MarshalJSON ¶
func (r WebhookEndpointNewParams) MarshalJSON() (data []byte, err error)
type WebhookEndpointNewParamsEvent ¶
type WebhookEndpointNewParamsEvent string
const ( WebhookEndpointNewParamsEventOrderCreated WebhookEndpointNewParamsEvent = "order.created" WebhookEndpointNewParamsEventSubscriptionCreated WebhookEndpointNewParamsEvent = "subscription.created" WebhookEndpointNewParamsEventSubscriptionUpdated WebhookEndpointNewParamsEvent = "subscription.updated" WebhookEndpointNewParamsEventProductCreated WebhookEndpointNewParamsEvent = "product.created" WebhookEndpointNewParamsEventProductUpdated WebhookEndpointNewParamsEvent = "product.updated" WebhookEndpointNewParamsEventBenefitCreated WebhookEndpointNewParamsEvent = "benefit.created" WebhookEndpointNewParamsEventBenefitUpdated WebhookEndpointNewParamsEvent = "benefit.updated" WebhookEndpointNewParamsEventOrganizationUpdated WebhookEndpointNewParamsEvent = "organization.updated" WebhookEndpointNewParamsEventPledgeCreated WebhookEndpointNewParamsEvent = "pledge.created" WebhookEndpointNewParamsEventPledgeUpdated WebhookEndpointNewParamsEvent = "pledge.updated" WebhookEndpointNewParamsEventDonationCreated WebhookEndpointNewParamsEvent = "donation.created" )
func (WebhookEndpointNewParamsEvent) IsKnown ¶
func (r WebhookEndpointNewParamsEvent) IsKnown() bool
type WebhookEndpointNewParamsFormat ¶
type WebhookEndpointNewParamsFormat string
The format of the webhook payload.
const ( WebhookEndpointNewParamsFormatRaw WebhookEndpointNewParamsFormat = "raw" WebhookEndpointNewParamsFormatDiscord WebhookEndpointNewParamsFormat = "discord" WebhookEndpointNewParamsFormatSlack WebhookEndpointNewParamsFormat = "slack" )
func (WebhookEndpointNewParamsFormat) IsKnown ¶
func (r WebhookEndpointNewParamsFormat) IsKnown() bool
type WebhookEndpointService ¶
type WebhookEndpointService struct {
Options []option.RequestOption
}
WebhookEndpointService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookEndpointService method instead.
func NewWebhookEndpointService ¶
func NewWebhookEndpointService(opts ...option.RequestOption) (r *WebhookEndpointService)
NewWebhookEndpointService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookEndpointService) Delete ¶
func (r *WebhookEndpointService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a webhook endpoint.
func (*WebhookEndpointService) Get ¶
func (r *WebhookEndpointService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Get a webhook endpoint by ID.
func (*WebhookEndpointService) List ¶
func (r *WebhookEndpointService) List(ctx context.Context, query WebhookEndpointListParams, opts ...option.RequestOption) (res *ListResourceWebhookEndpoint, err error)
List webhook endpoints.
func (*WebhookEndpointService) New ¶
func (r *WebhookEndpointService) New(ctx context.Context, body WebhookEndpointNewParams, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Create a webhook endpoint.
func (*WebhookEndpointService) Update ¶
func (r *WebhookEndpointService) Update(ctx context.Context, id string, body WebhookEndpointUpdateParams, opts ...option.RequestOption) (res *WebhookEndpoint, err error)
Update a webhook endpoint.
type WebhookEndpointUpdateParams ¶
type WebhookEndpointUpdateParams struct {
// The events that will trigger the webhook.
Events param.Field[[]WebhookEndpointUpdateParamsEvent] `json:"events"`
// The format of the webhook payload.
Format param.Field[WebhookEndpointUpdateParamsFormat] `json:"format"`
// The secret used to sign the webhook events.
Secret param.Field[string] `json:"secret"`
// The URL where the webhook events will be sent.
URL param.Field[string] `json:"url" format:"uri"`
}
func (WebhookEndpointUpdateParams) MarshalJSON ¶
func (r WebhookEndpointUpdateParams) MarshalJSON() (data []byte, err error)
type WebhookEndpointUpdateParamsEvent ¶
type WebhookEndpointUpdateParamsEvent string
const ( WebhookEndpointUpdateParamsEventOrderCreated WebhookEndpointUpdateParamsEvent = "order.created" WebhookEndpointUpdateParamsEventSubscriptionCreated WebhookEndpointUpdateParamsEvent = "subscription.created" WebhookEndpointUpdateParamsEventSubscriptionUpdated WebhookEndpointUpdateParamsEvent = "subscription.updated" WebhookEndpointUpdateParamsEventProductCreated WebhookEndpointUpdateParamsEvent = "product.created" WebhookEndpointUpdateParamsEventProductUpdated WebhookEndpointUpdateParamsEvent = "product.updated" WebhookEndpointUpdateParamsEventBenefitCreated WebhookEndpointUpdateParamsEvent = "benefit.created" WebhookEndpointUpdateParamsEventBenefitUpdated WebhookEndpointUpdateParamsEvent = "benefit.updated" WebhookEndpointUpdateParamsEventOrganizationUpdated WebhookEndpointUpdateParamsEvent = "organization.updated" WebhookEndpointUpdateParamsEventPledgeCreated WebhookEndpointUpdateParamsEvent = "pledge.created" WebhookEndpointUpdateParamsEventPledgeUpdated WebhookEndpointUpdateParamsEvent = "pledge.updated" WebhookEndpointUpdateParamsEventDonationCreated WebhookEndpointUpdateParamsEvent = "donation.created" )
func (WebhookEndpointUpdateParamsEvent) IsKnown ¶
func (r WebhookEndpointUpdateParamsEvent) IsKnown() bool
type WebhookEndpointUpdateParamsFormat ¶
type WebhookEndpointUpdateParamsFormat string
The format of the webhook payload.
const ( WebhookEndpointUpdateParamsFormatRaw WebhookEndpointUpdateParamsFormat = "raw" WebhookEndpointUpdateParamsFormatDiscord WebhookEndpointUpdateParamsFormat = "discord" WebhookEndpointUpdateParamsFormatSlack WebhookEndpointUpdateParamsFormat = "slack" )
func (WebhookEndpointUpdateParamsFormat) IsKnown ¶
func (r WebhookEndpointUpdateParamsFormat) IsKnown() bool
type WebhookEventRedeliverResponse ¶
type WebhookEventRedeliverResponse = interface{}
type WebhookEventService ¶
type WebhookEventService struct {
Options []option.RequestOption
}
WebhookEventService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookEventService method instead.
func NewWebhookEventService ¶
func NewWebhookEventService(opts ...option.RequestOption) (r *WebhookEventService)
NewWebhookEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookEventService) Redeliver ¶
func (r *WebhookEventService) Redeliver(ctx context.Context, id string, opts ...option.RequestOption) (res *WebhookEventRedeliverResponse, err error)
Schedule the re-delivery of a webhook event.
type WebhookService ¶
type WebhookService struct {
Options []option.RequestOption
Endpoints *WebhookEndpointService
Deliveries *WebhookDeliveryService
Events *WebhookEventService
}
WebhookService contains methods and other services that help with interacting with the polar API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.
func NewWebhookService ¶
func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)
NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
Source Files
¶
- account.go
- advertisement.go
- aliases.go
- article.go
- articlereceiver.go
- benefit.go
- benefitgrant.go
- checkout.go
- client.go
- donation.go
- donationpaymentintent.go
- donationpublic.go
- externalorganization.go
- field.go
- file.go
- funding.go
- issue.go
- issuebody.go
- issuelookup.go
- metric.go
- metriclimit.go
- oauth2.go
- oauth2register.go
- oauth2userinfo.go
- order.go
- orderinvoice.go
- organization.go
- organizationcustomer.go
- pledge.go
- pledgesummary.go
- product.go
- productbenefit.go
- pullrequest.go
- repository.go
- reward.go
- subscription.go
- transaction.go
- transactionpayout.go
- user.go
- useradvertisement.go
- userbenefit.go
- userdownloadable.go
- userorder.go
- usersubscription.go
- webhook.go
- webhookdelivery.go
- webhookendpoint.go
- webhookevent.go