Documentation
¶
Index ¶
- Constants
- func NewGoogle(inputConfig *GoogleConfig) *googleReceiverArgument
- type GoogleConfig
- type GoogleConfigGenerateAccessToken
- type GoogleProductPurchaseResponse
- type GooglePurchaseValidateParam
- type GooglePurchaseValidateResponseError
- type GoogleSubscriptionsPurchaseResponse
- type GoogleSubscriptionsPurchaseValidateParam
- type SubscriptionCanceledStateContext
- type SubscriptionPausedStateContext
- type SubscriptionPurchaseLineItem
- type SubscriptionPurchaseLineItemAutoRenewingPlan
- type SubscriptionPurchaseLineItemOfferDetails
- type SubscriptionPurchaseLineItemPrepaidPlan
- type SubscriptionUserInitiatedCancellation
- type SubscriptionUserInitiatedCancellationCancelSurveyResult
Constants ¶
View Source
const (
GoogleProductPurchaseURL = "" /* 132-byte string literal not displayed */
)
View Source
const (
GoogleSubscriptionsPurchaseV2URL = "" /* 127-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
func NewGoogle ¶
func NewGoogle(inputConfig *GoogleConfig) *googleReceiverArgument
Types ¶
type GoogleConfig ¶
type GoogleConfig struct { GenerateAccessToken GoogleConfigGenerateAccessToken AccessToken string }
type GoogleConfigGenerateAccessToken ¶
type GoogleConfigGenerateAccessToken struct { // Client Email from service account json file ClientEmail string // Private Key ID from service account json file PrivateKeyID string // Private Key from service account json file // PrivateKey contains the contents of an RSA private key or the // contents of a PEM file that contains a private key. The provided // private key is used to sign JWT payloads. // PEM containers with a passphrase are not supported. // Use the following command to convert a PKCS 12 file into a PEM. // // $ openssl pkcs12 -in key.p12 -out key.pem -nodes // PrivateKey string // Scopes optionally specifies a list of requested permission scopes. Scopes []string }
type GoogleProductPurchaseResponse ¶
type GoogleProductPurchaseResponse struct { OrderID string `json:"orderId"` PurchaseTimeMillis string `json:"purchaseTimeMillis"` DeveloperPayload string `json:"developerPayload"` // Ex. androidpublisher#productPurchase Kind string `json:"kind"` /* Purchase State 0 - Purchased 1 - Canceled 2 - Pending */ PurchaseState int `json:"purchaseState"` /* Consumption State 0 - Yet to be consumed 1 - Consumed */ ConsumptionState int `json:"consumptionState"` /* Purchase Type 0 - Test (i.e. purchased from a license testing account) 1 - Promo (i.e. purchased using a promo code) 2 - Rewarded (i.e. from watching a video ad instead of paying) */ PurchaseType int `json:"purchaseType"` /* Acknowledgement State 0 - Yet to be acknowledged 1 - Acknowledged */ AcknowledgementState int `json:"acknowledgementState"` // Region Code - ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. RegionCode string `json:"regionCode"` // Quantity - If not present, the quantity is 1. Quantity int `json:"quantity"` }
type GoogleSubscriptionsPurchaseResponse ¶ added in v1.0.14
type GoogleSubscriptionsPurchaseResponse struct { Kind string `json:"kind"` // ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted. RegionCode string `json:"regionCode"` // Time at which the subscription was granted. Not set for pending subscriptions (subscription was created but awaiting payment during signup). // Timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". StartTime time.Time `json:"startTime"` /* Subscription State - SUBSCRIPTION_STATE_UNSPECIFIED - SUBSCRIPTION_STATE_PENDING - SUBSCRIPTION_STATE_ACTIVE - SUBSCRIPTION_STATE_PAUSED - SUBSCRIPTION_STATE_IN_GRACE_PERIOD - SUBSCRIPTION_STATE_ON_HOLD - SUBSCRIPTION_STATE_CANCELED - SUBSCRIPTION_STATE_EXPIRED */ SubscriptionState string `json:"subscriptionState"` LatestOrderID string `json:"latestOrderId"` AcknowledgementState string `json:"acknowledgementState"` LinkedPurchaseToken *string `json:"linkedPurchaseToken"` LineItems []SubscriptionPurchaseLineItem `json:"lineItems"` // Additional context around paused subscriptions. Only present if the subscription currently has subscriptionState SUBSCRIPTION_STATE_PAUSED. PausedStateContext *SubscriptionPausedStateContext `json:"pausedStateContext"` CanceledStateContext *SubscriptionCanceledStateContext `json:"canceledStateContext"` }
type GoogleSubscriptionsPurchaseValidateParam ¶ added in v1.0.14
type SubscriptionCanceledStateContext ¶ added in v1.0.14
type SubscriptionCanceledStateContext struct {
UserInitiatedCancellation *SubscriptionUserInitiatedCancellation `json:"userInitiatedCancellation"`
}
type SubscriptionPausedStateContext ¶ added in v1.0.14
type SubscriptionPurchaseLineItem ¶ added in v1.0.14
type SubscriptionPurchaseLineItem struct { ProductId string `json:"productId"` ExpiryTime time.Time `json:"expiryTime"` AutoRenewingPlan *SubscriptionPurchaseLineItemAutoRenewingPlan `json:"autoRenewingPlan"` PrepaidPlan *SubscriptionPurchaseLineItemPrepaidPlan `json:"prepaidPlan"` OfferDetails *SubscriptionPurchaseLineItemOfferDetails `json:"offerDetails"` }
type SubscriptionPurchaseLineItemAutoRenewingPlan ¶ added in v1.0.14
type SubscriptionPurchaseLineItemAutoRenewingPlan struct {
AutoRenewEnabled *bool `json:"autoRenewEnabled"`
}
type SubscriptionPurchaseLineItemOfferDetails ¶ added in v1.0.14
type SubscriptionPurchaseLineItemPrepaidPlan ¶ added in v1.0.14
type SubscriptionUserInitiatedCancellation ¶ added in v1.0.14
type SubscriptionUserInitiatedCancellation struct { CancelSurveyResult *SubscriptionUserInitiatedCancellationCancelSurveyResult `json:"cancelSurveyResult"` CancelTime *time.Time `json:"cancelTime"` }
type SubscriptionUserInitiatedCancellationCancelSurveyResult ¶ added in v1.0.14
type SubscriptionUserInitiatedCancellationCancelSurveyResult struct { /* Cancellation Reason - CANCEL_SURVEY_REASON_UNSPECIFIED - CANCEL_SURVEY_REASON_NOT_ENOUGH_USAGE - CANCEL_SURVEY_REASON_TECHNICAL_ISSUES - CANCEL_SURVEY_REASON_COST_RELATED - CANCEL_SURVEY_REASON_FOUND_BETTER_APP - CANCEL_SURVEY_REASON_OTHERS */ Reason *string `json:"reason"` // Only set for CANCEL_SURVEY_REASON_OTHERS. This is the user's freeform response to the survey. ReasonUserInput *string `json:"reasonUserInput"` }
Click to show internal directories.
Click to hide internal directories.