stripe 17.3.0.pre.alpha.1 → 17.3.0.pre.alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_version.rb +1 -1
  3. data/lib/stripe/object_types.rb +1 -1
  4. data/lib/stripe/params/account_create_params.rb +33 -1
  5. data/lib/stripe/params/account_person_create_params.rb +33 -1
  6. data/lib/stripe/params/account_person_update_params.rb +33 -1
  7. data/lib/stripe/params/account_update_params.rb +33 -1
  8. data/lib/stripe/params/capital/financing_offer_create_params.rb +5 -5
  9. data/lib/stripe/params/capital/financing_offer_refill_params.rb +5 -5
  10. data/lib/stripe/params/delegated_checkout/requested_session_create_params.rb +1 -1
  11. data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +1 -1
  12. data/lib/stripe/params/invoice_create_preview_params.rb +57 -1
  13. data/lib/stripe/params/issuing/program_create_params.rb +21 -0
  14. data/lib/stripe/params/issuing/program_list_params.rb +24 -0
  15. data/lib/stripe/params/issuing/program_retrieve_params.rb +15 -0
  16. data/lib/stripe/params/issuing/program_update_params.rb +21 -0
  17. data/lib/stripe/params/quote_create_params.rb +210 -2
  18. data/lib/stripe/params/quote_update_params.rb +210 -2
  19. data/lib/stripe/params/subscription_schedule_create_params.rb +62 -2
  20. data/lib/stripe/params/subscription_schedule_update_params.rb +62 -2
  21. data/lib/stripe/params/test_helpers/capital/financing_offer_create_params.rb +5 -5
  22. data/lib/stripe/params/test_helpers/capital/financing_offer_refill_params.rb +5 -5
  23. data/lib/stripe/params/token_create_params.rb +66 -2
  24. data/lib/stripe/params.rb +4 -5
  25. data/lib/stripe/resources/delegated_checkout/requested_session.rb +19 -1
  26. data/lib/stripe/resources/discount.rb +2 -0
  27. data/lib/stripe/resources/invoice.rb +16 -0
  28. data/lib/stripe/resources/invoice_item.rb +16 -0
  29. data/lib/stripe/resources/invoice_line_item.rb +16 -0
  30. data/lib/stripe/resources/issuing/program.rb +69 -0
  31. data/lib/stripe/resources/person.rb +36 -0
  32. data/lib/stripe/resources/quote.rb +348 -1
  33. data/lib/stripe/resources/quote_preview_invoice.rb +16 -0
  34. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +174 -0
  35. data/lib/stripe/resources/subscription.rb +105 -2
  36. data/lib/stripe/resources/subscription_schedule.rb +174 -0
  37. data/lib/stripe/resources.rb +1 -1
  38. data/lib/stripe/services/issuing/program_service.rb +52 -0
  39. data/lib/stripe/services/issuing_service.rb +2 -1
  40. data/lib/stripe/services/v2_services.rb +1 -2
  41. data/lib/stripe/services.rb +1 -2
  42. data/lib/stripe/version.rb +1 -1
  43. data/rbi/stripe.rbi +2356 -203
  44. metadata +8 -10
  45. data/lib/stripe/params/v2/tax/automatic_rule_create_params.rb +0 -20
  46. data/lib/stripe/params/v2/tax/automatic_rule_deactivate_params.rb +0 -10
  47. data/lib/stripe/params/v2/tax/automatic_rule_find_params.rb +0 -17
  48. data/lib/stripe/params/v2/tax/automatic_rule_retrieve_params.rb +0 -10
  49. data/lib/stripe/params/v2/tax/automatic_rule_update_params.rb +0 -17
  50. data/lib/stripe/resources/v2/tax/automatic_rule.rb +0 -39
  51. data/lib/stripe/services/v2/tax/automatic_rule_service.rb +0 -65
  52. data/lib/stripe/services/v2/tax_service.rb +0 -15
@@ -588,6 +588,173 @@ module Stripe
588
588
  end
589
589
  end
590
590
 
