File tree Expand file tree Collapse file tree 5 files changed +22
-10
lines changed
core/src/main/java/io/snabble/sdk
ui/src/main/java/io/snabble/sdk/ui/payment Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ enum class BarcodeFormat {
1717 /* *
1818 * Parse the BarcodeFormat from a string
1919 */
20+ @JvmStatic
2021 fun parse (str : String? ): BarcodeFormat ? {
2122 return when (str) {
2223 " code39" -> CODE_39
Original file line number Diff line number Diff line change @@ -7,21 +7,26 @@ data class Company(
77 /* *
88 * Get the name of the city
99 */
10- val city : String ,
10+ @JvmField
11+ val city : String? ,
1112 /* *
1213 * Get the name of the country
1314 */
14- val country : String ,
15+ @JvmField
16+ val country : String? ,
1517 /* *
1618 * Get the companies name
1719 */
18- val name : String ,
20+ @JvmField
21+ val name : String? ,
1922 /* *
2023 * Get the name of the street, including the house number
2124 */
22- val street : String ,
25+ @JvmField
26+ val street : String? ,
2327 /* *
2428 * Get the zip code
2529 */
26- val zip : String
30+ @JvmField
31+ val zip : String?
2732)
Original file line number Diff line number Diff line change @@ -7,25 +7,31 @@ data class ReceiptInfo(
77 /* *
88 * Unique id of the receipt / order
99 */
10+ @JvmField
1011 val id : String ,
1112 /* *
1213 * Get the project id of the order
1314 */
15+ @JvmField
1416 val projectId : String ,
1517 /* *
1618 * Unix timestamp of the purchase
1719 */
20+ @JvmField
1821 val timestamp : Long ,
1922 /* *
2023 * Url to the pdf document, containing the receipt
2124 */
22- val pdfUrl : String ,
25+ @JvmField
26+ val pdfUrl : String? ,
2327 /* *
2428 * Name of the shop in which the order was fulfilled
2529 */
30+ @JvmField
2631 val shopName : String ,
2732 /* *
2833 * Final price of the order
2934 */
35+ @JvmField
3036 val price : String
3137)
Original file line number Diff line number Diff line change @@ -141,8 +141,8 @@ public void success(ApiReceipt apiReceipt) {
141141 }
142142
143143 Collections .sort (result , (o1 , o2 ) -> {
144- Date date1 = new Date (o1 .getTimestamp () );
145- Date date2 = new Date (o2 .getTimestamp () );
144+ Date date1 = new Date (o1 .timestamp );
145+ Date date2 = new Date (o2 .timestamp );
146146 return -date1 .compareTo (date2 );
147147 });
148148
Original file line number Diff line number Diff line change @@ -254,8 +254,8 @@ private void loadForm(HashResponse hashResponse) {
254254
255255 Project project = getProject ();
256256 String companyName = project .getName ();
257- if (project .getCompany () != null && project .getCompany ().getName () != null ) {
258- companyName = project .getCompany ().getName () ;
257+ if (project .getCompany () != null && project .getCompany ().name != null ) {
258+ companyName = project .getCompany ().name ;
259259 }
260260 NumberFormat numberFormat = NumberFormat .getCurrencyInstance (project .getCurrencyLocale ());
261261 BigDecimal chargeTotal = new BigDecimal (hashResponse .chargeTotal );
You can’t perform that action at this time.
0 commit comments