entity

package
v0.0.0-...-d2439cc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MO_REG          = "REG"
	MO_UNREG        = "UNREG"
	MO_OFF          = "OFF"
	MO_CONFIRM      = "Y"
	VALID_PREFIX    = "628"
	SERVICE_QUIZPRO = "QUIZPRO"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AveragePerUser

type AveragePerUser struct {
	Name       string  `json:"name"`
	Service    string  `json:"service"`
	Adnet      string  `json:"adnet"`
	Subs       string  `json:"subs"`
	SubsActive string  `json:"subs_active"`
	Revenue    float64 `json:"revenue"`
}

type AveragePerUserResponse

type AveragePerUserResponse struct {
	Name       string `json:"name"`
	Service    string `json:"service"`
	Adnet      string `json:"adnet"`
	Subs       string `json:"subs"`
	SubsActive string `json:"subs_active"`
	Revenue    int    `json:"revenue"`
}

func (*AveragePerUserResponse) SetRevenue

func (e *AveragePerUserResponse) SetRevenue(revenue float64)

type Blacklist

type Blacklist struct {
	ID        int       `json:"id"`
	Msisdn    string    `json:"msisdn"`
	CreatedAt time.Time `json:"created_at"`
}

type Campaign

type Campaign struct {
	ID        int `json:"id"`
	ServiceID int `json:"service_id"`
	Service   *Service
	Adnet     string `json:"adnet"`
	LimitMo   int    `json:"limit_mo"`
	TotalMo   int    `json:"total_mo"`
}

type CampaignToolsRequest

type CampaignToolsRequest struct {
	Service   string `json:"srv" query:"srv"`
	Adnet     string `json:"adnet" query:"ad"`
	PubId     string `json:"pub_id" query:"pubid"`
	AffSub    string `json:"aff_sub" query:"aff_sub"`
	IpAddress string `json:"ip_address" query:"ip"`
}

func (*CampaignToolsRequest) GetAdnet

func (r *CampaignToolsRequest) GetAdnet() string

func (*CampaignToolsRequest) GetAffSub

func (r *CampaignToolsRequest) GetAffSub() string

func (*CampaignToolsRequest) GetIpAddress

func (r *CampaignToolsRequest) GetIpAddress() string

func (*CampaignToolsRequest) GetPubId

func (r *CampaignToolsRequest) GetPubId() string

func (*CampaignToolsRequest) GetService

func (r *CampaignToolsRequest) GetService() string

func (*CampaignToolsRequest) GetSubKeyword

func (r *CampaignToolsRequest) GetSubKeyword() string

func (*CampaignToolsRequest) IsBillable

func (r *CampaignToolsRequest) IsBillable() bool

type CampaignToolsResponse

type CampaignToolsResponse struct {
	StatusCode int    `json:"status_code" xml:"status_code"`
	Token      string `json:"token" xml:"token"`
	UrlPromo   string `json:"url_promo" xml:"url_promo"`
}

type Content

type Content struct {
	ID        int `json:"id"`
	ServiceID int `json:"service_id"`
	Service   *Service
	Name      string `json:"name"`
	Value     string `json:"value"`
	Tid       string `json:"tid"`
}

func (*Content) GetName

func (c *Content) GetName() string

func (*Content) GetTid

func (c *Content) GetTid() string

func (*Content) GetValue

func (c *Content) GetValue() string

func (*Content) SetPIN

func (c *Content) SetPIN(pin int)

type ErrorResponse

type ErrorResponse struct {
	FailedField string `json:"failed_field" xml:"failed_field"`
	Tag         string `json:"tag" xml:"tag"`
	Value       string `json:"value" xml:"value"`
}

type History

type History struct {
	ID        int64 `json:"id"`
	ServiceID int   `json:"service_id"`
	Service   *Service
	Msisdn    string    `json:"msisdn"`
	Channel   string    `json:"channel"`
	Adnet     string    `json:"adnet"`
	Keyword   string    `json:"keyword"`
	Subject   string    `json:"subject"`
	Status    string    `json:"status"`
	IpAddress string    `json:"ip_address"`
	CreatedAt time.Time `json:"created_at"`
}