591
+ class BillingSchedule < ::Stripe::StripeObject
592
+ class AppliesTo < ::Stripe::StripeObject
593
+ # The billing schedule will apply to the subscription item with the given price ID.
594
+ attr_reader :price
595
+ # Controls which subscription items the billing schedule applies to.
596
+ attr_reader :type
597
+
598
+ def self.inner_class_types
599
+ @inner_class_types = {}
600
+ end
601
+
602
+ def self.field_remappings
603
+ @field_remappings = {}
604
+ end
605
+ end
606
+
607
+ class BillFrom < ::Stripe::StripeObject
608
+ class AmendmentStart < ::Stripe::StripeObject
609
+ # Use an index to specify the position of an amendment to start prebilling with.
610
+ attr_reader :index
611
+
612
+ def self.inner_class_types
613
+ @inner_class_types = {}
614
+ end
615
+
616
+ def self.field_remappings
617
+ @field_remappings = {}
618
+ end
619
+ end
620
+
621
+ class LineStartsAt < ::Stripe::StripeObject
622
+ # Unique identifier for the object.
623
+ attr_reader :id
624
+
625
+ def self.inner_class_types
626
+ @inner_class_types = {}
627
+ end
628
+
629
+ def self.field_remappings
630
+ @field_remappings = {}
631
+ end
632
+ end
633
+
634
+ class Relative < ::Stripe::StripeObject
635
+ # Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
636
+ attr_reader :interval
637
+ # The multiplier applied to the interval.
638
+ attr_reader :interval_count
639
+
640
+ def self.inner_class_types
641
+ @inner_class_types = {}
642
+ end
643
+
644
+ def self.field_remappings
645
+ @field_remappings = {}
646
+ end
647
+ end
648
+ # Use an index to specify the position of an amendment to start prebilling with.
649
+ attr_reader :amendment_start
650
+ # The time the billing schedule applies from.
651
+ attr_reader :computed_timestamp
652
+ # Lets you bill the period starting from a particular Quote line.
653
+ attr_reader :line_starts_at
654
+ # Timestamp is calculated from the request time.
655
+ attr_reader :relative
656
+ # Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
657
+ attr_reader :timestamp
658
+ # Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
659
+ attr_reader :type
660
+
661
+ def self.inner_class_types
662
+ @inner_class_types = {
663
+ amendment_start: AmendmentStart,
664
+ line_starts_at: LineStartsAt,
665
+ relative: Relative,
666
+ }
667
+ end
668
+
669
+ def self.field_remappings
670
+ @field_remappings = {}
671
+ end
672
+ end
673
+
674
+ class BillUntil < ::Stripe::StripeObject
675
+ class AmendmentEnd < ::Stripe::StripeObject
676
+ # Use an index to specify the position of an amendment to end prebilling with.
677
+ attr_reader :index
678
+
679
+ def self.inner_class_types
680
+ @inner_class_types = {}
681
+ end
682
+
683
+ def self.field_remappings
684
+ @field_remappings = {}
685
+ end
686
+ end
687
+
688
+ class Duration < ::Stripe::StripeObject
689
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
690
+ attr_reader :interval
691
+ # The multiplier applied to the interval.
692
+ attr_reader :interval_count
693
+
694
+ def self.inner_class_types
695
+ @inner_class_types = {}
696
+ end
697
+
698
+ def self.field_remappings
699
+ @field_remappings = {}
700
+ end
701
+ end
702
+
703
+ class LineEndsAt < ::Stripe::StripeObject
704
+ # Unique identifier for the object.
705
+ attr_reader :id
706
+
707
+ def self.inner_class_types
708
+ @inner_class_types = {}
709
+ end
710
+
711
+ def self.field_remappings
712
+ @field_remappings = {}
713
+ end
714
+ end
715
+ # The timestamp the billing schedule will apply until.
716
+ attr_reader :computed_timestamp
717
+ # Specifies the billing period.
718
+ attr_reader :duration
719
+ # If specified, the billing schedule will apply until the specified timestamp.
720
+ attr_reader :timestamp
721
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
722
+ attr_reader :type
723
+ # Use an index to specify the position of an amendment to end prebilling with.
724
+ attr_reader :amendment_end
725
+ # Lets you bill the period ending at a particular Quote line.
726
+ attr_reader :line_ends_at
727
+
728
+ def self.inner_class_types
729
+ @inner_class_types = {
730
+ duration: Duration,
731
+ amendment_end: AmendmentEnd,
732
+ line_ends_at: LineEndsAt,
733
+ }
734
+ end
735
+
736
+ def self.field_remappings
737
+ @field_remappings = {}
738
+ end
739
+ end
740
+ # Specifies which subscription items the billing schedule applies to.
741
+ attr_reader :applies_to
742
+ # Specifies the billing period.
743
+ attr_reader :bill_until
744
+ # Unique identifier for the billing schedule.
745
+ attr_reader :key
746
+ # Specifies the start of the billing period.
747
+ attr_reader :bill_from
748
+
749
+ def self.inner_class_types
750
+ @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
751
+ end
752
+
753
+ def self.field_remappings
754
+ @field_remappings = {}
755
+ end
756
+ end
757
+
591
758
  class Prebilling < ::Stripe::StripeObject
592
759
  # Attribute for field iterations
593
760
  attr_reader :iterations
@@ -624,12 +791,17 @@ module Stripe
624
791
  attr_reader :proration_behavior
625
792
  # Integer representing the number of trial period days before the customer is charged for the first time.
626
793
  attr_reader :trial_period_days
794
+ # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
795
+ attr_reader :billing_schedules
796
+ # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
797
+ attr_reader :phase_effective_at
627
798
 
628
799
  def self.inner_class_types
629
800
  @inner_class_types = {
630
801
  bill_on_acceptance: BillOnAcceptance,
631
802
  billing_mode: BillingMode,
632
803
  prebilling: Prebilling,
804
+ billing_schedules: BillingSchedule,
633
805
  }
634
806
  end
635
807
 
@@ -748,6 +920,173 @@ module Stripe
748
920
  @field_remappings = {}
749
921
  end
750
922
  end
923
+
924
+ class BillingSchedule < ::Stripe::StripeObject
925
+ class AppliesTo < ::Stripe::StripeObject
926
+ # The billing schedule will apply to the subscription item with the given price ID.
927
+ attr_reader :price
928
+ # Controls which subscription items the billing schedule applies to.
929
+ attr_reader :type
930
+
931
+ def self.inner_class_types
932
+ @inner_class_types = {}
933
+ end
934
+
935
+ def self.field_remappings
936
+ @field_remappings = {}
937
+ end
938
+ end
939
+
940
+ class BillFrom < ::Stripe::StripeObject
941
+ class AmendmentStart < ::Stripe::StripeObject
942
+ # Use an index to specify the position of an amendment to start prebilling with.
943
+ attr_reader :index
944
+
945
+ def self.inner_class_types
946
+ @inner_class_types = {}
947
+ end
948
+
949
+ def self.field_remappings
950
+ @field_remappings = {}
951
+ end
952
+ end
953
+
954
+ class LineStartsAt < ::Stripe::StripeObject
955
+ # Unique identifier for the object.
956
+ attr_reader :id
957
+
958
+ def self.inner_class_types
959
+ @inner_class_types = {}
960
+ end
961
+
962
+ def self.field_remappings
963
+ @field_remappings = {}
964
+ end
965
+ end
966
+
967
+ class Relative < ::Stripe::StripeObject
968
+ # Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
969
+ attr_reader :interval
970
+ # The multiplier applied to the interval.
971
+ attr_reader :interval_count
972
+
973
+ def self.inner_class_types
974
+ @inner_class_types = {}
975
+ end
976
+
977
+ def self.field_remappings
978
+ @field_remappings = {}
979
+ end
980
+ end
981
+ # Use an index to specify the position of an amendment to start prebilling with.
982
+ attr_reader :amendment_start
983
+ # The time the billing schedule applies from.
984
+ attr_reader :computed_timestamp
985
+ # Lets you bill the period starting from a particular Quote line.
986
+ attr_reader :line_starts_at
987
+ # Timestamp is calculated from the request time.
988
+ attr_reader :relative
989
+ # Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
990
+ attr_reader :timestamp
991
+ # Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
992
+ attr_reader :type
993
+
994
+ def self.inner_class_types
995
+ @inner_class_types = {
996
+ amendment_start: AmendmentStart,
997
+ line_starts_at: LineStartsAt,
998
+ relative: Relative,
999
+ }
1000
+ end
1001
+
1002
+ def self.field_remappings
1003
+ @field_remappings = {}
1004
+ end
1005
+ end
1006
+
1007
+ class BillUntil < ::Stripe::StripeObject
1008
+ class AmendmentEnd < ::Stripe::StripeObject
1009
+ # Use an index to specify the position of an amendment to end prebilling with.
1010
+ attr_reader :index
1011
+
1012
+ def self.inner_class_types
1013
+ @inner_class_types = {}
1014
+ end
1015
+
1016
+ def self.field_remappings
1017
+ @field_remappings = {}
1018
+ end
1019
+ end
1020
+
1021
+ class Duration < ::Stripe::StripeObject
1022
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
1023
+ attr_reader :interval
1024
+ # The multiplier applied to the interval.
1025
+ attr_reader :interval_count
1026
+
1027
+ def self.inner_class_types
1028
+ @inner_class_types = {}
1029
+ end
1030
+
1031
+ def self.field_remappings
1032
+ @field_remappings = {}
1033
+ end
1034
+ end
1035
+
1036
+ class LineEndsAt < ::Stripe::StripeObject
1037
+ # Unique identifier for the object.
1038
+ attr_reader :id
1039
+
1040
+ def self.inner_class_types
1041
+ @inner_class_types = {}
1042
+ end
1043
+
1044
+ def self.field_remappings
1045
+ @field_remappings = {}
1046
+ end
1047
+ end
1048
+ # The timestamp the billing schedule will apply until.
1049
+ attr_reader :computed_timestamp
1050
+ # Specifies the billing period.
1051
+ attr_reader :duration
1052
+ # If specified, the billing schedule will apply until the specified timestamp.
1053
+ attr_reader :timestamp
1054
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
1055
+ attr_reader :type
1056
+ # Use an index to specify the position of an amendment to end prebilling with.
1057
+ attr_reader :amendment_end
1058
+ # Lets you bill the period ending at a particular Quote line.
1059
+ attr_reader :line_ends_at
1060
+
1061
+ def self.inner_class_types
1062
+ @inner_class_types = {
1063
+ duration: Duration,
1064
+ amendment_end: AmendmentEnd,
1065
+ line_ends_at: LineEndsAt,
1066
+ }
1067
+ end
1068
+
1069
+ def self.field_remappings
1070
+ @field_remappings = {}
1071
+ end
1072
+ end
1073
+ # Specifies which subscription items the billing schedule applies to.
1074
+ attr_reader :applies_to
1075
+ # Specifies the billing period.
1076
+ attr_reader :bill_until
1077
+ # Unique identifier for the billing schedule.
1078
+ attr_reader :key
1079
+ # Specifies the start of the billing period.
1080
+ attr_reader :bill_from
1081
+
1082
+ def self.inner_class_types
1083
+ @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
1084
+ end
1085
+
1086
+ def self.field_remappings
1087
+ @field_remappings = {}
1088
+ end
1089
+ end
751
1090
  # Attribute for field applies_to
