crosspay

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 17 Imported by: 0

README

Crosspay Server SDK for Go

A Go client library for the Crosspay API, providing easy access to subscription management, customer information, and webhook validation.

Installation

go get github.com/maxint-app/crosspay-server-sdk-go

Usage

Initialize the Client
import (
    "context"
    crosspay "github.com/maxint-app/crosspay-server-sdk-go/src"
)

client, err := crosspay.NewCrosspayServerClient("your_api_key_here")
if err != nil {
    log.Fatal(err)
}

// Or with a custom base URL
client, err := crosspay.NewCrosspayServerClient("your_api_key_here", "https://custom-api.example.com")
List Products
ctx := context.Background()
products, err := client.ListProducts(ctx)
if err != nil {
    log.Fatal(err)
}
List Entitlements
entitlements, err := client.ListEntitlements(ctx, "production") // or "sandbox"
if err != nil {
    log.Fatal(err)
}
Get Active Subscription
subscription, err := client.GetActiveSubscription(ctx, "customer@example.com")
if err != nil {
    log.Fatal(err)
}
Get Active Product
product, err := client.GetActiveProduct(ctx, "customer@example.com")
if err != nil {
    log.Fatal(err)
}
Get Active Entitlement
entitlement, err := client.GetActiveEntitlement(ctx, "customer@example.com", "production")
if err != nil {
    log.Fatal(err)
}
List Customers
limit := int64(20)
cursor := "optional_cursor_string"
customers, err := client.ListCustomers(ctx, &limit, &cursor)
if err != nil {
    log.Fatal(err)
}
Get Customer Info
customerInfo, err := client.GetCustomerInfo(ctx, "customer@example.com")
if err != nil {
    log.Fatal(err)
}
Validate Webhook Events
webhookPublicKey := `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
-----END PUBLIC KEY-----`

rawPayload := []byte(`{"email":"user@example.com","id":"123"}`)
signatureHeader := "base64_encoded_signature"
timestampHeader := "2026-01-06T10:00:00Z"

event, err := client.ConstructWebhookEvent(
    webhookPublicKey,
    rawPayload,
    signatureHeader,
    timestampHeader,
)
if err != nil {
    log.Printf("Webhook validation failed: %v", err)
} else {
    fmt.Printf("Valid webhook event: %+v\n", event)
}

Types

The SDK exports the following types from the generated package:

  • TenantProduct - Product information
  • TenantEntitlement - Entitlement details
  • StorableSubscription - Subscription data
  • GetCustomerExtendedInfoByEmailRow - Extended customer information
  • ListCustomerResponseBody - Paginated customer list response

Error Handling

All methods return errors that should be checked. API errors are wrapped with descriptive messages.

customers, err := client.ListCustomers(ctx, nil, nil)
if err != nil {
    log.Printf("Failed to list customers: %v", err)
    return
}

Context Support

All API methods accept a context.Context parameter for cancellation and timeout support:

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

products, err := client.ListProducts(ctx)

Example

See the example directory for a complete usage example.

License

See LICENSE file for details.

Documentation

Overview

Package crosspay provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetTenantEntitlementsByEnvironmentRequest

func NewGetTenantEntitlementsByEnvironmentRequest(server string, environment string) (*http.Request, error)

NewGetTenantEntitlementsByEnvironmentRequest generates requests for GetTenantEntitlementsByEnvironment

func NewGetTenantProductsRequest

func NewGetTenantProductsRequest(server string, params *GetTenantProductsParams) (*http.Request, error)

NewGetTenantProductsRequest generates requests for GetTenantProducts

func NewGetTenantServerCustomersRequest

func NewGetTenantServerCustomersRequest(server string, params *GetTenantServerCustomersParams) (*http.Request, error)

NewGetTenantServerCustomersRequest generates requests for GetTenantServerCustomers

func NewGetTenantStripeProductsByEnvironmentRequest

func NewGetTenantStripeProductsByEnvironmentRequest(server string, environment string) (*http.Request, error)

NewGetTenantStripeProductsByEnvironmentRequest generates requests for GetTenantStripeProductsByEnvironment

func NewPostTenantEntitlementsActiveRequest added in v0.2.0

func NewPostTenantEntitlementsActiveRequest(server string, body PostTenantEntitlementsActiveJSONRequestBody) (*http.Request, error)

NewPostTenantEntitlementsActiveRequest calls the generic PostTenantEntitlementsActive builder with application/json body

func NewPostTenantEntitlementsActiveRequestWithBody added in v0.2.0

func NewPostTenantEntitlementsActiveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantEntitlementsActiveRequestWithBody generates requests for PostTenantEntitlementsActive with any type of body

func NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequest added in v0.1.1

func NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequest(server string, environment string, body PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody) (*http.Request, error)

NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequest calls the generic PostTenantGocardlessBillingRequestFlowByEnvironment builder with application/json body

func NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequestWithBody added in v0.1.1

func NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequestWithBody(server string, environment string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantGocardlessBillingRequestFlowByEnvironmentRequestWithBody generates requests for PostTenantGocardlessBillingRequestFlowByEnvironment with any type of body

func NewPostTenantIdentifyRequest added in v0.1.1

func NewPostTenantIdentifyRequest(server string, body PostTenantIdentifyJSONRequestBody) (*http.Request, error)

NewPostTenantIdentifyRequest calls the generic PostTenantIdentify builder with application/json body

func NewPostTenantIdentifyRequestWithBody added in v0.1.1

func NewPostTenantIdentifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantIdentifyRequestWithBody generates requests for PostTenantIdentify with any type of body

func NewPostTenantServerCustomerRequest

func NewPostTenantServerCustomerRequest(server string, body PostTenantServerCustomerJSONRequestBody) (*http.Request, error)

NewPostTenantServerCustomerRequest calls the generic PostTenantServerCustomer builder with application/json body

func NewPostTenantServerCustomerRequestWithBody

func NewPostTenantServerCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantServerCustomerRequestWithBody generates requests for PostTenantServerCustomer with any type of body

func NewPostTenantServerGocardlessCancelByEnvironmentRequest added in v0.2.0

func NewPostTenantServerGocardlessCancelByEnvironmentRequest(server string, environment string, body PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody) (*http.Request, error)

NewPostTenantServerGocardlessCancelByEnvironmentRequest calls the generic PostTenantServerGocardlessCancelByEnvironment builder with application/json body

func NewPostTenantServerGocardlessCancelByEnvironmentRequestWithBody added in v0.2.0

func NewPostTenantServerGocardlessCancelByEnvironmentRequestWithBody(server string, environment string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantServerGocardlessCancelByEnvironmentRequestWithBody generates requests for PostTenantServerGocardlessCancelByEnvironment with any type of body

func NewPostTenantServerStripeCancelByEnvironmentRequest added in v0.2.0

func NewPostTenantServerStripeCancelByEnvironmentRequest(server string, environment string, body PostTenantServerStripeCancelByEnvironmentJSONRequestBody) (*http.Request, error)

NewPostTenantServerStripeCancelByEnvironmentRequest calls the generic PostTenantServerStripeCancelByEnvironment builder with application/json body

func NewPostTenantServerStripeCancelByEnvironmentRequestWithBody added in v0.2.0

func NewPostTenantServerStripeCancelByEnvironmentRequestWithBody(server string, environment string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantServerStripeCancelByEnvironmentRequestWithBody generates requests for PostTenantServerStripeCancelByEnvironment with any type of body

func NewPostTenantServerV2CustomerRequest added in v0.2.0

func NewPostTenantServerV2CustomerRequest(server string, body PostTenantServerV2CustomerJSONRequestBody) (*http.Request, error)

NewPostTenantServerV2CustomerRequest calls the generic PostTenantServerV2Customer builder with application/json body

func NewPostTenantServerV2CustomerRequestWithBody added in v0.2.0

func NewPostTenantServerV2CustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantServerV2CustomerRequestWithBody generates requests for PostTenantServerV2Customer with any type of body

func NewPostTenantStripeCheckoutByEnvironmentRequest

func NewPostTenantStripeCheckoutByEnvironmentRequest(server string, environment string, body PostTenantStripeCheckoutByEnvironmentJSONRequestBody) (*http.Request, error)

NewPostTenantStripeCheckoutByEnvironmentRequest calls the generic PostTenantStripeCheckoutByEnvironment builder with application/json body

func NewPostTenantStripeCheckoutByEnvironmentRequestWithBody

func NewPostTenantStripeCheckoutByEnvironmentRequestWithBody(server string, environment string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantStripeCheckoutByEnvironmentRequestWithBody generates requests for PostTenantStripeCheckoutByEnvironment with any type of body

func NewPostTenantSubscriptionsActiveRequest

func NewPostTenantSubscriptionsActiveRequest(server string, body PostTenantSubscriptionsActiveJSONRequestBody) (*http.Request, error)

NewPostTenantSubscriptionsActiveRequest calls the generic PostTenantSubscriptionsActive builder with application/json body

func NewPostTenantSubscriptionsActiveRequestWithBody

func NewPostTenantSubscriptionsActiveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTenantSubscriptionsActiveRequestWithBody generates requests for PostTenantSubscriptionsActive with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetTenantEntitlementsByEnvironment

func (c *Client) GetTenantEntitlementsByEnvironment(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTenantProducts

func (c *Client) GetTenantProducts(ctx context.Context, params *GetTenantProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTenantServerCustomers

func (c *Client) GetTenantServerCustomers(ctx context.Context, params *GetTenantServerCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTenantStripeProductsByEnvironment

func (c *Client) GetTenantStripeProductsByEnvironment(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantEntitlementsActive added in v0.2.0

func (c *Client) PostTenantEntitlementsActive(ctx context.Context, body PostTenantEntitlementsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantEntitlementsActiveWithBody added in v0.2.0

func (c *Client) PostTenantEntitlementsActiveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantGocardlessBillingRequestFlowByEnvironment added in v0.1.1

func (c *Client) PostTenantGocardlessBillingRequestFlowByEnvironment(ctx context.Context, environment string, body PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantGocardlessBillingRequestFlowByEnvironmentWithBody added in v0.1.1

func (c *Client) PostTenantGocardlessBillingRequestFlowByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantIdentify added in v0.1.1

func (c *Client) PostTenantIdentify(ctx context.Context, body PostTenantIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantIdentifyWithBody added in v0.1.1

func (c *Client) PostTenantIdentifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerCustomer

func (c *Client) PostTenantServerCustomer(ctx context.Context, body PostTenantServerCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerCustomerWithBody

func (c *Client) PostTenantServerCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerGocardlessCancelByEnvironment added in v0.2.0

func (c *Client) PostTenantServerGocardlessCancelByEnvironment(ctx context.Context, environment string, body PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerGocardlessCancelByEnvironmentWithBody added in v0.2.0

func (c *Client) PostTenantServerGocardlessCancelByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerStripeCancelByEnvironment added in v0.2.0

func (c *Client) PostTenantServerStripeCancelByEnvironment(ctx context.Context, environment string, body PostTenantServerStripeCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerStripeCancelByEnvironmentWithBody added in v0.2.0

func (c *Client) PostTenantServerStripeCancelByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerV2Customer added in v0.2.0

func (c *Client) PostTenantServerV2Customer(ctx context.Context, body PostTenantServerV2CustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantServerV2CustomerWithBody added in v0.2.0

func (c *Client) PostTenantServerV2CustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantStripeCheckoutByEnvironment

func (c *Client) PostTenantStripeCheckoutByEnvironment(ctx context.Context, environment string, body PostTenantStripeCheckoutByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantStripeCheckoutByEnvironmentWithBody

func (c *Client) PostTenantStripeCheckoutByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantSubscriptionsActive

func (c *Client) PostTenantSubscriptionsActive(ctx context.Context, body PostTenantSubscriptionsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTenantSubscriptionsActiveWithBody

func (c *Client) PostTenantSubscriptionsActiveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PostTenantServerCustomerWithBody request with any body
	PostTenantServerCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantServerCustomer(ctx context.Context, body PostTenantServerCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTenantServerCustomers request
	GetTenantServerCustomers(ctx context.Context, params *GetTenantServerCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantServerGocardlessCancelByEnvironmentWithBody request with any body
	PostTenantServerGocardlessCancelByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantServerGocardlessCancelByEnvironment(ctx context.Context, environment string, body PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantServerStripeCancelByEnvironmentWithBody request with any body
	PostTenantServerStripeCancelByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantServerStripeCancelByEnvironment(ctx context.Context, environment string, body PostTenantServerStripeCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantServerV2CustomerWithBody request with any body
	PostTenantServerV2CustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantServerV2Customer(ctx context.Context, body PostTenantServerV2CustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantEntitlementsActiveWithBody request with any body
	PostTenantEntitlementsActiveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantEntitlementsActive(ctx context.Context, body PostTenantEntitlementsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTenantEntitlementsByEnvironment request
	GetTenantEntitlementsByEnvironment(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantGocardlessBillingRequestFlowByEnvironmentWithBody request with any body
	PostTenantGocardlessBillingRequestFlowByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantGocardlessBillingRequestFlowByEnvironment(ctx context.Context, environment string, body PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantIdentifyWithBody request with any body
	PostTenantIdentifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantIdentify(ctx context.Context, body PostTenantIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTenantProducts request
	GetTenantProducts(ctx context.Context, params *GetTenantProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantStripeCheckoutByEnvironmentWithBody request with any body
	PostTenantStripeCheckoutByEnvironmentWithBody(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantStripeCheckoutByEnvironment(ctx context.Context, environment string, body PostTenantStripeCheckoutByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTenantStripeProductsByEnvironment request
	GetTenantStripeProductsByEnvironment(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTenantSubscriptionsActiveWithBody request with any body
	PostTenantSubscriptionsActiveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTenantSubscriptionsActive(ctx context.Context, body PostTenantSubscriptionsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetTenantEntitlementsByEnvironmentWithResponse

func (c *ClientWithResponses) GetTenantEntitlementsByEnvironmentWithResponse(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*GetTenantEntitlementsByEnvironmentResponse, error)

GetTenantEntitlementsByEnvironmentWithResponse request returning *GetTenantEntitlementsByEnvironmentResponse

func (*ClientWithResponses) GetTenantProductsWithResponse

func (c *ClientWithResponses) GetTenantProductsWithResponse(ctx context.Context, params *GetTenantProductsParams, reqEditors ...RequestEditorFn) (*GetTenantProductsResponse, error)

GetTenantProductsWithResponse request returning *GetTenantProductsResponse

func (*ClientWithResponses) GetTenantServerCustomersWithResponse

func (c *ClientWithResponses) GetTenantServerCustomersWithResponse(ctx context.Context, params *GetTenantServerCustomersParams, reqEditors ...RequestEditorFn) (*GetTenantServerCustomersResponse, error)

GetTenantServerCustomersWithResponse request returning *GetTenantServerCustomersResponse

func (*ClientWithResponses) GetTenantStripeProductsByEnvironmentWithResponse

func (c *ClientWithResponses) GetTenantStripeProductsByEnvironmentWithResponse(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*GetTenantStripeProductsByEnvironmentResponse, error)

GetTenantStripeProductsByEnvironmentWithResponse request returning *GetTenantStripeProductsByEnvironmentResponse

func (*ClientWithResponses) PostTenantEntitlementsActiveWithBodyWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantEntitlementsActiveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantEntitlementsActiveResponse, error)

PostTenantEntitlementsActiveWithBodyWithResponse request with arbitrary body returning *PostTenantEntitlementsActiveResponse

func (*ClientWithResponses) PostTenantEntitlementsActiveWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantEntitlementsActiveWithResponse(ctx context.Context, body PostTenantEntitlementsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantEntitlementsActiveResponse, error)

func (*ClientWithResponses) PostTenantGocardlessBillingRequestFlowByEnvironmentWithBodyWithResponse added in v0.1.1

func (c *ClientWithResponses) PostTenantGocardlessBillingRequestFlowByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantGocardlessBillingRequestFlowByEnvironmentResponse, error)

PostTenantGocardlessBillingRequestFlowByEnvironmentWithBodyWithResponse request with arbitrary body returning *PostTenantGocardlessBillingRequestFlowByEnvironmentResponse

func (*ClientWithResponses) PostTenantGocardlessBillingRequestFlowByEnvironmentWithResponse added in v0.1.1

func (c *ClientWithResponses) PostTenantGocardlessBillingRequestFlowByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantGocardlessBillingRequestFlowByEnvironmentResponse, error)

func (*ClientWithResponses) PostTenantIdentifyWithBodyWithResponse added in v0.1.1

func (c *ClientWithResponses) PostTenantIdentifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantIdentifyResponse, error)

PostTenantIdentifyWithBodyWithResponse request with arbitrary body returning *PostTenantIdentifyResponse

func (*ClientWithResponses) PostTenantIdentifyWithResponse added in v0.1.1

func (c *ClientWithResponses) PostTenantIdentifyWithResponse(ctx context.Context, body PostTenantIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantIdentifyResponse, error)

func (*ClientWithResponses) PostTenantServerCustomerWithBodyWithResponse

func (c *ClientWithResponses) PostTenantServerCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerCustomerResponse, error)

PostTenantServerCustomerWithBodyWithResponse request with arbitrary body returning *PostTenantServerCustomerResponse

func (*ClientWithResponses) PostTenantServerCustomerWithResponse

func (c *ClientWithResponses) PostTenantServerCustomerWithResponse(ctx context.Context, body PostTenantServerCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerCustomerResponse, error)

func (*ClientWithResponses) PostTenantServerGocardlessCancelByEnvironmentWithBodyWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerGocardlessCancelByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerGocardlessCancelByEnvironmentResponse, error)

PostTenantServerGocardlessCancelByEnvironmentWithBodyWithResponse request with arbitrary body returning *PostTenantServerGocardlessCancelByEnvironmentResponse

func (*ClientWithResponses) PostTenantServerGocardlessCancelByEnvironmentWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerGocardlessCancelByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerGocardlessCancelByEnvironmentResponse, error)

func (*ClientWithResponses) PostTenantServerStripeCancelByEnvironmentWithBodyWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerStripeCancelByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerStripeCancelByEnvironmentResponse, error)

PostTenantServerStripeCancelByEnvironmentWithBodyWithResponse request with arbitrary body returning *PostTenantServerStripeCancelByEnvironmentResponse

func (*ClientWithResponses) PostTenantServerStripeCancelByEnvironmentWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerStripeCancelByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantServerStripeCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerStripeCancelByEnvironmentResponse, error)

func (*ClientWithResponses) PostTenantServerV2CustomerWithBodyWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerV2CustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerV2CustomerResponse, error)

PostTenantServerV2CustomerWithBodyWithResponse request with arbitrary body returning *PostTenantServerV2CustomerResponse

func (*ClientWithResponses) PostTenantServerV2CustomerWithResponse added in v0.2.0

func (c *ClientWithResponses) PostTenantServerV2CustomerWithResponse(ctx context.Context, body PostTenantServerV2CustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerV2CustomerResponse, error)

func (*ClientWithResponses) PostTenantStripeCheckoutByEnvironmentWithBodyWithResponse

func (c *ClientWithResponses) PostTenantStripeCheckoutByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantStripeCheckoutByEnvironmentResponse, error)

PostTenantStripeCheckoutByEnvironmentWithBodyWithResponse request with arbitrary body returning *PostTenantStripeCheckoutByEnvironmentResponse

func (*ClientWithResponses) PostTenantStripeCheckoutByEnvironmentWithResponse

func (c *ClientWithResponses) PostTenantStripeCheckoutByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantStripeCheckoutByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantStripeCheckoutByEnvironmentResponse, error)

func (*ClientWithResponses) PostTenantSubscriptionsActiveWithBodyWithResponse

func (c *ClientWithResponses) PostTenantSubscriptionsActiveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantSubscriptionsActiveResponse, error)

PostTenantSubscriptionsActiveWithBodyWithResponse request with arbitrary body returning *PostTenantSubscriptionsActiveResponse

func (*ClientWithResponses) PostTenantSubscriptionsActiveWithResponse

func (c *ClientWithResponses) PostTenantSubscriptionsActiveWithResponse(ctx context.Context, body PostTenantSubscriptionsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantSubscriptionsActiveResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostTenantServerCustomerWithBodyWithResponse request with any body
	PostTenantServerCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerCustomerResponse, error)

	PostTenantServerCustomerWithResponse(ctx context.Context, body PostTenantServerCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerCustomerResponse, error)

	// GetTenantServerCustomersWithResponse request
	GetTenantServerCustomersWithResponse(ctx context.Context, params *GetTenantServerCustomersParams, reqEditors ...RequestEditorFn) (*GetTenantServerCustomersResponse, error)

	// PostTenantServerGocardlessCancelByEnvironmentWithBodyWithResponse request with any body
	PostTenantServerGocardlessCancelByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerGocardlessCancelByEnvironmentResponse, error)

	PostTenantServerGocardlessCancelByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerGocardlessCancelByEnvironmentResponse, error)

	// PostTenantServerStripeCancelByEnvironmentWithBodyWithResponse request with any body
	PostTenantServerStripeCancelByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerStripeCancelByEnvironmentResponse, error)

	PostTenantServerStripeCancelByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantServerStripeCancelByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerStripeCancelByEnvironmentResponse, error)

	// PostTenantServerV2CustomerWithBodyWithResponse request with any body
	PostTenantServerV2CustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantServerV2CustomerResponse, error)

	PostTenantServerV2CustomerWithResponse(ctx context.Context, body PostTenantServerV2CustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantServerV2CustomerResponse, error)

	// PostTenantEntitlementsActiveWithBodyWithResponse request with any body
	PostTenantEntitlementsActiveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantEntitlementsActiveResponse, error)

	PostTenantEntitlementsActiveWithResponse(ctx context.Context, body PostTenantEntitlementsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantEntitlementsActiveResponse, error)

	// GetTenantEntitlementsByEnvironmentWithResponse request
	GetTenantEntitlementsByEnvironmentWithResponse(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*GetTenantEntitlementsByEnvironmentResponse, error)

	// PostTenantGocardlessBillingRequestFlowByEnvironmentWithBodyWithResponse request with any body
	PostTenantGocardlessBillingRequestFlowByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantGocardlessBillingRequestFlowByEnvironmentResponse, error)

	PostTenantGocardlessBillingRequestFlowByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantGocardlessBillingRequestFlowByEnvironmentResponse, error)

	// PostTenantIdentifyWithBodyWithResponse request with any body
	PostTenantIdentifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantIdentifyResponse, error)

	PostTenantIdentifyWithResponse(ctx context.Context, body PostTenantIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantIdentifyResponse, error)

	// GetTenantProductsWithResponse request
	GetTenantProductsWithResponse(ctx context.Context, params *GetTenantProductsParams, reqEditors ...RequestEditorFn) (*GetTenantProductsResponse, error)

	// PostTenantStripeCheckoutByEnvironmentWithBodyWithResponse request with any body
	PostTenantStripeCheckoutByEnvironmentWithBodyWithResponse(ctx context.Context, environment string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantStripeCheckoutByEnvironmentResponse, error)

	PostTenantStripeCheckoutByEnvironmentWithResponse(ctx context.Context, environment string, body PostTenantStripeCheckoutByEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantStripeCheckoutByEnvironmentResponse, error)

	// GetTenantStripeProductsByEnvironmentWithResponse request
	GetTenantStripeProductsByEnvironmentWithResponse(ctx context.Context, environment string, reqEditors ...RequestEditorFn) (*GetTenantStripeProductsByEnvironmentResponse, error)

	// PostTenantSubscriptionsActiveWithBodyWithResponse request with any body
	PostTenantSubscriptionsActiveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTenantSubscriptionsActiveResponse, error)

	PostTenantSubscriptionsActiveWithResponse(ctx context.Context, body PostTenantSubscriptionsActiveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTenantSubscriptionsActiveResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CrosspayServerClient

type CrosspayServerClient struct {
	// contains filtered or unexported fields
}

CrosspayServerClient is a high-level client for the Crosspay API

func NewCrosspayServerClient

func NewCrosspayServerClient(apiKey string, baseURL ...string) (*CrosspayServerClient, error)

NewCrosspayServerClient creates a new Crosspay server client

func (*CrosspayServerClient) CancelGocardlessSubscription added in v0.2.1

func (c *CrosspayServerClient) CancelGocardlessSubscription(
	ctx context.Context,
	environment Environment,
	entitlementId,
	customerEmail string,
) error

func (*CrosspayServerClient) CancelStripeSubscription added in v0.2.1

func (c *CrosspayServerClient) CancelStripeSubscription(
	ctx context.Context,
	environment Environment,
	entitlementId,
	customerEmail string,
) error

func (*CrosspayServerClient) ConstructWebhookEvent

func (c *CrosspayServerClient) ConstructWebhookEvent(
	webhookPublicKey string,
	rawPayload []byte,
	signatureHeader string,
	timestampHeader string,
) (*CustomerEntitlements, error)

ConstructWebhookEvent validates and parses a webhook event

func (*CrosspayServerClient) GetActiveEntitlements added in v0.2.0

func (c *CrosspayServerClient) GetActiveEntitlements(ctx context.Context, customerEmail string, environment Environment) ([]StorableEntitlement, error)

GetActiveEntitlements retrieves the active entitlement for a customer

func (*CrosspayServerClient) GetActiveProducts added in v0.2.0

func (c *CrosspayServerClient) GetActiveProducts(ctx context.Context, customerEmail string, environment Environment) ([]TenantProduct, error)

GetActiveProduct retrieves the active product for a customer

func (*CrosspayServerClient) GetCustomerInfo

func (c *CrosspayServerClient) GetCustomerInfo(ctx context.Context, customerEmail string, environment Environment) (*CustomerEntitlements, error)

GetCustomerInfo retrieves extended customer information

func (*CrosspayServerClient) ListCustomers

func (c *CrosspayServerClient) ListCustomers(ctx context.Context, limit *int64, cursor *string) (*ListCustomerResponseBody, error)

ListCustomers retrieves a paginated list of customers

func (*CrosspayServerClient) ListEntitlements

func (c *CrosspayServerClient) ListEntitlements(ctx context.Context, environment Environment) ([]TenantEntitlement, error)

ListEntitlements retrieves all tenant entitlements for the specified environment

func (*CrosspayServerClient) ListProducts

func (c *CrosspayServerClient) ListProducts(ctx context.Context) ([]TenantProduct, error)

ListProducts retrieves all tenant products

type CustomerEntitlement added in v0.2.0

type CustomerEntitlement struct {
	Id     string  `json:"id"`
	Name   string  `json:"name"`
	Status *string `json:"status,omitempty"`
	Store  *string `json:"store,omitempty"`
}

CustomerEntitlement defines model for CustomerEntitlement.

type CustomerEntitlements added in v0.2.0

type CustomerEntitlements struct {
	CustomerId    string              `json:"customer_id"`
	Email         string              `json:"email"`
	Purchases     *[]PurchaseItem     `json:"purchases"`
	Subscriptions *[]SubscriptionItem `json:"subscriptions"`
}

CustomerEntitlements defines model for CustomerEntitlements.

type CustomerListItem added in v0.2.0

type CustomerListItem struct {
	CustomerId   string                 `json:"customer_id"`
	Email        string                 `json:"email"`
	Entitlements *[]CustomerEntitlement `json:"entitlements"`
	Products     *[]CustomerProduct     `json:"products"`
	Status       string                 `json:"status"`
}

CustomerListItem defines model for CustomerListItem.

type CustomerProduct added in v0.2.0

type CustomerProduct struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

CustomerProduct defines model for CustomerProduct.

type Environment added in v0.1.2

type Environment string
const (
	// EnvironmentProduction is the production environment
	EnvironmentProduction Environment = "prod"
	// EnvironmentSandbox is the sandbox environment
	EnvironmentSandbox Environment = "sandbox"
)

type ErrorDetail

type ErrorDetail struct {
	// Location Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
	Location *string `json:"location,omitempty"`

	// Message Error message text
	Message *string `json:"message,omitempty"`

	// Value The value at the given location
	Value interface{} `json:"value,omitempty"`
}

ErrorDetail defines model for ErrorDetail.

type ErrorModel

type ErrorModel struct {
	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail *string `json:"detail,omitempty"`

	// Errors Optional list of individual error details
	Errors *[]ErrorDetail `json:"errors,omitempty"`

	// Instance A URI reference that identifies the specific occurrence of the problem.
	Instance *string `json:"instance,omitempty"`

	// Status HTTP status code
	Status *int64 `json:"status,omitempty"`

	// Title A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
	Title *string `json:"title,omitempty"`

	// Type A URI reference to human-readable documentation for the error.
	Type *string `json:"type,omitempty"`
}

ErrorModel defines model for ErrorModel.

type GetCustomerExtendedInfoByEmailRow

type GetCustomerExtendedInfoByEmailRow struct {
	Email           string  `json:"email"`
	EmailSha256Sum  *string `json:"email_sha256_sum"`
	EntitlementName *string `json:"entitlement_name"`
	EntitlementType *string `json:"entitlement_type"`
	Id              string  `json:"id"`
	ProductId       *string `json:"product_id"`
	ProductName     *string `json:"product_name"`
	Status          *string `json:"status"`
	Store           *string `json:"store"`
}

GetCustomerExtendedInfoByEmailRow defines model for GetCustomerExtendedInfoByEmailRow.

type GetTenantEntitlementsByEnvironmentResponse

type GetTenantEntitlementsByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantListEntitlementsResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParseGetTenantEntitlementsByEnvironmentResponse

func ParseGetTenantEntitlementsByEnvironmentResponse(rsp *http.Response) (*GetTenantEntitlementsByEnvironmentResponse, error)

ParseGetTenantEntitlementsByEnvironmentResponse parses an HTTP response from a GetTenantEntitlementsByEnvironmentWithResponse call

func (GetTenantEntitlementsByEnvironmentResponse) Status

Status returns HTTPResponse.Status

func (GetTenantEntitlementsByEnvironmentResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetTenantProductsParams

type GetTenantProductsParams struct {
	ApiKey *string `json:"api-key,omitempty"`
}

GetTenantProductsParams defines parameters for GetTenantProducts.

type GetTenantProductsResponse

type GetTenantProductsResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantListProductsResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParseGetTenantProductsResponse

func ParseGetTenantProductsResponse(rsp *http.Response) (*GetTenantProductsResponse, error)

ParseGetTenantProductsResponse parses an HTTP response from a GetTenantProductsWithResponse call

func (GetTenantProductsResponse) Status

func (r GetTenantProductsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTenantProductsResponse) StatusCode

func (r GetTenantProductsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTenantServerCustomersParams

type GetTenantServerCustomersParams struct {
	Limit  *int64  `form:"limit,omitempty" json:"limit,omitempty"`
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

GetTenantServerCustomersParams defines parameters for GetTenantServerCustomers.

type GetTenantServerCustomersResponse

type GetTenantServerCustomersResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *ListCustomerResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParseGetTenantServerCustomersResponse

func ParseGetTenantServerCustomersResponse(rsp *http.Response) (*GetTenantServerCustomersResponse, error)

ParseGetTenantServerCustomersResponse parses an HTTP response from a GetTenantServerCustomersWithResponse call

func (GetTenantServerCustomersResponse) Status

Status returns HTTPResponse.Status

func (GetTenantServerCustomersResponse) StatusCode

func (r GetTenantServerCustomersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTenantStripeProductsByEnvironmentResponse

type GetTenantStripeProductsByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantListStripeProductsResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParseGetTenantStripeProductsByEnvironmentResponse

func ParseGetTenantStripeProductsByEnvironmentResponse(rsp *http.Response) (*GetTenantStripeProductsByEnvironmentResponse, error)

ParseGetTenantStripeProductsByEnvironmentResponse parses an HTTP response from a GetTenantStripeProductsByEnvironmentWithResponse call

func (GetTenantStripeProductsByEnvironmentResponse) Status

Status returns HTTPResponse.Status

func (GetTenantStripeProductsByEnvironmentResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListCustomerResponseBody

type ListCustomerResponseBody struct {
	Data  PaginatedCustomers `json:"data"`
	Error *string            `json:"error,omitempty"`
}

ListCustomerResponseBody defines model for ListCustomerResponseBody.

type PaginatedCustomers

type PaginatedCustomers struct {
	Customers  *[]CustomerListItem `json:"customers"`
	Limit      int64               `json:"limit"`
	NextCursor *string             `json:"next_cursor,omitempty"`
	Total      *int64              `json:"total,omitempty"`
}

PaginatedCustomers defines model for PaginatedCustomers.

type PostTenantEntitlementsActiveJSONRequestBody added in v0.2.0

type PostTenantEntitlementsActiveJSONRequestBody = TenantActiveEntitlementsInputBody

PostTenantEntitlementsActiveJSONRequestBody defines body for PostTenantEntitlementsActive for application/json ContentType.

type PostTenantEntitlementsActiveResponse added in v0.2.0

type PostTenantEntitlementsActiveResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantActiveEntitlementsResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantEntitlementsActiveResponse added in v0.2.0

func ParsePostTenantEntitlementsActiveResponse(rsp *http.Response) (*PostTenantEntitlementsActiveResponse, error)

ParsePostTenantEntitlementsActiveResponse parses an HTTP response from a PostTenantEntitlementsActiveWithResponse call

func (PostTenantEntitlementsActiveResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (PostTenantEntitlementsActiveResponse) StatusCode added in v0.2.0

StatusCode returns HTTPResponse.StatusCode

type PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody added in v0.1.1

type PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody = TenantGoCardlessBillingRequestFlowInputBody

PostTenantGocardlessBillingRequestFlowByEnvironmentJSONRequestBody defines body for PostTenantGocardlessBillingRequestFlowByEnvironment for application/json ContentType.

type PostTenantGocardlessBillingRequestFlowByEnvironmentResponse added in v0.1.1

type PostTenantGocardlessBillingRequestFlowByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantGoCardlessBillingRequestFlowResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantGocardlessBillingRequestFlowByEnvironmentResponse added in v0.1.1

func ParsePostTenantGocardlessBillingRequestFlowByEnvironmentResponse(rsp *http.Response) (*PostTenantGocardlessBillingRequestFlowByEnvironmentResponse, error)

ParsePostTenantGocardlessBillingRequestFlowByEnvironmentResponse parses an HTTP response from a PostTenantGocardlessBillingRequestFlowByEnvironmentWithResponse call

func (PostTenantGocardlessBillingRequestFlowByEnvironmentResponse) Status added in v0.1.1

Status returns HTTPResponse.Status

func (PostTenantGocardlessBillingRequestFlowByEnvironmentResponse) StatusCode added in v0.1.1

StatusCode returns HTTPResponse.StatusCode

type PostTenantIdentifyJSONRequestBody added in v0.1.1

type PostTenantIdentifyJSONRequestBody = TenantIdentifyUserInputBody

PostTenantIdentifyJSONRequestBody defines body for PostTenantIdentify for application/json ContentType.

type PostTenantIdentifyResponse added in v0.1.1

type PostTenantIdentifyResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantIdentifyUserResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantIdentifyResponse added in v0.1.1

func ParsePostTenantIdentifyResponse(rsp *http.Response) (*PostTenantIdentifyResponse, error)

ParsePostTenantIdentifyResponse parses an HTTP response from a PostTenantIdentifyWithResponse call

func (PostTenantIdentifyResponse) Status added in v0.1.1

Status returns HTTPResponse.Status

func (PostTenantIdentifyResponse) StatusCode added in v0.1.1

func (r PostTenantIdentifyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostTenantServerCustomerJSONRequestBody

type PostTenantServerCustomerJSONRequestBody = TenantServerGetCustomerInputBody

PostTenantServerCustomerJSONRequestBody defines body for PostTenantServerCustomer for application/json ContentType.

type PostTenantServerCustomerResponse

type PostTenantServerCustomerResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantServerGetCustomerResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantServerCustomerResponse

func ParsePostTenantServerCustomerResponse(rsp *http.Response) (*PostTenantServerCustomerResponse, error)

ParsePostTenantServerCustomerResponse parses an HTTP response from a PostTenantServerCustomerWithResponse call

func (PostTenantServerCustomerResponse) Status

Status returns HTTPResponse.Status

func (PostTenantServerCustomerResponse) StatusCode

func (r PostTenantServerCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody added in v0.2.0

type PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody = TenantCancelGoCardlessSubscriptionInputBody

PostTenantServerGocardlessCancelByEnvironmentJSONRequestBody defines body for PostTenantServerGocardlessCancelByEnvironment for application/json ContentType.

type PostTenantServerGocardlessCancelByEnvironmentResponse added in v0.2.0

type PostTenantServerGocardlessCancelByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantCancelGoCardlessSubscriptionResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantServerGocardlessCancelByEnvironmentResponse added in v0.2.0

func ParsePostTenantServerGocardlessCancelByEnvironmentResponse(rsp *http.Response) (*PostTenantServerGocardlessCancelByEnvironmentResponse, error)

ParsePostTenantServerGocardlessCancelByEnvironmentResponse parses an HTTP response from a PostTenantServerGocardlessCancelByEnvironmentWithResponse call

func (PostTenantServerGocardlessCancelByEnvironmentResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (PostTenantServerGocardlessCancelByEnvironmentResponse) StatusCode added in v0.2.0

StatusCode returns HTTPResponse.StatusCode

type PostTenantServerStripeCancelByEnvironmentJSONRequestBody added in v0.2.0

type PostTenantServerStripeCancelByEnvironmentJSONRequestBody = TenantCancelStripeSubscriptionInputBody

PostTenantServerStripeCancelByEnvironmentJSONRequestBody defines body for PostTenantServerStripeCancelByEnvironment for application/json ContentType.

type PostTenantServerStripeCancelByEnvironmentResponse added in v0.2.0

type PostTenantServerStripeCancelByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantCancelStripeSubscriptionResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantServerStripeCancelByEnvironmentResponse added in v0.2.0

func ParsePostTenantServerStripeCancelByEnvironmentResponse(rsp *http.Response) (*PostTenantServerStripeCancelByEnvironmentResponse, error)

ParsePostTenantServerStripeCancelByEnvironmentResponse parses an HTTP response from a PostTenantServerStripeCancelByEnvironmentWithResponse call

func (PostTenantServerStripeCancelByEnvironmentResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (PostTenantServerStripeCancelByEnvironmentResponse) StatusCode added in v0.2.0

StatusCode returns HTTPResponse.StatusCode

type PostTenantServerV2CustomerJSONRequestBody added in v0.2.0

type PostTenantServerV2CustomerJSONRequestBody = TenantServerGetCustomerInputBody

PostTenantServerV2CustomerJSONRequestBody defines body for PostTenantServerV2Customer for application/json ContentType.

type PostTenantServerV2CustomerResponse added in v0.2.0

type PostTenantServerV2CustomerResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantServerGetCustomerV2ResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantServerV2CustomerResponse added in v0.2.0

func ParsePostTenantServerV2CustomerResponse(rsp *http.Response) (*PostTenantServerV2CustomerResponse, error)

ParsePostTenantServerV2CustomerResponse parses an HTTP response from a PostTenantServerV2CustomerWithResponse call

func (PostTenantServerV2CustomerResponse) Status added in v0.2.0

Status returns HTTPResponse.Status

func (PostTenantServerV2CustomerResponse) StatusCode added in v0.2.0

func (r PostTenantServerV2CustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostTenantStripeCheckoutByEnvironmentJSONRequestBody

type PostTenantStripeCheckoutByEnvironmentJSONRequestBody = TenantStripeCheckoutInputBody

PostTenantStripeCheckoutByEnvironmentJSONRequestBody defines body for PostTenantStripeCheckoutByEnvironment for application/json ContentType.

type PostTenantStripeCheckoutByEnvironmentResponse

type PostTenantStripeCheckoutByEnvironmentResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantStripeCheckoutResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantStripeCheckoutByEnvironmentResponse

func ParsePostTenantStripeCheckoutByEnvironmentResponse(rsp *http.Response) (*PostTenantStripeCheckoutByEnvironmentResponse, error)

ParsePostTenantStripeCheckoutByEnvironmentResponse parses an HTTP response from a PostTenantStripeCheckoutByEnvironmentWithResponse call

func (PostTenantStripeCheckoutByEnvironmentResponse) Status

Status returns HTTPResponse.Status

func (PostTenantStripeCheckoutByEnvironmentResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostTenantSubscriptionsActiveJSONRequestBody

type PostTenantSubscriptionsActiveJSONRequestBody = TenantActiveSubscriptionInputBody

PostTenantSubscriptionsActiveJSONRequestBody defines body for PostTenantSubscriptionsActive for application/json ContentType.

type PostTenantSubscriptionsActiveResponse

type PostTenantSubscriptionsActiveResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TenantActiveSubscriptionResponseBody
	ApplicationproblemJSONDefault *ErrorModel
}

func ParsePostTenantSubscriptionsActiveResponse

func ParsePostTenantSubscriptionsActiveResponse(rsp *http.Response) (*PostTenantSubscriptionsActiveResponse, error)

ParsePostTenantSubscriptionsActiveResponse parses an HTTP response from a PostTenantSubscriptionsActiveWithResponse call

func (PostTenantSubscriptionsActiveResponse) Status

Status returns HTTPResponse.Status

func (PostTenantSubscriptionsActiveResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PurchaseItem added in v0.2.0

type PurchaseItem struct {
	EntitlementId   string `json:"entitlement_id"`
	EntitlementName string `json:"entitlement_name"`
	EntitlementType string `json:"entitlement_type"`
	ProductId       string `json:"product_id"`
	ProductName     string `json:"product_name"`
	PurchaseState   string `json:"purchase_state"`
	Status          string `json:"status"`
	Store           string `json:"store"`
}

PurchaseItem defines model for PurchaseItem.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type StorableEntitlement added in v0.2.0

type StorableEntitlement struct {
	EntitlementId   string  `json:"entitlement_id"`
	EntitlementType string  `json:"entitlement_type"`
	ExpiresAt       int64   `json:"expires_at"`
	Id              string  `json:"id"`
	ProductId       string  `json:"product_id"`
	PurchaseState   *string `json:"purchase_state,omitempty"`
	RenewalStatus   *string `json:"renewal_status,omitempty"`
	Status          string  `json:"status"`
	Store           string  `json:"store"`
	TrialExpiresAt  *int64  `json:"trial_expires_at"`
}

StorableEntitlement defines model for StorableEntitlement.

type StorableSubscription

type StorableSubscription struct {
	EntitlementId  string `json:"entitlement_id"`
	ExpiresAt      int64  `json:"expires_at"`
	Id             string `json:"id"`
	ProductId      string `json:"product_id"`
	RenewalStatus  string `json:"renewal_status"`
	Status         string `json:"status"`
	Store          string `json:"store"`
	TrialExpiresAt *int64 `json:"trial_expires_at"`
}

StorableSubscription defines model for StorableSubscription.

type SubscriptionItem added in v0.2.0

type SubscriptionItem struct {
	EntitlementId   string `json:"entitlement_id"`
	EntitlementName string `json:"entitlement_name"`
	EntitlementType string `json:"entitlement_type"`
	ProductId       string `json:"product_id"`
	ProductName     string `json:"product_name"`
	Status          string `json:"status"`
	Store           string `json:"store"`
}

SubscriptionItem defines model for SubscriptionItem.

type SubscriptionStripePrice

type SubscriptionStripePrice struct {
	Currency       string `json:"currency"`
	FormattedPrice string `json:"formattedPrice"`
	Id             string `json:"id"`
	Price          int32  `json:"price"`
	UnitLabel      string `json:"unitLabel"`
}

SubscriptionStripePrice defines model for SubscriptionStripePrice.

type SubscriptionStripeProduct

type SubscriptionStripeProduct struct {
	Active              bool                    `json:"active"`
	Created             int64                   `json:"created"`
	Deleted             *bool                   `json:"deleted,omitempty"`
	Description         *string                 `json:"description,omitempty"`
	Id                  string                  `json:"id"`
	Images              *[]string               `json:"images"`
	Livemode            bool                    `json:"livemode"`
	Metadata            map[string]string       `json:"metadata"`
	Name                string                  `json:"name"`
	Object              string                  `json:"object"`
	Price               SubscriptionStripePrice `json:"price"`
	Shippable           *bool                   `json:"shippable,omitempty"`
	StatementDescriptor *string                 `json:"statement_descriptor,omitempty"`
	Type                string                  `json:"type"`
	UnitLabel           *string                 `json:"unit_label,omitempty"`
	Updated             int64                   `json:"updated"`
	Url                 *string                 `json:"url,omitempty"`
}

SubscriptionStripeProduct defines model for SubscriptionStripeProduct.

type TenantActiveEntitlementsInputBody added in v0.2.0

type TenantActiveEntitlementsInputBody struct {
	CustomerEmail string  `json:"customer_email"`
	Environment   *string `json:"environment"`
}

TenantActiveEntitlementsInputBody defines model for TenantActiveEntitlementsInputBody.

type TenantActiveEntitlementsResponseBody added in v0.2.0

type TenantActiveEntitlementsResponseBody struct {
	Data  *[]StorableEntitlement `json:"data,omitempty"`
	Error *string                `json:"error,omitempty"`
}

TenantActiveEntitlementsResponseBody defines model for TenantActiveEntitlementsResponseBody.

type TenantActiveSubscriptionInputBody

type TenantActiveSubscriptionInputBody struct {
	CustomerEmail string  `json:"customer_email"`
	Environment   *string `json:"environment"`
}

TenantActiveSubscriptionInputBody defines model for TenantActiveSubscriptionInputBody.

type TenantActiveSubscriptionResponseBody

type TenantActiveSubscriptionResponseBody struct {
	Data  *StorableSubscription `json:"data,omitempty"`
	Error *string               `json:"error,omitempty"`
}

TenantActiveSubscriptionResponseBody defines model for TenantActiveSubscriptionResponseBody.

type TenantCancelGoCardlessSubscriptionInputBody added in v0.1.1

type TenantCancelGoCardlessSubscriptionInputBody struct {
	CustomerEmail string `json:"customer_email"`
	EntitlementId string `json:"entitlement_id"`
}

TenantCancelGoCardlessSubscriptionInputBody defines model for TenantCancelGoCardlessSubscriptionInputBody.

type TenantCancelGoCardlessSubscriptionResponseBody added in v0.1.1

type TenantCancelGoCardlessSubscriptionResponseBody struct {
	Error *string `json:"error,omitempty"`
}

TenantCancelGoCardlessSubscriptionResponseBody defines model for TenantCancelGoCardlessSubscriptionResponseBody.

type TenantCancelStripeSubscriptionInputBody added in v0.1.1

type TenantCancelStripeSubscriptionInputBody struct {
	CustomerEmail string `json:"customer_email"`
	EntitlementId string `json:"entitlement_id"`
}

TenantCancelStripeSubscriptionInputBody defines model for TenantCancelStripeSubscriptionInputBody.

type TenantCancelStripeSubscriptionResponseBody added in v0.1.1

type TenantCancelStripeSubscriptionResponseBody struct {
	Error *string `json:"error,omitempty"`
}

TenantCancelStripeSubscriptionResponseBody defines model for TenantCancelStripeSubscriptionResponseBody.

type TenantEntitlement

type TenantEntitlement struct {
	Description     *string                          `json:"description"`
	EntitlementType TenantEntitlementEntitlementType `json:"entitlement_type"`
	Id              string                           `json:"id"`
	Metadata        []byte                           `json:"metadata"`
	Name            string                           `json:"name"`
	PeriodMs        *int64                           `json:"period_ms"`
	Products        TenantProducts                   `json:"products"`
}

TenantEntitlement defines model for TenantEntitlement.

type TenantEntitlementEntitlementType added in v0.2.0

type TenantEntitlementEntitlementType string

TenantEntitlementEntitlementType defines model for TenantEntitlement.EntitlementType.

const (
	Consumable    TenantEntitlementEntitlementType = "consumable"
	NonConsumable TenantEntitlementEntitlementType = "non_consumable"
	Subscription  TenantEntitlementEntitlementType = "subscription"
)

Defines values for TenantEntitlementEntitlementType.

func (TenantEntitlementEntitlementType) Valid added in v0.2.0

Valid indicates whether the value is a known member of the TenantEntitlementEntitlementType enum.

type TenantEntitlementProduct

type TenantEntitlementProduct struct {
	Description *string `json:"description"`
	Id          string  `json:"id"`
	Metadata    []byte  `json:"metadata"`
	Name        string  `json:"name"`
	ProductId   string  `json:"product_id"`
}

TenantEntitlementProduct defines model for TenantEntitlementProduct.

type TenantGoCardlessBillingRequestFlowInputBody added in v0.1.1

type TenantGoCardlessBillingRequestFlowInputBody struct {
	CustomerEmail      string                                                    `json:"customer_email"`
	FailureRedirectUrl string                                                    `json:"failure_redirect_url"`
	ProductId          string                                                    `json:"product_id"`
	ProratedProductId  *string                                                   `json:"prorated_product_id,omitempty"`
	ProrationMode      *TenantGoCardlessBillingRequestFlowInputBodyProrationMode `json:"proration_mode,omitempty"`
	RedirectUrl        string                                                    `json:"redirect_url"`
}

TenantGoCardlessBillingRequestFlowInputBody defines model for TenantGoCardlessBillingRequestFlowInputBody.

type TenantGoCardlessBillingRequestFlowInputBodyProrationMode added in v0.2.0

type TenantGoCardlessBillingRequestFlowInputBodyProrationMode string

TenantGoCardlessBillingRequestFlowInputBodyProrationMode defines model for TenantGoCardlessBillingRequestFlowInputBody.ProrationMode.

const (
	TenantGoCardlessBillingRequestFlowInputBodyProrationModeDowngrade TenantGoCardlessBillingRequestFlowInputBodyProrationMode = "downgrade"
	TenantGoCardlessBillingRequestFlowInputBodyProrationModeUpgrade   TenantGoCardlessBillingRequestFlowInputBodyProrationMode = "upgrade"
)

Defines values for TenantGoCardlessBillingRequestFlowInputBodyProrationMode.

func (TenantGoCardlessBillingRequestFlowInputBodyProrationMode) Valid added in v0.2.0

Valid indicates whether the value is a known member of the TenantGoCardlessBillingRequestFlowInputBodyProrationMode enum.

type TenantGoCardlessBillingRequestFlowResponseBody added in v0.1.1

type TenantGoCardlessBillingRequestFlowResponseBody struct {
	Error *string `json:"error,omitempty"`
	Url   string  `json:"url"`
}

TenantGoCardlessBillingRequestFlowResponseBody defines model for TenantGoCardlessBillingRequestFlowResponseBody.

type TenantIdentifyUserInputBody added in v0.1.1

type TenantIdentifyUserInputBody struct {
	CustomerEmail string `json:"customer_email"`
}

TenantIdentifyUserInputBody defines model for TenantIdentifyUserInputBody.

type TenantIdentifyUserResponseBody added in v0.1.1

type TenantIdentifyUserResponseBody struct {
	CustomerId *string `json:"customer_id,omitempty"`
	Error      *string `json:"error,omitempty"`
}

TenantIdentifyUserResponseBody defines model for TenantIdentifyUserResponseBody.

type TenantListEntitlementsResponseBody

type TenantListEntitlementsResponseBody struct {
	Data  *[]TenantEntitlement `json:"data"`
	Error *string              `json:"error,omitempty"`
}

TenantListEntitlementsResponseBody defines model for TenantListEntitlementsResponseBody.

type TenantListProductsResponseBody

type TenantListProductsResponseBody struct {
	Data  *[]TenantProduct `json:"data"`
	Error *string          `json:"error,omitempty"`
}

TenantListProductsResponseBody defines model for TenantListProductsResponseBody.

type TenantListStripeProductsResponseBody

type TenantListStripeProductsResponseBody struct {
	Data  *[]SubscriptionStripeProduct `json:"data"`
	Error *string                      `json:"error,omitempty"`
}

TenantListStripeProductsResponseBody defines model for TenantListStripeProductsResponseBody.

type TenantProduct

type TenantProduct struct {
	Description   *string `json:"description"`
	EntitlementId string  `json:"entitlement_id"`
	Id            string  `json:"id"`
	Metadata      []byte  `json:"metadata"`
	Name          string  `json:"name"`
	ProductId     string  `json:"product_id"`
	Store         string  `json:"store"`
}

TenantProduct defines model for TenantProduct.

type TenantProducts

type TenantProducts struct {
	Appstore   TenantEntitlementProduct `json:"appstore"`
	Gocardless TenantEntitlementProduct `json:"gocardless"`
	Playstore  TenantEntitlementProduct `json:"playstore"`
	Stripe     TenantEntitlementProduct `json:"stripe"`
}

TenantProducts defines model for TenantProducts.

type TenantServerGetCustomerInputBody

type TenantServerGetCustomerInputBody struct {
	CustomerEmail string  `json:"customer_email"`
	Environment   *string `json:"environment"`
}

TenantServerGetCustomerInputBody defines model for TenantServerGetCustomerInputBody.

type TenantServerGetCustomerResponseBody

type TenantServerGetCustomerResponseBody struct {
	Data  *GetCustomerExtendedInfoByEmailRow `json:"data,omitempty"`
	Error *string                            `json:"error,omitempty"`
}

TenantServerGetCustomerResponseBody defines model for TenantServerGetCustomerResponseBody.

type TenantServerGetCustomerV2ResponseBody added in v0.2.0

type TenantServerGetCustomerV2ResponseBody struct {
	Data  *CustomerEntitlements `json:"data,omitempty"`
	Error *string               `json:"error,omitempty"`
}

TenantServerGetCustomerV2ResponseBody defines model for TenantServerGetCustomerV2ResponseBody.

type TenantStripeCheckoutInputBody

type TenantStripeCheckoutInputBody struct {
	CustomerEmail      string                                      `json:"customer_email"`
	FailureRedirectUrl string                                      `json:"failure_redirect_url"`
	ProductId          string                                      `json:"product_id"`
	ProratedProductId  *string                                     `json:"prorated_product_id,omitempty"`
	ProrationMode      *TenantStripeCheckoutInputBodyProrationMode `json:"proration_mode,omitempty"`
	RedirectUrl        string                                      `json:"redirect_url"`
}

TenantStripeCheckoutInputBody defines model for TenantStripeCheckoutInputBody.

type TenantStripeCheckoutInputBodyProrationMode added in v0.2.0

type TenantStripeCheckoutInputBodyProrationMode string

TenantStripeCheckoutInputBodyProrationMode defines model for TenantStripeCheckoutInputBody.ProrationMode.

const (
	TenantStripeCheckoutInputBodyProrationModeDowngrade TenantStripeCheckoutInputBodyProrationMode = "downgrade"
	TenantStripeCheckoutInputBodyProrationModeUpgrade   TenantStripeCheckoutInputBodyProrationMode = "upgrade"
)

Defines values for TenantStripeCheckoutInputBodyProrationMode.

func (TenantStripeCheckoutInputBodyProrationMode) Valid added in v0.2.0

Valid indicates whether the value is a known member of the TenantStripeCheckoutInputBodyProrationMode enum.

type TenantStripeCheckoutResponseBody

type TenantStripeCheckoutResponseBody struct {
	Error *string `json:"error,omitempty"`
	Url   string  `json:"url"`
}

TenantStripeCheckoutResponseBody defines model for TenantStripeCheckoutResponseBody.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL