Documentation ¶
Index ¶
- Variables
- func BitflyerUploadSettlement(ctx context.Context, action, inPath, outPath, token string, ...) error
- func CheckStatusBitflyerSettlement(cmd *cobra.Command, args []string) error
- func CheckStatusGeminiSettlement(cmd *cobra.Command, args []string) error
- func CompletePaypalSettlement(cmd *cobra.Command, args []string) error
- func EmailPaypalSettlement(cmd *cobra.Command, args []string) error
- func GeminiUploadSettlement(ctx context.Context, action string, inPath string, signatureSwitch int, ...) error
- func GetBitflyerToken(cmd *cobra.Command, args []string) error
- func NewRefreshTokenPayloadFromViper() *bitflyer.TokenPayload
- func ParseDryRun(cmd *cobra.Command) (*bitflyer.DryRunOption, error)
- func PaypalCompleteSettlement(payouts *[]custodian.Transaction, txnID string) (*[]custodian.Transaction, error)
- func PaypalEmailTemplate(inPath string, outPath string) (err error)
- func PaypalTransformForMassPay(ctx context.Context, payouts *[]custodian.Transaction, currency string, ...) error
- func PaypalWriteMassPayCSV(ctx context.Context, outPath string, metadata *[]paypal.Metadata) error
- func PaypalWriteTransactions(outPath string, metadata *[]custodian.Transaction) error
- func RunTransformPaypalSettlement(cmd *cobra.Command, args []string) error
- func RunUpholdUpload(cmd *cobra.Command, args []string) error
- func UpholdUpload(ctx context.Context, inputFile string, logFile string, outputFilePrefix string) error
- func UploadBitflyerSettlement(cmd *cobra.Command, args []string) error
- func UploadGeminiSettlement(cmd *cobra.Command, args []string) error
- func WriteCategorizedTransactions(ctx context.Context, outPath string, ...) error
- func WriteTransactions(ctx context.Context, outPath string, metadata []custodian.Transaction) error
- type PaypalTransformArgs
Constants ¶
This section is empty.
Variables ¶
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), } )
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), } )
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), } )
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), } )
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 ¶
CheckStatusBitflyerSettlement is the command runner for checking bitflyer transactions status
func CheckStatusGeminiSettlement ¶
CheckStatusGeminiSettlement is the command runner for checking gemini transactions status
func CompletePaypalSettlement ¶
CompletePaypalSettlement added complete paypal settlement
func EmailPaypalSettlement ¶
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 ¶
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 ¶
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 ¶
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 ¶
RunTransformPaypalSettlement transforms a paypal settlement
func RunUpholdUpload ¶
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 ¶
UploadBitflyerSettlement uploads bitflyer settlement
func UploadGeminiSettlement ¶
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 ¶
WriteTransactions writes settlement transactions to a json file