Documentation ¶
Index ¶
- Variables
- func ChargeAsync(charges bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func ConstructEvent(data []byte, signature string) (stripe.Event, error)
- func IntervalToString(interval Service_Interval) string
- func Register(merchant bcgo.Node, processor Processor, aliases, registrations bcgo.Channel, ...) func(string, string, string) (string, *bcgo.Reference, error)
- func RegistrationAsync(registrations bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func Subscribe(merchant bcgo.Node, processor Processor, aliases, subscriptions bcgo.Channel, ...) func(string, string) (string, *bcgo.Reference, error)
- func SubscriptionAsync(subscriptions bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func UsageRecordAsync(usages bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- type Charge
- func (*Charge) Descriptor() ([]byte, []int)
- func (m *Charge) GetAmount() int64
- func (m *Charge) GetChargeId() string
- func (m *Charge) GetCountry() string
- func (m *Charge) GetCurrency() string
- func (m *Charge) GetCustomerAlias() string
- func (m *Charge) GetCustomerId() string
- func (m *Charge) GetDescription() string
- func (m *Charge) GetInvoiceId() string
- func (m *Charge) GetMerchantAlias() string
- func (m *Charge) GetPaymentId() string
- func (m *Charge) GetPlanId() string
- func (m *Charge) GetProcessor() PaymentProcessor
- func (m *Charge) GetProductId() string
- func (m *Charge) GetReceiptUrl() string
- func (*Charge) ProtoMessage()
- func (m *Charge) Reset()
- func (m *Charge) String() string
- func (m *Charge) XXX_DiscardUnknown()
- func (m *Charge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Charge) XXX_Merge(src proto.Message)
- func (m *Charge) XXX_Size() int
- func (m *Charge) XXX_Unmarshal(b []byte) error
- type ChargeCallback
- type Invoice
- func (*Invoice) Descriptor() ([]byte, []int)
- func (m *Invoice) GetAmountDue() int64
- func (m *Invoice) GetAmountPaid() int64
- func (m *Invoice) GetAmountRemaining() int64
- func (m *Invoice) GetCountry() string
- func (m *Invoice) GetCurrency() string
- func (m *Invoice) GetCustomerAlias() string
- func (m *Invoice) GetCustomerId() string
- func (m *Invoice) GetInvoiceId() string
- func (m *Invoice) GetInvoiceUrl() string
- func (m *Invoice) GetMerchantAlias() string
- func (m *Invoice) GetNumber() string
- func (m *Invoice) GetPaymentId() string
- func (m *Invoice) GetPlanId() string
- func (m *Invoice) GetProcessor() PaymentProcessor
- func (m *Invoice) GetProductId() string
- func (*Invoice) ProtoMessage()
- func (m *Invoice) Reset()
- func (m *Invoice) String() string
- func (m *Invoice) XXX_DiscardUnknown()
- func (m *Invoice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Invoice) XXX_Merge(src proto.Message)
- func (m *Invoice) XXX_Size() int
- func (m *Invoice) XXX_Unmarshal(b []byte) error
- type Merchant
- func (*Merchant) Descriptor() ([]byte, []int)
- func (m *Merchant) GetAlias() string
- func (m *Merchant) GetDomain() string
- func (m *Merchant) GetProcessor() PaymentProcessor
- func (m *Merchant) GetPublishableKey() string
- func (m *Merchant) GetRegisterUrl() string
- func (*Merchant) ProtoMessage()
- func (m *Merchant) Reset()
- func (m *Merchant) String() string
- func (m *Merchant) XXX_DiscardUnknown()
- func (m *Merchant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Merchant) XXX_Merge(src proto.Message)
- func (m *Merchant) XXX_Size() int
- func (m *Merchant) XXX_Unmarshal(b []byte) error
- type PaymentProcessor
- type Processor
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetCountry() string
- func (m *Product) GetCurrency() string
- func (m *Product) GetProductId() string
- func (m *Product) GetPurchaseUrl() string
- func (m *Product) GetUnitPrice() int64
- func (*Product) ProtoMessage()
- func (m *Product) Reset()
- func (m *Product) String() string
- func (m *Product) XXX_DiscardUnknown()
- func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Product) XXX_Merge(src proto.Message)
- func (m *Product) XXX_Size() int
- func (m *Product) XXX_Unmarshal(b []byte) error
- type Registration
- func (*Registration) Descriptor() ([]byte, []int)
- func (m *Registration) GetCustomerAlias() string
- func (m *Registration) GetCustomerId() string
- func (m *Registration) GetMerchantAlias() string
- func (m *Registration) GetPaymentId() string
- func (m *Registration) GetProcessor() PaymentProcessor
- func (*Registration) ProtoMessage()
- func (m *Registration) Reset()
- func (m *Registration) String() string
- func (m *Registration) XXX_DiscardUnknown()
- func (m *Registration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Registration) XXX_Merge(src proto.Message)
- func (m *Registration) XXX_Size() int
- func (m *Registration) XXX_Unmarshal(b []byte) error
- type RegistrationCallback
- type Service
- func (*Service) Descriptor() ([]byte, []int)
- func (m *Service) GetCountry() string
- func (m *Service) GetCurrency() string
- func (m *Service) GetGroupPrice() int64
- func (m *Service) GetGroupSize() int64
- func (m *Service) GetInterval() Service_Interval
- func (m *Service) GetMode() Service_Mode
- func (m *Service) GetPlanId() string
- func (m *Service) GetProductId() string
- func (m *Service) GetSubscribeUrl() string
- func (*Service) ProtoMessage()
- func (m *Service) Reset()
- func (m *Service) String() string
- func (m *Service) XXX_DiscardUnknown()
- func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Service) XXX_Merge(src proto.Message)
- func (m *Service) XXX_Size() int
- func (m *Service) XXX_Unmarshal(b []byte) error
- type Service_Interval
- type Service_Mode
- type Stripe
- func (p *Stripe) NewCharge(...) (*Charge, error)
- func (p *Stripe) NewCustomerCharge(registration *Registration, productId, planId, country, currency string, ...) (*Charge, error)
- func (p *Stripe) NewRegistration(merchantAlias, customerAlias, email, paymentId, description string) (*Registration, error)
- func (p *Stripe) NewSubscription(merchantAlias, customerAlias, customerId, paymentId, productId, planId string) (*Subscription, error)
- func (p *Stripe) NewUsageRecord(...) (*UsageRecord, error)
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)
- func (m *Subscription) GetCustomerAlias() string
- func (m *Subscription) GetCustomerId() string
- func (m *Subscription) GetMerchantAlias() string
- func (m *Subscription) GetPaymentId() string
- func (m *Subscription) GetPlanId() string
- func (m *Subscription) GetProcessor() PaymentProcessor
- func (m *Subscription) GetProductId() string
- func (m *Subscription) GetSubscriptionId() string
- func (m *Subscription) GetSubscriptionItemId() string
- func (*Subscription) ProtoMessage()
- func (m *Subscription) Reset()
- func (m *Subscription) String() string
- func (m *Subscription) XXX_DiscardUnknown()
- func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subscription) XXX_Merge(src proto.Message)
- func (m *Subscription) XXX_Size() int
- func (m *Subscription) XXX_Unmarshal(b []byte) error
- type SubscriptionCallback
- type UsageRecord
- func (*UsageRecord) Descriptor() ([]byte, []int)
- func (m *UsageRecord) GetCustomerAlias() string
- func (m *UsageRecord) GetMerchantAlias() string
- func (m *UsageRecord) GetPlanId() string
- func (m *UsageRecord) GetProcessor() PaymentProcessor
- func (m *UsageRecord) GetProductId() string
- func (m *UsageRecord) GetQuantity() int64
- func (m *UsageRecord) GetSubscriptionId() string
- func (m *UsageRecord) GetSubscriptionItemId() string
- func (m *UsageRecord) GetUsageRecordId() string
- func (*UsageRecord) ProtoMessage()
- func (m *UsageRecord) Reset()
- func (m *UsageRecord) String() string
- func (m *UsageRecord) XXX_DiscardUnknown()
- func (m *UsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UsageRecord) XXX_Merge(src proto.Message)
- func (m *UsageRecord) XXX_Size() int
- func (m *UsageRecord) XXX_Unmarshal(b []byte) error
- type UsageRecordCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var PaymentProcessor_name = map[int32]string{
0: "UNKNOWN_PROCESSOR",
1: "STRIPE",
}
View Source
var PaymentProcessor_value = map[string]int32{
"UNKNOWN_PROCESSOR": 0,
"STRIPE": 1,
}
View Source
var Service_Interval_name = map[int32]string{
0: "UNKNOWN_INTERVAL",
1: "DAILY",
2: "WEEKLY",
3: "MONTHLY",
4: "QUARTERLY",
5: "YEARLY",
}
View Source
var Service_Interval_value = map[string]int32{
"UNKNOWN_INTERVAL": 0,
"DAILY": 1,
"WEEKLY": 2,
"MONTHLY": 3,
"QUARTERLY": 4,
"YEARLY": 5,
}
View Source
var Service_Mode_name = map[int32]string{
0: "UNKNOWN_MODE",
1: "FIXED_AMOUNT",
2: "METERED_SUM_USAGE",
3: "METERED_MAX_USAGE",
4: "METERED_LAST_USAGE",
5: "METERED_LAST_USAGE_EVER",
}
View Source
var Service_Mode_value = map[string]int32{
"UNKNOWN_MODE": 0,
"FIXED_AMOUNT": 1,
"METERED_SUM_USAGE": 2,
"METERED_MAX_USAGE": 3,
"METERED_LAST_USAGE": 4,
"METERED_LAST_USAGE_EVER": 5,
}
Functions ¶
func ChargeAsync ¶ added in v1.2.0
func ConstructEvent ¶
func IntervalToString ¶
func IntervalToString(interval Service_Interval) string
func RegistrationAsync ¶ added in v1.2.0
func SubscriptionAsync ¶ added in v1.2.0
Types ¶
type Charge ¶
type Charge struct { MerchantAlias string `protobuf:"bytes,1,opt,name=merchant_alias,json=merchantAlias,proto3" json:"merchant_alias,omitempty"` CustomerAlias string `protobuf:"bytes,2,opt,name=customer_alias,json=customerAlias,proto3" json:"customer_alias,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` CustomerId string `protobuf:"bytes,4,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` ChargeId string `protobuf:"bytes,6,opt,name=charge_id,json=chargeId,proto3" json:"charge_id,omitempty"` Amount int64 `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty"` InvoiceId string `protobuf:"bytes,8,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"` ReceiptUrl string `protobuf:"bytes,9,opt,name=receipt_url,json=receiptUrl,proto3" json:"receipt_url,omitempty"` ProductId string `protobuf:"bytes,10,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` PlanId string `protobuf:"bytes,11,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` Country string `protobuf:"bytes,12,opt,name=country,proto3" json:"country,omitempty"` Currency string `protobuf:"bytes,13,opt,name=currency,proto3" json:"currency,omitempty"` Description string `protobuf:"bytes,14,opt,name=description,proto3" json:"description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func ChargeSync ¶ added in v1.2.0
func (*Charge) Descriptor ¶
func (*Charge) GetChargeId ¶
func (*Charge) GetCountry ¶
func (*Charge) GetCurrency ¶
func (*Charge) GetCustomerAlias ¶
func (*Charge) GetCustomerId ¶
func (*Charge) GetDescription ¶
func (*Charge) GetInvoiceId ¶
func (*Charge) GetMerchantAlias ¶
func (*Charge) GetPaymentId ¶
func (*Charge) GetProcessor ¶
func (m *Charge) GetProcessor() PaymentProcessor
func (*Charge) GetProductId ¶
func (*Charge) GetReceiptUrl ¶
func (*Charge) ProtoMessage ¶
func (*Charge) ProtoMessage()
func (*Charge) XXX_DiscardUnknown ¶
func (m *Charge) XXX_DiscardUnknown()
func (*Charge) XXX_Marshal ¶
func (*Charge) XXX_Unmarshal ¶
type ChargeCallback ¶
type ChargeCallback func(*bcgo.BlockEntry, *Charge) error
type Invoice ¶
type Invoice struct { MerchantAlias string `protobuf:"bytes,1,opt,name=merchant_alias,json=merchantAlias,proto3" json:"merchant_alias,omitempty"` CustomerAlias string `protobuf:"bytes,2,opt,name=customer_alias,json=customerAlias,proto3" json:"customer_alias,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` CustomerId string `protobuf:"bytes,4,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` InvoiceId string `protobuf:"bytes,6,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"` InvoiceUrl string `protobuf:"bytes,7,opt,name=invoice_url,json=invoiceUrl,proto3" json:"invoice_url,omitempty"` ProductId string `protobuf:"bytes,8,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` PlanId string `protobuf:"bytes,9,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` Country string `protobuf:"bytes,10,opt,name=country,proto3" json:"country,omitempty"` Currency string `protobuf:"bytes,11,opt,name=currency,proto3" json:"currency,omitempty"` Number string `protobuf:"bytes,12,opt,name=number,proto3" json:"number,omitempty"` AmountDue int64 `protobuf:"varint,13,opt,name=amount_due,json=amountDue,proto3" json:"amount_due,omitempty"` AmountPaid int64 `protobuf:"varint,14,opt,name=amount_paid,json=amountPaid,proto3" json:"amount_paid,omitempty"` AmountRemaining int64 `protobuf:"varint,15,opt,name=amount_remaining,json=amountRemaining,proto3" json:"amount_remaining,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Invoice) Descriptor ¶
func (*Invoice) GetAmountDue ¶
func (*Invoice) GetAmountPaid ¶
func (*Invoice) GetAmountRemaining ¶
func (*Invoice) GetCountry ¶
func (*Invoice) GetCurrency ¶
func (*Invoice) GetCustomerAlias ¶
func (*Invoice) GetCustomerId ¶
func (*Invoice) GetInvoiceId ¶
func (*Invoice) GetInvoiceUrl ¶
func (*Invoice) GetMerchantAlias ¶
func (*Invoice) GetPaymentId ¶
func (*Invoice) GetProcessor ¶
func (m *Invoice) GetProcessor() PaymentProcessor
func (*Invoice) GetProductId ¶
func (*Invoice) ProtoMessage ¶
func (*Invoice) ProtoMessage()
func (*Invoice) XXX_DiscardUnknown ¶
func (m *Invoice) XXX_DiscardUnknown()
func (*Invoice) XXX_Marshal ¶
func (*Invoice) XXX_Unmarshal ¶
type Merchant ¶
type Merchant struct { Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` // The domain name of the merchant // Eg. space.aletheiaware.com Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` PublishableKey string `protobuf:"bytes,4,opt,name=publishable_key,json=publishableKey,proto3" json:"publishable_key,omitempty"` RegisterUrl string `protobuf:"bytes,5,opt,name=register_url,json=registerUrl,proto3" json:"register_url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Merchant) Descriptor ¶
func (*Merchant) GetProcessor ¶
func (m *Merchant) GetProcessor() PaymentProcessor
func (*Merchant) GetPublishableKey ¶
func (*Merchant) GetRegisterUrl ¶
func (*Merchant) ProtoMessage ¶
func (*Merchant) ProtoMessage()
func (*Merchant) XXX_DiscardUnknown ¶
func (m *Merchant) XXX_DiscardUnknown()
func (*Merchant) XXX_Marshal ¶
func (*Merchant) XXX_Unmarshal ¶
type PaymentProcessor ¶
type PaymentProcessor int32
const ( PaymentProcessor_UNKNOWN_PROCESSOR PaymentProcessor = 0 PaymentProcessor_STRIPE PaymentProcessor = 1 )
func (PaymentProcessor) EnumDescriptor ¶
func (PaymentProcessor) EnumDescriptor() ([]byte, []int)
func (PaymentProcessor) String ¶
func (x PaymentProcessor) String() string
type Processor ¶
type Processor interface { NewCharge(merchantAlias, customerAlias, paymentId, productId, planId, country, currency string, amount int64, description string) (*Charge, error) NewRegistration(merchantAlias, customerAlias, email, paymentId, description string) (*Registration, error) NewCustomerCharge(registration *Registration, productId, planId, country, currency string, amount int64, description string) (*Charge, error) NewSubscription(merchantAlias, customerAlias, customerId, paymentId, productId, planId string) (*Subscription, error) NewUsageRecord(merchantAlias, customerAlias, subscriptionId, subscriptionItemId, productId, planId string, timestamp int64, size int64) (*UsageRecord, error) }
type Product ¶
type Product struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` UnitPrice int64 `protobuf:"varint,4,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` PurchaseUrl string `protobuf:"bytes,5,opt,name=purchase_url,json=purchaseUrl,proto3" json:"purchase_url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Product) Descriptor ¶
func (*Product) GetCountry ¶
func (*Product) GetCurrency ¶
func (*Product) GetProductId ¶
func (*Product) GetPurchaseUrl ¶
func (*Product) GetUnitPrice ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) XXX_DiscardUnknown ¶
func (m *Product) XXX_DiscardUnknown()
func (*Product) XXX_Marshal ¶
func (*Product) XXX_Unmarshal ¶
type Registration ¶
type Registration struct { MerchantAlias string `protobuf:"bytes,1,opt,name=merchant_alias,json=merchantAlias,proto3" json:"merchant_alias,omitempty"` CustomerAlias string `protobuf:"bytes,2,opt,name=customer_alias,json=customerAlias,proto3" json:"customer_alias,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` CustomerId string `protobuf:"bytes,4,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func RegistrationSync ¶ added in v1.2.0
func (*Registration) Descriptor ¶
func (*Registration) Descriptor() ([]byte, []int)
func (*Registration) GetCustomerAlias ¶
func (m *Registration) GetCustomerAlias() string
func (*Registration) GetCustomerId ¶
func (m *Registration) GetCustomerId() string
func (*Registration) GetMerchantAlias ¶
func (m *Registration) GetMerchantAlias() string
func (*Registration) GetPaymentId ¶
func (m *Registration) GetPaymentId() string
func (*Registration) GetProcessor ¶
func (m *Registration) GetProcessor() PaymentProcessor
func (*Registration) ProtoMessage ¶
func (*Registration) ProtoMessage()
func (*Registration) Reset ¶
func (m *Registration) Reset()
func (*Registration) String ¶
func (m *Registration) String() string
func (*Registration) XXX_DiscardUnknown ¶
func (m *Registration) XXX_DiscardUnknown()
func (*Registration) XXX_Marshal ¶
func (m *Registration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Registration) XXX_Merge ¶
func (m *Registration) XXX_Merge(src proto.Message)
func (*Registration) XXX_Size ¶
func (m *Registration) XXX_Size() int
func (*Registration) XXX_Unmarshal ¶
func (m *Registration) XXX_Unmarshal(b []byte) error
type RegistrationCallback ¶
type RegistrationCallback func(*bcgo.BlockEntry, *Registration) error
type Service ¶
type Service struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` PlanId string `protobuf:"bytes,2,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"` Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` GroupPrice int64 `protobuf:"varint,5,opt,name=group_price,json=groupPrice,proto3" json:"group_price,omitempty"` GroupSize int64 `protobuf:"varint,6,opt,name=group_size,json=groupSize,proto3" json:"group_size,omitempty"` Interval Service_Interval `protobuf:"varint,7,opt,name=interval,proto3,enum=finance.Service_Interval" json:"interval,omitempty"` Mode Service_Mode `protobuf:"varint,8,opt,name=mode,proto3,enum=finance.Service_Mode" json:"mode,omitempty"` SubscribeUrl string `protobuf:"bytes,9,opt,name=subscribe_url,json=subscribeUrl,proto3" json:"subscribe_url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Service) Descriptor ¶
func (*Service) GetCountry ¶
func (*Service) GetCurrency ¶
func (*Service) GetGroupPrice ¶
func (*Service) GetGroupSize ¶
func (*Service) GetInterval ¶
func (m *Service) GetInterval() Service_Interval
func (*Service) GetMode ¶
func (m *Service) GetMode() Service_Mode
func (*Service) GetProductId ¶
func (*Service) GetSubscribeUrl ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) XXX_DiscardUnknown ¶
func (m *Service) XXX_DiscardUnknown()
func (*Service) XXX_Marshal ¶
func (*Service) XXX_Unmarshal ¶
type Service_Interval ¶
type Service_Interval int32
const ( Service_UNKNOWN_INTERVAL Service_Interval = 0 Service_DAILY Service_Interval = 1 Service_WEEKLY Service_Interval = 2 Service_MONTHLY Service_Interval = 3 Service_QUARTERLY Service_Interval = 4 Service_YEARLY Service_Interval = 5 )
func (Service_Interval) EnumDescriptor ¶
func (Service_Interval) EnumDescriptor() ([]byte, []int)
func (Service_Interval) String ¶
func (x Service_Interval) String() string
type Service_Mode ¶
type Service_Mode int32
const ( Service_UNKNOWN_MODE Service_Mode = 0 Service_FIXED_AMOUNT Service_Mode = 1 Service_METERED_SUM_USAGE Service_Mode = 2 Service_METERED_MAX_USAGE Service_Mode = 3 Service_METERED_LAST_USAGE Service_Mode = 4 Service_METERED_LAST_USAGE_EVER Service_Mode = 5 )
func (Service_Mode) EnumDescriptor ¶
func (Service_Mode) EnumDescriptor() ([]byte, []int)
func (Service_Mode) String ¶
func (x Service_Mode) String() string
type Stripe ¶
type Stripe struct { }
func (*Stripe) NewCustomerCharge ¶
func (*Stripe) NewRegistration ¶
func (p *Stripe) NewRegistration(merchantAlias, customerAlias, email, paymentId, description string) (*Registration, error)
func (*Stripe) NewSubscription ¶
func (p *Stripe) NewSubscription(merchantAlias, customerAlias, customerId, paymentId, productId, planId string) (*Subscription, error)
func (*Stripe) NewUsageRecord ¶
type Subscription ¶
type Subscription struct { MerchantAlias string `protobuf:"bytes,1,opt,name=merchant_alias,json=merchantAlias,proto3" json:"merchant_alias,omitempty"` CustomerAlias string `protobuf:"bytes,2,opt,name=customer_alias,json=customerAlias,proto3" json:"customer_alias,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` CustomerId string `protobuf:"bytes,4,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` ProductId string `protobuf:"bytes,6,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` PlanId string `protobuf:"bytes,7,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` SubscriptionId string `protobuf:"bytes,8,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` SubscriptionItemId string `protobuf:"bytes,9,opt,name=subscription_item_id,json=subscriptionItemId,proto3" json:"subscription_item_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func SubscriptionSync ¶ added in v1.2.0
func (*Subscription) Descriptor ¶
func (*Subscription) Descriptor() ([]byte, []int)
func (*Subscription) GetCustomerAlias ¶
func (m *Subscription) GetCustomerAlias() string
func (*Subscription) GetCustomerId ¶
func (m *Subscription) GetCustomerId() string
func (*Subscription) GetMerchantAlias ¶
func (m *Subscription) GetMerchantAlias() string
func (*Subscription) GetPaymentId ¶
func (m *Subscription) GetPaymentId() string
func (*Subscription) GetPlanId ¶
func (m *Subscription) GetPlanId() string
func (*Subscription) GetProcessor ¶
func (m *Subscription) GetProcessor() PaymentProcessor
func (*Subscription) GetProductId ¶
func (m *Subscription) GetProductId() string
func (*Subscription) GetSubscriptionId ¶
func (m *Subscription) GetSubscriptionId() string
func (*Subscription) GetSubscriptionItemId ¶
func (m *Subscription) GetSubscriptionItemId() string
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) Reset ¶
func (m *Subscription) Reset()
func (*Subscription) String ¶
func (m *Subscription) String() string
func (*Subscription) XXX_DiscardUnknown ¶
func (m *Subscription) XXX_DiscardUnknown()
func (*Subscription) XXX_Marshal ¶
func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Subscription) XXX_Merge ¶
func (m *Subscription) XXX_Merge(src proto.Message)
func (*Subscription) XXX_Size ¶
func (m *Subscription) XXX_Size() int
func (*Subscription) XXX_Unmarshal ¶
func (m *Subscription) XXX_Unmarshal(b []byte) error
type SubscriptionCallback ¶
type SubscriptionCallback func(*bcgo.BlockEntry, *Subscription) error
type UsageRecord ¶
type UsageRecord struct { MerchantAlias string `protobuf:"bytes,1,opt,name=merchant_alias,json=merchantAlias,proto3" json:"merchant_alias,omitempty"` CustomerAlias string `protobuf:"bytes,2,opt,name=customer_alias,json=customerAlias,proto3" json:"customer_alias,omitempty"` Processor PaymentProcessor `protobuf:"varint,3,opt,name=processor,proto3,enum=finance.PaymentProcessor" json:"processor,omitempty"` SubscriptionId string `protobuf:"bytes,4,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` UsageRecordId string `protobuf:"bytes,5,opt,name=usage_record_id,json=usageRecordId,proto3" json:"usage_record_id,omitempty"` Quantity int64 `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"` SubscriptionItemId string `protobuf:"bytes,7,opt,name=subscription_item_id,json=subscriptionItemId,proto3" json:"subscription_item_id,omitempty"` ProductId string `protobuf:"bytes,8,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` PlanId string `protobuf:"bytes,9,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func UsageRecordSync ¶ added in v1.2.0
func (*UsageRecord) Descriptor ¶
func (*UsageRecord) Descriptor() ([]byte, []int)
func (*UsageRecord) GetCustomerAlias ¶
func (m *UsageRecord) GetCustomerAlias() string
func (*UsageRecord) GetMerchantAlias ¶
func (m *UsageRecord) GetMerchantAlias() string
func (*UsageRecord) GetPlanId ¶
func (m *UsageRecord) GetPlanId() string
func (*UsageRecord) GetProcessor ¶
func (m *UsageRecord) GetProcessor() PaymentProcessor
func (*UsageRecord) GetProductId ¶
func (m *UsageRecord) GetProductId() string
func (*UsageRecord) GetQuantity ¶
func (m *UsageRecord) GetQuantity() int64
func (*UsageRecord) GetSubscriptionId ¶
func (m *UsageRecord) GetSubscriptionId() string
func (*UsageRecord) GetSubscriptionItemId ¶
func (m *UsageRecord) GetSubscriptionItemId() string
func (*UsageRecord) GetUsageRecordId ¶
func (m *UsageRecord) GetUsageRecordId() string
func (*UsageRecord) ProtoMessage ¶
func (*UsageRecord) ProtoMessage()
func (*UsageRecord) Reset ¶
func (m *UsageRecord) Reset()
func (*UsageRecord) String ¶
func (m *UsageRecord) String() string
func (*UsageRecord) XXX_DiscardUnknown ¶
func (m *UsageRecord) XXX_DiscardUnknown()
func (*UsageRecord) XXX_Marshal ¶
func (m *UsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UsageRecord) XXX_Merge ¶
func (m *UsageRecord) XXX_Merge(src proto.Message)
func (*UsageRecord) XXX_Size ¶
func (m *UsageRecord) XXX_Size() int
func (*UsageRecord) XXX_Unmarshal ¶
func (m *UsageRecord) XXX_Unmarshal(b []byte) error
type UsageRecordCallback ¶
type UsageRecordCallback func(*bcgo.BlockEntry, *UsageRecord) error
Click to show internal directories.
Click to hide internal directories.