NAV
shell ruby python csharp php

RefundPolicy

The RefundPolicy object

The RefundPolicy object looks like this in JSON:

{
    "object": "refund_policy",
    "id": 6,
    "name": "Accelerated Refund Schedule",
    "type": "custom",
    "days_full_refund_into_term": null,
    "prorate_as_of_term_start": false,
    "days_cutoff": null,
    "added_at": null,
    "added_by_id": null,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
name No text (300)
type Yes enum (prorated, custom)
days_full_refund_into_term No int
prorate_as_of_term_start No bool
days_cutoff No int
added_at No datetime
added_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/refundpolicies" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/refundpolicies',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/refundpolicies',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/refundpolicies"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/refundpolicies');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "refund_policy",
            "id": 6,
            "name": "Accelerated Refund Schedule",
            "type": "custom",
            "days_full_refund_into_term": null,
            "prorate_as_of_term_start": false,
            "days_cutoff": null,
            "added_at": null,
            "added_by_id": null
        }
    ],
    "sandbox": true
}

Retrieves all RefundPolicy objects.

HTTP Request

GET /refundpolicies

Parameters

None

Permissions

One of the following roles is required to call this method:

show

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/refundpolicies/(refundpolicy)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/refundpolicies/(refundpolicy)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/refundpolicies/(refundpolicy)',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/refundpolicies/(refundpolicy)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/refundpolicies/(refundpolicy)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "refund_policy",
    "id": 6,
    "name": "Accelerated Refund Schedule",
    "type": "custom",
    "days_full_refund_into_term": null,
    "prorate_as_of_term_start": false,
    "days_cutoff": null,
    "added_at": null,
    "added_by_id": null,
    "sandbox": true
}

Retrieves a specific RefundPolicy object.

HTTP Request

GET /refundpolicies/(refundpolicy)

Parameters

No additional parameters are needed beyond the ID of the object being requested that appears in the URL.

Expandable Properties

Permissions

One of the following roles is required to call this method: