billing

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_billing_proto protoreflect.FileDescriptor

Functions

func NewBillingEndpoints

func NewBillingEndpoints() []*api.Endpoint

func RegisterBillingHandler

func RegisterBillingHandler(s server.Server, hdlr BillingHandler, opts ...server.HandlerOption) error

Types

type BillingAccount

type BillingAccount struct {
	Id            string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Admins        []string        `protobuf:"bytes,2,rep,name=admins,proto3" json:"admins,omitempty"`
	Members       []string        `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"`
	Subscriptions []*Subscription `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
	// contains filtered or unexported fields
}

func (*BillingAccount) Descriptor deprecated

func (*BillingAccount) Descriptor() ([]byte, []int)

Deprecated: Use BillingAccount.ProtoReflect.Descriptor instead.

func (*BillingAccount) GetAdmins

func (x *BillingAccount) GetAdmins() []string

func (*BillingAccount) GetId

func (x *BillingAccount) GetId() string

func (*BillingAccount) GetMembers

func (x *BillingAccount) GetMembers() []string

func (*BillingAccount) GetSubscriptions

func (x *BillingAccount) GetSubscriptions() []*Subscription

func (*BillingAccount) ProtoMessage

func (*BillingAccount) ProtoMessage()

func (*BillingAccount) ProtoReflect

func (x *BillingAccount) ProtoReflect() protoreflect.Message

func (*BillingAccount) Reset

func (x *BillingAccount) Reset()

func (*BillingAccount) String

func (x *BillingAccount) String() string

type BillingService

type BillingService interface {
	// Subscribe to a tier
	SubscribeTier(ctx context.Context, in *SubscribeTierRequest, opts ...client.CallOption) (*SubscribeTierResponse, error)
	ReadAccount(ctx context.Context, in *ReadAccountRequest, opts ...client.CallOption) (*ReadAccountResponse, error)
	CreateCheckoutSession(ctx context.Context, in *CreateCheckoutSessionRequest, opts ...client.CallOption) (*CreateCheckoutSessionResponse, error)
	ListCards(ctx context.Context, in *ListCardsRequest, opts ...client.CallOption) (*ListCardsResponse, error)
	ChargeCard(ctx context.Context, in *ChargeCardRequest, opts ...client.CallOption) (*ChargeCardResponse, error)
	DeleteCard(ctx context.Context, in *DeleteCardRequest, opts ...client.CallOption) (*DeleteCardResponse, error)
	ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...client.CallOption) (*ListPaymentsResponse, error)
	GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...client.CallOption) (*GetPaymentResponse, error)
	SetupCard(ctx context.Context, in *SetupCardRequest, opts ...client.CallOption) (*SetupCardResponse, error)
}

func NewBillingService

func NewBillingService(name string, c client.Client) BillingService

type Card

type Card struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	LastFour string `protobuf:"bytes,2,opt,name=last_four,json=lastFour,proto3" json:"last_four,omitempty"`
	Expires  string `protobuf:"bytes,3,opt,name=expires,proto3" json:"expires,omitempty"`
	// contains filtered or unexported fields
}

func (*Card) Descriptor deprecated

func (*Card) Descriptor() ([]byte, []int)

Deprecated: Use Card.ProtoReflect.Descriptor instead.

func (*Card) GetExpires

func (x *Card) GetExpires() string

func (*Card) GetId

func (x *Card) GetId() string

func (*Card) GetLastFour

func (x *Card) GetLastFour() string

func (*Card) ProtoMessage

func (*Card) ProtoMessage()

func (*Card) ProtoReflect

func (x *Card) ProtoReflect() protoreflect.Message

func (*Card) Reset

func (x *Card) Reset()

func (*Card) String

func (x *Card) String() string

type ChargeCardRequest

type ChargeCardRequest struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Amount int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*ChargeCardRequest) Descriptor deprecated

func (*ChargeCardRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChargeCardRequest.ProtoReflect.Descriptor instead.

func (*ChargeCardRequest) GetAmount

func (x *ChargeCardRequest) GetAmount() int64

func (*ChargeCardRequest) GetId

func (x *ChargeCardRequest) GetId() string

func (*ChargeCardRequest) ProtoMessage

func (*ChargeCardRequest) ProtoMessage()

func (*ChargeCardRequest) ProtoReflect

func (x *ChargeCardRequest) ProtoReflect() protoreflect.Message

func (*ChargeCardRequest) Reset

func (x *ChargeCardRequest) Reset()

func (*ChargeCardRequest) String

func (x *ChargeCardRequest) String() string

type ChargeCardResponse

type ChargeCardResponse struct {
	ClientSecret string `protobuf:"bytes,1,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*ChargeCardResponse) Descriptor deprecated

func (*ChargeCardResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChargeCardResponse.ProtoReflect.Descriptor instead.

func (*ChargeCardResponse) GetClientSecret

func (x *ChargeCardResponse) GetClientSecret() string

func (*ChargeCardResponse) ProtoMessage

func (*ChargeCardResponse) ProtoMessage()

func (*ChargeCardResponse) ProtoReflect

func (x *ChargeCardResponse) ProtoReflect() protoreflect.Message

func (*ChargeCardResponse) Reset

func (x *ChargeCardResponse) Reset()

func (*ChargeCardResponse) String

func (x *ChargeCardResponse) String() string

type CreateCheckoutSessionRequest

type CreateCheckoutSessionRequest struct {
	Amount   int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	SaveCard bool  `protobuf:"varint,2,opt,name=save_card,json=saveCard,proto3" json:"save_card,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCheckoutSessionRequest) Descriptor deprecated

func (*CreateCheckoutSessionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateCheckoutSessionRequest.ProtoReflect.Descriptor instead.

func (*CreateCheckoutSessionRequest) GetAmount

func (x *CreateCheckoutSessionRequest) GetAmount() int64

func (*CreateCheckoutSessionRequest) GetSaveCard

func (x *CreateCheckoutSessionRequest) GetSaveCard() bool

func (*CreateCheckoutSessionRequest) ProtoMessage

func (*CreateCheckoutSessionRequest) ProtoMessage()

func (*CreateCheckoutSessionRequest) ProtoReflect

func (*CreateCheckoutSessionRequest) Reset

func (x *CreateCheckoutSessionRequest) Reset()

func (*CreateCheckoutSessionRequest) String

type CreateCheckoutSessionResponse

type CreateCheckoutSessionResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCheckoutSessionResponse) Descriptor deprecated

func (*CreateCheckoutSessionResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateCheckoutSessionResponse.ProtoReflect.Descriptor instead.

func (*CreateCheckoutSessionResponse) GetId

func (*CreateCheckoutSessionResponse) ProtoMessage

func (*CreateCheckoutSessionResponse) ProtoMessage()

func (*CreateCheckoutSessionResponse) ProtoReflect

func (*CreateCheckoutSessionResponse) Reset

func (x *CreateCheckoutSessionResponse) Reset()

func (*CreateCheckoutSessionResponse) String

type DeleteCardRequest

type DeleteCardRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCardRequest) Descriptor deprecated

func (*DeleteCardRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteCardRequest.ProtoReflect.Descriptor instead.

func (*DeleteCardRequest) GetId

func (x *DeleteCardRequest) GetId() string

func (*DeleteCardRequest) ProtoMessage

func (*DeleteCardRequest) ProtoMessage()

func (*DeleteCardRequest) ProtoReflect

func (x *DeleteCardRequest) ProtoReflect() protoreflect.Message

func (*DeleteCardRequest) Reset

func (x *DeleteCardRequest) Reset()

func (*DeleteCardRequest) String

func (x *DeleteCardRequest) String() string

type DeleteCardResponse

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

func (*DeleteCardResponse) Descriptor deprecated

func (*DeleteCardResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteCardResponse.ProtoReflect.Descriptor instead.

func (*DeleteCardResponse) ProtoMessage

func (*DeleteCardResponse) ProtoMessage()

func (*DeleteCardResponse) ProtoReflect

func (x *DeleteCardResponse) ProtoReflect() protoreflect.Message

func (*DeleteCardResponse) Reset

func (x *DeleteCardResponse) Reset()

func (*DeleteCardResponse) String

func (x *DeleteCardResponse) String() string

type GetPaymentRequest

type GetPaymentRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPaymentRequest) Descriptor deprecated

func (*GetPaymentRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPaymentRequest.ProtoReflect.Descriptor instead.

func (*GetPaymentRequest) GetId

func (x *GetPaymentRequest) GetId() string

func (*GetPaymentRequest) ProtoMessage

func (*GetPaymentRequest) ProtoMessage()

func (*GetPaymentRequest) ProtoReflect

func (x *GetPaymentRequest) ProtoReflect() protoreflect.Message

func (*GetPaymentRequest) Reset

func (x *GetPaymentRequest) Reset()

func (*GetPaymentRequest) String

func (x *GetPaymentRequest) String() string

type GetPaymentResponse

type GetPaymentResponse struct {
	Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPaymentResponse) Descriptor deprecated

func (*GetPaymentResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPaymentResponse.ProtoReflect.Descriptor instead.

func (*GetPaymentResponse) GetPayment

func (x *GetPaymentResponse) GetPayment() *Payment

func (*GetPaymentResponse) ProtoMessage

func (*GetPaymentResponse) ProtoMessage()

func (*GetPaymentResponse) ProtoReflect

func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message

func (*GetPaymentResponse) Reset

func (x *GetPaymentResponse) Reset()

func (*GetPaymentResponse) String

func (x *GetPaymentResponse) String() string

type ListCardsRequest

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

func (*ListCardsRequest) Descriptor deprecated

func (*ListCardsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListCardsRequest.ProtoReflect.Descriptor instead.

func (*ListCardsRequest) ProtoMessage

func (*ListCardsRequest) ProtoMessage()

func (*ListCardsRequest) ProtoReflect

func (x *ListCardsRequest) ProtoReflect() protoreflect.Message

func (*ListCardsRequest) Reset

func (x *ListCardsRequest) Reset()

func (*ListCardsRequest) String

func (x *ListCardsRequest) String() string

type ListCardsResponse

type ListCardsResponse struct {
	Cards []*Card `protobuf:"bytes,1,rep,name=cards,proto3" json:"cards,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCardsResponse) Descriptor deprecated

func (*ListCardsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListCardsResponse.ProtoReflect.Descriptor instead.

func (*ListCardsResponse) GetCards

func (x *ListCardsResponse) GetCards() []*Card

func (*ListCardsResponse) ProtoMessage

func (*ListCardsResponse) ProtoMessage()

func (*ListCardsResponse) ProtoReflect

func (x *ListCardsResponse) ProtoReflect() protoreflect.Message

func (*ListCardsResponse) Reset

func (x *ListCardsResponse) Reset()

func (*ListCardsResponse) String

func (x *ListCardsResponse) String() string

type ListPaymentsRequest

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

func (*ListPaymentsRequest) Descriptor deprecated

func (*ListPaymentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead.

func (*ListPaymentsRequest) ProtoMessage

func (*ListPaymentsRequest) ProtoMessage()

func (*ListPaymentsRequest) ProtoReflect

func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message

func (*ListPaymentsRequest) Reset

func (x *ListPaymentsRequest) Reset()

func (*ListPaymentsRequest) String

func (x *ListPaymentsRequest) String() string

type ListPaymentsResponse

type ListPaymentsResponse struct {
	Payments []*Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPaymentsResponse) Descriptor deprecated

func (*ListPaymentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead.

func (*ListPaymentsResponse) GetPayments

func (x *ListPaymentsResponse) GetPayments() []*Payment

func (*ListPaymentsResponse) ProtoMessage

func (*ListPaymentsResponse) ProtoMessage()

func (*ListPaymentsResponse) ProtoReflect

func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message

func (*ListPaymentsResponse) Reset

func (x *ListPaymentsResponse) Reset()

func (*ListPaymentsResponse) String

func (x *ListPaymentsResponse) String() string

type Payment

type Payment struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Amount     int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Currency   string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"`
	Date       int64  `protobuf:"varint,4,opt,name=date,proto3" json:"date,omitempty"`
	ReceiptUrl string `protobuf:"bytes,5,opt,name=receipt_url,json=receiptUrl,proto3" json:"receipt_url,omitempty"`
	// contains filtered or unexported fields
}

func (*Payment) Descriptor deprecated

func (*Payment) Descriptor() ([]byte, []int)

Deprecated: Use Payment.ProtoReflect.Descriptor instead.

func (*Payment) GetAmount

func (x *Payment) GetAmount() int64

func (*Payment) GetCurrency

func (x *Payment) GetCurrency() string

func (*Payment) GetDate

func (x *Payment) GetDate() int64

func (*Payment) GetId

func (x *Payment) GetId() string

func (*Payment) GetReceiptUrl

func (x *Payment) GetReceiptUrl() string

func (*Payment) ProtoMessage

func (*Payment) ProtoMessage()

func (*Payment) ProtoReflect

func (x *Payment) ProtoReflect() protoreflect.Message

func (*Payment) Reset

func (x *Payment) Reset()

func (*Payment) String

func (x *Payment) String() string

type ReadAccountRequest

type ReadAccountRequest struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	AdminId string `protobuf:"bytes,2,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
	// contains filtered or unexported fields
}

Read an account either by account ID or admin ID

func (*ReadAccountRequest) Descriptor deprecated

func (*ReadAccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadAccountRequest.ProtoReflect.Descriptor instead.

func (*ReadAccountRequest) GetAdminId

func (x *ReadAccountRequest) GetAdminId() string

func (*ReadAccountRequest) GetId

func (x *ReadAccountRequest) GetId() string

func (*ReadAccountRequest) ProtoMessage

func (*ReadAccountRequest) ProtoMessage()

func (*ReadAccountRequest) ProtoReflect

func (x *ReadAccountRequest) ProtoReflect() protoreflect.Message

func (*ReadAccountRequest) Reset

func (x *ReadAccountRequest) Reset()

func (*ReadAccountRequest) String

func (x *ReadAccountRequest) String() string

type ReadAccountResponse

type ReadAccountResponse struct {
	BillingAccount *BillingAccount `protobuf:"bytes,1,opt,name=billing_account,json=billingAccount,proto3" json:"billing_account,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadAccountResponse) Descriptor deprecated

func (*ReadAccountResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadAccountResponse.ProtoReflect.Descriptor instead.

func (*ReadAccountResponse) GetBillingAccount

func (x *ReadAccountResponse) GetBillingAccount() *BillingAccount

func (*ReadAccountResponse) ProtoMessage

func (*ReadAccountResponse) ProtoMessage()

func (*ReadAccountResponse) ProtoReflect

func (x *ReadAccountResponse) ProtoReflect() protoreflect.Message

func (*ReadAccountResponse) Reset

func (x *ReadAccountResponse) Reset()

func (*ReadAccountResponse) String

func (x *ReadAccountResponse) String() string

type SetupCardRequest

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

func (*SetupCardRequest) Descriptor deprecated

func (*SetupCardRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetupCardRequest.ProtoReflect.Descriptor instead.

func (*SetupCardRequest) ProtoMessage

func (*SetupCardRequest) ProtoMessage()

func (*SetupCardRequest) ProtoReflect

func (x *SetupCardRequest) ProtoReflect() protoreflect.Message

func (*SetupCardRequest) Reset

func (x *SetupCardRequest) Reset()

func (*SetupCardRequest) String

func (x *SetupCardRequest) String() string

type SetupCardResponse

type SetupCardResponse struct {
	ClientSecret string `protobuf:"bytes,1,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*SetupCardResponse) Descriptor deprecated

func (*SetupCardResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetupCardResponse.ProtoReflect.Descriptor instead.

func (*SetupCardResponse) GetClientSecret

func (x *SetupCardResponse) GetClientSecret() string

func (*SetupCardResponse) ProtoMessage

func (*SetupCardResponse) ProtoMessage()

func (*SetupCardResponse) ProtoReflect

func (x *SetupCardResponse) ProtoReflect() protoreflect.Message

func (*SetupCardResponse) Reset

func (x *SetupCardResponse) Reset()

func (*SetupCardResponse) String

func (x *SetupCardResponse) String() string

type SubscribeTierRequest

type SubscribeTierRequest struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                       // ID of the tier - free, pro, team
	CardId string `protobuf:"bytes,2,opt,name=card_id,json=cardId,proto3" json:"card_id,omitempty"` // The card to charge
	// contains filtered or unexported fields
}

func (*SubscribeTierRequest) Descriptor deprecated

func (*SubscribeTierRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeTierRequest.ProtoReflect.Descriptor instead.

func (*SubscribeTierRequest) GetCardId

func (x *SubscribeTierRequest) GetCardId() string

func (*SubscribeTierRequest) GetId

func (x *SubscribeTierRequest) GetId() string

func (*SubscribeTierRequest) ProtoMessage

func (*SubscribeTierRequest) ProtoMessage()

func (*SubscribeTierRequest) ProtoReflect

func (x *SubscribeTierRequest) ProtoReflect() protoreflect.Message

func (*SubscribeTierRequest) Reset

func (x *SubscribeTierRequest) Reset()

func (*SubscribeTierRequest) String

func (x *SubscribeTierRequest) String() string

type SubscribeTierResponse

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

func (*SubscribeTierResponse) Descriptor deprecated

func (*SubscribeTierResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeTierResponse.ProtoReflect.Descriptor instead.

func (*SubscribeTierResponse) ProtoMessage

func (*SubscribeTierResponse) ProtoMessage()

func (*SubscribeTierResponse) ProtoReflect

func (x *SubscribeTierResponse) ProtoReflect() protoreflect.Message

func (*SubscribeTierResponse) Reset

func (x *SubscribeTierResponse) Reset()

func (*SubscribeTierResponse) String

func (x *SubscribeTierResponse) String() string

type Subscription

type Subscription struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // TODO add more useful fields
	// contains filtered or unexported fields
}

func (*Subscription) Descriptor deprecated

func (*Subscription) Descriptor() ([]byte, []int)

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetId

func (x *Subscription) GetId() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) ProtoReflect

func (x *Subscription) ProtoReflect() protoreflect.Message

func (*Subscription) Reset

func (x *Subscription) Reset()

func (*Subscription) String

func (x *Subscription) String() string

type Tier

type Tier struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price       string `protobuf:"bytes,3,opt,name=price,proto3" json:"price,omitempty"` // why string? Because then we can do things like $5 per / month
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Tier) Descriptor deprecated

func (*Tier) Descriptor() ([]byte, []int)

Deprecated: Use Tier.ProtoReflect.Descriptor instead.

func (*Tier) GetDescription

func (x *Tier) GetDescription() string

func (*Tier) GetId

func (x *Tier) GetId() string

func (*Tier) GetName

func (x *Tier) GetName() string

func (*Tier) GetPrice

func (x *Tier) GetPrice() string

func (*Tier) ProtoMessage

func (*Tier) ProtoMessage()

func (*Tier) ProtoReflect

func (x *Tier) ProtoReflect() protoreflect.Message

func (*Tier) Reset

func (x *Tier) Reset()

func (*Tier) String

func (x *Tier) String() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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