Consent
Update Consent
Welcome to the Omise Docs! These pages should contain everything you need to know to get paid using the Omise API. This is developer-oriented documentation.If you are not a developer, you can check our comprehensive support articles for non-technical explanations of various concepts or go straight to the plugin overview.
Update Consent
curl -X PATCH\
-H "Accept: application/json"\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://api.omise.co/consent"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentApi;
import java.io.File;
import java.util.*;
public class ConsentApiExample {
public static void main(String[] args) {
ConsentApi apiInstance = new ConsentApi();
String principal = principal_example; // String |
Object policies = ; // Object |
try {
consent result = apiInstance.consentPatch(principal, policies);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ConsentApi#consentPatch");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ConsentApi;
public class ConsentApiExample {
public static void main(String[] args) {
ConsentApi apiInstance = new ConsentApi();
String principal = principal_example; // String |
Object policies = ; // Object |
try {
consent result = apiInstance.consentPatch(principal, policies);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ConsentApi#consentPatch");
e.printStackTrace();
}
}
}
String *principal = principal_example; // (optional)
Object *policies = ; // (optional)
ConsentApi *apiInstance = [[ConsentApi alloc] init];
[apiInstance consentPatchWith:principal
policies:policies
completionHandler: ^(consent output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OmiseApi = require('omise_api');
var api = new OmiseApi.ConsentApi()
var opts = {
'principal': principal_example // {{String}}
'policies': // {{Object}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.consentPatch(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class consentPatchExample
{
public void main()
{
var apiInstance = new ConsentApi();
var principal = principal_example; // String | (optional)
var policies = new Object(); // Object | (optional)
try
{
consent result = apiInstance.consentPatch(principal, policies);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ConsentApi.consentPatch: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiConsentApi();
$principal = principal_example; // String |
$policies = ; // Object |
try {
$result = $api_instance->consentPatch($principal, $policies);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConsentApi->consentPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentApi;
my $api_instance = WWW::SwaggerClient::ConsentApi->new();
my $principal = principal_example; # String |
my $policies = ; # Object |
eval {
my $result = $api_instance->consentPatch(principal => $principal, policies => $policies);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ConsentApi->consentPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ConsentApi()
principal = principal_example # String | (optional)
policies = # Object | (optional)
try:
api_response = api_instance.consent_patch(principal=principal, policies=policies)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConsentApi->consentPatch: %s\n" % e)
Parameters
Name | Description |
---|---|
principal | String |
policies | Object |