Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CheckEditable.amount to Double #345

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions __tests__/Model/CheckEditableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Object[][] checkEditableDpMethod(){
{"from", new AddressDomestic()},
{"to", new AddressDomestic()},
{"bank_account", "fake account"},
{"amount", 111f},
{"amount", 147480.18d},
{"logo", "fake logo"},
{"check_bottom", "fake bottom"},
{"attachment", "fake attachment"},
Expand Down Expand Up @@ -61,7 +61,7 @@ public void checkEditableTestWithProvidedValue(String prop, Object val) throws E
break;
}
case "amount": {
Float castedVal = (Float)val;
Double castedVal = (Double)val;
rec.setAmount(castedVal);
Assert.assertEquals(rec.getAmount(), castedVal);
break;
Expand Down
2 changes: 1 addition & 1 deletion docs/CheckEditable.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**from** | **Object** | Must either be an address ID or an inline object with correct address parameters. |
**to** | **Object** | Must either be an address ID or an inline object with correct address parameters. |
**bankAccount** | **String** | |
**amount** | **Float** | The payment amount to be sent in US dollars. |
**amount** | **Double** | The payment amount to be sent in US dollars. |
**logo** | **String** | Accepts a remote URL or local file upload to an image to print (in grayscale) in the upper-left corner of your check. | [optional]
**checkBottom** | **String** | The artwork to use on the bottom of the check page. Notes: - HTML merge variables should not include delimiting whitespace. - PDF, PNG, and JPGs must be sized at 8.5\"x11\" at 300 DPI, while supplied HTML will be rendered and trimmed to fit on a 8.5\"x11\" page. - The check bottom will always be printed in black & white. - Must conform to [this template](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_bottom_template.pdf). Need more help? Consult our [HTML examples](#section/HTML-Examples). | [optional]
**attachment** | **String** | A document to include with the check. | [optional]
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/lob/model/CheckEditable.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public String getBankAccount() {
@SerializedName(SERIALIZED_NAME_AMOUNT)


private Float amount;
private Double amount;
/**
* The payment amount to be sent in US dollars.
* maximum: 999999.99
Expand All @@ -119,7 +119,7 @@ public String getBankAccount() {

@ApiModelProperty(required = true, value = "The payment amount to be sent in US dollars.")

public Float getAmount() {
public Double getAmount() {
return amount;
}

Expand Down Expand Up @@ -476,15 +476,15 @@ public void setBankAccount(String bankAccount) {


/*
public CheckEditable amount(Float amount) {
public CheckEditable amount(Double amount) {

this.amount = amount;
return this;
}
*/


public void setAmount(Float amount) {
public void setAmount(Double amount) {
this.amount = amount;
}

Expand Down