Skip to content

Latest commit

 

History

History
363 lines (231 loc) · 9.17 KB

BillingPricesApi.md

File metadata and controls

363 lines (231 loc) · 9.17 KB

\BillingPricesApi

All URIs are relative to http://localhost

Method HTTP request Description
AddPrice Post /billing/api/v8/prices Add price for tenant and event type.
DeletePrice Delete /billing/api/v8/prices/{id} Delete a price.
GetPrice Get /billing/api/v8/prices/{id} Get a price.
GetPricesPage Get /billing/api/v8/prices Retrieve a page of prices.
UpdatePrice Put /billing/api/v8/prices/{id} Update price for an event type and tenant.

AddPrice

BillingPrice AddPrice(ctx).BillingPriceCreate(billingPriceCreate).Execute()

Add price for tenant and event type.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    billingPriceCreate := *openapiclient.NewBillingPriceCreate("Name_example", "Type_example", float64(123), "TenantId_example") // BillingPriceCreate | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
billingPriceCreate BillingPriceCreate

Return type

BillingPrice

Authorization

No authorization required

HTTP request headers

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

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

DeletePrice

DeletePrice(ctx, id).Execute()

Delete a price.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.BillingPricesApi.DeletePrice(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BillingPricesApi.DeletePrice``: %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 apiDeletePriceRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

GetPrice

BillingPrice GetPrice(ctx, id).Execute()

Get a price.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := TODO // string | 

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

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 apiGetPriceRequest struct via the builder pattern

Name Type Description Notes

Return type

BillingPrice

Authorization

No authorization required

HTTP request headers

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

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

GetPricesPage

BillingPricesPage GetPricesPage(ctx).TenantId(tenantId).Page(page).PageSize(pageSize).Type_(type_).Subtype(subtype).Execute()

Retrieve a page of prices.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    tenantId := TODO // string | 
    page := int32(0) // int32 | 
    pageSize := int32(10) // int32 | 
    type_ := "type__example" // string |  (optional)
    subtype := "subtype_example" // string |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.BillingPricesApi.GetPricesPage(context.Background()).TenantId(tenantId).Page(page).PageSize(pageSize).Type_(type_).Subtype(subtype).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BillingPricesApi.GetPricesPage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetPricesPage`: BillingPricesPage
    fmt.Fprintf(os.Stdout, "Response from `BillingPricesApi.GetPricesPage`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
tenantId string
page int32
pageSize int32
type_ string
subtype string

Return type

BillingPricesPage

Authorization

No authorization required

HTTP request headers

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

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

UpdatePrice

BillingPrice UpdatePrice(ctx, id).BillingPriceUpdate(billingPriceUpdate).Execute()

Update price for an event type and tenant.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := TODO // string | 
    billingPriceUpdate := *openapiclient.NewBillingPriceUpdate("Name_example", "Type_example", float64(123), "TenantId_example") // BillingPriceUpdate | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.BillingPricesApi.UpdatePrice(context.Background(), id).BillingPriceUpdate(billingPriceUpdate).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BillingPricesApi.UpdatePrice``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdatePrice`: BillingPrice
    fmt.Fprintf(os.Stdout, "Response from `BillingPricesApi.UpdatePrice`: %v\n", resp)
}

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 apiUpdatePriceRequest struct via the builder pattern

Name Type Description Notes

billingPriceUpdate | BillingPriceUpdate | |

Return type

BillingPrice

Authorization

No authorization required

HTTP request headers

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

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