billing

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Billing_CreateBillingPlan_FullMethodName    = "/api.v1alpha1.billing.Billing/CreateBillingPlan"
	Billing_GetBillingPlan_FullMethodName       = "/api.v1alpha1.billing.Billing/GetBillingPlan"
	Billing_UpdateBillingPlan_FullMethodName    = "/api.v1alpha1.billing.Billing/UpdateBillingPlan"
	Billing_DeleteBillingDetails_FullMethodName = "/api.v1alpha1.billing.Billing/DeleteBillingDetails"
	Billing_GetInvoice_FullMethodName           = "/api.v1alpha1.billing.Billing/GetInvoice"
)

Variables

View Source
var Billing_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1alpha1.billing.Billing",
	HandlerType: (*BillingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateBillingPlan",
			Handler:    _Billing_CreateBillingPlan_Handler,
		},
		{
			MethodName: "GetBillingPlan",
			Handler:    _Billing_GetBillingPlan_Handler,
		},
		{
			MethodName: "UpdateBillingPlan",
			Handler:    _Billing_UpdateBillingPlan_Handler,
		},
		{
			MethodName: "DeleteBillingDetails",
			Handler:    _Billing_DeleteBillingDetails_Handler,
		},
		{
			MethodName: "GetInvoice",
			Handler:    _Billing_GetInvoice_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1alpha1/billing/service.proto",
}

Billing_ServiceDesc is the grpc.ServiceDesc for Billing service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_v1alpha1_billing_entities_proto protoreflect.FileDescriptor
View Source
var File_api_v1alpha1_billing_service_proto protoreflect.FileDescriptor

Functions

func RegisterBillingServer

func RegisterBillingServer(s grpc.ServiceRegistrar, srv BillingServer)

Types

type BillingClient

type BillingClient interface {
	// CreateBillingPlan - saves the provided billing plan, and returns the saved
	// plan. However, in an organization's Billing Plan there can only ever be
	// one billing detail with a specific config type and event type.
	CreateBillingPlan(ctx context.Context, in *CreateBillingPlanReq, opts ...grpc.CallOption) (*CreateBillingPlanRes, error)
	// GetBillingPlan - returns the billing plan for the provided organization.
	GetBillingPlan(ctx context.Context, in *GetBillingPlanReq, opts ...grpc.CallOption) (*GetBillingPlanRes, error)
	// UpdateBillingPlan - updates the provided billing plan and it's details.
	// If some details are not provided, they will be left as is. However, if
	// deletion is desired, the DeleteBillingDetails method should be used. The
	// billing plan still follows the constraint of only having one billing detail
	// with a specific config type and event type, and so if the request contains
	// more than one billing detail with a config type and event type, the request
	// is malformed and will result in potentially unexpected behavior.
	UpdateBillingPlan(ctx context.Context, in *UpdateBillingPlanReq, opts ...grpc.CallOption) (*UpdateBillingPlanRes, error)
	// DeleteBillingDetails - deletes the provided billing details. If the billing
	// details do not exist, this won't do anything.
	DeleteBillingDetails(ctx context.Context, in *DeleteBillingDetailsReq, opts ...grpc.CallOption) (*DeleteBillingDetailsRes, error)
	// GetInvoice - returns the invoice for the organization. If a date is
	// provided, this will return the invoice for the organization that
	// corresponds to the billing cycle that contains the provided date. If
	// no date is provided, this will return the invoice as it currently
	// stands for the current billing cycle.
	GetInvoice(ctx context.Context, in *GetInvoiceReq, opts ...grpc.CallOption) (*GetInvoiceRes, error)
}

BillingClient is the client API for Billing service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewBillingClient

func NewBillingClient(cc grpc.ClientConnInterface) BillingClient

type BillingServer