type Logger

type Logger struct {
	Type     string    `bson:"type"`
	Msisdn   string    `bson:"msisdn,omitempty"`
	Keyword  string    `bsoh:"keyword"`
	Date     time.Time `bson:"date,omitempty"`
	Request  string    `bson:"request,omitempty"`
	Response string    `bson:"response,omitempty"`
	Message  string    `bson:"message,omitempty"`
}

type ReqArpuParams

type ReqArpuParams struct {
	Start   string `json:"from" query:"from"`
	End     string `json:"to" query:"to"`
	ToRenew string `json:"to_renew" query:"renew"`
	Service string `json:"service" query:"service"`
}

func (*ReqArpuParams) GetEnd

func (e *ReqArpuParams) GetEnd() string

func (*ReqArpuParams) GetService

func (e *ReqArpuParams) GetService() string

func (*ReqArpuParams) GetStart

func (e *ReqArpuParams) GetStart() string

func (*ReqArpuParams) GetToRenew

func (e *ReqArpuParams) GetToRenew() string

type ReqDRParams

type ReqDRParams struct {
	SMS       string `validate:"required" query:"sms" json:"sms"`
	CpId      string `query:"cpid" json:"cpid"`
	Pwd       string `query:"pwd" json:"pwd"`
	Msisdn    string `validate:"required" query:"msisdn" json:"msisdn"`
	TrxId     string `validate:"required" query:"trx_id" json:"trx_id"`
	Sid       string `query:"sid" json:"sid"`
	Sender    string `query:"sender" json:"sender"`
	Tid       string `query:"tid" json:"tid"`
	IpAddress string `query:"ip_address" json:"ip_address"`
}

func NewReqDRParams

func NewReqDRParams(sms, TrxId, msisdn string) *ReqDRParams

func (*ReqDRParams) GetMsisdn

func (s *ReqDRParams) GetMsisdn() string

func (*ReqDRParams) GetTrxId

func (s *ReqDRParams) GetTrxId() string

type ReqMOBody

type ReqMOBody struct {
	MessageID struct {
		Sms struct {
			Retry struct {
				Count       string `json:"count" xml:"count"`
				Max         string `json:"max" xml:"max"`
				Destination struct {
					Address struct {
						Unknown struct {
							Cnpi string `json:"cnpi" xml:"cnpi"`
						} `json:"unknown" xml:"unknown"`
					} `json:"address" xml:"address"`
				} `json:"destination" xml:"destination"`
				Source struct {
					Address struct {
						Number struct {
							Type string `json:"type" xml:"type"`
						} `json:"number" xml:"number"`
					} `json:"address" xml:"address"`
				} `json:"source" xml:"source"`
				Ud struct {
					Type string `json:"type" xml:"type"`
				} `json:"ud" xml:"ud"`
				Param struct {
					Name  string `json:"name" xml:"name"`
					Value string `json:"value" xml:"value"`
				} `json:"param" xml:"param"`
			} `json:"retry"`
		} `json:"sms" xml:"sms"`
	} `json:"message" xml:"message"`
}

type ReqMOParams

type ReqMOParams struct {
	SMS       string `validate:"required" query:"sms" json:"sms"`
	Adn       string `query:"adn" json:"adn"`
	Msisdn    string `validate:"required" query:"msisdn" json:"msisdn"`
	Channel   string `query:"channel" json:"channel"`
	TrxId     string `query:"trx_id" json:"trx_id"`
	Number    string `query:"http_segment_number" json:"http_segment_number"`
	Count     string `query:"http_segment_count" json:"http_segment_count"`
	IpAddress string `query:"ip_address" json:"ip_address"`
}

func NewReqMOParams

func NewReqMOParams(sms, adn, msisdn, channel string) *ReqMOParams

