@@ -415,6 +415,10 @@ public String description() {
415415 return optString ("description" );
416416 }
417417
418+ public String lineItemId () {
419+ return optString ("line_item_id" );
420+ }
421+
418422 public EntityType entityType () {
419423 return reqEnum ("entity_type" , EntityType .class );
420424 }
@@ -498,6 +502,49 @@ public Long txnAmount() {
498502
499503 }
500504
505+ public static class ReferenceTransaction extends Resource <ReferenceTransaction > {
506+ public ReferenceTransaction (JSONObject jsonObj ) {
507+ super (jsonObj );
508+ }
509+
510+ public Long appliedAmount () {
511+ return reqLong ("applied_amount" );
512+ }
513+
514+ public Timestamp appliedAt () {
515+ return reqTimestamp ("applied_at" );
516+ }
517+
518+ public String txnId () {
519+ return reqString ("txn_id" );
520+ }
521+
522+ public Transaction .Status txnStatus () {
523+ return optEnum ("txn_status" , Transaction .Status .class );
524+ }
525+
526+ public Timestamp txnDate () {
527+ return optTimestamp ("txn_date" );
528+ }
529+
530+ public Long txnAmount () {
531+ return optLong ("txn_amount" );
532+ }
533+
534+ public Transaction .Type txnType () {
535+ return reqEnum ("txn_type" , Transaction .Type .class );
536+ }
537+
538+ public Long amountCapturable () {
539+ return reqLong ("amount_capturable" );
540+ }
541+
542+ public Transaction .AuthorizationReason authorizationReason () {
543+ return optEnum ("authorization_reason" , Transaction .AuthorizationReason .class );
544+ }
545+
546+ }
547+
501548 public static class DunningAttempt extends Resource <DunningAttempt > {
502549 public DunningAttempt (JSONObject jsonObj ) {
503550 super (jsonObj );
@@ -1115,6 +1162,10 @@ public List<Invoice.LinkedPayment> linkedPayments() {
11151162 return optList ("linked_payments" , Invoice .LinkedPayment .class );
11161163 }
11171164
1165+ public List <Invoice .ReferenceTransaction > referenceTransactions () {
1166+ return optList ("reference_transactions" , Invoice .ReferenceTransaction .class );
1167+ }
1168+
11181169 public List <Invoice .DunningAttempt > dunningAttempts () {
11191170 return optList ("dunning_attempts" , Invoice .DunningAttempt .class );
11201171 }
@@ -3437,6 +3488,10 @@ public ImportInvoiceRequest lineItemTierUnitAmountInDecimal(int index, String li
34373488 params .addOpt ("line_item_tiers[unit_amount_in_decimal][" + index + "]" , lineItemTierUnitAmountInDecimal );
34383489 return this ;
34393490 }
3491+ public ImportInvoiceRequest discountLineItemId (int index , String discountLineItemId ) {
3492+ params .addOpt ("discounts[line_item_id][" + index + "]" , discountLineItemId );
3493+ return this ;
3494+ }
34403495 public ImportInvoiceRequest discountEntityType (int index , Invoice .Discount .EntityType discountEntityType ) {
34413496 params .add ("discounts[entity_type][" + index + "]" , discountEntityType );
34423497 return this ;
0 commit comments