type BillingServer interface {
	// CreateBillingPlan - saves the provided billing plan, and returns the saved
	// plan. However, in an organization's Billing Plan there can only ever be
	// one billing detail with a specific config type and event type.
	CreateBillingPlan(context.Context, *CreateBillingPlanReq) (*CreateBillingPlanRes, error)
	// GetBillingPlan - returns the billing plan for the provided organization.
	GetBillingPlan(context.Context, *GetBillingPlanReq) (*GetBillingPlanRes, error)
	// UpdateBillingPlan - updates the provided billing plan and it's details.
	// If some details are not provided, they will be left as is. However, if
	// deletion is desired, the DeleteBillingDetails method should be used. The
	// billing plan still follows the constraint of only having one billing detail
	// with a specific config type and event type, and so if the request contains
	// more than one billing detail with a config type and event type, the request
	// is malformed and will result in potentially unexpected behavior.
	UpdateBillingPlan(context.Context, *UpdateBillingPlanReq) (*UpdateBillingPlanRes, error)
	// DeleteBillingDetails - deletes the provided billing details. If the billing
	// details do not exist, this won't do anything.
	DeleteBillingDetails(context.Context, *DeleteBillingDetailsReq) (*DeleteBillingDetailsRes, error)
	// GetInvoice - returns the invoice for the organization. If a date is
	// provided, this will return the invoice for the organization that
	// corresponds to the billing cycle that contains the provided date. If
	// no date is provided, this will return the invoice as it currently
	// stands for the current billing cycle.
	GetInvoice(context.Context, *GetInvoiceReq) (*GetInvoiceRes, error)
	// contains filtered or unexported methods
}

BillingServer is the server API for Billing service. All implementations must embed UnimplementedBillingServer for forward compatibility

type CreateBillingPlanReq

type CreateBillingPlanReq struct {

	// Required. the billing plan to create
	BillingPlan *billing.Plan `protobuf:"bytes,1,opt,name=billing_plan,json=billingPlan,proto3" json:"billing_plan,omitempty"`
	// contains filtered or unexported fields
}

CreateBillingPlanReq - request to create a billing plan for an organization

func (*CreateBillingPlanReq) Descriptor deprecated

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

Deprecated: Use CreateBillingPlanReq.ProtoReflect.Descriptor instead.

func (*CreateBillingPlanReq) GetBillingPlan

func (x *CreateBillingPlanReq) GetBillingPlan() *billing.Plan

func (*CreateBillingPlanReq) ProtoMessage

func (*CreateBillingPlanReq) ProtoMessage()

func (*CreateBillingPlanReq) ProtoReflect

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

func (*CreateBillingPlanReq) Reset

func (x *CreateBillingPlanReq) Reset()

func (*CreateBillingPlanReq) String

func (x *CreateBillingPlanReq) String() string

type CreateBillingPlanRes

type CreateBillingPlanRes struct {

	// the created billing plan
	BillingPlan *billing.Plan `protobuf:"bytes,1,opt,name=billing_plan,json=billingPlan,proto3" json:"billing_plan,omitempty"`
	// contains filtered or unexported fields
}

CreateBillingPlanRes - result of creating a billing plan; contains the created billing plan

func (*CreateBillingPlanRes) Descriptor deprecated

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

Deprecated: Use CreateBillingPlanRes.ProtoReflect.Descriptor instead.

func (*CreateBillingPlanRes) GetBillingPlan

func (x *CreateBillingPlanRes) GetBillingPlan() *billing.Plan

func (*CreateBillingPlanRes) ProtoMessage

func (*CreateBillingPlanRes) ProtoMessage()

func (*CreateBillingPlanRes) ProtoReflect

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

func (*CreateBillingPlanRes) Reset

func (x *CreateBillingPlanRes) Reset()

func (*CreateBillingPlanRes) String

func (x *CreateBillingPlanRes) String() string

type DeleteBillingDetailsReq

type DeleteBillingDetailsReq struct {

	// the identifiers of the billing details to delete
	BillingDetailSids []int64 `protobuf:"varint,1,rep,packed,name=billing_detail_sids,json=billingDetailSids,proto3" json:"billing_detail_sids,omitempty"`
	// contains filtered or unexported fields
}

DeleteBillingDetailsReq - request to delete billing details

func (*DeleteBillingDetailsReq) Descriptor deprecated

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

Deprecated: Use DeleteBillingDetailsReq.ProtoReflect.Descriptor instead.

func (*DeleteBillingDetailsReq) GetBillingDetailSids

func (x *DeleteBillingDetailsReq) GetBillingDetailSids() []int64

func (*DeleteBillingDetailsReq) ProtoMessage

func (*DeleteBillingDetailsReq) ProtoMessage()

func (*DeleteBillingDetailsReq) ProtoReflect

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