func (*ReqMOParams) GetAdn

func (s *ReqMOParams) GetAdn() string

func (*ReqMOParams) GetAdnet

func (s *ReqMOParams) GetAdnet() string

func (*ReqMOParams) GetChannel

func (s *ReqMOParams) GetChannel() string

func (*ReqMOParams) GetIpAddress

func (s *ReqMOParams) GetIpAddress() string

func (*ReqMOParams) GetKeyword

func (s *ReqMOParams) GetKeyword() string

func (*ReqMOParams) GetMsisdn

func (s *ReqMOParams) GetMsisdn() string

func (*ReqMOParams) GetSMS

func (s *ReqMOParams) GetSMS() string

func (*ReqMOParams) GetSubKeyword

func (s *ReqMOParams) GetSubKeyword() string

func (*ReqMOParams) IsConfirm

func (s *ReqMOParams) IsConfirm() bool

func (*ReqMOParams) IsInValidPrefix

func (s *ReqMOParams) IsInValidPrefix() bool

func (*ReqMOParams) IsREG

func (s *ReqMOParams) IsREG() bool

func (*ReqMOParams) IsUNREG

func (s *ReqMOParams) IsUNREG() bool

func (*ReqMOParams) SetSMS

func (s *ReqMOParams) SetSMS(sms string)

type ReqMTBody

type ReqMTBody struct {
	Message struct {
		Sms struct {
			Type        string `xml:"type,attr"`
			Destination struct {
				Address struct {
					Number string `xml:"number"`
				} `xml:"address"`
			} `xml:"destination"`
			Source struct {
				Address struct {
					Number string `xml:"number"`
				} `xml:"address"`
			} `xml:"source"`
			Ud    string           `xml:"ud"`
			Param []ReqMTBodyParam `xml:"param"`
		} `xml:"sms"`
	} `xml:"message"`
}

type ReqMTBodyParam

type ReqMTBodyParam struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type ReqMTParams

type ReqMTParams struct {
	SMS    string `url:"sms,omitempty" query:"sms"`
	CpId   string `url:"cpid,omitempty" query:"cpid"`
	Pwd    string `url:"pwd,omitempty" query:"pwd"`
	Msisdn string `url:"msisdn,omitempty" query:"msisdn"`
	TrxId  string `url:"trx_id,omitempty" query:"trx_id"`
	Sid    string `url:"sid,omitempty" query:"sid"`
	Sender string `url:"sender,omitempty" query:"sender"`
	Tid    string `url:"tid,omitempty" query:"tid"`
}

type ReqOptInParam

type ReqOptInParam struct {
	Service        string `json:"service" query:"service"`
	Adnet          string `json:"adnet" query:"ad"`
	PubId          string `json:"pub_id" query:"pubid"`
	AffSub         string `json:"aff_sub" query:"aff_sub"`
	CampKeyword    string `json:"keyword" query:"keyword"`
	CampSubKeyword string `json:"subkey" query:"subkey"`
	IpAddress      string `json:"ip_address" query:"ip_address"`
}

func (*ReqOptInParam) GetAdnet

func (r *ReqOptInParam) GetAdnet() string

func (*ReqOptInParam) GetAffSub

func (r *ReqOptInParam) GetAffSub() string

func (*ReqOptInParam) GetCampKeyword

func (r *ReqOptInParam) GetCampKeyword() string

func (*ReqOptInParam) GetCampSubKeyword

func (r *ReqOptInParam) GetCampSubKeyword() string

func (*ReqOptInParam) GetIpAddress

func (r *ReqOptInParam) GetIpAddress() string

func (*ReqOptInParam) GetPubId

func (r *ReqOptInParam) GetPubId() string

func (*ReqOptInParam) SetIpAddress

func (r *ReqOptInParam) SetIpAddress(ip string)

type ResponseDR

type ResponseDR struct {
	StatusCode int    `json:"status_code" xml:"status_code"`
	Message    string `json:"message" xml:"message"`
}

type ResponseMO

type ResponseMO struct {
	StatusCode int    `json:"status_code" xml:"status_code"`
	Message    string `json:"message" xml:"message"`
}

type Schedule

type Schedule struct {
	ID         int       `json:"id"`
	Name       string    `json:"name"`
	PublishAt  time.Time `json:"publish_at"`
	UnlockedAt time.Time `json:"unlocked_at"`
	IsUnlocked bool      `json:"is_unlocked"`
}

type Service

type Service struct {
	ID                  int     `json:"id"`
	Category            string  `json:"category"`
	Code                string  `json:"code"`
	Name                string  `json:"name"`
	Package             string  `json:"package"`
	Price               float64 `json:"price"`
	ProgramId           string  `json:"program_id"`
	Sid                 string  `json:"sid"`
	RenewalDay          int     `json:"renewal_day"`
	TrialDay            int     `json:"trial_day"`
	UrlTelco            string  `json:"url_telco"`
	UrlPortal           string  `json:"url_portal"`
	UrlCallback         string  `json:"url_callback"`
	UrlNotifSub         string  `json:"url_notif_sub"`
	UrlNotifUnsub       string  `json:"url_notif_unsub"`
	UrlNotifRenewal     string  `json:"url_notif_renewal"`
	UrlPostback         string  `json:"url_postback"`
	UrlPostbackBillable string  `json:"url_postback_billable"`
}

func (*Service) GetCategory

func (s *Service) GetCategory() string

func (*Service) GetCode

func (s *Service) GetCode() string

func (*Service) GetID

func (s *Service) GetID() int

func (*Service) GetName

func (s *Service) GetName() string

func (*Service) GetPackage

func (s *Service) GetPackage() string

func (*Service) GetPrice

func (s *Service) GetPrice() float64

func (*Service) GetProgramId

func (s *Service) GetProgramId() string

func (*Service) GetRenewalDay

func (s *Service) GetRenewalDay() int

func (*Service) GetSid

func (s *Service) GetSid() string

func (*Service) GetTrialDay

func (s *Service) GetTrialDay() int

func (*Service) GetUrlCallback

func (s *Service) GetUrlCallback() string

func (*Service) GetUrlNotifRenewal

func (s *Service) GetUrlNotifRenewal() string

func (*Service) GetUrlNotifSub

func (s *Service) GetUrlNotifSub() string

func (*Service) GetUrlNotifUnsub

func (s *Service) GetUrlNotifUnsub() string

func (*Service) GetUrlPortal

func (s *Service) GetUrlPortal() string

func (*Service) GetUrlPostback

func (s *Service) GetUrlPostback() string

func (*Service) GetUrlPostbackBillable

func (s *Service) GetUrlPostbackBillable() string

func (*Service) GetUrlTelco

func (s *Service) GetUrlTelco() string

type Subscription

