Skip to content

Latest commit

 

History

History
400 lines (312 loc) · 14.4 KB

CcProjectApi.md

File metadata and controls

400 lines (312 loc) · 14.4 KB

CcProjectApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
createCCProject POST /checkout/v1/project Create a project
deleteCCProject DELETE /checkout/v1/project/{project_id} Delete a project
getCCProject GET /checkout/v1/project/{project_id} Get a project
listCCProjects GET /checkout/v1/projects List projects
updateCCProject PUT /checkout/v1/project/{project_id} Update a project

createCCProject

CCProject createCCProject(ccProjectCreateRequest)

Create a project

A project represents that project or company that is accepting payments. A project can have products, which can have multiple plans (prices) each. To create a project, you just need to supply a name and a Solana public key to receive payments. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.CcProjectApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    CcProjectApi apiInstance = new CcProjectApi(defaultClient);
    CCProjectCreateRequest ccProjectCreateRequest = new CCProjectCreateRequest(); // CCProjectCreateRequest | 
    try {
      CCProject result = apiInstance.createCCProject(ccProjectCreateRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CcProjectApi#createCCProject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
ccProjectCreateRequest CCProjectCreateRequest [optional]

Return type

CCProject

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
429 Rate limited -

deleteCCProject

deleteCCProject(projectId)

Delete a project

Delete a project. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.CcProjectApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    CcProjectApi apiInstance = new CcProjectApi(defaultClient);
    String projectId = "project_WDQskRIfHQxj53N5mk5K"; // String | The ID of the project. Created and returned when a project is created.
    try {
      apiInstance.deleteCCProject(projectId);
    } catch (ApiException e) {
      System.err.println("Exception when calling CcProjectApi#deleteCCProject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String The ID of the project. Created and returned when a project is created.

Return type

null (empty response body)

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
429 Rate limited -

getCCProject

CCProject getCCProject(projectId)

Get a project

Retrieve a project. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.CcProjectApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    CcProjectApi apiInstance = new CcProjectApi(defaultClient);
    String projectId = "project_WDQskRIfHQxj53N5mk5K"; // String | The ID of the project. Created and returned when a project is created.
    try {
      CCProject result = apiInstance.getCCProject(projectId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CcProjectApi#getCCProject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String The ID of the project. Created and returned when a project is created.

Return type

CCProject

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
429 Rate limited -

listCCProjects

List<CCProject> listCCProjects()

List projects

List all projects associated with an account. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.CcProjectApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    CcProjectApi apiInstance = new CcProjectApi(defaultClient);
    try {
      List<CCProject> result = apiInstance.listCCProjects();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CcProjectApi#listCCProjects");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

List<CCProject>

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
429 Rate limited -

updateCCProject

CCProject updateCCProject(projectId, ccProject)

Update a project

Retrieve a project. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.CcProjectApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    CcProjectApi apiInstance = new CcProjectApi(defaultClient);
    String projectId = "project_WDQskRIfHQxj53N5mk5K"; // String | The ID of the project. Created and returned when a project is created.
    CCProject ccProject = new CCProject(); // CCProject | 
    try {
      CCProject result = apiInstance.updateCCProject(projectId, ccProject);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CcProjectApi#updateCCProject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectId String The ID of the project. Created and returned when a project is created.
ccProject CCProject [optional]

Return type

CCProject

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
429 Rate limited -