Skip to content

Commit c10ce3b

Browse files
committed
updated samples
1 parent 5465f9a commit c10ce3b

1,011 files changed

Lines changed: 330693 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* InterServer Management API
3+
* # Overview\n\nThe InterServer Management API provides programmatic access to manage your InterServer services. Use this REST API to automate provisioning, configuration, and billing operations across your account.\n\nThe API covers the following service categories:\n- [Domains](https://www.interserver.net/domains/) — registration, transfers, and DNS management\n- [Web Hosting](https://www.interserver.net/hosting/) — shared and reseller hosting\n- [VPS Hosting](https://www.interserver.net/vps/) — virtual private servers\n- [Dedicated Servers](https://www.interserver.net/dedicated/) — bare metal and [Rapid Deploy Servers](https://www.interserver.net/dedicated/rapid-deploy.html)\n- [Backups](https://www.interserver.net/storage/) — storage and backup services\n- Licenses — control panel and software licenses\n- [Mail](https://www.mail.baby/) — mail delivery services\n- SSL — certificate provisioning\n- Billing — invoices, payment methods, and account management\n\nFor interactive testing, see the [API documentation](/api-docs/).\n\n# Authentication\n\nMost endpoints require authentication. Two methods are supported:\n\n## API Key (Preferred)\n\nGenerate an API key from the [Account Security](https://my.interserver.net/account_security) page on [my.interserver.net](https://my.interserver.net/). Pass it in the `X-API-KEY` request header:\n\n```\nX-API-KEY: your-api-key-here\n```\n\n## Session-Based Authentication\n\nAlternatively, authenticate by creating a session:\n\n1. **Log in** — Send a `POST` request to `/login` with your account credentials. The response includes a session identifier.\n2. **Pass the session ID** — Include the session identifier in the `sessionid` header on subsequent requests:\n\n```\nsessionid: your-session-id-here\n```\n\nAPI key authentication is recommended for most integrations as it does not expire and avoids the overhead of session management.\n\n
4+
*
5+
* The version of the OpenAPI document: 0.9.0
6+
* Contact: support@interserver.net
7+
*
8+
* NOTE: This class is auto generated by the OAS code generator program.
9+
* https://github.com/OpenAPITools/openapi-generator
10+
* Do not edit the class manually.
11+
*/
12+
13+
/**
14+
* OASAddServer200Response
15+
*/
16+
public class OASAddServer200Response {
17+
/**
18+
* Status message.
19+
* @return text
20+
*/
21+
public String text { get; set; }
22+
23+
/**
24+
* Invoice ID for payment.
25+
* @return invoice
26+
*/
27+
public Integer invoice { get; set; }
28+
29+
/**
30+
* Server order ID.
31+
* @return order
32+
*/
33+
public Integer order { get; set; }
34+
35+
public static OASAddServer200Response getExample() {
36+
OASAddServer200Response addServer200Response = new OASAddServer200Response();
37+
addServer200Response.text = 'Order Completed';
38+
addServer200Response.invoice = 0;
39+
addServer200Response.order = 0;
40+
return addServer200Response;
41+
}
42+
43+
public Boolean equals(Object obj) {
44+
if (obj instanceof OASAddServer200Response) {
45+
OASAddServer200Response addServer200Response = (OASAddServer200Response) obj;
46+
return this.text == addServer200Response.text
47+
&& this.invoice == addServer200Response.invoice
48+
&& this.order == addServer200Response.order;
49+
}
50+
return false;
51+
}
52+
53+
public Integer hashCode() {
54+
Integer hashCode = 43;
55+
hashCode = (17 * hashCode) + (text == null ? 0 : System.hashCode(text));
56+
hashCode = (17 * hashCode) + (invoice == null ? 0 : System.hashCode(invoice));
57+
hashCode = (17 * hashCode) + (order == null ? 0 : System.hashCode(order));
58+
return hashCode;
59+
}
60+
}
61+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>42.0</apiVersion>
4+
<status>Active</status>
5+
</ApexClass>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
@isTest
2+
private class OASAddServer200ResponseTest {
3+
@isTest
4+
private static void equalsSameInstance() {
5+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
6+
OASAddServer200Response addServer200Response2 = addServer200Response1;
7+
OASAddServer200Response addServer200Response3 = new OASAddServer200Response();
8+
OASAddServer200Response addServer200Response4 = addServer200Response3;
9+
10+
System.assert(addServer200Response1.equals(addServer200Response2));
11+
System.assert(addServer200Response2.equals(addServer200Response1));
12+
System.assert(addServer200Response1.equals(addServer200Response1));
13+
System.assert(addServer200Response3.equals(addServer200Response4));
14+
System.assert(addServer200Response4.equals(addServer200Response3));
15+
System.assert(addServer200Response3.equals(addServer200Response3));
16+
}
17+
18+
@isTest
19+
private static void equalsIdenticalInstance() {
20+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
21+
OASAddServer200Response addServer200Response2 = OASAddServer200Response.getExample();
22+
OASAddServer200Response addServer200Response3 = new OASAddServer200Response();
23+
OASAddServer200Response addServer200Response4 = new OASAddServer200Response();
24+
25+
System.assert(addServer200Response1.equals(addServer200Response2));
26+
System.assert(addServer200Response2.equals(addServer200Response1));
27+
System.assert(addServer200Response3.equals(addServer200Response4));
28+
System.assert(addServer200Response4.equals(addServer200Response3));
29+
}
30+
31+
@isTest
32+
private static void notEqualsDifferentType() {
33+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
34+
OASAddServer200Response addServer200Response2 = new OASAddServer200Response();
35+
36+
System.assertEquals(false, addServer200Response1.equals('foo'));
37+
System.assertEquals(false, addServer200Response2.equals('foo'));
38+
}
39+
40+
@isTest
41+
private static void notEqualsNull() {
42+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
43+
OASAddServer200Response addServer200Response2 = new OASAddServer200Response();
44+
OASAddServer200Response addServer200Response3;
45+
46+
System.assertEquals(false, addServer200Response1.equals(addServer200Response3));
47+
System.assertEquals(false, addServer200Response2.equals(addServer200Response3));
48+
}
49+
50+
@isTest
51+
private static void consistentHashCodeValue() {
52+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
53+
OASAddServer200Response addServer200Response2 = new OASAddServer200Response();
54+
55+
System.assertEquals(addServer200Response1.hashCode(), addServer200Response1.hashCode());
56+
System.assertEquals(addServer200Response2.hashCode(), addServer200Response2.hashCode());
57+
}
58+
59+
@isTest
60+
private static void equalInstancesHaveSameHashCode() {
61+
OASAddServer200Response addServer200Response1 = OASAddServer200Response.getExample();
62+
OASAddServer200Response addServer200Response2 = OASAddServer200Response.getExample();
63+
OASAddServer200Response addServer200Response3 = new OASAddServer200Response();
64+
OASAddServer200Response addServer200Response4 = new OASAddServer200Response();
65+
66+
System.assert(addServer200Response1.equals(addServer200Response2));
67+
System.assert(addServer200Response3.equals(addServer200Response4));
68+
System.assertEquals(addServer200Response1.hashCode(), addServer200Response2.hashCode());
69+
System.assertEquals(addServer200Response3.hashCode(), addServer200Response4.hashCode());
70+
}
71+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>42.0</apiVersion>
4+
<status>Active</status>
5+
</ApexClass>
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
/*
2+
* InterServer Management API
3+
* # Overview\n\nThe InterServer Management API provides programmatic access to manage your InterServer services. Use this REST API to automate provisioning, configuration, and billing operations across your account.\n\nThe API covers the following service categories:\n- [Domains](https://www.interserver.net/domains/) — registration, transfers, and DNS management\n- [Web Hosting](https://www.interserver.net/hosting/) — shared and reseller hosting\n- [VPS Hosting](https://www.interserver.net/vps/) — virtual private servers\n- [Dedicated Servers](https://www.interserver.net/dedicated/) — bare metal and [Rapid Deploy Servers](https://www.interserver.net/dedicated/rapid-deploy.html)\n- [Backups](https://www.interserver.net/storage/) — storage and backup services\n- Licenses — control panel and software licenses\n- [Mail](https://www.mail.baby/) — mail delivery services\n- SSL — certificate provisioning\n- Billing — invoices, payment methods, and account management\n\nFor interactive testing, see the [API documentation](/api-docs/).\n\n# Authentication\n\nMost endpoints require authentication. Two methods are supported:\n\n## API Key (Preferred)\n\nGenerate an API key from the [Account Security](https://my.interserver.net/account_security) page on [my.interserver.net](https://my.interserver.net/). Pass it in the `X-API-KEY` request header:\n\n```\nX-API-KEY: your-api-key-here\n```\n\n## Session-Based Authentication\n\nAlternatively, authenticate by creating a session:\n\n1. **Log in** — Send a `POST` request to `/login` with your account credentials. The response includes a session identifier.\n2. **Pass the session ID** — Include the session identifier in the `sessionid` header on subsequent requests:\n\n```\nsessionid: your-session-id-here\n```\n\nAPI key authentication is recommended for most integrations as it does not expire and avoids the overhead of session management.\n\n
4+
*
5+
* The version of the OpenAPI document: 0.9.0
6+
* Contact: support@interserver.net
7+
*
8+
* NOTE: This class is auto generated by the OAS code generator program.
9+
* https://github.com/OpenAPITools/openapi-generator
10+
* Do not edit the class manually.
11+
*/
12+
13+
/**
14+
* Generic response returned after placing a service order. Contains invoice IDs for payment and the new service ID.
15+
*/
16+
public class OASServiceOrderPostResponse implements OAS.MappedProperties {
17+
/**
18+
* Whether the order was accepted and can proceed to payment.
19+
* @return r_continue
20+
*/
21+
public Boolean r_continue { get; set; }
22+
23+
/**
24+
* List of validation errors (empty on success).
25+
* @return errors
26+
*/
27+
public List<String> errors { get; set; }
28+
29+
/**
30+
* Total cost of the order.
31+
* @return totalCost
32+
*/
33+
public String totalCost { get; set; }
34+
35+
/**
36+
* Primary invoice ID for payment.
37+
* @return iid
38+
*/
39+
public String iid { get; set; }
40+
41+
/**
42+
* All invoice identifiers associated with the order.
43+
* @return iids
44+
*/
45+
public List<String> iids { get; set; }
46+
47+
/**
48+
* Numeric invoice IDs for use with billing endpoints.
49+
* @return realIids
50+
*/
51+
public List<String> realIids { get; set; }
52+
53+
/**
54+
* The new service ID created by the order.
55+
* @return serviceId
56+
*/
57+
public Integer serviceId { get; set; }
58+
59+
/**
60+
* Human-readable description of the invoice.
61+
* @return invoiceDescription
62+
*/
63+
public String invoiceDescription { get; set; }
64+
65+
private static final Map<String, String> propertyMappings = new Map<String, String>{
66+
'continue' => 'r_continue',
67+
'total_cost' => 'totalCost',
68+
'real_iids' => 'realIids',
69+
'invoice_description' => 'invoiceDescription'
70+
};
71+
72+
public Map<String, String> getPropertyMappings() {
73+
return propertyMappings;
74+
}
75+
76+
private static final Map<String, String> propertyMappings = new Map<String, String>{
77+
'continue' => 'r_continue',
78+
'total_cost' => 'totalCost',
79+
'real_iids' => 'realIids',
80+
'invoice_description' => 'invoiceDescription'
81+
};
82+
83+
public Map<String, String> getPropertyMappings() {
84+
return propertyMappings;
85+
}
86+
87+
private static final Map<String, String> propertyMappings = new Map<String, String>{
88+
'continue' => 'r_continue',
89+
'total_cost' => 'totalCost',
90+
'real_iids' => 'realIids',
91+
'invoice_description' => 'invoiceDescription'
92+
};
93+
94+
public Map<String, String> getPropertyMappings() {
95+
return propertyMappings;
96+
}
97+
98+
private static final Map<String, String> propertyMappings = new Map<String, String>{
99+
'continue' => 'r_continue',
100+
'total_cost' => 'totalCost',
101+
'real_iids' => 'realIids',
102+
'invoice_description' => 'invoiceDescription'
103+
};
104+
105+
public Map<String, String> getPropertyMappings() {
106+
return propertyMappings;
107+
}
108+
109+
public OASServiceOrderPostResponse() {
110+
errors = new List<String>();
111+
iids = new List<String>();
112+
realIids = new List<String>();
113+
}
114+
115+
public static OASServiceOrderPostResponse getExample() {
116+
OASServiceOrderPostResponse serviceOrderPostResponse = new OASServiceOrderPostResponse();
117+
serviceOrderPostResponse.r_continue = true;
118+
serviceOrderPostResponse.errors = new List<String>{''};
119+
serviceOrderPostResponse.totalCost = '';
120+
serviceOrderPostResponse.iid = '';
121+
serviceOrderPostResponse.iids = new List<String>{''};
122+
serviceOrderPostResponse.realIids = new List<String>{''};
123+
serviceOrderPostResponse.serviceId = 0;
124+
serviceOrderPostResponse.invoiceDescription = '';
125+
return serviceOrderPostResponse;
126+
}
127+
128+
public Boolean equals(Object obj) {
129+
if (obj instanceof OASServiceOrderPostResponse) {
130+
OASServiceOrderPostResponse serviceOrderPostResponse = (OASServiceOrderPostResponse) obj;
131+
return this.r_continue == serviceOrderPostResponse.r_continue
132+
&& this.errors == serviceOrderPostResponse.errors
133+
&& this.totalCost == serviceOrderPostResponse.totalCost
134+
&& this.iid == serviceOrderPostResponse.iid
135+
&& this.iids == serviceOrderPostResponse.iids
136+
&& this.realIids == serviceOrderPostResponse.realIids
137+
&& this.serviceId == serviceOrderPostResponse.serviceId
138+
&& this.invoiceDescription == serviceOrderPostResponse.invoiceDescription;
139+
}
140+
return false;
141+
}
142+
143+
public Integer hashCode() {
144+
Integer hashCode = 43;
145+
hashCode = (17 * hashCode) + (r_continue == null ? 0 : System.hashCode(r_continue));
146+
hashCode = (17 * hashCode) + (errors == null ? 0 : System.hashCode(errors));
147+
hashCode = (17 * hashCode) + (totalCost == null ? 0 : System.hashCode(totalCost));
148+
hashCode = (17 * hashCode) + (iid == null ? 0 : System.hashCode(iid));
149+
hashCode = (17 * hashCode) + (iids == null ? 0 : System.hashCode(iids));
150+
hashCode = (17 * hashCode) + (realIids == null ? 0 : System.hashCode(realIids));
151+
hashCode = (17 * hashCode) + (serviceId == null ? 0 : System.hashCode(serviceId));
152+
hashCode = (17 * hashCode) + (invoiceDescription == null ? 0 : System.hashCode(invoiceDescription));
153+
return hashCode;
154+
}
155+
}
156+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>42.0</apiVersion>
4+
<status>Active</status>
5+
</ApexClass>

0 commit comments

Comments
 (0)