type Subscription struct {
	ID                   int64     `json:"id,omitempty"`
	ServiceID            int       `json:"service_id,omitempty"`
	Service              *Service  `json:"service,omitempty"`
	Category             string    `json:"category,omitempty"`
	Msisdn               string    `json:"msisdn,omitempty"`
	Channel              string    `json:"channel,omitempty"`
	CampKeyword          string    `json:"camp_keyword,omitempty"`
	CampSubKeyword       string    `json:"camp_sub_keyword,omitempty"`
	Adnet                string    `json:"adnet,omitempty"`
	PubID                string    `json:"pub_id,omitempty"`
	AffSub               string    `json:"aff_sub,omitempty"`
	LatestTrxId          string    `json:"trx_id,omitempty"`
	LatestKeyword        string    `json:"latest_keyword,omitempty"`
	LatestSubject        string    `json:"latest_subject,omitempty"`
	LatestStatus         string    `json:"latest_status,omitempty"`
	LatestPIN            int       `json:"latest_pin,omitempty"`
	Amount               float64   `json:"amount,omitempty"`
	TrialAt              time.Time `json:"trial_at,omitempty"`
	RenewalAt            time.Time `json:"renewal_at,omitempty"`
	UnsubAt              time.Time `json:"unsub_at,omitempty"`
	ChargeAt             time.Time `json:"charge_at,omitempty"`
	RetryAt              time.Time `json:"retry_at,omitempty"`
	Success              uint      `json:"success,omitempty"`
	IpAddress            string    `json:"ip_address,omitempty"`
	TotalFirstpush       uint      `json:"total_firstpush,omitempty"`
	TotalRenewal         uint      `json:"total_renewal,omitempty"`
	TotalAmountFirstpush float64   `json:"total_amount_firstpush,omitempty"`
	TotalAmountRenewal   float64   `json:"total_amount_renewal,omitempty"`
	ChargingCount        uint      `json:"charging_count,omitempty"`
	ChargingCountAll     uint      `json:"charging_count_all,omitempty"`
	IsTrial              bool      `json:"is_trial,omitempty"`
	IsRetry              bool      `json:"is_retry,omitempty"`
	IsConfirm            bool      `json:"is_confirm,omitempty"`
	IsActive             bool      `json:"is_active,omitempty"`
	CreatedAt            time.Time `json:"created_at"`
	UpdatedAt            time.Time `json:"updated_at"`
}

func (*Subscription) GetAdnet

func (s *Subscription) GetAdnet() string

func (*Subscription) GetAffSub

func (s *Subscription) GetAffSub() string

func (*Subscription) GetCampKeyword

func (s *Subscription) GetCampKeyword() string

func (*Subscription) GetCampSubKeyword

func (s *Subscription) GetCampSubKeyword() string

func (*Subscription) GetCategory

func (s *Subscription) GetCategory() string

func (*Subscription) GetChannel

func (s *Subscription) GetChannel() string

func (*Subscription) GetChargingCount

func (s *Subscription) GetChargingCount() uint

func (*Subscription) GetChargingcountAll

func (s *Subscription) GetChargingcountAll() uint

func (*Subscription) GetIpAddress

func (s *Subscription) GetIpAddress() string

func (*Subscription) GetLatestKeyword

func (s *Subscription) GetLatestKeyword() string

func (*Subscription) GetLatestPIN

func (s *Subscription) GetLatestPIN() int

func (*Subscription) GetLatestStatus

func (s *Subscription) GetLatestStatus() string

func (*Subscription) GetLatestSubject

func (s *Subscription) GetLatestSubject() string

func (*Subscription) GetLatestTrxId

func (s *Subscription) GetLatestTrxId() string

func (*Subscription) GetMsisdn

func (s *Subscription) GetMsisdn() string

func (*Subscription) GetPubId

func (s *Subscription) GetPubId() string

func (*Subscription) GetServiceId

func (s *Subscription) GetServiceId() int

func (*Subscription) IsCreatedAtToday

func (s *Subscription) IsCreatedAtToday() bool

func (*Subscription) IsLatestPIN

func (s *Subscription) IsLatestPIN() bool

func (*Subscription) SetAdnet

func (s *Subscription) SetAdnet(adnet string)

func (*Subscription) SetAffSub

func (s *Subscription) SetAffSub(affsub string)

func (*Subscription) SetChannel

func (s *Subscription) SetChannel(channel string)

func (*Subscription) SetChargeAt

func (s *Subscription) SetChargeAt(chargeAt time.Time)

func (*Subscription) SetIsActive

func (s *Subscription) SetIsActive(active bool)

func (*Subscription) SetIsConfirm

func (s *Subscription) SetIsConfirm(confirm bool)

func (*Subscription) SetIsRetry

func (s *Subscription) SetIsRetry(retry bool)

func (*Subscription) SetIsTrial

func (s *Subscription) SetIsTrial(trial bool)

func (*Subscription) SetLatestStatus

func (s *Subscription) SetLatestStatus(latestStatus string)

func (*Subscription) SetLatestSubject

