Sha256: eff5083cc51757bd07980c75cfc7b00f31db06c90f36ab5261a7126f7351e71b

Contents?: true

Size: 832 Bytes

Versions: 4

Compression:

Stored size: 832 Bytes

Contents

## Updating charges

### Changing the metadata

You can update the `custom_id` or the `notification_url` of a charge:

```ruby
params = {
  id: 1008
}

body = {
  notification_url: "http://yourdomain.com",
  custom_id: "my_new_id"
}

gerencianet = Gerencianet.new(options)
gerencianet.update_charge_metadata(params: params, body: body)
```

If everything goes well, the return will be:

```ruby
{
  "code": 200
}
```

### Updating the expiration date of a billet

Only charges with status `waiting` or `unpaid` and with payment method `banking_billet` can have the `expire_at` changed:

```ruby
params = {
  id: 1008
}

body = {
  expire_at: "2020-12-12"
}

gerencianet = Gerencianet.new(options)
gerencianet.update_billet(params: params, body: body)
```

If everything goes well, the return will be:

```ruby
{
  "code": 200
}
```

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gerencianet-0.0.5 docs/charge-update.md
gerencianet-0.0.4 docs/charge-update.md
gerencianet-0.0.3 docs/charge-update.md
gerencianet-0.0.2 docs/charge-update.md