Update dunning rule policy
PUThttps://euwest.api.elasticpath.com/v2/subscriptions/dunning-rules/:dunning_rule_uuid
Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the rule is not updated. For fields that are optional, an existing value can be removed by specifying a value of null.
Request
Responses
- 200
- 400
- 403
- 404
- 409
- 500
Success. The dunning rule set has been updated.
Bad request. The request failed validation.
Forbidden. The operation is forbidden on this entity.
Not found. The requested entity does not exist.
Write conflict. Unable to perform the operation at this time.
Internal server error. There was a system failure in the platform.
Authorization: http
name: BearerTokentype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/v2/subscriptions/dunning-rules/:dunning_rule_uuid");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"id\": \"11111111-2222-3333-4444-555555555555\",\n \"type\": \"subscription_dunning_rule\",\n \"attributes\": {\n \"payment_retry_type\": \"fixed\",\n \"payment_retry_interval\": 1,\n \"payment_retry_unit\": \"day\",\n \"payment_retry_multiplier\": 1,\n \"payment_retries_limit\": 5,\n \"action\": \"none\",\n \"default\": false\n }\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear