Skip to content

Commit

Permalink
chore: add aliases for DonationAmount fields (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Sep 3, 2022
1 parent 43b5225 commit 7a41221
Showing 1 changed file with 4 additions and 0 deletions.
@@ -1,5 +1,6 @@
package com.github.twitch4j.common.util;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand All @@ -25,18 +26,21 @@ public class DonationAmount {
* <p>
* For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
*/
@JsonAlias({ "amount", "donation_amount" })
private Long value;

/**
* The number of decimal places used by the currency.
* <p>
* For example, USD uses two decimal places.
*/
@JsonAlias("exponent")
private Integer decimalPlaces;

/**
* The ISO-4217 three-letter currency code that identifies the type of currency in {@link #getValue()}.
*/
@JsonAlias({ "campaign_currency", "donation_currency" })
private String currency;

/**
Expand Down

0 comments on commit 7a41221

Please sign in to comment.