本文整理汇总了Golang中github.com/ticketmatic/tm-go/ticketmatic.Client类的典型用法代码示例。如果您正苦于以下问题:Golang Client类的具体用法?Golang Client怎么用?Golang Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Client类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Delete
// Remove an order fee definition
//
// Order fee definitions are archivable: this call won't actually delete the object
// from the database. Instead, it will mark the object as archived, which means it
// won't show up anymore in most places.
//
// Most object types are archivable and can't be deleted: this is needed to ensure
// consistency of historical data.
func Delete(client *ticketmatic.Client, id int64) error {
r := client.NewRequest("DELETE", "/{accountname}/settings/pricing/orderfeedefinitions/{id}")
r.UrlParameters(map[string]interface{}{
"id": id,
})
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例2: Delete
// Remove a contact
//
// Contacts are archivable: this call won't actually delete the object from the
// database. Instead, it will mark the contact as deleted, which means it won't
// show up anymore in most places.
//
// Most object types are archivable and can't be deleted: this is needed to ensure
// consistency of historical data.
func Delete(client *ticketmatic.Client, id int64) error {
r := client.NewRequest("DELETE", "/{accountname}/contacts/{id}")
r.UrlParameters(map[string]interface{}{
"id": id,
})
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例3: Delete
// Remove a phone number type
//
// Phone number types are archivable: this call won't actually delete the object
// from the database. Instead, it will mark the object as archived, which means it
// won't show up anymore in most places.
//
// Most object types are archivable and can't be deleted: this is needed to ensure
// consistency of historical data.
func Delete(client *ticketmatic.Client, id int64) error {
r := client.NewRequest("DELETE", "/{accountname}/settings/system/phonenumbertypes/{id}")
r.UrlParameters(map[string]interface{}{
"id": id,
})
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例4: Delete
// Remove a delivery scenario
//
// Delivery scenarios are archivable: this call won't actually delete the object
// from the database. Instead, it will mark the object as archived, which means it
// won't show up anymore in most places.
//
// Most object types are archivable and can't be deleted: this is needed to ensure
// consistency of historical data.
func Delete(client *ticketmatic.Client, id int64) error {
r := client.NewRequest("DELETE", "/{accountname}/settings/ticketsales/deliveryscenarios/{id}")
r.UrlParameters(map[string]interface{}{
"id": id,
})
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例5: Delete
// Remove a ticket layout
//
// Ticket layouts are archivable: this call won't actually delete the object from
// the database. Instead, it will mark the object as archived, which means it won't
// show up anymore in most places.
//
// Most object types are archivable and can't be deleted: this is needed to ensure
// consistency of historical data.
func Delete(client *ticketmatic.Client, id int64) error {
r := client.NewRequest("DELETE", "/{accountname}/settings/communicationanddesign/ticketlayouts/{id}")
r.UrlParameters(map[string]interface{}{
"id": id,
})
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例6: Unlocktickets
// Unlock a set of tickets for an event (only for events with seatingplans)
//
// Unlock a set of tickets for an event with a seating plan. The unlock call is
// limited to 100 tickets per call.
func Unlocktickets(client *ticketmatic.Client, id int64, data *ticketmatic.EventUnlockTickets) error {
r := client.NewRequest("PUT", "/{accountname}/events/{id}/tickets/unlock")
r.UrlParameters(map[string]interface{}{
"id": id,
})
r.Body(data)
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:13,代码来源:operations.go
示例7: Batchupdatetickets
// Batch update tickets for an event
//
// Update the contents of one or more custom fields for multiple tickets in one
// call. Batch update is limited to 5000 tickets per call.
//
// Warning: Do not change the barcode of a ticket that has been delivered: existing
// printed tickets will no longer work.
func Batchupdatetickets(client *ticketmatic.Client, id int64, data []*ticketmatic.EventTicket) error {
r := client.NewRequest("PUT", "/{accountname}/events/{id}/tickets/batch")
r.UrlParameters(map[string]interface{}{
"id": id,
})
r.Body(data)
return r.Run(nil)
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:16,代码来源:operations.go
示例8: Export
// Export a query on the public data model
//
// Executes a query against the public data model and exports the results as a
// stream of JSON lines (http://jsonlines.org/): each line contains a JSON object
// which holds one row of the query result.
func Export(client *ticketmatic.Client, data *ticketmatic.QueryRequest) (*QueryStream, error) {
r := client.NewRequest("POST", "/{accountname}/tools/queries/export")
r.Body(data)
stream, err := r.Stream()
if err != nil {
return nil, err
}
return &QueryStream{stream}, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:15,代码来源:operations.go
示例9: Time
// Get the backend time
//
// Returns the current system time, in UTC.
//
// The returned timestamp uses the ISO-8601 format.
//
// This call does not require an Authorization header to be set (it's the only call
// that allows this) and can be used to investigate timestamp issues when trying to
// sign API requests
// (https://www.ticketmatic.com/docs/api/coreconcepts/authentication).
func Time(client *ticketmatic.Client) (*ticketmatic.Timestamp, error) {
r := client.NewRequest("GET", "/{accountname}/diagnostics/time")
var obj *ticketmatic.Timestamp
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:20,代码来源:operations.go
示例10: Getlist
// Get the contact fields
//
// Gets the contact fields
func Getlist(client *ticketmatic.Client) (*List, error) {
r := client.NewRequest("GET", "/{accountname}/settings/system/contactfields")
var obj *List
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:13,代码来源:operations.go
示例11: Create
// Create a new product category
func Create(client *ticketmatic.Client, data *ticketmatic.ProductCategory) (*ticketmatic.ProductCategory, error) {
r := client.NewRequest("POST", "/{accountname}/settings/productcategories")
r.Body(data)
var obj *ticketmatic.ProductCategory
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例12: Create
// Create a new contact address type
func Create(client *ticketmatic.Client, data *ticketmatic.ContactAddressType) (*ticketmatic.ContactAddressType, error) {
r := client.NewRequest("POST", "/{accountname}/settings/system/contactaddresstypes")
r.Body(data)
var obj *ticketmatic.ContactAddressType
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例13: Create
// Create a new sales channel
func Create(client *ticketmatic.Client, data *ticketmatic.SalesChannel) (*ticketmatic.SalesChannel, error) {
r := client.NewRequest("POST", "/{accountname}/settings/ticketsales/saleschannels")
r.Body(data)
var obj *ticketmatic.SalesChannel
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例14: Reserve
// Reserve order IDs
//
// Importing orders with specified IDs is only possible when those IDs fall in the
// reserved ID range.
//
// Use this call to reserve a range of order IDs. Any ID lower than or equal to the
// specified ID will be reserved. New orders will receive IDs higher than the
// specified ID.
func Reserve(client *ticketmatic.Client, data *ticketmatic.OrderIdReservation) (*ticketmatic.OrderIdReservation, error) {
r := client.NewRequest("POST", "/{accountname}/orders/import/reserve")
r.Body(data)
var obj *ticketmatic.OrderIdReservation
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:19,代码来源:operations.go
示例15: Create
// Create a new order fee definition
func Create(client *ticketmatic.Client, data *ticketmatic.OrderFeeDefinition) (*ticketmatic.OrderFeeDefinition, error) {
r := client.NewRequest("POST", "/{accountname}/settings/pricing/orderfeedefinitions")
r.Body(data)
var obj *ticketmatic.OrderFeeDefinition
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例16: Create
// Create a new ticket layout
func Create(client *ticketmatic.Client, data *ticketmatic.TicketLayout) (*ticketmatic.TicketLayout, error) {
r := client.NewRequest("POST", "/{accountname}/settings/communicationanddesign/ticketlayouts")
r.Body(data)
var obj *ticketmatic.TicketLayout
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例17: Queries
// Execute a query on the public data model
//
// Use this method to execute random (read-only) queries on the public data model.
// Note that this is not meant for long-running queries or for returning large
// resultsets. If the query executes too long or uses too much memory, an exception
// will be returned.
func Queries(client *ticketmatic.Client, data *ticketmatic.QueryRequest) (*ticketmatic.QueryResult, error) {
r := client.NewRequest("POST", "/{accountname}/tools/queries")
r.Body(data)
var obj *ticketmatic.QueryResult
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:17,代码来源:operations.go
示例18: Create
// Create a new contact
//
// Creates a new contact
func Create(client *ticketmatic.Client, data *ticketmatic.Contact) (*ticketmatic.Contact, error) {
r := client.NewRequest("POST", "/{accountname}/contacts")
r.Body(data)
var obj *ticketmatic.Contact
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:14,代码来源:operations.go
示例19: Create
// Create a new event location
func Create(client *ticketmatic.Client, data *ticketmatic.EventLocation) (*ticketmatic.EventLocation, error) {
r := client.NewRequest("POST", "/{accountname}/settings/events/eventlocations")
r.Body(data)
var obj *ticketmatic.EventLocation
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:12,代码来源:operations.go
示例20: Import
// Import historic orders
//
// Up to 100 orders can be sent per call.
func Import(client *ticketmatic.Client, data []*ticketmatic.ImportOrder) ([]*ticketmatic.OrderImportStatus, error) {
r := client.NewRequest("POST", "/{accountname}/orders/import")
r.Body(data)
var obj []*ticketmatic.OrderImportStatus
err := r.Run(&obj)
if err != nil {
return nil, err
}
return obj, nil
}
开发者ID:ticketmatic,项目名称:tm-go,代码行数:14,代码来源:operations.go
注:本文中的github.com/ticketmatic/tm-go/ticketmatic.Client类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论