752
1091
  attr_reader :applies_to
753
1092
  # Describes the period to bill for upon accepting the quote.
@@ -762,9 +1101,17 @@ module Stripe
762
1101
  attr_reader :end_behavior
763
1102
  # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
764
1103
  attr_reader :proration_behavior
1104
+ # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
1105
+ attr_reader :billing_schedules
1106
+ # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1107
+ attr_reader :phase_effective_at
765
1108
 
766
1109
  def self.inner_class_types
767
- @inner_class_types = { applies_to: AppliesTo, bill_on_acceptance: BillOnAcceptance }
1110
+ @inner_class_types = {
1111
+ applies_to: AppliesTo,
1112
+ bill_on_acceptance: BillOnAcceptance,
1113
+ billing_schedules: BillingSchedule,
1114
+ }
768
1115
  end
769
1116
 
770
1117
  def self.field_remappings
@@ -364,6 +364,19 @@ module Stripe
364
364
  end
365
365
  end
366
366
 
367
+ class ScheduleDetails < ::Stripe::StripeObject
368
+ # The schedule that generated this invoice
369
+ attr_reader :schedule
370
+
371
+ def self.inner_class_types
372
+ @inner_class_types = {}
373
+ end
374
+
375
+ def self.field_remappings
376
+ @field_remappings = {}
377
+ end
378
+ end
379
+
367
380
  class SubscriptionDetails < ::Stripe::StripeObject
