settlement

package
v0.0.0-...-4ce4a32 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MPL-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BitflyerSettlementCmd creates the bitflyer subcommand
	BitflyerSettlementCmd = &cobra.Command{
		Use:   "bitflyer",
		Short: "facilitates bitflyer settlement",
	}

	// UploadBitflyerSettlementCmd creates the bitflyer uphold subcommand
	UploadBitflyerSettlementCmd = &cobra.Command{
		Use:   "upload",
		Short: "uploads signed bitflyer transactions",
		Run:   rootcmd.Perform("bitflyer upload", UploadBitflyerSettlement),
	}

	// CheckStatusBitflyerSettlementCmd creates the bitflyer checkstatus subcommand
	CheckStatusBitflyerSettlementCmd = &cobra.Command{
		Use:   "checkstatus",
		Short: "uploads signed bitflyer transactions",
		Run:   rootcmd.Perform("bitflyer checkstatus", CheckStatusBitflyerSettlement),
	}

	// GetBitflyerTokenCmd gets a new bitflyer token
	GetBitflyerTokenCmd = &cobra.Command{
		Use:   "token",
		Short: "gets a new token for authing",
		Run:   rootcmd.Perform("bitflyer token", GetBitflyerToken),
	}
)
View Source
var (
	// GeminiSettlementCmd creates the gemini subcommand
	GeminiSettlementCmd = &cobra.Command{
		Use:   "gemini",
		Short: "provides gemini settlement",
	}

	// UploadGeminiSettlementCmd creates the gemini uphold subcommand
	UploadGeminiSettlementCmd = &cobra.Command{
		Use:   "upload",
		Short: "uploads signed gemini transactions",
		Run:   rootcmd.Perform("gemini upload", UploadGeminiSettlement),
	}

	// CheckStatusGeminiSettlementCmd creates the gemini checkstatus subcommand
	CheckStatusGeminiSettlementCmd = &cobra.Command{
		Use:   "checkstatus",
		Short: "uploads signed gemini transactions",
		Run:   rootcmd.Perform("gemini checkstatus", CheckStatusGeminiSettlement),
	}
)
View Source
var (
	// PaypalSettlementCmd is the paypal command
	PaypalSettlementCmd = &cobra.Command{
		Use:   "paypal",
		Short: "provides paypal settlement",
	}

	// EmailPaypalSettlementCmd provides population of a templated email
	EmailPaypalSettlementCmd = &cobra.Command{
		Use:   "email",
		Short: "provides population of a templated email",
		Run:   rootcmd.Perform("email", EmailPaypalSettlement),
	}

	// CompletePaypalSettlementCmd provides completion of paypal settlement
	CompletePaypalSettlementCmd = &cobra.Command{
		Use:   "complete",
		Short: "provides completion of paypal settlement",
		Run:   rootcmd.Perform("complete", CompletePaypalSettlement),
	}

	// TransformPaypalSettlementCmd provides transform of paypal settlement for mass pay
	TransformPaypalSettlementCmd = &cobra.Command{
		Use:   "transform",
		Short: "provides transform of paypal settlement for mass pay",
		Run:   rootcmd.Perform("transform", RunTransformPaypalSettlement),
	}
)
View Source
var (
	// UpholdCmd uphold subcommand
	UpholdCmd = &cobra.Command{
		Use:   "uphold",
		Short: "uphold sub command",
	}
	// UpholdUploadCmd uphold upload subcommand
	UpholdUploadCmd = &cobra.Command{
		Use:   "upload",
		Short: "upload to uphold",
		Run:   rootcmd.Perform("upload", RunUpholdUpload),
	}
)
View Source
var SettlementCmd = &cobra.Command{
	Use:   "settlement",
	Short: "provides settlement utilities",
}

SettlementCmd is the settlement command

Functions

func BitflyerUploadSettlement

func BitflyerUploadSettlement(
	ctx context.Context,
	action, inPath, outPath, token string,
	excludeLimited bool,
	dryRun *bitflyer.DryRunOption,
) error

BitflyerUploadSettlement marks the settlement file as complete

