GetBillingDocuments サービス操作 - 顧客の課金
指定した課金ドキュメントを取得します。
Request 要素
GetBillingDocumentsRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。 要素は、 要求 SOAP に示されている順序と同じ順序である必要があります。
注:
以下に特に記載がない限り、すべての要求要素が必要です。
要求本文要素
要素 | 説明 | データ型 |
---|---|---|
BillingDocumentsInfo | 取得する請求伝票の一覧を識別します。 リスト内の各 BillingDocumentInfo オブジェクトには、CustomerId と DocumentId が含まれている必要があります。 その他のプロパティは無視されます。 リストには最大 25 個の項目を含めることができます。 |
BillingDocumentInfo 配列 |
種類 | 請求伝票の生成に使用する形式。 たとえば、請求伝票を PDF または XML 形式で生成できます。 | DataType |
要求ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
AuthenticationToken | Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。 詳細については、「 OAuth による認証」を参照してください。 |
string |
DeveloperToken | Bing Ads API へのアクセスに使用される開発者トークン。 詳細については、「 開発者トークンを取得する」を参照してください。 |
string |
Password | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
UserName | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
Response 要素
GetBillingDocumentsResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 応答 SOAP に示されている順序と同じ順序で返されます。
応答本文の要素
要素 | 説明 | データ型 |
---|---|---|
BillingDocuments | 取得された請求伝票の一覧。 | BillingDocument 配列 |
応答ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
TrackingId | API 呼び出しの詳細を含むログ エントリの識別子。 | string |
SOAP を要求する
このテンプレートは、SOAP 要求の本文要素とヘッダー要素の順序を示すツールによって生成されました。 このサービス操作で使用できるサポートされる型については、上記の 要求本文要素 のリファレンスを参照してください。
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Billing/v13">
<Action mustUnderstand="1">GetBillingDocuments</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<GetBillingDocumentsRequest xmlns="https://bingads.microsoft.com/Billing/v13">
<BillingDocumentsInfo xmlns:e159="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
<e159:BillingDocumentInfo>
<e159:AccountId>ValueHere</e159:AccountId>
<e159:AccountName i:nil="false">ValueHere</e159:AccountName>
<e159:AccountNumber i:nil="false">ValueHere</e159:AccountNumber>
<e159:Amount>ValueHere</e159:Amount>
<e159:CurrencyCode i:nil="false">ValueHere</e159:CurrencyCode>
<e159:DocumentDate i:nil="false">ValueHere</e159:DocumentDate>
<e159:DocumentId i:nil="false">ValueHere</e159:DocumentId>
<e159:CustomerId i:nil="false">ValueHere</e159:CustomerId>
<e159:CampaignId i:nil="false">ValueHere</e159:CampaignId>
<e159:DocumentNumber i:nil="false">ValueHere</e159:DocumentNumber>
</e159:BillingDocumentInfo>
</BillingDocumentsInfo>
<Type>ValueHere</Type>
</GetBillingDocumentsRequest>
</s:Body>
</s:Envelope>
応答 SOAP
このテンプレートは、SOAP 応答の 本文 要素と ヘッダー 要素の順序を示すツールによって生成されました。
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Billing/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<GetBillingDocumentsResponse xmlns="https://bingads.microsoft.com/Billing/v13">
<BillingDocuments xmlns:e160="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<e160:BillingDocument>
<e160:Data d4p1:nil="false">ValueHere</e160:Data>
<e160:Id>ValueHere</e160:Id>
<e160:Type>ValueHere</e160:Type>
<e160:Number d4p1:nil="false">ValueHere</e160:Number>
</e160:BillingDocument>
</BillingDocuments>
</GetBillingDocumentsResponse>
</s:Body>
</s:Envelope>
コード構文
構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。
public async Task<GetBillingDocumentsResponse> GetBillingDocumentsAsync(
IList<BillingDocumentInfo> billingDocumentsInfo,
DataType type)
{
var request = new GetBillingDocumentsRequest
{
BillingDocumentsInfo = billingDocumentsInfo,
Type = type
};
return (await CustomerBillingService.CallAsync((s, r) => s.GetBillingDocumentsAsync(r), request));
}
static GetBillingDocumentsResponse getBillingDocuments(
ArrayOfBillingDocumentInfo billingDocumentsInfo,
DataType type) throws RemoteException, Exception
{
GetBillingDocumentsRequest request = new GetBillingDocumentsRequest();
request.setBillingDocumentsInfo(billingDocumentsInfo);
request.setType(type);
return CustomerBillingService.getService().getBillingDocuments(request);
}
static function GetBillingDocuments(
$billingDocumentsInfo,
$type)
{
$GLOBALS['Proxy'] = $GLOBALS['CustomerBillingProxy'];
$request = new GetBillingDocumentsRequest();
$request->BillingDocumentsInfo = $billingDocumentsInfo;
$request->Type = $type;
return $GLOBALS['CustomerBillingProxy']->GetService()->GetBillingDocuments($request);
}
response=customerbilling_service.GetBillingDocuments(
BillingDocumentsInfo=BillingDocumentsInfo,
Type=Type)
要件
サービス: CustomerBillingService.svc v13
Namespace: https://bingads.microsoft.com/Billing/v13
要求 URL
https://clientcenter.api.bingads.microsoft.com/CustomerBilling/v13/BillingDocuments/Query
Request 要素
GetBillingDocumentsRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。
注:
以下に特に記載がない限り、すべての要求要素が必要です。
要求本文要素
要素 | 説明 | データ型 |
---|---|---|
BillingDocumentsInfo | 取得する請求伝票の一覧を識別します。 リスト内の各 BillingDocumentInfo オブジェクトには、CustomerId と DocumentId が含まれている必要があります。 その他のプロパティは無視されます。 リストには最大 25 個の項目を含めることができます。 |
BillingDocumentInfo 配列 |
種類 | 請求伝票の生成に使用する形式。 たとえば、請求伝票を PDF または XML 形式で生成できます。 | DataType |
要求ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
Authorization | Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。 トークンのプレフィックスに "Bearer" があることを確認してください。これは、適切な認証に必要です。 詳細については、「 OAuth による認証」を参照してください。 |
string |
DeveloperToken | Bing Ads API へのアクセスに使用される開発者トークン。 詳細については、「 開発者トークンを取得する」を参照してください。 |
string |
Password | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
UserName | この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 | string |
Response 要素
GetBillingDocumentsResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 Response JSON に示されている順序と同じ順序で返されます。
応答本文の要素
要素 | 説明 | データ型 |
---|---|---|
BillingDocuments | 取得された請求伝票の一覧。 | BillingDocument 配列 |
応答ヘッダー要素
要素 | 説明 | データ型 |
---|---|---|
TrackingId | API 呼び出しの詳細を含むログ エントリの識別子。 | string |
JSON を要求する
このテンプレートは、JSON 要求の 本文 と ヘッダー 要素を表示するツールによって生成されました。 このサービス操作で使用できるサポートされる型については、上記の 要求本文要素 のリファレンスを参照してください。
{
"BillingDocumentsInfo": [
{
"AccountId": "LongValueHere",
"AccountName": "ValueHere",
"AccountNumber": "ValueHere",
"Amount": DoubleValueHere,
"CampaignId": "LongValueHere",
"CurrencyCode": "ValueHere",
"CustomerId": IntValueHere,
"DocumentDate": "ValueHere",
"DocumentId": "LongValueHere",
"DocumentNumber": "ValueHere"
}
],
"Type": "ValueHere"
}
応答 JSON
このテンプレートは、JSON 応答の 本文 と ヘッダー 要素を表示するツールによって生成されました。
{
"BillingDocuments": [
{
"Data": "ValueHere",
"Id": "LongValueHere",
"Number": "ValueHere",
"Type": "ValueHere"
}
]
}
コード構文
SDK を使用して REST API を呼び出すには、SDK を特定のバージョンにアップグレードし、システム パラメーターを構成する必要があります。構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。
public async Task<GetBillingDocumentsResponse> GetBillingDocumentsAsync(
IList<BillingDocumentInfo> billingDocumentsInfo,
DataType type)
{
var request = new GetBillingDocumentsRequest
{
BillingDocumentsInfo = billingDocumentsInfo,
Type = type
};
return (await CustomerBillingService.CallAsync((s, r) => s.GetBillingDocumentsAsync(r), request));
}
static GetBillingDocumentsResponse getBillingDocuments(
ArrayOfBillingDocumentInfo billingDocumentsInfo,
DataType type) throws RemoteException, Exception
{
GetBillingDocumentsRequest request = new GetBillingDocumentsRequest();
request.setBillingDocumentsInfo(billingDocumentsInfo);
request.setType(type);
return CustomerBillingService.getService().getBillingDocuments(request);
}
static function GetBillingDocuments(
$billingDocumentsInfo,
$type)
{
$GLOBALS['Proxy'] = $GLOBALS['CustomerBillingProxy'];
$request = new GetBillingDocumentsRequest();
$request->BillingDocumentsInfo = $billingDocumentsInfo;
$request->Type = $type;
return $GLOBALS['CustomerBillingProxy']->GetService()->GetBillingDocuments($request);
}
response=customerbilling_service.GetBillingDocuments(
BillingDocumentsInfo=BillingDocumentsInfo,
Type=Type)