Fix JSON schema for Xero Invoice
This commit is contained in:
parent
74ebb9d61a
commit
e475a4e471
1 changed files with 2 additions and 2 deletions
|
@ -180,7 +180,7 @@ data XeroInvoice =
|
||||||
, xi_number :: T.Text
|
, xi_number :: T.Text
|
||||||
, xi_contact :: T.Text
|
, xi_contact :: T.Text
|
||||||
, xi_currency :: T.Text
|
, xi_currency :: T.Text
|
||||||
, xi_currRate :: Double
|
, xi_currRate :: Maybe Double
|
||||||
, xi_total :: Double
|
, xi_total :: Double
|
||||||
, xi_status :: T.Text
|
, xi_status :: T.Text
|
||||||
, xi_date :: T.Text
|
, xi_date :: T.Text
|
||||||
|
@ -199,7 +199,7 @@ instance FromJSON XeroInvoice where
|
||||||
c <- obj .: "Contact"
|
c <- obj .: "Contact"
|
||||||
cN <- c .: "Name"
|
cN <- c .: "Name"
|
||||||
cu <- obj .: "CurrencyCode"
|
cu <- obj .: "CurrencyCode"
|
||||||
cR <- obj .: "CurrencyRate"
|
cR <- obj .:? "CurrencyRate"
|
||||||
total <- obj .: "AmountDue"
|
total <- obj .: "AmountDue"
|
||||||
status <- obj .: "Status"
|
status <- obj .: "Status"
|
||||||
d <- obj .: "Date"
|
d <- obj .: "Date"
|
||||||
|
|
Loading…
Reference in a new issue