368
381
  class PauseCollection < ::Stripe::StripeObject
369
382
  # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
@@ -405,12 +418,15 @@ module Stripe
405
418
  attr_reader :subscription_details
406
419
  # The type of parent that generated this invoice
407
420
  attr_reader :type
421
+ # Details about the schedule that generated this invoice
422
+ attr_reader :schedule_details
408
423
 
409
424
  def self.inner_class_types
410
425
  @inner_class_types = {
411
426
  billing_cadence_details: BillingCadenceDetails,
412
427
  quote_details: QuoteDetails,
413
428
  subscription_details: SubscriptionDetails,
429
+ schedule_details: ScheduleDetails,
414
430
  }
415
431
  end
416
432
 
@@ -181,6 +181,8 @@ module Stripe
181
181
  attr_reader :on_behalf_of
182
182
  # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
183
183
  attr_reader :transfer_data
184
+ # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
185
+ attr_reader :phase_effective_at
184
186
 
185
187
  def self.inner_class_types
186
188
  @inner_class_types = {
@@ -664,6 +666,173 @@ module Stripe
664
666
  @field_remappings = {}
665
667
  end
666
668
  end
669
+
670
+ class BillingSchedule < ::Stripe::StripeObject
671
+ class AppliesTo < ::Stripe::StripeObject
672
+ # The billing schedule will apply to the subscription item with the given price ID.
673
+ attr_reader :price
674
+ # Controls which subscription items the billing schedule applies to.
675
+ attr_reader :type
676
+
677
+ def self.inner_class_types
678
+ @inner_class_types = {}
679
+ end
680
+
681
+ def self.field_remappings
682
+ @field_remappings = {}
683
+ end
684
+ end
685
+
686
+ class BillFrom < ::Stripe::StripeObject
687
+ class AmendmentStart < ::Stripe::StripeObject
688
+ # Use an index to specify the position of an amendment to start prebilling with.
689
+ attr_reader :index
690
+
691
+ def self.inner_class_types
692
+ @inner_class_types = {}
693
+ end
694
+
695
+ def self.field_remappings
696
+ @field_remappings = {}
697
+ end
698
+ end
699
+
700
+ class LineStartsAt < ::Stripe::StripeObject
701
+ # Unique identifier for the object.
702
+ attr_reader :id
703
+
704
+ def self.inner_class_types
705
+ @inner_class_types = {}
706
+ end
707
+
708
+ def self.field_remappings
709
+ @field_remappings = {}
710
+ end
711
+ end
712
+
713
+ class Relative < ::Stripe::StripeObject
714
+ # Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
715
+ attr_reader :interval
716
+ # The multiplier applied to the interval.
717
+ attr_reader :interval_count
718
+
719
+ def self.inner_class_types
720
+ @inner_class_types = {}
721
+ end
722
+
723
+ def self.field_remappings
724
+ @field_remappings = {}
725
+ end
726
+ end
727
+ # Use an index to specify the position of an amendment to start prebilling with.
728
+ attr_reader :amendment_start
729
+ # The time the billing schedule applies from.
730
+ attr_reader :computed_timestamp
731
+ # Lets you bill the period starting from a particular Quote line.
732
+ attr_reader :line_starts_at
733
+ # Timestamp is calculated from the request time.
734
+ attr_reader :relative
735
+ # Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
736
+ attr_reader :timestamp
737
+ # Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
738
+ attr_reader :type
739
+
740
+ def self.inner_class_types
741
+ @inner_class_types = {
742
+ amendment_start: AmendmentStart,
743
+ line_starts_at: LineStartsAt,
744
+ relative: Relative,
745
+ }
746
+ end
747
+
748
+ def self.field_remappings
749
+ @field_remappings = {}
750
+ end
751
+ end
752
+
753
+ class BillUntil < ::Stripe::StripeObject
754
+ class AmendmentEnd < ::Stripe::StripeObject
755
+ # Use an index to specify the position of an amendment to end prebilling with.
756
+ attr_reader :index
757
+
758
+ def self.inner_class_types
759
+ @inner_class_types = {}
760
+ end
761
+
762
+ def self.field_remappings
763
+ @field_remappings = {}
764
+ end
765
+ end
766
+
767
+ class Duration < ::Stripe::StripeObject
768
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
769
+ attr_reader :interval
770
+ # The multiplier applied to the interval.
771
+ attr_reader :interval_count
772
+
773
+ def self.inner_class_types
774
+ @inner_class_types = {}
775
+ end
776
+
777
+ def self.field_remappings
778
+ @field_remappings = {}
779
+ end
780
+ end
781
+
782
+ class LineEndsAt < ::Stripe::StripeObject
783
+ # Unique identifier for the object.
784
+ attr_reader :id
785
+
786
+ def self.inner_class_types
787
+ @inner_class_types = {}
788
+ end
789
+
790
+ def self.field_remappings
791
+ @field_remappings = {}
792
+ end
793
+ end
794
+ # The timestamp the billing schedule will apply until.
795
+ attr_reader :computed_timestamp
796
+ # Specifies the billing period.
797
+ attr_reader :duration
798
+ # If specified, the billing schedule will apply until the specified timestamp.
799
+ attr_reader :timestamp
800
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
801
+ attr_reader :type
802
+ # Use an index to specify the position of an amendment to end prebilling with.
803
+ attr_reader :amendment_end
804
+ # Lets you bill the period ending at a particular Quote line.
805
+ attr_reader :line_ends_at
806
+
807
+ def self.inner_class_types
808
+ @inner_class_types = {
809
+ duration: Duration,
810
+ amendment_end: AmendmentEnd,
811
+ line_ends_at: LineEndsAt,
812
+ }
813
+ end
814
+
815
+ def self.field_remappings
816
+ @field_remappings = {}
817
+ end
818
+ end
819
+ # Specifies which subscription items the billing schedule applies to.
820
+ attr_reader :applies_to
821
+ # Specifies the billing period.
822
+ attr_reader :bill_until
823
+ # Unique identifier for the billing schedule.
824
+ attr_reader :key
825
+ # Specifies the start of the billing period.
826
+ attr_reader :bill_from
827
+
828
+ def self.inner_class_types
829
+ @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
830
+ end
831
+
832
+ def self.field_remappings
833
+ @field_remappings = {}
834
+ end
835
+ end
667
836
  # ID of the Connect Application that created the schedule.
668
837
  attr_reader :application
669
838
  # Attribute for field applies_to
@@ -712,6 +881,10 @@ module Stripe
712
881
  attr_reader :subscription
713
882
  # ID of the test clock this subscription schedule belongs to.
714
883
  attr_reader :test_clock
884
+ # Billing schedules for this subscription schedule.
885
+ attr_reader :billing_schedules
886
+ # The most recent invoice this subscription schedule has generated.
887
+ attr_reader :latest_invoice
715
888
 
716
889
  def self.inner_class_types
717
890
  @inner_class_types = {
@@ -722,6 +895,7 @@ module Stripe
722
895
  last_price_migration_error: LastPriceMigrationError,
723
896
  phases: Phase,
724
897
  prebilling: Prebilling,
898
+ billing_schedules: BillingSchedule,
725
899
  }
726
900
  end
727
901