model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Page

func Page(inp *SearchRequest)

Types

type AddPartnerRequest

type AddPartnerRequest struct {
	Partner string               `json:"partner" validate:"required"`
	Code    string               `json:"code" validate:"required"`
	Email   string               `json:"email" validate:"required"`
	Msisdn  string               `json:"msisdn" validate:"required"`
	Officer string               `json:"officer" validate:"required"`
	Address string               `json:"address" validate:"required"`
	SessionRequest
}

type AddUserRequest

type AddUserRequest struct {
	Fullname string `json:"fullname" validate:"required"`
	Msisdn   string `json:"msisdn" validate:"required"`
	Email    string `json:"email" validate:"required"`
	RoleId   int64  `json:"role_id" validate:"required"`
	SessionRequest
}

type BadPayloadResponse

type BadPayloadResponse struct {
	FailedField string
	Tag         string
	Value       string
}

type BaseEntity

type BaseEntity struct {
	IsDeleted   bool          `json:"is_deleted"`
	CreatedBy   sql.NullInt64 `json:"created_by"`
	CreatedDate sql.NullTime  `json:"created_date"`
	UpdatedBy   sql.NullInt64 `json:"updated_by"`
	UpdatedDate sql.NullTime  `json:"updated_date"`
}

type BusinessError

type BusinessError struct {
	ErrorCode    string
	ErrorMessage string
}

type Cashback

type Cashback struct {
	Id            int64               `json:"id" db:"id"`
	KezbekRefCode sql.NullString      `json:"kezbek_ref_code" db:"kezbek_ref_code"`
	Amount        decimal.NullDecimal `json:"amount" db:"amount"`
	Reward        decimal.NullDecimal `json:"reward" db:"reward"`
	WalletCode    sql.NullString      `json:"wallet_code" db:"wallet_code"`
	H2HCode       sql.NullString      `json:"h2h_code" db:"h2h_code"`
	BaseEntity
}

type CiamAuthenticationRequest

type CiamAuthenticationRequest struct {
	Username string
	Secret   string
}

type CiamAuthenticationResponse

type CiamAuthenticationResponse struct {
	AccessToken  string
	Token        string
	RefreshToken string
	ExpiresIn    int64
}

type CiamOnboardPartnerRequest

type CiamOnboardPartnerRequest struct {
	Username    string
	Name        string
	PhoneNumber string
	Email       string
	Picture     string
	Password    string
}

type CiamUserResponse

type CiamUserResponse struct {
	SubId string
	TransactionResponse
}

type ClientAuthenticationRequest

type ClientAuthenticationRequest struct {
	ApiKey string `swaggerignore:"true"`
	Code   string `json:"code" example:"LAJADA" validate:"required"`
}

type ClientAuthenticationResponse

type ClientAuthenticationResponse struct {
	Id      *int64 `json:"id,omitempty"`
	Code    string `json:"code"`
	Company string `json:"company"`
	SessionResponse
}

type ContextRequest

type ContextRequest struct {
	Channel       string `json:"channel,omitempty" swaggerignore:"true"`
	OS            string `json:"os,omitempty" swaggerignore:"true"`
	Version       string `json:"version,omitempty" swaggerignore:"true"`
	DeviceId      string `json:"device_id,omitempty" swaggerignore:"true"`
	Authorization string `json:"authorization,omitempty" swaggerignore:"true"`
	AuthSignature string `json:"auth_signature,omitempty" swaggerignore:"true"`
	RefreshToken  string `json:"refresh_token,omitempty" swaggerignore:"true"`
	TransactionId string `json:"transaction_id,omitempty" swaggerignore:"true"`
	ApiKey        string `json:"api_key,omitempty" swaggerignore:"true"`
}

type FindByIdRequest

type FindByIdRequest struct {
	Id int64 `json:"id"`
	SessionRequest
}

type FindCashbackRequest

type FindCashbackRequest struct {
	Qty    int
	Amount decimal.Decimal
}

type FindCashbackResponse

type FindCashbackResponse struct {
	Amount decimal.Decimal
}

type GopaidTopUpRequest

type GopaidTopUpRequest struct {
	Receipient string          `json:"receipient"`
	AddBalance decimal.Decimal `json:"add_balance"`
}

type GopaidTopupResponse

type GopaidTopupResponse struct {
	RefCode   string `json:"ref_code"`
	Timestamp string `json:"timestamp"`
}

type H2HPricingProjection

type H2HPricingProjection struct {
	Code       string          `json:"code" db:"code"`
	Provider   string          `json:"provider" db:"provider"`
	WalletCode string          `json:"wallet_code" db:"wallet_code"`
	Fee        decimal.Decimal `json:"fee" db:"fee"`
}

type H2HPricingsProjection

