billing

package
v1.7.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Billing_GetBillingPlan_FullMethodName    = "/api.v1alpha1.billing.Billing/GetBillingPlan"
	Billing_UpdateBillingPlan_FullMethodName = "/api.v1alpha1.billing.Billing/UpdateBillingPlan"
	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: "GetBillingPlan",
			Handler:    _Billing_GetBillingPlan_Handler,
		},
		{
			MethodName: "UpdateBillingPlan",
			Handler:    _Billing_UpdateBillingPlan_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 {
	// 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)
	// 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 {
	// 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)
	// 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 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) 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 billing details to update
	BillingDetails []*billing.Detail `protobuf:"bytes,1,rep,name=billing_details,json=billingDetails,proto3" json:"billing_details,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) GetBillingDetails added in v1.7.13

func (x *UpdateBillingPlanReq) GetBillingDetails() []*billing.Detail

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 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