func CheckStatusBitflyerSettlement

func CheckStatusBitflyerSettlement(cmd *cobra.Command, args []string) error

CheckStatusBitflyerSettlement is the command runner for checking bitflyer transactions status

func CheckStatusGeminiSettlement

func CheckStatusGeminiSettlement(cmd *cobra.Command, args []string) error

CheckStatusGeminiSettlement is the command runner for checking gemini transactions status

func CompletePaypalSettlement

func CompletePaypalSettlement(cmd *cobra.Command, args []string) error

CompletePaypalSettlement added complete paypal settlement

func EmailPaypalSettlement

func EmailPaypalSettlement(cmd *cobra.Command, args []string) error

EmailPaypalSettlement create the email to send to the

func GeminiUploadSettlement

func GeminiUploadSettlement(ctx context.Context, action string, inPath string, signatureSwitch int, allTransactionsFile string, outPath string) error

GeminiUploadSettlement marks the settlement file as complete

func GetBitflyerToken

func GetBitflyerToken(cmd *cobra.Command, args []string) error

GetBitflyerToken gets a new bitflyer token from cobra command

func NewRefreshTokenPayloadFromViper

func NewRefreshTokenPayloadFromViper() *bitflyer.TokenPayload

NewRefreshTokenPayloadFromViper creates the payload to refresh a bitflyer token from viper

func ParseDryRun

func ParseDryRun(cmd *cobra.Command) (*bitflyer.DryRunOption, error)

ParseDryRun parses the dry run option

func PaypalCompleteSettlement

func PaypalCompleteSettlement(payouts *[]custodian.Transaction, txnID string) (*[]custodian.Transaction, error)

PaypalCompleteSettlement marks the settlement file as complete

func PaypalEmailTemplate

func PaypalEmailTemplate(inPath string, outPath string) (err error)

PaypalEmailTemplate performs template replacement of date fields in emails

func PaypalTransformForMassPay

func PaypalTransformForMassPay(ctx context.Context, payouts *[]custodian.Transaction, currency string, rate decimal.Decimal, out string) error

PaypalTransformForMassPay starts the process to transform a settlement into a mass pay csv

func PaypalWriteMassPayCSV

func PaypalWriteMassPayCSV(ctx context.Context, outPath string, metadata *[]paypal.Metadata) error

PaypalWriteMassPayCSV writes a csv for using with Paypal web mass payments

func PaypalWriteTransactions

func PaypalWriteTransactions(outPath string, metadata *[]custodian.Transaction) error

PaypalWriteTransactions writes settlement transactions to a json file

func RunTransformPaypalSettlement

func RunTransformPaypalSettlement(cmd *cobra.Command, args []string) error

RunTransformPaypalSettlement transforms a paypal settlement

func RunUpholdUpload

func RunUpholdUpload(cmd *cobra.Command, args []string) error

RunUpholdUpload the runner that the uphold upload command calls

func UpholdUpload

func UpholdUpload(
	ctx context.Context,
	inputFile string,
	logFile string,
	outputFilePrefix string,
) error

UpholdUpload uploads transactions to uphold

func UploadBitflyerSettlement

func UploadBitflyerSettlement(cmd *cobra.Command, args []string) error

UploadBitflyerSettlement uploads bitflyer settlement

func UploadGeminiSettlement

func UploadGeminiSettlement(cmd *cobra.Command, args []string) error

UploadGeminiSettlement uploads gemini settlement

func WriteCategorizedTransactions

func WriteCategorizedTransactions(
	ctx context.Context,
	outPath string,
	transactions map[string][]custodian.Transaction,
) error

WriteCategorizedTransactions write out transactions categorized under a key

func WriteTransactions

func WriteTransactions(ctx context.Context, outPath string, metadata []custodian.Transaction) error

WriteTransactions writes settlement transactions to a json file

Types

type PaypalTransformArgs

type PaypalTransformArgs struct {
	In       string
	Currency string
	Auth     string
	Rate     decimal.Decimal
	Out      string
}

PaypalTransformArgs are the args required for the transform command

Jump to

Keyboard shortcuts

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