Skip to content

Latest commit

 

History

History
808 lines (518 loc) · 18.1 KB

File metadata and controls

808 lines (518 loc) · 18.1 KB

\ExtrasAPI

All URIs are relative to https://tours.api.rezkit.app

Method HTTP request Description
CreateExtra Post /extras Create Extra
CreateExtraPrice Post /extras/{id}/prices Create Extra Price
DeleteExtra Delete /extras/{id} Delete Extra
DeleteExtraPrice Delete /extras/{id}/prices/{price_id} Delete Extra Price
GetExtra Get /extras/{id} Get Extra
GetExtraPrice Get /extras/{id}/prices/{price_id} Get Extra Price
ListExtraPrices Get /extras/{id}/prices List Extra Prices
ListExtras Get /extras List Extras
RestoreExtra Put /extras/{id}/restore Restore Extra
RestoreExtraPrice Put /extras/{id}/prices/{price_id}/restore Restore Extra Price
UpdateExtra Patch /extras/{id} Update Extra
UpdateExtraPrice Patch /extras/{id}/prices/{price_id} Update Extra Price

CreateExtra

CreateExtra(ctx).Execute()

Create Extra

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.CreateExtra(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.CreateExtra``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiCreateExtraRequest struct via the builder pattern

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateExtraPrice

CreateExtraPrice(ctx, id).Execute()

Create Extra Price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.CreateExtraPrice(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.CreateExtraPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiCreateExtraPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteExtra

DeleteExtra(ctx, id).Execute()

Delete Extra

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.DeleteExtra(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.DeleteExtra``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteExtraRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteExtraPrice

DeleteExtraPrice(ctx, id, priceId).Execute()

Delete Extra Price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 
	priceId := "priceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.DeleteExtraPrice(context.Background(), id, priceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.DeleteExtraPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string
priceId string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteExtraPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetExtra

GetExtra(ctx, id).Execute()

Get Extra

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.GetExtra(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.GetExtra``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiGetExtraRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetExtraPrice

GetExtraPrice(ctx, id, priceId).Execute()

Get Extra Price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 
	priceId := "priceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.GetExtraPrice(context.Background(), id, priceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.GetExtraPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string
priceId string

Other Parameters

Other parameters are passed through a pointer to a apiGetExtraPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListExtraPrices

ListExtraPrices(ctx, id).Execute()

List Extra Prices

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.ListExtraPrices(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.ListExtraPrices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiListExtraPricesRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListExtras

ListExtras200Response ListExtras(ctx).Execute()

List Extras

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ExtrasAPI.ListExtras(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.ListExtras``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListExtras`: ListExtras200Response
	fmt.Fprintf(os.Stdout, "Response from `ExtrasAPI.ListExtras`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListExtrasRequest struct via the builder pattern

Return type

ListExtras200Response

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RestoreExtra

RestoreExtra(ctx, id).Execute()

Restore Extra

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.RestoreExtra(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.RestoreExtra``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiRestoreExtraRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RestoreExtraPrice

RestoreExtraPrice(ctx, id, priceId).Execute()

Restore Extra Price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 
	priceId := "priceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.RestoreExtraPrice(context.Background(), id, priceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.RestoreExtraPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string
priceId string

Other Parameters

Other parameters are passed through a pointer to a apiRestoreExtraPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateExtra

UpdateExtra(ctx, id).Execute()

Update Extra

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.UpdateExtra(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.UpdateExtra``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiUpdateExtraRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateExtraPrice

UpdateExtraPrice(ctx, id, priceId).Execute()

Update Extra Price

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	id := "id_example" // string | 
	priceId := "priceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ExtrasAPI.UpdateExtraPrice(context.Background(), id, priceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ExtrasAPI.UpdateExtraPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string
priceId string

Other Parameters

Other parameters are passed through a pointer to a apiUpdateExtraPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]