func (*DeleteBillingDetailsReq) Reset

func (x *DeleteBillingDetailsReq) Reset()

func (*DeleteBillingDetailsReq) String

func (x *DeleteBillingDetailsReq) String() string

type DeleteBillingDetailsRes

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

DeleteBillingDetailsRes - result of deleting billing details

func (*DeleteBillingDetailsRes) Descriptor deprecated

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

Deprecated: Use DeleteBillingDetailsRes.ProtoReflect.Descriptor instead.

func (*DeleteBillingDetailsRes) ProtoMessage

func (*DeleteBillingDetailsRes) ProtoMessage()

func (*DeleteBillingDetailsRes) ProtoReflect

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

func (*DeleteBillingDetailsRes) Reset

func (x *DeleteBillingDetailsRes) Reset()

func (*DeleteBillingDetailsRes) String

func (x *DeleteBillingDetailsRes) String() string

type GetBillingPlanReq

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

GetBillingPlanReq - request to get an organization's billing plan

func (*GetBillingPlanReq) Descriptor deprecated

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

Deprecated: Use GetBillingPlanReq.ProtoReflect.Descriptor instead.

func (*GetBillingPlanReq) ProtoMessage

func (*GetBillingPlanReq) ProtoMessage()

func (*GetBillingPlanReq) ProtoReflect

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

func (*GetBillingPlanReq) Reset

func (x *GetBillingPlanReq) Reset()

func (*GetBillingPlanReq) String

func (x *GetBillingPlanReq) String() string

type GetBillingPlanRes

type GetBillingPlanRes struct {

	// the billing plan
	BillingPlan *billing.Plan `protobuf:"bytes,1,opt,name=billing_plan,json=billingPlan,proto3" json:"billing_plan,omitempty"`
	// contains filtered or unexported fields
}

GetBillingPlanRes - result of retrieving an organization's billing plan

func (*GetBillingPlanRes) Descriptor deprecated

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

Deprecated: Use GetBillingPlanRes.ProtoReflect.Descriptor instead.

func (*GetBillingPlanRes) GetBillingPlan

func (x *GetBillingPlanRes) GetBillingPlan() *billing.Plan

func (*GetBillingPlanRes) ProtoMessage

func (*GetBillingPlanRes) ProtoMessage()

func (*GetBillingPlanRes) ProtoReflect

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

func (*GetBillingPlanRes) Reset

func (x *GetBillingPlanRes) Reset()

func (*GetBillingPlanRes) String

func (x *GetBillingPlanRes) String() string

type GetInvoiceReq

type GetInvoiceReq struct {

	// Optional. the date of the invoice to retrieve. If not specified,
	// will return the invoice associated with the current billing cycle.
	// Otherwise, it will return the invoice associated with the billing
	// cycle that contains the specified date.
	InvoiceDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=invoice_date,json=invoiceDate,proto3" json:"invoice_date,omitempty"`
	// contains filtered or unexported fields
}

GetInvoiceReq - request to get an invoice

func (*GetInvoiceReq) Descriptor deprecated

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

Deprecated: Use GetInvoiceReq.ProtoReflect.Descriptor instead.

func (*GetInvoiceReq) GetInvoiceDate

func (x *GetInvoiceReq) GetInvoiceDate() *timestamppb.Timestamp

func (*GetInvoiceReq) ProtoMessage

func (*GetInvoiceReq) ProtoMessage()

func (*GetInvoiceReq) ProtoReflect

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

func (*GetInvoiceReq) Reset

func (x *GetInvoiceReq) Reset()

func (*GetInvoiceReq) String

func (x *GetInvoiceReq) String() string

type GetInvoiceRes

type GetInvoiceRes struct {

	// the invoice for the organization
	Invoice *billing.Invoice `protobuf:"bytes,1,opt,name=invoice,proto3" json:"invoice,omitempty"`
	// contains filtered or unexported fields
}

GetInvoiceRes - result of retrieving an invoice

func (*GetInvoiceRes) Descriptor deprecated

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

Deprecated: Use GetInvoiceRes.ProtoReflect.Descriptor instead.

func (*GetInvoiceRes) GetInvoice

func (x *GetInvoiceRes) GetInvoice() *billing.Invoice

func (*GetInvoiceRes) ProtoMessage