type H2HPricingsProjection struct {
	WalletCode string `json:"wallet_code,omitempty"`
	Prices     []H2HPricingProjection
}

type H2HProvider

type H2HProvider struct {
	Id       int64          `json:"id" db:"id"`
	Provider sql.NullString `json:"provider" db:"provider"`
	Code     sql.NullString `json:"code" db:"code"`
	Status   int
	BaseEntity
}

type H2HProviderFee

type H2HProviderFee struct {
	Id            int64               `json:"id" db:"id"`
	H2HProviderId int64               `json:"h2h_provider_id" db:"h2h_provider_id"`
	WalletCode    sql.NullString      `json:"wallet_code" db:"wallet_code"`
	Fee           decimal.NullDecimal `json:"fee" db:"fee"`
	BaseEntity
}

type H2HProviderResponse

type H2HProviderResponse struct {
	Id       int64  `json:"id,omitempty"`
	Code     string `json:"code,omitempty"`
	Provider string `json:"provider,omitempty"`
}

type H2HSendCashbackRequest

type H2HSendCashbackRequest struct {
	HostCode    string `json:"host_code,omitempty"`
	Amount      decimal.Decimal
	Destination string
	Notes       string
	KezbekRefNo string
	WalletCode  string
}

type H2HTransactionResponse

type H2HTransactionResponse struct {
	HostCode string `json:"host_code" example:"LSAJAH2H"`
	TransactionResponse
}

type JosvoAccountTransferRequest

type JosvoAccountTransferRequest struct {
	PhoneNo       string          `json:"phone_no"`
	Amount        decimal.Decimal `json:"amount"`
	ClientRefCode string          `json:"client_ref_code"`
}

type JosvoAccountTransferResponse

type JosvoAccountTransferResponse struct {
	Code  string `json:"code"`
	Notes string `json:"notes"`
}

type LinksajaAuthorizationResponse

type LinksajaAuthorizationResponse struct {
	Token          string `json:"token"`
	ThirdPartyName string `json:"thirdPartyName"`
}

type LinksajaFundTransferRequest

type LinksajaFundTransferRequest struct {
	Bearer string          `json:"bearer,omitempty"`
	Amount decimal.Decimal `json:"amount"`
	Msisdn string          `json:"msisdn"`
	Notes  string          `json:"notes"`
}

type LinksajaFundTransferResponse

type LinksajaFundTransferResponse struct {
	TransactionID   string `json:"transactionID"`
	TransactionTime string `json:"transactionTime"`
}

type Meta

type Meta struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type MiddletransWalletTransferRequest

type MiddletransWalletTransferRequest struct {
	Wallet  string          `json:"wallet"`
	Amount  decimal.Decimal `json:"amount"`
	Account string          `json:"account"`
}

type MiddletransWalletTransferResponse

type MiddletransWalletTransferResponse struct {
	IsSuccess      bool   `json:"isSuccess"`
	StatusCode     string `json:"statusCode"`
	TransactionRef string `json:"transactionRef"`
	Message        string `json:"message"`
}

type OfficerAuthenticationRequest

type OfficerAuthenticationRequest struct {
	Email string `json:"email" example:"john.doe@lajada.id"`
}

type OfficerAuthenticationResponse

type OfficerAuthenticationResponse struct {
	RemainingSeconds float64 `json:"remaining_seconds"`
	TransactionResponse
}

type OfficerValidationRequest

type OfficerValidationRequest struct {
	TransactionId string `swaggerignore:"true" validate:"required"`
	Otp           string `json:"otp" example:"123456" validate:"required"`
}

type OfficerValidationResponse

type OfficerValidationResponse struct {
	Id      int64  `json:"id,omitempty" example:"1"`
	Msisdn  string `json:"msisdn" example:"628118770510"`
	Email   string `json:"email" example:"john.doe@email.net"`
	Code    string `json:"code" example:"CORPCODE_A"`
	Company string `json:"company"  example:"Kezbek Indonesia Ltd"`
	SessionResponse
}

type PaginationResponse

type PaginationResponse struct {
	Number        int    `json:"number,omitempty" example:"1"`
	Size          int    `json:"size,omitempty" example:"10"`
	TotalElements int    `json:"total_elements,omitempty" example:"100"`
	TotalPages    int    `json:"total_pages,omitempty" example:"10"`
	Sort          string `json:"sort,omitempty" example:"ASC"`
	SortBy        string `json:"sort_by,omitempty" example:"id"`
}

func Pagination

func Pagination(count int, limit int, start int) PaginationResponse

type Parameter

type Parameter struct {
	Id         sql.NullInt64  `json:"id"`
	ParamGroup sql.NullString `json:"param_group"`
	ParamName  sql.NullString `json:"param_name"`
	ParamValue sql.NullString `json:"value_param"`
	BaseEntity
}