func (s *Subscription) SetLatestSubject(latestSubject string)

func (*Subscription) SetPubID

func (s *Subscription) SetPubID(pubId string)

func (*Subscription) SetRenewalAt

func (s *Subscription) SetRenewalAt(renewalAt time.Time)

func (*Subscription) SetRetryAt

func (s *Subscription) SetRetryAt(retryAt time.Time)

func (*Subscription) SetUnsubAt

func (s *Subscription) SetUnsubAt(unsubAt time.Time)

type Transaction

type Transaction struct {
	ID             int64     `json:"id"`
	TxID           string    `json:"tx_id,omitempty"`
	ServiceID      int       `json:"service_id,omitempty"`
	Service        *Service  `json:"service,omitempty"`
	Msisdn         string    `json:"msisdn,omitempty"`
	Channel        string    `json:"channel,omitempty"`
	CampKeyword    string    `json:"camp_keyword,omitempty"`
	CampSubKeyword string    `json:"camp_sub_keyword,omitempty"`
	Adnet          string    `json:"adnet,omitempty"`
	PubID          string    `json:"pub_id,omitempty"`
	AffSub         string    `json:"aff_sub,omitempty"`
	Keyword        string    `json:"keyword,omitempty"`
	PIN            int       `json:"pin,omitempty"`
	Amount         float64   `json:"amount,omitempty"`
	Status         string    `json:"status,omitempty"`
	StatusCode     string    `json:"status_code,omitempty"`
	StatusDetail   string    `json:"status_detail,omitempty"`
	Subject        string    `json:"subject,omitempty"`
	IpAddress      string    `json:"ip_address,omitempty"`
	Payload        string    `json:"payload,omitempty"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
}

func (*Transaction) GetAmount

func (t *Transaction) GetAmount() int

func (*Transaction) SetAmount

func (t *Transaction) SetAmount(amount float64)

func (*Transaction) SetStatus

func (t *Transaction) SetStatus(status string)

func (*Transaction) SetStatusCode

func (t *Transaction) SetStatusCode(statusCode string)

func (*Transaction) SetStatusDetail

func (t *Transaction) SetStatusDetail(statusDetail string)

func (*Transaction) SetSubject

func (t *Transaction) SetSubject(subject string)

type Verify

type Verify struct {
	ID             int64  `json:"id"`
	Token          string `json:"token,omitempty"`
	Adnet          string `json:"adnet,omitempty"`
	PubID          string `json:"pub_id,omitempty"`
	AffSub         string `json:"aff_sub,omitempty"`
	CampKeyword    string `json:"camp_keyword,omitempty"`
	CampSubKeyword string `json:"camp_sub_keyword,omitempty"`
	IpAddress      string `json:"ip_address,omitempty"`
	IsBillable     bool   `json:"is_billable,omitempty"`
	IsCampTool     bool   `json:"is_camptool,omitempty"`
}

func (*Verify) GetAdnet

func (v *Verify) GetAdnet() string

func (*Verify) GetAffSub

func (v *Verify) GetAffSub() string

func (*Verify) GetCampKeyword

func (v *Verify) GetCampKeyword() string

func (*Verify) GetCampSubKeyword

func (v *Verify) GetCampSubKeyword() string

func (*Verify) GetIpAddress

func (v *Verify) GetIpAddress() string

func (*Verify) GetIsBillable

func (v *Verify) GetIsBillable() bool

func (*Verify) GetIsCampTool

func (v *Verify) GetIsCampTool() bool

func (*Verify) GetPubId

func (v *Verify) GetPubId() string

func (*Verify) GetToken

func (v *Verify) GetToken() string

func (*Verify) IsCampKeyword

func (v *Verify) IsCampKeyword() bool

func (*Verify) SetCampKeyword

func (v *Verify) SetCampKeyword(keyword string)

func (*Verify) SetCampSubKeyword

func (v *Verify) SetCampSubKeyword(subkey string)

Jump to

Keyboard shortcuts

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