diff --git a/js/consumer/selly.go b/js/consumer/selly.go index 0305c7c..975cb5b 100644 --- a/js/consumer/selly.go +++ b/js/consumer/selly.go @@ -4,7 +4,9 @@ package jsconsumer var Selly = struct { PushNotification string UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string }{ PushNotification: "PULL_PUSH_NOTIFICATION", UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC", + CheckAnDInsertCashflowBySeller: "PULL_CHECK_AND_INSERT_CASHFLOW_BY_SELLER", } diff --git a/js/model/selly.go b/js/model/selly.go index 412e62d..c521660 100644 --- a/js/model/selly.go +++ b/js/model/selly.go @@ -34,3 +34,26 @@ type SellerAffiliateStatistic struct { CommissionTransactionApproved float64 `json:"commissionTransactionApproved"` CommissionTransactionRejected float64 `json:"commissionTransactionRejected"` } + +// PayloadCashflowsBySeller ... +type PayloadCashflowsBySeller struct { + SellerID string `json:"sellerId"` + List []CashflowSeller `json:"list"` +} + +// CashflowSeller ... +type CashflowSeller struct { + Value float64 `json:"value"` + Action string `json:"action"` + Category string `json:"category"` + TargetID string `json:"targetId"` + TargetType string `json:"targetType"` + Options *CashFlowOptions `json:"options"` +} + +// CashFlowOptions ... +type CashFlowOptions struct { + AffiliateTransactionCode string `json:"affiliateTransactionCode,omitempty"` + AffiliateCampaignID string `json:"affiliateCampaignId,omitempty"` + AffiliateCampaignName string `json:"affiliateCampaignName,omitempty"` +} diff --git a/js/subject/selly.go b/js/subject/selly.go index 71ca355..2f665bb 100644 --- a/js/subject/selly.go +++ b/js/subject/selly.go @@ -13,7 +13,9 @@ func getSellyValue(val string) string { var Selly = struct { PushNotification string UpdateSellerAffiliateStatistic string + CheckAnDInsertCashflowBySeller string }{ PushNotification: getSellyValue("push_notifications"), UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"), + CheckAnDInsertCashflowBySeller: getSellyValue("check_and_insert_cashflow_statistic"), }