type Partner

type Partner struct {
	Id      int64          `json:"id" db:"id"`
	Partner sql.NullString `json:"partner" db:"partner"`
	Code    sql.NullString `json:"code" db:"code"`
	ApiKey  sql.NullString `json:"api_key" db:"api_key"`
	Salt    sql.NullString `json:"salt" db:"salt"`
	Secret  sql.RawBytes   `json:"secret" db:"secret"`
	Email   sql.NullString `json:"email" db:"email"`
	Msisdn  sql.NullString `json:"msisdn" db:"msisdn"`
	Officer sql.NullString `json:"officer" db:"officer"`
	Address sql.NullString `json:"address" db:"address"`
	Status  int            `json:"status" db:"status"`
	BaseEntity
}

type PartnerTransactionProjection

type PartnerTransactionProjection struct {
	Id          int64           `json:"id" example:"1"`
	WalletCode  string          `json:"wallet_code,omitempty" example:"LSAJA"`
	Email       string          `json:"email,omitempty" example:"john.doe@email.net"`
	Msisdn      string          `json:"msisdn,omitempty" example:"628118770510"`
	Qty         int             `json:"qty,omitempty" example:"2"`
	Transaction decimal.Decimal `json:"transaction,omitempty" example:"250000"`
	Cashback    decimal.Decimal `json:"cashback,omitempty" example:"2500"`
	Reward      decimal.Decimal `json:"reward,omitempty" example:"13000"`
}

type PartnerTransactionSearchResponse

type PartnerTransactionSearchResponse struct {
	Transactions []PartnerTransactionProjection `json:"transactions,omitempty"`
	PaginationResponse
}

type Response

type Response struct {
	Data interface{} `json:"data,omitempty"`
	Meta Meta        `json:"meta,omitempty"`
}

type S3UploadRequest

type S3UploadRequest struct {
	ContentType string
	Source      io.Reader
	Destination string
}

type SearchRequest

type SearchRequest struct {
	TextSearch string `json:"text_search"`
	Start      int    `json:"start" binding:"required" example:"0"`
	Limit      int    `json:"limit" binding:"required" example:"5"`
	SortBy     string `json:"sort_by" `
	Sort       string `json:"sort" enums:"ASC,DESC"`
	SessionRequest
}

type SendEmailRequest

type SendEmailRequest struct {
	Destination string
	Subject     string
	Content     string
}

type SessionRequest

type SessionRequest struct {
	Id       int64  `swaggerignore:"true"`
	Username string `swaggerignore:"true"`
	Msisdn   string `swaggerignore:"true"`
	Email    string `swaggerignore:"true"`
	Role     string `swaggerignore:"true"`
	Fullname string `swaggerignore:"true"`
	ContextRequest
}

type SessionResponse

type SessionResponse struct {
	Token        string `json:"token,omitempty" example:"**secret**"`
	RefreshToken string `json:"refresh_token,omitempty" example:"**secret**"`
	AccessToken  string `json:"access_token,omitempty" example:"**secret**"`
	Expired      *int64 `json:"expired,omitempty" example:"11234823643"`
}

type TechnicalError

type TechnicalError struct {
	Exception string `json:"exception"`
	Occurred  int64  `json:"occurred_unixts"`
	Ticket    string `json:"ticket"`
}

type Tier

type Tier struct {
	Id                   int64          `json:"id" db:"id"`
	PartnerId            int64          `json:"partner_id" db:"partner_id"`
	Msisdn               sql.NullString `json:"msisdn" db:"msisdn"`
	Email                sql.NullString `json:"email" db:"email"`
	NextGrade            int            `json:"next_grade" db:"next_grade"`
	NextTier             sql.NullString `json:"next_tier" db:"next_tier"`
	CurrentGrade         int            `json:"current_grade" db:"current_grade"`
	CurrentTier          sql.NullString `json:"current_tier" db:"current_tier"`
	PrevGrade            int            `json:"prev_grade" db:"prev_grade"`
	PrevTier             sql.NullString `json:"prev_tier" db:"prev_tier"`
	ExpiredDate          sql.NullTime   `json:"expired_date" db:"expired_date"`
	TransactionRecurring int            `json:"transaction_recurring" db:"transaction_recurring"`
	Journey              TierJourney
	BaseEntity
}

type TierJourney

type TierJourney struct {
	Id                int64          `json:"id" db:"id"`
	CurrentGrade      int            `json:"current_grade" db:"current_grade"`
	CurrentTier       sql.NullString `json:"current_tier" db:"current_tier"`
	LastTransactionId int64          `json:"last_transaction_id" db:"last_transaction_id"`
	Notes             sql.NullString `json:"notes" db:"notes"`
	TierId            int64          `json:"tier_id" db:"tier_id"`
	BaseEntity
}

