Skip to content

Payment Profiles

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/payment-profiles/ List Payment Profiles
GET /api/payment-profiles/{uuid}/ Retrieve
POST /api/payment-profiles/ Create
PUT /api/payment-profiles/{uuid}/ Update
PATCH /api/payment-profiles/{uuid}/ Partial Update
DELETE /api/payment-profiles/{uuid}/ Delete
Other Actions
POST /api/payment-profiles/{uuid}/enable/ Enable

Core CRUD

List Payment Profiles

1
2
3
4
http \
  GET \
  https://api.example.com/api/payment-profiles/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.payment_profiles import payment_profiles_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = payment_profiles_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: payment_profiles_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { paymentProfilesList } from 'waldur-js-client';

try {
  const response = await paymentProfilesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
is_active boolean
o array Ordering

organization string
organization_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
payment_type array

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
uuid string (uuid)
url string (uri)
name string
organization_uuid string (uuid)
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
payment_type_display string
is_active boolean

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/payment-profiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.payment_profiles import payment_profiles_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = payment_profiles_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: payment_profiles_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { paymentProfilesRetrieve } from 'waldur-js-client';

try {
  const response = await paymentProfilesRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
uuid string (uuid)
url string (uri)
name string
organization_uuid string (uuid)
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
payment_type_display string
is_active boolean

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/payment-profiles/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-payment-profile" \
  organization="https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  payment_type="fixed_price"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.payment_profile_request import PaymentProfileRequest # (1)
from waldur_api_client.api.payment_profiles import payment_profiles_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PaymentProfileRequest(
    name="my-awesome-payment-profile",
    organization="https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    payment_type="fixed_price"
)
response = payment_profiles_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PaymentProfileRequest
  2. API Source: payment_profiles_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { paymentProfilesCreate } from 'waldur-js-client';

try {
  const response = await paymentProfilesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-payment-profile",
    "organization": "https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "payment_type": "fixed_price"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
is_active boolean

201 -

Field Type
uuid string (uuid)
url string (uri)
name string
organization_uuid string (uuid)
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
payment_type_display string
is_active boolean

Update

1
2
3
4
5
6
7
http \
  PUT \
  https://api.example.com/api/payment-profiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-payment-profile" \
  organization="https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  payment_type="fixed_price"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.payment_profile_request import PaymentProfileRequest # (1)
from waldur_api_client.api.payment_profiles import payment_profiles_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PaymentProfileRequest(
    name="my-awesome-payment-profile",
    organization="https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    payment_type="fixed_price"
)
response = payment_profiles_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PaymentProfileRequest
  2. API Source: payment_profiles_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { paymentProfilesUpdate } from 'waldur-js-client';

try {
  const response = await paymentProfilesUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-payment-profile",
    "organization": "https://api.example.com/api/organization/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "payment_type": "fixed_price"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
is_active boolean

200 -

Field Type
uuid string (uuid)
url string (uri)
name string
organization_uuid string (uuid)
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
payment_type_display string
is_active boolean

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/payment-profiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_payment_profile_request import PatchedPaymentProfileRequest # (1)
from waldur_api_client.api.payment_profiles import payment_profiles_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedPaymentProfileRequest()
response = payment_profiles_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedPaymentProfileRequest
  2. API Source: payment_profiles_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { paymentProfilesPartialUpdate } from 'waldur-js-client';

try {
  const response = await paymentProfilesPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
is_active boolean

200 -

Field Type
uuid string (uuid)
url string (uri)
name string
organization_uuid string (uuid)
organization string (uri)
attributes object
attributes.end_date string
attributes.agreement_number string
attributes.contract_sum integer
payment_type string
payment_type_display string
is_active boolean

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/payment-profiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.payment_profiles import payment_profiles_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = payment_profiles_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: payment_profiles_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { paymentProfilesDestroy } from 'waldur-js-client';

try {
  const response = await paymentProfilesDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Enable

1
2
3
4
http \
  POST \
  https://api.example.com/api/payment-profiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/enable/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.payment_profiles import payment_profiles_enable # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = payment_profiles_enable.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: payment_profiles_enable
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { paymentProfilesEnable } from 'waldur-js-client';

try {
  const response = await paymentProfilesEnable({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body