Exemple #1
0
// 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)
}
Exemple #2
0
// 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)
}
Exemple #3
0
// 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)
}
Exemple #4
0
// 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)
}
Exemple #5
0
// 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)
}
Exemple #6
0
// 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)
}
Exemple #7
0
// 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)
}
Exemple #8
0
// 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
}
Exemple #9
0
// 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
}
Exemple #10
0
// 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
}
Exemple #11
0
// 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
}
Exemple #12
0
// 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
}
Exemple #13
0
// Create a new seat rank
func Create(client *ticketmatic.Client, data *ticketmatic.SeatRank) (*ticketmatic.SeatRank, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/seatranks")
	r.Body(data)

	var obj *ticketmatic.SeatRank
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #14
0
// 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
}
Exemple #15
0
// Create a new custom field
func Create(client *ticketmatic.Client, data *ticketmatic.CustomField) (*ticketmatic.CustomField, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/system/customfields")
	r.Body(data)

	var obj *ticketmatic.CustomField
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #16
0
// 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
}
Exemple #17
0
// Create a new field definition
func Create(client *ticketmatic.Client, data *ticketmatic.FieldDefinition) (*ticketmatic.FieldDefinition, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/system/fielddefinitions")
	r.Body(data)

	var obj *ticketmatic.FieldDefinition
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #18
0
// 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
}
Exemple #19
0
// Create a new lock type
func Create(client *ticketmatic.Client, data *ticketmatic.LockType) (*ticketmatic.LockType, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/ticketsales/locktypes")
	r.Body(data)

	var obj *ticketmatic.LockType
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #20
0
// Create a new phone number type
func Create(client *ticketmatic.Client, data *ticketmatic.PhoneNumberType) (*ticketmatic.PhoneNumberType, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/system/phonenumbertypes")
	r.Body(data)

	var obj *ticketmatic.PhoneNumberType
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #21
0
// Create a new ticket fee
func Create(client *ticketmatic.Client, data *ticketmatic.TicketFee) (*ticketmatic.TicketFee, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/pricing/ticketfees")
	r.Body(data)

	var obj *ticketmatic.TicketFee
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #22
0
// 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
}
Exemple #23
0
// 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
}
Exemple #24
0
// Create a new report
func Create(client *ticketmatic.Client, data *ticketmatic.Report) (*ticketmatic.Report, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/system/reports")
	r.Body(data)

	var obj *ticketmatic.Report
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #25
0
// 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
}
Exemple #26
0
// 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
}
Exemple #27
0
// Create a new delivery scenario
func Create(client *ticketmatic.Client, data *ticketmatic.DeliveryScenario) (*ticketmatic.DeliveryScenario, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/ticketsales/deliveryscenarios")
	r.Body(data)

	var obj *ticketmatic.DeliveryScenario
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #28
0
// Create a new web sales skin
func Create(client *ticketmatic.Client, data *ticketmatic.WebSalesSkin) (*ticketmatic.WebSalesSkin, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/communicationanddesign/webskins")
	r.Body(data)

	var obj *ticketmatic.WebSalesSkin
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}
Exemple #29
0
// 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
}
Exemple #30
0
// Create a new order mail template
func Create(client *ticketmatic.Client, data *ticketmatic.OrderMailTemplate) (*ticketmatic.OrderMailTemplate, error) {
	r := client.NewRequest("POST", "/{accountname}/settings/communicationanddesign/ordermails")
	r.Body(data)

	var obj *ticketmatic.OrderMailTemplate
	err := r.Run(&obj)
	if err != nil {
		return nil, err
	}
	return obj, nil
}