type TierRequest

type TierRequest struct {
	PartnerId     int64
	Msisdn        string
	Email         string
	TransactionId int64
}

type Transaction

type Transaction struct {
	Id             int64           `json:"id" db:"id"`
	Status         int             `json:"status" db:"status"`
	PartnerId      int64           `json:"partner_id" db:"partner_id"`
	Partner        sql.NullString  `json:"partner" db:"partner"`
	WalletCode     sql.NullString  `json:"wallet_code" db:"wallet_code"`
	Msisdn         sql.NullString  `json:"msisdn" db:"msisdn"`
	Email          sql.NullString  `json:"email" db:"email"`
	Qty            int             `json:"qty" db:"qty"`
	Amount         decimal.Decimal `json:"amount" db:"amount"`
	PartnerRefCode sql.NullString  `json:"partner_ref_code" db:"kezbek_ref_code"`
	KezbekRefCode  sql.NullString  `json:"kezbek_ref_code" db:"kezbek_ref_code"`
	BaseEntity
}

type TransactionRequest

type TransactionRequest struct {
	Qty                  int             `json:"quantity" example:"2" validate:"required"`
	Amount               decimal.Decimal `json:"amount" example:"750000" validate:"required"`
	Msisdn               string          `json:"msisdn" example:"62812345678" validate:"required"`
	Email                string          `json:"email" example:"john.doe@gmailxyz.com"`
	MerchantCode         string          `json:"merchant_code" example:"LSAJA,GPAID,JOSVO"`
	TransactionReference string          `json:"transaction_reference" example:"INV/001/002"`
	SessionRequest
}

type TransactionResponse

type TransactionResponse struct {
	TransactionTimestamp int64  `json:"transaction_timestamp" example:"11285736234"`
	TransactionId        string `json:"transaction_id" example:"TRX0012345678"`
}

type TransactionTierResponse

type TransactionTierResponse struct {
	Tier        string `json:"tier,omitempty" example:"GOLD"`
	Recurring   int    `json:"recurring,omitempty" example:"3"`
	DateExpired string `json:"date_expired,omitempty" example:"2022-01-01"`
}

type UpdatePartnerRequest

type UpdatePartnerRequest struct {
	Id      int64
	Partner string                `json:"partner" validate:"required"`
	Msisdn  string                `json:"msisdn" validate:"required"`
	Officer string                `json:"officer" validate:"required"`
	Address string                `json:"address" validate:"required"`
	SessionRequest
}

type UpdateUserRequest

type UpdateUserRequest struct {
	Id       int64  `json:"id" validate:"required"`
	Fullname string `json:"fullname" validate:"required"`
	Msisdn   string `json:"msisdn" validate:"required"`
	RoleId   int64  `json:"role_id" validate:"required"`
	SessionRequest
}

type User

type User struct {
	Id       int64          `json:"id" db:"id"`
	Fullname sql.NullString `json:"fullname" db:"fullname"`
	Msisdn   sql.NullString `json:"msisdn" db:"msisdn"`
	Email    sql.NullString `json:"email" db:"email"`
	SubId    sql.NullString `json:"sub_id" db:"sub_id"`
	Status   int            `json:"status" db:"status"`
	BaseEntity
}

type WfRewardTierGradeProjection

type WfRewardTierGradeProjection struct {
	Tier  *string `json:"tier,omitempty" db:"tier"`
	Grade *int    `json:"grade,omitempty" db:"grade"`
}

type WfRewardTierProjection

type WfRewardTierProjection struct {
	Recurring    int                         `json:"recurring,omitempty" db:"recurring"`
	MaxRecurring int                         `json:"max_recurring,omitempty" db:"max_recurring"`
	Tier         string                      `json:"tier,omitempty" db:"tier"`
	Grade        int                         `json:"grade,omitempty" db:"grade"`
	PrevTier     WfRewardTierGradeProjection `json:"prev_tier,omitempty" db:"prev_tier"`
	NextTier     WfRewardTierGradeProjection `json:"next_tier,omitempty" db:"next_tier"`
	Reward       decimal.Decimal             `json:"reward,omitempty" db:"reward"`
}

type XenitWalletTopupRequest

type XenitWalletTopupRequest struct {
	Wallet      string          `json:"wallet"`
	Beneficiary string          `json:"beneficiary"`
	Amount      decimal.Decimal `json:"amount"`
	RefCode     string          `json:"ref_code"`
}

type XenitWalletTopupResponse

type XenitWalletTopupResponse struct {
	TopupRef     string `json:"topup_ref"`
	TopupTime    string `json:"topup_time"`
	TopupStatus  string `json:"topup_status"`
	TopupMessage string `json:"topup_message"`
}

Jump to

Keyboard shortcuts

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