savingsplans

package
v0.0.0-...-a2a535d Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnflattenSavingsPlan

func UnflattenSavingsPlan(flat *SavingsPlanFlat) *tr.SavingsPlan

Types

type SavingsPlanFlat

type SavingsPlanFlat struct {
	ID                           string  `json:"id"`
	CreatedAt                    int64   `json:"created_at"`
	InstrumentID                 string  `json:"instrument_id"`
	Amount                       float64 `json:"amount"`
	Interval                     string  `json:"interval"`
	StartDateType                string  `json:"start_date_type"`
	StartDateValue               int     `json:"start_date_value"`
	StartDateNextExecutionDate   string  `json:"start_date_next_execution_date"`
	FirstExecutionDate           string  `json:"first_execution_date"`
	NextExecutionDate            string  `json:"next_execution_date"`
	PreviousExecutionDate        string  `json:"previous_execution_date"`
	VirtualPreviousExecutionDate string  `json:"virtual_previous_execution_date"`
	FinalExecutionDate           string  `json:"final_execution_date"`
	PaymentMethodID              string  `json:"payment_method_id"`
	PaymentMethodCode            string  `json:"payment_method_code"`
	LastPaymentExecutionDate     string  `json:"last_payment_execution_date"`
	Paused                       bool    `json:"paused"`
}

func FlattenSavingsPlan

func FlattenSavingsPlan(plan *tr.SavingsPlan) *SavingsPlanFlat

type SavingsPlans

type SavingsPlans struct {
	scylla.Scylla
}

func NewSavingsPlanKeyspace

func NewSavingsPlanKeyspace(contactPoint string, port int) (*SavingsPlans, error)

func (*SavingsPlans) AddPlan

func (s *SavingsPlans) AddPlan(currentTable *table.Table, plan tr.SavingsPlan) error

func (*SavingsPlans) CheckIfPlanExists

func (s *SavingsPlans) CheckIfPlanExists(currentTable *table.Table, plan tr.SavingsPlan) bool

func (*SavingsPlans) CreateTable

func (s *SavingsPlans) CreateTable(tableName string) (*table.Table, error)

func (*SavingsPlans) DeletePlan

func (s *SavingsPlans) DeletePlan(currentTable *table.Table, plan tr.SavingsPlan) error

func (*SavingsPlans) GetAllPlans

func (s *SavingsPlans) GetAllPlans(currentTable *table.Table) (*[]tr.SavingsPlan, error)

func (*SavingsPlans) GetPlan

func (s *SavingsPlans) GetPlan(currentTable *table.Table, plan tr.SavingsPlan) (*tr.SavingsPlan, error)

func (*SavingsPlans) UpdatePlan

func (s *SavingsPlans) UpdatePlan(currentTable *table.Table, plan tr.SavingsPlan) error

Jump to

Keyboard shortcuts

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