Skip to content Search or jump to… Pull requests Issues Marketplace Explore @Landro6 Learn Git and GitHub without any code! Using the Hello World guide, you’ll start a branch, write comments, and open a pull request. verizonlabs / m2mdeveloper Private 4 00 Code Issues Pull requests Actions Projects Wiki Security Insights m2mdeveloper/docs/ts-docs-wns/src/API_Reference/GetBilledUsage.html Graciela Diaz Fixed rendering of sample code Latest commit 24c6d64 on Jun 5 History 1 contributor 519 lines (459 sloc) 15.6 KB  GetBilledUsage

GetBilledUsage

Gets billing usage for a customer segment for a specified billing cycle, or the most recent billing cycle if one is not specified.

Uses and Requirements

Allow customers to get billing usage for a customer segment for a specified billing cycle, or the most recent billing cycle if one is not specified.

For example, this API can be used for the automotive sector in cases where a streaming radio device is present.

Request Parameters

Parameter Type Description
AccountName
required
string The name of a billing account. An account name is usually numeric, and must include any leading zeros.
Label
required
string The label associated with the device
Name string The label associated with the device.
Value string The label value.
billingCycle The billing cycle for which you want billing information. If you do not specify the billing cycle, the most recent billing cycle information is provided.
billingCycle.year integer The year in which the billing cycle occurs.
billingCycle.month integer The number representing the month of the billing cycle. Valid values include integers between 1 and 12.

Callback Response Parameters

Parameter Type Description
AccountName string The name of a billing account. An account name is usually numeric, and must include any leading zeros.
AccountNumber string The billing account number.
RatePlanDescription string A description of the rate plan.
Label Array of label names and label values Maximum of 2,000 objects are allowed in the array.
Name string The name or type of label associated with the device.
Value string The label value.
DeviceIdentifier Array of device object An identifier for a single device.
DeviceIdentifier.Kind,
DeviceIdentifier.Identifier
string The type and value of the device identifier. Valid value is:
  • EID - decimal, 20 digits
billingCycle The billing cycle for which you want billing information. If you do not specify the billing cycle, the most recent billing cycle information is provided.
billingCycle.year integer The year in which the billing cycle occurs.
billingCycle.month integer The number representing the month of the billing cycle. Valid values include integers between 1 and 12.
UnitOfMeasure string Indicates the method in which TotalDeviceBilledUsage is measured.
TotalDeviceBilledUsage integer Total of usage in units of measure.
TotalDeviceBilledChargeAmt integer The total dollar amount billed for the specified billing cycle.
UsageSegments An array of UsageSegment objects Breaks down the billing and usage details by rating groups.
RatingGroup> string An identifier for a grouping that breaks down billing and usage based on a contracted rate.
RatingGroupDetails array Lists charge and usage details for the billing cycle, by country code.
CurrentCycleDetails array Lists billing and usage details for the rating group for the specified billing cycle.
RatingGroupDetails array Lists charge and usage details for the billing cycles by country code.
CountryCode string Code for the country that the usage and resulting charges are in.
Usage integer Total usage int he corresponding country for the billing cycle.
ChargeAmt integer The total dollar amount charged and usage information for the rating group by country code for the current billing cycle.
ChargeDescription string A description of the charges for the rating group by country code.

Example SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:v2="http://nphase.com/unifiedwebservice/v2"
 xmlns:nph="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.DeviceService"
 xmlns:nph1="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.Common">
 <soapenv:Header>
    <token xmlns="http://nphase.com/unifiedwebservice/v2">f75bd90f-5d70-46fc-8bf9-0374680acfe5</token>
 </soapenv:Header>
 <soapenv:Body>
    <v2:GetBilledUsage>
        <v2:Input>
        <nph:AccountName>7653489765-12345</nph:AccountName>
        <nph:Label>
            <nph1:Name>VIN</nph1:Name>
            <nph1:Value>JN8AS5MT3DW541941</nph1:Value>
        </nph:Label>
        <nph:BillingCycle>
            <nph:Year>2020</nph:Year>
            <nph:Month>3</nph:Month>
        </nph:BillingCycle>
        </v2:Input>
    </v2:GetBilledUsage>
 </soapenv:Body>
</soapenv:Envelope>

Example SOAP Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetBilledUsageResponse xmlns="http://nphase.com/unifiedwebservice/v2">
         <Output xmlns:a="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.DeviceService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:AccountName>7653489765-12345</a:AccountName>
            <a:AccountNumber>0123454356-00001</a:AccountNumber>
            <a:RatePlanDescription i:nil="true"/>
            <a:Label>
                  <b:Name>VIN</b:Name>
                  <b:Value>JN8AS5MT3DW541941</b:Value>
            </a:Label>
               <a:DeviceIdentifier>
                  <b:Kind>EID</b:Kind>
                  <b:Identifier>11412932897852347208444228499828</b:Identifier>
               </a:DeviceIdentifier>
            <a:BillingCycle>
               <a:Year>2020</a:Year>
               <a:Month>3</a:Month>
            </a:BillingCycle>
            <a:UnitOfMeasure>MB</a:UnitOfMeasure>
            <a:TotalDeviceBilledUsage>3</a:TotalDeviceBilledUsage>
            <a:TotalDeviceBilledChargeAmt>100</a:TotalDeviceBilledChargeAmt>
            <a:UsageSegments>
               <a:UsageSegment>
                  <a:RatingGroup>0000010101</a:RatingGroup>
                  <a:RatingGroupDetails>
                     <a:CurrentCycleDetails>
                        <a:RatingGroupDetail>
                           <a:CountryCode>CAN</a:CountryCode>
                           <a:Usage>3</a:Usage>
                           <a:ChargeAmt>100</a:ChargeAmt>
                           <a:ChargeDescription>0</a:ChargeDescription>
                        </a:RatingGroupDetail>
                     </a:CurrentCycleDetails>
                     <a:UnBilledPreviousCycleDetails i:nil="true"/>
                  </a:RatingGroupDetails>
               </a:UsageSegment>
            </a:UsageSegments>
         </Output>
      </GetBilledUsageResponse>
   </s:Body>
</s:Envelope>