Entitlements
Xóa Tệp
Xóa một tệp khỏi quyền sở hữu Tệp Kỹ Thuật Số. Tệp được xóa khỏi lưu trữ và khỏi danh sách digital_file_ids của quyền sở hữu.
DELETE
/
entitlements
/
{id}
/
files
/
{file_id}
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
await client.entitlements.files.delete('file_id', { id: 'ent_jt7jcvI79Xh8eehqgWdcm' });import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
client.entitlements.files.delete(
file_id="file_id",
id="ent_jt7jcvI79Xh8eehqgWdcm",
)package main
import (
"context"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.Entitlements.Files.Delete(
context.TODO(),
"ent_jt7jcvI79Xh8eehqgWdcm",
"file_id",
)
if err != nil {
panic(err.Error())
}
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.files.FileDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
FileDeleteParams params = FileDeleteParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.fileId("file_id")
.build();
client.entitlements().files().delete(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.files.FileDeleteParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: FileDeleteParams = FileDeleteParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.fileId("file_id")
.build()
client.entitlements().files().delete(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
result = dodo_payments.entitlements.files.delete("file_id", id: "ent_jt7jcvI79Xh8eehqgWdcm")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$result = $client->entitlements->files->delete(
'file_id', id: 'ent_jt7jcvI79Xh8eehqgWdcm'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements.Files;
DodoPaymentsClient client = new();
FileDeleteParams parameters = new()
{
ID = "ent_jt7jcvI79Xh8eehqgWdcm",
FileID = "file_id",
};
await client.Entitlements.Files.Delete(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let file_id = "file_id";
let result = client
.entitlements()
.files()
.delete()
.id(id)
.file_id(file_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request DELETE \
--url https://test.dodopayments.com/entitlements/{id}/files/{file_id} \
--header 'Authorization: Bearer <token>'Lần sửa đổi cuối 13 tháng 5, 2026
Trang này có hữu ích không?
Trước
Danh sách các khoản cấpLiệt kê tất cả các khoản cấp cho một quyền lợi, với các bộ lọc tùy chọn theo trạng thái và ID khách hàng. Mỗi khoản cấp mang trạng thái hoàn thành theo từng khách hàng, bao gồm các khóa cấp phép và URL tải xuống tệp kỹ thuật số nếu có.
Tiếp theo
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
await client.entitlements.files.delete('file_id', { id: 'ent_jt7jcvI79Xh8eehqgWdcm' });import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
client.entitlements.files.delete(
file_id="file_id",
id="ent_jt7jcvI79Xh8eehqgWdcm",
)package main
import (
"context"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.Entitlements.Files.Delete(
context.TODO(),
"ent_jt7jcvI79Xh8eehqgWdcm",
"file_id",
)
if err != nil {
panic(err.Error())
}
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.files.FileDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
FileDeleteParams params = FileDeleteParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.fileId("file_id")
.build();
client.entitlements().files().delete(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.files.FileDeleteParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: FileDeleteParams = FileDeleteParams.builder()
.id("ent_jt7jcvI79Xh8eehqgWdcm")
.fileId("file_id")
.build()
client.entitlements().files().delete(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
result = dodo_payments.entitlements.files.delete("file_id", id: "ent_jt7jcvI79Xh8eehqgWdcm")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$result = $client->entitlements->files->delete(
'file_id', id: 'ent_jt7jcvI79Xh8eehqgWdcm'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements.Files;
DodoPaymentsClient client = new();
FileDeleteParams parameters = new()
{
ID = "ent_jt7jcvI79Xh8eehqgWdcm",
FileID = "file_id",
};
await client.Entitlements.Files.Delete(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let file_id = "file_id";
let result = client
.entitlements()
.files()
.delete()
.id(id)
.file_id(file_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request DELETE \
--url https://test.dodopayments.com/entitlements/{id}/files/{file_id} \
--header 'Authorization: Bearer <token>'