Update a Customer Deposit
patch
/bcws/webresources/v1.0/depositManagement/customerDeposit/{id}
Updates the specified customer deposit.
Request
Path Parameters
-
id(required): string
The customer deposit ID, for example: 0.0.0.1+-purchased_deposit+1234567
Supported Media Types
- application/xml
- application/json
The customer deposit to update. The minimum required parameters are:
- customerRef
- DepositSpecRef
- totalAmount
Nested Schema : CustomerDeposit
Type:
Show Source
object
-
balanceAmount: object
Money
-
billProfileRef(required): string
The bill profile reference.
-
code(required): string
The external identifier.
-
createdAt(required): string
The date when the customer deposit is created.
-
customerRef(required): string
The customer reference.
-
depositSpecName(required): string
The deposit specoification name.
-
depositSpecRef(required): string
The deposit specification reference.
-
discountAmount: object
Money
-
effectiveDate(required): string
The date from which the customer deposit is effective.
-
href(required): string
The unique resource URL, used to get the object.
-
id(required): string
The customer deposit ID.
-
interestAmount: object
Money
-
modifiedAt(required): string
The date when the customer deposit is modified.
-
notes: string
The notes for the customer deposit.
-
receivedAmount: object
Money
-
releasedAmount: object
Money
-
releaseType: integer
(int32)
The release type. Allowed Values: 1 (Prepayment), 2 (Refund), 3 (Zeroise).
-
serviceRef(required): string
The service reference.
-
status(required): string
The deposit status. Allowed Values: WAITING, ACTIVE, EXPIRED, TRANSFERRED, RELEASED, REFUNDED, CANCELLED
-
totalAmount: object
Money
-
transactions(required): array
transactions
-
validFor: object
TimePeriod
-
validityRule: object
DepositValidityRule
Nested Schema : Money
Type:
Show Source
object
-
amount(required): number
The amount of money.
-
currency: integer
(int32)
The currency for the money.
Nested Schema : DepositValidityRule
Type:
Show Source
object
-
endOffsetPeriodUnit: integer
(int32)
The unit of measure for the end offset.
Allowed Values:- 0 (Month)
- 1 (Day)
- 2 (Week)
- 3 (Year)
-
endOffsetPeriodValue: integer
(int32)
The value for the end offset.
Nested Schema : CustomerDepositTransactions
Type:
Show Source
object
-
transactionRef(required): string
Reference to the transaction record.
-
transactions(required): string
The transactions.
Nested Schema : DepositPayment
Type:
Show Source
object
-
completedAt: string
The deposit payment completion date.
-
createdAt: string
The date when the deposit payment is created.
-
currency: integer
(int32)
The code for the payment's currency.
-
customerDepositRef: string
The customer deposit reference.
-
customerRef: string
The customer reference.
-
glCode: string
The general ledger ID.
-
href: string
The unique resource URL, used to get the object.
-
id: string
The deposit payment ID.
-
notes: string
Notes about the deposit payment.
-
payinfoTypeObject: object
Discriminator: @class
Discriminator:
{ "propertyName":"@class" }
-
paymentAmount: object
Money
-
paymentMethodType: integer
(int32)
The payment method type. Allowed Values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
- 3 (Prepayment)
- 4 (Other)
-
paymentRef: string
The payment reference.
-
status: integer
(int32)
The deposit payment status. Allowed Values: 1 (Completed), 2 (Failed), 3 (Pending).
Nested Schema : Discriminator: @class
Type:
Show Source
object
-
accountObj: object
ResourceRef
-
creationDate: string
(date-time)
The date and time the payment type was created.
-
extension: object
extension
The extended attributes.
-
id: object
ResourceRef
-
name: string
The name of the payment type.
-
paymentType: integer
(int32)
The payment type.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
The customer deposit to update. The minimum required parameters are:
- customerRef
- DepositSpecRef
- totalAmount
Nested Schema : CustomerDeposit
Type:
Show Source
object
-
balanceAmount: object
Money
-
billProfileRef(required): string
The bill profile reference.
-
code(required): string
The external identifier.
-
createdAt(required): string
The date when the customer deposit is created.
-
customerRef(required): string
The customer reference.
-
depositSpecName(required): string
The deposit specoification name.
-
depositSpecRef(required): string
The deposit specification reference.
-
discountAmount: object
Money
-
effectiveDate(required): string
The date from which the customer deposit is effective.
-
href(required): string
The unique resource URL, used to get the object.
-
id(required): string
The customer deposit ID.
-
interestAmount: object
Money
-
modifiedAt(required): string
The date when the customer deposit is modified.
-
notes: string
The notes for the customer deposit.
-
receivedAmount: object
Money
-
releasedAmount: object
Money
-
releaseType: integer
(int32)
The release type. Allowed Values: 1 (Prepayment), 2 (Refund), 3 (Zeroise).
-
serviceRef(required): string
The service reference.
-
status(required): string
The deposit status. Allowed Values: WAITING, ACTIVE, EXPIRED, TRANSFERRED, RELEASED, REFUNDED, CANCELLED
-
totalAmount: object
Money
-
transactions(required): array
transactions
-
validFor: object
TimePeriod
-
validityRule: object
DepositValidityRule
Nested Schema : Money
Type:
Show Source
object
-
amount(required): number
The amount of money.
-
currency: integer
(int32)
The currency for the money.
Nested Schema : DepositValidityRule
Type:
Show Source
object
-
endOffsetPeriodUnit: integer
(int32)
The unit of measure for the end offset.
Allowed Values:- 0 (Month)
- 1 (Day)
- 2 (Week)
- 3 (Year)
-
endOffsetPeriodValue: integer
(int32)
The value for the end offset.
Nested Schema : CustomerDepositTransactions
Type:
Show Source
object
-
transactionRef(required): string
Reference to the transaction record.
-
transactions(required): string
The transactions.
Nested Schema : DepositPayment
Type:
Show Source
object
-
completedAt: string
The deposit payment completion date.
-
createdAt: string
The date when the deposit payment is created.
-
currency: integer
(int32)
The code for the payment's currency.
-
customerDepositRef: string
The customer deposit reference.
-
customerRef: string
The customer reference.
-
glCode: string
The general ledger ID.
-
href: string
The unique resource URL, used to get the object.
-
id: string
The deposit payment ID.
-
notes: string
Notes about the deposit payment.
-
payinfoTypeObject: object
Discriminator: @class
Discriminator:
{ "propertyName":"@class" }
-
paymentAmount: object
Money
-
paymentMethodType: integer
(int32)
The payment method type. Allowed Values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
- 3 (Prepayment)
- 4 (Other)
-
paymentRef: string
The payment reference.
-
status: integer
(int32)
The deposit payment status. Allowed Values: 1 (Completed), 2 (Failed), 3 (Pending).
Nested Schema : Discriminator: @class
Type:
Show Source
object
-
accountObj: object
ResourceRef
-
creationDate: string
(date-time)
The date and time the payment type was created.
-
extension: object
extension
The extended attributes.
-
id: object
ResourceRef
-
name: string
The name of the payment type.
-
paymentType: integer
(int32)
The payment type.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Response
201 Response
The customer deposit order was updated successfully, and the ID of the updated deposit was returned.
500 Response
An error occurred. An exception has been raised.
Examples
This example shows how to update a deposit by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X PUT 'http://hostname:port/bcws/webresources/version/depositManagement/customerDeposit/0.0.0.1+-purchased_deposit+2552521' -H 'content-type: application/json' -d @updateDeposit.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- updateDeposit.json is the JSON file that specifies the details to update.
Example of Request Body
This example shows the contents of the updateDeposit.json file sent as the request body.
{
"customerDeposit": {
"customerRef": "0.0.0.1+-account+2205426",
"billProfileRef": "0.0.0.1+-billinfo+2206194",
"depositSpecRef": "0.0.0.1+-deposit_specification+2207626",
"serviceRef": "0.0.0.1+-service-telco-gsm+2203914",
"validityRule": {
"endOffsetPeriodUnit": "DAYS",
"endOffsetPeriodValue": "10"
},
"totalAmount": {
"amount": "123",
"currency": "EUR"
},
"releaseType": "PREPAYMENT"
},
"payments": [
{
"paymentAmount": {
"amount": 99.95,
"currency": "EUR"
},
"notes": "HELO",
"glCode": "101",
"paymentMethodType": "CASH",
"paymentRef": "0.0.0.1+-payment+1563385",
"status": "PENDING"
}
]
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"id": " 0.0.0.1+-purchased_deposit+2654172 ",
"href": "http://hostname:port/bcws/webresources/version/depositManagement/customerDeposit/0.0.0.1+-purchased_deposit+2654172"
}