func (*GetInvoiceRes) ProtoMessage()

func (*GetInvoiceRes) ProtoReflect

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

func (*GetInvoiceRes) Reset

func (x *GetInvoiceRes) Reset()

func (*GetInvoiceRes) String

func (x *GetInvoiceRes) String() string

type UnimplementedBillingServer

type UnimplementedBillingServer struct {
}

UnimplementedBillingServer must be embedded to have forward compatible implementations.

func (UnimplementedBillingServer) CreateBillingPlan

func (UnimplementedBillingServer) DeleteBillingDetails

func (UnimplementedBillingServer) GetBillingPlan

func (UnimplementedBillingServer) GetInvoice

func (UnimplementedBillingServer) UpdateBillingPlan

type UnsafeBillingServer

type UnsafeBillingServer interface {
	// contains filtered or unexported methods
}

UnsafeBillingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BillingServer will result in compilation errors.

type UpdateBillingPlanReq

type UpdateBillingPlanReq struct {

	// Required. the updates to perform on the billing plan
	Updates []*UpdateBillingPlanReq_UpdateReq `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"`
	// contains filtered or unexported fields
}

UpdateBillingPlanReq - request to update a billing plan.

func (*UpdateBillingPlanReq) Descriptor deprecated

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

Deprecated: Use UpdateBillingPlanReq.ProtoReflect.Descriptor instead.

func (*UpdateBillingPlanReq) GetUpdates

func (*UpdateBillingPlanReq) ProtoMessage

func (*UpdateBillingPlanReq) ProtoMessage()

func (*UpdateBillingPlanReq) ProtoReflect

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

func (*UpdateBillingPlanReq) Reset

func (x *UpdateBillingPlanReq) Reset()

func (*UpdateBillingPlanReq) String

func (x *UpdateBillingPlanReq) String() string

type UpdateBillingPlanReq_UpdateReq

type UpdateBillingPlanReq_UpdateReq struct {

	// Required. the billing detail to update
	BillingDetail *billing.Detail `protobuf:"bytes,1,opt,name=billing_detail,json=billingDetail,proto3" json:"billing_detail,omitempty"`
	// Required. the mask of fields to update for the billing detail
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

UpdateReq - request to update a single billing detail

func (*UpdateBillingPlanReq_UpdateReq) Descriptor deprecated

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

Deprecated: Use UpdateBillingPlanReq_UpdateReq.ProtoReflect.Descriptor instead.

func (*UpdateBillingPlanReq_UpdateReq) GetBillingDetail

func (x *UpdateBillingPlanReq_UpdateReq) GetBillingDetail() *billing.Detail

func (*UpdateBillingPlanReq_UpdateReq) GetFields

func (x *UpdateBillingPlanReq_UpdateReq) GetFields() []string

func (*UpdateBillingPlanReq_UpdateReq) ProtoMessage

func (*UpdateBillingPlanReq_UpdateReq) ProtoMessage()

func (*UpdateBillingPlanReq_UpdateReq) ProtoReflect

func (*UpdateBillingPlanReq_UpdateReq) Reset

func (x *UpdateBillingPlanReq_UpdateReq) Reset()

func (*UpdateBillingPlanReq_UpdateReq) String

type UpdateBillingPlanRes

type UpdateBillingPlanRes struct {

	// the updated billing plan
	BillingPlan *billing.Plan `protobuf:"bytes,1,opt,name=billing_plan,json=billingPlan,proto3" json:"billing_plan,omitempty"`
	// contains filtered or unexported fields
}

UpdateBillingPlanRes - result of updating a billing plan; contains only the details that were provided in the request

func (*UpdateBillingPlanRes) Descriptor deprecated

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

Deprecated: Use UpdateBillingPlanRes.ProtoReflect.Descriptor instead.

func (*UpdateBillingPlanRes) GetBillingPlan

func (x *UpdateBillingPlanRes) GetBillingPlan() *billing.Plan

func (*UpdateBillingPlanRes) ProtoMessage

func (*UpdateBillingPlanRes) ProtoMessage()

func (*UpdateBillingPlanRes) ProtoReflect

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

func (*UpdateBillingPlanRes) Reset

func (x *UpdateBillingPlanRes) Reset()

func (*UpdateBillingPlanRes) String

func (x *UpdateBillingPlanRes) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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