Documentation
¶
Index ¶
- Variables
- type Account
- type BanData
- type BanInput
- type BanUser
- type Bans
- type Checkout
- type CommunityGoal
- type Coupon
- type CouponData
- type CouponEffective
- type CouponExpire
- type CouponPagination
- type Coupons
- type CreateCouponObject
- type Currency
- type GiftCard
- type GiftCardBalance
- type GiftCards
- type Listing
- type ListingCategory
- type ListingPackage
- type ListingPackageSale
- type Package
- type PackageCategory
- type PackageServer
- type Payment
- type PaymentGateway
- type PaymentPackage
- type PaymentPackageFieldOption
- type PaymentPackageFields
- type PaymentPlayer
- type Player
- type PlayerData
- type PlayerPayment
- type PurchaseTotals
- type PutCheckoutObject
- type PutGiftCardObject
- type Sale
- type SaleDiscount
- type SaleEffective
- type Sales
- type Server
- type ServerInformation
- type Session
- func (s *Session) CreateBan(input *BanInput) (*Bans, error)
- func (s *Session) CreateCheckoutUrl(checkoutObject *PutCheckoutObject) (*Checkout, error)
- func (s *Session) CreateCoupon(createObject *CreateCouponObject) (*CouponData, error)
- func (s *Session) CreateGiftCard(cardObject *PutGiftCardObject) (*GiftCard, error)
- func (s *Session) DeleteCoupon(couponId string) error
- func (s *Session) DisableGiftCard(giftCardId string) (*GiftCard, error)
- func (s *Session) GetAllBans() (*Bans, error)
- func (s *Session) GetAllCommunityGoals() (*[]CommunityGoal, error)
- func (s *Session) GetAllCoupons() (*Coupons, error)
- func (s *Session) GetAllGiftCards() (*GiftCards, error)
- func (s *Session) GetAllPackages() ([]Package, error)
- func (s *Session) GetAllPayments() (*[]Payment, error)
- func (s *Session) GetAllSales() (*Sales, error)
- func (s *Session) GetCoupon(couponId string) (*Coupon, error)
- func (s *Session) GetGiftCard(cardId string) (*GiftCard, error)
- func (s *Session) GetListing() (*Listing, error)
- func (s *Session) GetPackage(packageId string) (Package, error)
- func (s *Session) GetRequiredPaymentFields(packageId string) (*[]PaymentPackageFields, error)
- func (s *Session) GetServerInfo() (*ServerInformation, error)
- func (s *Session) PlayerLookup(user string) (*PlayerData, error)
- func (s *Session) RetrieveCommunityGoal(communityGoal int) (*CommunityGoal, error)
- func (s *Session) RetrievePayment(transactionId string) (*Payment, error)
- func (s *Session) TopUpGiftCard(giftCardId string) (*GiftCard, error)
- func (s *Session) UpdatePackage(packageId string, updateObject *UpdatePackageObject) error
- func (s *Session) UpdatePayment(transactionId string, object *UpdatePaymentObject) error
- type UpdatePackageObject
- type UpdatePaymentObject
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TebexEndpoint = "https://plugin.tebex.io" InformationEndpoint = TebexEndpoint + "/information" AllPackagesEndpoint = TebexEndpoint + "/packages" RetrievePackageEndpoint = TebexEndpoint + "/package/" ListingEndpoint = TebexEndpoint + "/listing" BansEndpoint = TebexEndpoint + "/bans" CheckoutEndpoint = TebexEndpoint + "/checkout" AllSalesEndpoint = TebexEndpoint + "/sales" GiftCardsEndpoint = TebexEndpoint + "/gift-cards" PlayerLookupEndpoint = TebexEndpoint + "/user" PaymentsEndpoint = TebexEndpoint + "/payments" CommunityEndpoint = TebexEndpoint + "/community_goals" CouponsEndpoint = TebexEndpoint + "/coupons" )
Functions ¶
This section is empty.
Types ¶
type CommunityGoal ¶ added in v1.0.1
type CommunityGoal struct { Id int `json:"id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Account int `json:"account"` Name string `json:"name"` Description string `json:"description"` Image string `json:"image"` Target string `json:"target"` Current string `json:"current"` Repeatable int `json:"repeatable"` LastAchieved int `json:"last_achieved"` TimesAchieved int `json:"times_achieved"` Satus string `json:"status"` Sale int `json:"sale"` }
type Coupon ¶ added in v1.0.1
type Coupon struct {
Data CouponData `json:"data"`
}
type CouponData ¶ added in v1.0.1
type CouponData struct { Id int `json:"id"` Code string `json:"code"` Effective CouponEffective `json:"effective"` Expire CouponExpire `json:"expire"` BasketType string `json:"basket_type"` StartDate string `json:"start_date"` UserLimit string `json:"user_limit"` Minimum int `json:"minimum"` Username string `json:"username"` Note string `json:"note"` }
type CouponEffective ¶ added in v1.0.1
type CouponExpire ¶ added in v1.0.1
type CouponPagination ¶ added in v1.0.1
type Coupons ¶ added in v1.0.1
type Coupons struct { Pagination CouponPagination `json:"pagination"` Data CouponData `json:"data"` }
type CreateCouponObject ¶ added in v1.0.1
type CreateCouponObject struct { Code string `json:"code"` EffectiveOn string `json:'effective_on"` Packages []int `json:"packages"` Categories []int `json:"categories"` DiscountType string `json:"discount_type"` DiscountAmount int `json:"discount_amount"` DiscountPrecentage int `json:"discount_precentage"` ReedemUnlimited bool `json:"reedem_unlimited"` ExpireNever bool `json:"expire_never"` ExpireLimit int `json:"expire_limit"` ExpireDate string `json:"expire_date"` StartDate string `json:"start_date"` BasketType string `json:"basket_type"` Minium int `json:"minimum"` DiscountApplicationMethod int `json:"discount_application_method"` Username string `json:"username"` Note string `json:"note"` }
type GiftCard ¶ added in v1.0.1
type GiftCard struct { Id int `json:"id"` Code string `json:"code"` Balance GiftCardBalance `json:"balance"` Note string `json:"note"` Void bool `json:"void"` }
type GiftCardBalance ¶ added in v1.0.1
type Listing ¶ added in v0.1.2
type Listing struct {
Categories []ListingCategory `json:"categories"`
}
type ListingCategory ¶ added in v0.1.2
type ListingCategory struct { Id int `json:"id"` Order int `json:"order"` Name string `json:"name"` OnlySubcategories bool `json:"only_subcategories"` Subcategories []interface{} `json:"subcategories"` Packages ListingPackage `json:"packages"` }
type ListingPackage ¶ added in v0.1.2
type ListingPackage struct { Id int `json:"id"` Order int `json:"order"` Name string `json:"name"` Price string `json:"price"` Sale ListingPackageSale `json:"sale"` }
type ListingPackageSale ¶ added in v0.1.2
type Package ¶ added in v0.1.2
type Package struct { Id int `json:"id"` Name string `json:"name"` Image interface{} `json:"image"` Price float32 `json:"price"` ExpiryLength int `json:"expiry_length"` ExpiryPeriod string `json:"expiry_period"` Type string `json:"type"` Category PackageCategory `json:"category"` GlobalLimit int `json:"global_limit"` GlobalLimitPeriod string `json:"global_limit_period"` UserLimit int `json:"user_limit"` Servers []PackageServer `json:"servers"` RequiredPackages []interface{} `json:"required_packages"` RequireAny bool `json:"require_any"` CreateGiftcard bool `json:"create_giftcard"` ShowUntil bool `json:"show_until"` GuiItem string `json:"gui_item"` Disabled bool `json:"disabled"` DisableQuantity bool `json:"disable_quantity"` CustomPrice bool `json:"custom_price"` ChooseServer bool `json:"choose_server"` LimitExpires bool `json:"limit_expires"` InheritCommands bool `json:"inherit_commands"` VariableGiftcard bool `json:"variable_giftcard"` }
type PackageCategory ¶ added in v0.1.2
type PackageServer ¶ added in v0.1.2
type Payment ¶ added in v1.0.1
type Payment struct { Id int `json:"id"` Amount string `json:"amount"` Date string `json:"date"` Currency Currency `json:"currency"` PaymentGateway PaymentGateway `json:"gateway"` Status string `json:"status"` Email string `json:"email"` Player PaymentPlayer `json:"player"` Packages []PaymentPackage `json:"packages"` }
type PaymentGateway ¶ added in v1.0.1
type PaymentPackage ¶ added in v1.0.1
type PaymentPackageFieldOption ¶ added in v1.0.1
type PaymentPackageFields ¶ added in v1.0.1
type PaymentPackageFields struct { Name string `json:"name"` Value string `json:"value"` Type string `json:"type"` Options []PaymentPackageFieldOption `json:"options"` }
type PaymentPlayer ¶ added in v1.0.1
type PlayerData ¶ added in v1.0.1
type PlayerData struct { Player Player `json:"player"` BanCount int `json:"banCount"` ChargebackRate int `json:"chargebackRate"` Payments []PlayerPayment `json:"payments"` PurchaseTotals PurchaseTotals `json:"purchaseTotals"` }
type PlayerPayment ¶ added in v1.0.1
type PurchaseTotals ¶ added in v1.0.1
type PutCheckoutObject ¶ added in v0.1.7
type PutGiftCardObject ¶ added in v1.0.1
type Sale ¶ added in v1.0.1
type Sale struct { Id int `json:"id"` Effective SaleEffective `json:"effective"` Discount SaleDiscount `json:"discount"` Start int `json:"start"` Expire int `json:"expire"` Order int `json:"order"` }
type SaleDiscount ¶ added in v1.0.1
type SaleEffective ¶ added in v1.0.1
type ServerInformation ¶
type Session ¶
type Session struct {
Secret string
}
func (*Session) CreateCheckoutUrl ¶ added in v0.1.7
func (s *Session) CreateCheckoutUrl(checkoutObject *PutCheckoutObject) (*Checkout, error)
func (*Session) CreateCoupon ¶ added in v1.0.1
func (s *Session) CreateCoupon(createObject *CreateCouponObject) (*CouponData, error)
func (*Session) CreateGiftCard ¶ added in v1.0.1
func (s *Session) CreateGiftCard(cardObject *PutGiftCardObject) (*GiftCard, error)
func (*Session) DeleteCoupon ¶ added in v1.0.1
func (*Session) DisableGiftCard ¶ added in v1.0.1
func (*Session) GetAllBans ¶ added in v0.1.6
func (*Session) GetAllCommunityGoals ¶ added in v1.0.1
func (s *Session) GetAllCommunityGoals() (*[]CommunityGoal, error)
func (*Session) GetAllCoupons ¶ added in v1.0.1
func (*Session) GetAllGiftCards ¶ added in v1.0.1
func (*Session) GetAllPackages ¶
func (*Session) GetAllPayments ¶ added in v1.0.1
Retrive the latest payments (up to a maximum of 100) made on your webstore.
func (*Session) GetAllSales ¶ added in v1.0.1
func (*Session) GetGiftCard ¶ added in v1.0.1
func (*Session) GetListing ¶ added in v0.1.6
func (*Session) GetPackage ¶ added in v0.1.2
func (*Session) GetRequiredPaymentFields ¶ added in v1.0.1
func (s *Session) GetRequiredPaymentFields(packageId string) (*[]PaymentPackageFields, error)
Returns an array of fields (custom variables, etc) required to be entered for a manual payment to be created for a package.
func (*Session) GetServerInfo ¶ added in v0.1.5
func (s *Session) GetServerInfo() (*ServerInformation, error)
func (*Session) PlayerLookup ¶ added in v1.0.1
func (s *Session) PlayerLookup(user string) (*PlayerData, error)
func (*Session) RetrieveCommunityGoal ¶ added in v1.0.1
func (s *Session) RetrieveCommunityGoal(communityGoal int) (*CommunityGoal, error)
func (*Session) RetrievePayment ¶ added in v1.0.1
Retrive a payment made on your webstore by transaction ID.
func (*Session) TopUpGiftCard ¶ added in v1.0.1
func (*Session) UpdatePackage ¶ added in v0.1.7
func (s *Session) UpdatePackage(packageId string, updateObject *UpdatePackageObject) error
func (*Session) UpdatePayment ¶ added in v1.0.1
func (s *Session) UpdatePayment(transactionId string, object *UpdatePaymentObject) error
type UpdatePackageObject ¶ added in v0.1.2
type UpdatePaymentObject ¶ added in v1.0.1
Source Files
¶
Click to show internal directories.
Click to hide internal directories.