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.
- checksums.yaml +4 -4
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/object_types.rb +1 -1
- data/lib/stripe/params/account_create_params.rb +33 -1
- data/lib/stripe/params/account_person_create_params.rb +33 -1
- data/lib/stripe/params/account_person_update_params.rb +33 -1
- data/lib/stripe/params/account_update_params.rb +33 -1
- data/lib/stripe/params/capital/financing_offer_create_params.rb +5 -5
- data/lib/stripe/params/capital/financing_offer_refill_params.rb +5 -5
- data/lib/stripe/params/delegated_checkout/requested_session_create_params.rb +1 -1
- data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +1 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +57 -1
- data/lib/stripe/params/issuing/program_create_params.rb +21 -0
- data/lib/stripe/params/issuing/program_list_params.rb +24 -0
- data/lib/stripe/params/issuing/program_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/program_update_params.rb +21 -0
- data/lib/stripe/params/quote_create_params.rb +210 -2
- data/lib/stripe/params/quote_update_params.rb +210 -2
- data/lib/stripe/params/subscription_schedule_create_params.rb +62 -2
- data/lib/stripe/params/subscription_schedule_update_params.rb +62 -2
- data/lib/stripe/params/test_helpers/capital/financing_offer_create_params.rb +5 -5
- data/lib/stripe/params/test_helpers/capital/financing_offer_refill_params.rb +5 -5
- data/lib/stripe/params/token_create_params.rb +66 -2
- data/lib/stripe/params.rb +4 -5
- data/lib/stripe/resources/delegated_checkout/requested_session.rb +19 -1
- data/lib/stripe/resources/discount.rb +2 -0
- data/lib/stripe/resources/invoice.rb +16 -0
- data/lib/stripe/resources/invoice_item.rb +16 -0
- data/lib/stripe/resources/invoice_line_item.rb +16 -0
- data/lib/stripe/resources/issuing/program.rb +69 -0
- data/lib/stripe/resources/person.rb +36 -0
- data/lib/stripe/resources/quote.rb +348 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +16 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +174 -0
- data/lib/stripe/resources/subscription.rb +105 -2
- data/lib/stripe/resources/subscription_schedule.rb +174 -0
- data/lib/stripe/resources.rb +1 -1
- data/lib/stripe/services/issuing/program_service.rb +52 -0
- data/lib/stripe/services/issuing_service.rb +2 -1
- data/lib/stripe/services/v2_services.rb +1 -2
- data/lib/stripe/services.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +2356 -203
- metadata +8 -10
- data/lib/stripe/params/v2/tax/automatic_rule_create_params.rb +0 -20
- data/lib/stripe/params/v2/tax/automatic_rule_deactivate_params.rb +0 -10
- data/lib/stripe/params/v2/tax/automatic_rule_find_params.rb +0 -17
- data/lib/stripe/params/v2/tax/automatic_rule_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/tax/automatic_rule_update_params.rb +0 -17
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +0 -39
- data/lib/stripe/services/v2/tax/automatic_rule_service.rb +0 -65
- data/lib/stripe/services/v2/tax_service.rb +0 -15
|
@@ -784,6 +784,102 @@ module Stripe
|
|
|
784
784
|
end
|
|
785
785
|
end
|
|
786
786
|
|
|
787
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
788
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
789
|
+
# The ID of the price object.
|
|
790
|
+
attr_accessor :price
|
|
791
|
+
# Controls which subscription items the billing schedule applies to.
|
|
792
|
+
attr_accessor :type
|
|
793
|
+
|
|
794
|
+
def initialize(price: nil, type: nil)
|
|
795
|
+
@price = price
|
|
796
|
+
@type = type
|
|
797
|
+
end
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
class BillFrom < ::Stripe::RequestParams
|
|
801
|
+
class LineStartsAt < ::Stripe::RequestParams
|
|
802
|
+
# The ID of a quote line.
|
|
803
|
+
attr_accessor :id
|
|
804
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
805
|
+
attr_accessor :index
|
|
806
|
+
|
|
807
|
+
def initialize(id: nil, index: nil)
|
|
808
|
+
@id = id
|
|
809
|
+
@index = index
|
|
810
|
+
end
|
|
811
|
+
end
|
|
812
|
+
# Details of a Quote line to start the bill period from.
|
|
813
|
+
attr_accessor :line_starts_at
|
|
814
|
+
# A precise Unix timestamp.
|
|
815
|
+
attr_accessor :timestamp
|
|
816
|
+
# The type of method to specify the `bill_from` time.
|
|
817
|
+
attr_accessor :type
|
|
818
|
+
|
|
819
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
|
820
|
+
@line_starts_at = line_starts_at
|
|
821
|
+
@timestamp = timestamp
|
|
822
|
+
@type = type
|
|
823
|
+
end
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
class BillUntil < ::Stripe::RequestParams
|
|
827
|
+
class Duration < ::Stripe::RequestParams
|
|
828
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
829
|
+
attr_accessor :interval
|
|
830
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
831
|
+
attr_accessor :interval_count
|
|
832
|
+
|
|
833
|
+
def initialize(interval: nil, interval_count: nil)
|
|
834
|
+
@interval = interval
|
|
835
|
+
@interval_count = interval_count
|
|
836
|
+
end
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
class LineEndsAt < ::Stripe::RequestParams
|
|
840
|
+
# The ID of a quote line.
|
|
841
|
+
attr_accessor :id
|
|
842
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
843
|
+
attr_accessor :index
|
|
844
|
+
|
|
845
|
+
def initialize(id: nil, index: nil)
|
|
846
|
+
@id = id
|
|
847
|
+
@index = index
|
|
848
|
+
end
|
|
849
|
+
end
|
|
850
|
+
# Details of the duration over which to bill.
|
|
851
|
+
attr_accessor :duration
|
|
852
|
+
# Details of a Quote line item from which to bill until.
|
|
853
|
+
attr_accessor :line_ends_at
|
|
854
|
+
# A precise Unix timestamp.
|
|
855
|
+
attr_accessor :timestamp
|
|
856
|
+
# The type of method to specify the `bill_until` time.
|
|
857
|
+
attr_accessor :type
|
|
858
|
+
|
|
859
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
|
860
|
+
@duration = duration
|
|
861
|
+
@line_ends_at = line_ends_at
|
|
862
|
+
@timestamp = timestamp
|
|
863
|
+
@type = type
|
|
864
|
+
end
|
|
865
|
+
end
|
|
866
|
+
# Configure billing schedule differently for individual subscription items.
|
|
867
|
+
attr_accessor :applies_to
|
|
868
|
+
# The start of the period to bill from when the Quote is accepted.
|
|
869
|
+
attr_accessor :bill_from
|
|
870
|
+
# The end of the period to bill until when the Quote is accepted.
|
|
871
|
+
attr_accessor :bill_until
|
|
872
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
873
|
+
attr_accessor :key
|
|
874
|
+
|
|
875
|
+
def initialize(applies_to: nil, bill_from: nil, bill_until: nil, key: nil)
|
|
876
|
+
@applies_to = applies_to
|
|
877
|
+
@bill_from = bill_from
|
|
878
|
+
@bill_until = bill_until
|
|
879
|
+
@key = key
|
|
880
|
+
end
|
|
881
|
+
end
|
|
882
|
+
|
|
787
883
|
class Prebilling < ::Stripe::RequestParams
|
|
788
884
|
# This is used to determine the number of billing cycles to prebill.
|
|
789
885
|
attr_accessor :iterations
|
|
@@ -822,6 +918,10 @@ module Stripe
|
|
|
822
918
|
attr_accessor :proration_behavior
|
|
823
919
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
|
824
920
|
attr_accessor :trial_period_days
|
|
921
|
+
# Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
922
|
+
attr_accessor :billing_schedules
|
|
923
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. 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.
|
|
924
|
+
attr_accessor :phase_effective_at
|
|
825
925
|
|
|
826
926
|
def initialize(
|
|
827
927
|
bill_on_acceptance: nil,
|
|
@@ -835,7 +935,9 @@ module Stripe
|
|
|
835
935
|
metadata: nil,
|
|
836
936
|
prebilling: nil,
|
|
837
937
|
proration_behavior: nil,
|
|
838
|
-
trial_period_days: nil
|
|
938
|
+
trial_period_days: nil,
|
|
939
|
+
billing_schedules: nil,
|
|
940
|
+
phase_effective_at: nil
|
|
839
941
|
)
|
|
840
942
|
@bill_on_acceptance = bill_on_acceptance
|
|
841
943
|
@billing_behavior = billing_behavior
|
|
@@ -849,6 +951,8 @@ module Stripe
|
|
|
849
951
|
@prebilling = prebilling
|
|
850
952
|
@proration_behavior = proration_behavior
|
|
851
953
|
@trial_period_days = trial_period_days
|
|
954
|
+
@billing_schedules = billing_schedules
|
|
955
|
+
@phase_effective_at = phase_effective_at
|
|
852
956
|
end
|
|
853
957
|
end
|
|
854
958
|
|
|
@@ -945,6 +1049,102 @@ module Stripe
|
|
|
945
1049
|
@bill_until = bill_until
|
|
946
1050
|
end
|
|
947
1051
|
end
|
|
1052
|
+
|
|
1053
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
1054
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
1055
|
+
# The ID of the price object.
|
|
1056
|
+
attr_accessor :price
|
|
1057
|
+
# Controls which subscription items the billing schedule applies to.
|
|
1058
|
+
attr_accessor :type
|
|
1059
|
+
|
|
1060
|
+
def initialize(price: nil, type: nil)
|
|
1061
|
+
@price = price
|
|
1062
|
+
@type = type
|
|
1063
|
+
end
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
class BillFrom < ::Stripe::RequestParams
|
|
1067
|
+
class LineStartsAt < ::Stripe::RequestParams
|
|
1068
|
+
# The ID of a quote line.
|
|
1069
|
+
attr_accessor :id
|
|
1070
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1071
|
+
attr_accessor :index
|
|
1072
|
+
|
|
1073
|
+
def initialize(id: nil, index: nil)
|
|
1074
|
+
@id = id
|
|
1075
|
+
@index = index
|
|
1076
|
+
end
|
|
1077
|
+
end
|
|
1078
|
+
# Details of a Quote line to start the bill period from.
|
|
1079
|
+
attr_accessor :line_starts_at
|
|
1080
|
+
# A precise Unix timestamp.
|
|
1081
|
+
attr_accessor :timestamp
|
|
1082
|
+
# The type of method to specify the `bill_from` time.
|
|
1083
|
+
attr_accessor :type
|
|
1084
|
+
|
|
1085
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
|
1086
|
+
@line_starts_at = line_starts_at
|
|
1087
|
+
@timestamp = timestamp
|
|
1088
|
+
@type = type
|
|
1089
|
+
end
|
|
1090
|
+
end
|
|
1091
|
+
|
|
1092
|
+
class BillUntil < ::Stripe::RequestParams
|
|
1093
|
+
class Duration < ::Stripe::RequestParams
|
|
1094
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1095
|
+
attr_accessor :interval
|
|
1096
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1097
|
+
attr_accessor :interval_count
|
|
1098
|
+
|
|
1099
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1100
|
+
@interval = interval
|
|
1101
|
+
@interval_count = interval_count
|
|
1102
|
+
end
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
class LineEndsAt < ::Stripe::RequestParams
|
|
1106
|
+
# The ID of a quote line.
|
|
1107
|
+
attr_accessor :id
|
|
1108
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1109
|
+
attr_accessor :index
|
|
1110
|
+
|
|
1111
|
+
def initialize(id: nil, index: nil)
|
|
1112
|
+
@id = id
|
|
1113
|
+
@index = index
|
|
1114
|
+
end
|
|
1115
|
+
end
|
|
1116
|
+
# Details of the duration over which to bill.
|
|
1117
|
+
attr_accessor :duration
|
|
1118
|
+
# Details of a Quote line item from which to bill until.
|
|
1119
|
+
attr_accessor :line_ends_at
|
|
1120
|
+
# A precise Unix timestamp.
|
|
1121
|
+
attr_accessor :timestamp
|
|
1122
|
+
# The type of method to specify the `bill_until` time.
|
|
1123
|
+
attr_accessor :type
|
|
1124
|
+
|
|
1125
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
|
1126
|
+
@duration = duration
|
|
1127
|
+
@line_ends_at = line_ends_at
|
|
1128
|
+
@timestamp = timestamp
|
|
1129
|
+
@type = type
|
|
1130
|
+
end
|
|
1131
|
+
end
|
|
1132
|
+
# Configure billing schedule differently for individual subscription items.
|
|
1133
|
+
attr_accessor :applies_to
|
|
1134
|
+
# The start of the period to bill from when the Quote is accepted.
|
|
1135
|
+
attr_accessor :bill_from
|
|
1136
|
+
# The end of the period to bill until when the Quote is accepted.
|
|
1137
|
+
attr_accessor :bill_until
|
|
1138
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
1139
|
+
attr_accessor :key
|
|
1140
|
+
|
|
1141
|
+
def initialize(applies_to: nil, bill_from: nil, bill_until: nil, key: nil)
|
|
1142
|
+
@applies_to = applies_to
|
|
1143
|
+
@bill_from = bill_from
|
|
1144
|
+
@bill_until = bill_until
|
|
1145
|
+
@key = key
|
|
1146
|
+
end
|
|
1147
|
+
end
|
|
948
1148
|
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
949
1149
|
attr_accessor :applies_to
|
|
950
1150
|
# Describes the period to bill for upon accepting the quote.
|
|
@@ -965,6 +1165,10 @@ module Stripe
|
|
|
965
1165
|
#
|
|
966
1166
|
# Prorations can be disabled by passing `none`.
|
|
967
1167
|
attr_accessor :proration_behavior
|
|
1168
|
+
# Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
1169
|
+
attr_accessor :billing_schedules
|
|
1170
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. 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.
|
|
1171
|
+
attr_accessor :phase_effective_at
|
|
968
1172
|
|
|
969
1173
|
def initialize(
|
|
970
1174
|
applies_to: nil,
|
|
@@ -973,7 +1177,9 @@ module Stripe
|
|
|
973
1177
|
customer: nil,
|
|
974
1178
|
description: nil,
|
|
975
1179
|
end_behavior: nil,
|
|
976
|
-
proration_behavior: nil
|
|
1180
|
+
proration_behavior: nil,
|
|
1181
|
+
billing_schedules: nil,
|
|
1182
|
+
phase_effective_at: nil
|
|
977
1183
|
)
|
|
978
1184
|
@applies_to = applies_to
|
|
979
1185
|
@bill_on_acceptance = bill_on_acceptance
|
|
@@ -982,6 +1188,8 @@ module Stripe
|
|
|
982
1188
|
@description = description
|
|
983
1189
|
@end_behavior = end_behavior
|
|
984
1190
|
@proration_behavior = proration_behavior
|
|
1191
|
+
@billing_schedules = billing_schedules
|
|
1192
|
+
@phase_effective_at = phase_effective_at
|
|
985
1193
|
end
|
|
986
1194
|
end
|
|
987
1195
|
|
|
@@ -769,6 +769,102 @@ module Stripe
|
|
|
769
769
|
end
|
|
770
770
|
end
|
|
771
771
|
|
|
772
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
773
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
774
|
+
# The ID of the price object.
|
|
775
|
+
attr_accessor :price
|
|
776
|
+
# Controls which subscription items the billing schedule applies to.
|
|
777
|
+
attr_accessor :type
|
|
778
|
+
|
|
779
|
+
def initialize(price: nil, type: nil)
|
|
780
|
+
@price = price
|
|
781
|
+
@type = type
|
|
782
|
+
end
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
class BillFrom < ::Stripe::RequestParams
|
|
786
|
+
class LineStartsAt < ::Stripe::RequestParams
|
|
787
|
+
# The ID of a quote line.
|
|
788
|
+
attr_accessor :id
|
|
789
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
790
|
+
attr_accessor :index
|
|
791
|
+
|
|
792
|
+
def initialize(id: nil, index: nil)
|
|
793
|
+
@id = id
|
|
794
|
+
@index = index
|
|
795
|
+
end
|
|
796
|
+
end
|
|
797
|
+
# Details of a Quote line to start the bill period from.
|
|
798
|
+
attr_accessor :line_starts_at
|
|
799
|
+
# A precise Unix timestamp.
|
|
800
|
+
attr_accessor :timestamp
|
|
801
|
+
# The type of method to specify the `bill_from` time.
|
|
802
|
+
attr_accessor :type
|
|
803
|
+
|
|
804
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
|
805
|
+
@line_starts_at = line_starts_at
|
|
806
|
+
@timestamp = timestamp
|
|
807
|
+
@type = type
|
|
808
|
+
end
|
|
809
|
+
end
|
|
810
|
+
|
|
811
|
+
class BillUntil < ::Stripe::RequestParams
|
|
812
|
+
class Duration < ::Stripe::RequestParams
|
|
813
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
814
|
+
attr_accessor :interval
|
|
815
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
816
|
+
attr_accessor :interval_count
|
|
817
|
+
|
|
818
|
+
def initialize(interval: nil, interval_count: nil)
|
|
819
|
+
@interval = interval
|
|
820
|
+
@interval_count = interval_count
|
|
821
|
+
end
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
class LineEndsAt < ::Stripe::RequestParams
|
|
825
|
+
# The ID of a quote line.
|
|
826
|
+
attr_accessor :id
|
|
827
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
828
|
+
attr_accessor :index
|
|
829
|
+
|
|
830
|
+
def initialize(id: nil, index: nil)
|
|
831
|
+
@id = id
|
|
832
|
+
@index = index
|
|
833
|
+
end
|
|
834
|
+
end
|
|
835
|
+
# Details of the duration over which to bill.
|
|
836
|
+
attr_accessor :duration
|
|
837
|
+
# Details of a Quote line item from which to bill until.
|
|
838
|
+
attr_accessor :line_ends_at
|
|
839
|
+
# A precise Unix timestamp.
|
|
840
|
+
attr_accessor :timestamp
|
|
841
|
+
# The type of method to specify the `bill_until` time.
|
|
842
|
+
attr_accessor :type
|
|
843
|
+
|
|
844
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
|
845
|
+
@duration = duration
|
|
846
|
+
@line_ends_at = line_ends_at
|
|
847
|
+
@timestamp = timestamp
|
|
848
|
+
@type = type
|
|
849
|
+
end
|
|
850
|
+
end
|
|
851
|
+
# Configure billing schedule differently for individual subscription items.
|
|
852
|
+
attr_accessor :applies_to
|
|
853
|
+
# The start of the period to bill from when the Quote is accepted.
|
|
854
|
+
attr_accessor :bill_from
|
|
855
|
+
# The end of the period to bill until when the Quote is accepted.
|
|
856
|
+
attr_accessor :bill_until
|
|
857
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
858
|
+
attr_accessor :key
|
|
859
|
+
|
|
860
|
+
def initialize(applies_to: nil, bill_from: nil, bill_until: nil, key: nil)
|
|
861
|
+
@applies_to = applies_to
|
|
862
|
+
@bill_from = bill_from
|
|
863
|
+
@bill_until = bill_until
|
|
864
|
+
@key = key
|
|
865
|
+
end
|
|
866
|
+
end
|
|
867
|
+
|
|
772
868
|
class Prebilling < ::Stripe::RequestParams
|
|
773
869
|
# This is used to determine the number of billing cycles to prebill.
|
|
774
870
|
attr_accessor :iterations
|
|
@@ -803,6 +899,10 @@ module Stripe
|
|
|
803
899
|
attr_accessor :proration_behavior
|
|
804
900
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
|
805
901
|
attr_accessor :trial_period_days
|
|
902
|
+
# Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
903
|
+
attr_accessor :billing_schedules
|
|
904
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. 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.
|
|
905
|
+
attr_accessor :phase_effective_at
|
|
806
906
|
|
|
807
907
|
def initialize(
|
|
808
908
|
bill_on_acceptance: nil,
|
|
@@ -814,7 +914,9 @@ module Stripe
|
|
|
814
914
|
metadata: nil,
|
|
815
915
|
prebilling: nil,
|
|
816
916
|
proration_behavior: nil,
|
|
817
|
-
trial_period_days: nil
|
|
917
|
+
trial_period_days: nil,
|
|
918
|
+
billing_schedules: nil,
|
|
919
|
+
phase_effective_at: nil
|
|
818
920
|
)
|
|
819
921
|
@bill_on_acceptance = bill_on_acceptance
|
|
820
922
|
@billing_behavior = billing_behavior
|
|
@@ -826,6 +928,8 @@ module Stripe
|
|
|
826
928
|
@prebilling = prebilling
|
|
827
929
|
@proration_behavior = proration_behavior
|
|
828
930
|
@trial_period_days = trial_period_days
|
|
931
|
+
@billing_schedules = billing_schedules
|
|
932
|
+
@phase_effective_at = phase_effective_at
|
|
829
933
|
end
|
|
830
934
|
end
|
|
831
935
|
|
|
@@ -922,6 +1026,102 @@ module Stripe
|
|
|
922
1026
|
@bill_until = bill_until
|
|
923
1027
|
end
|
|
924
1028
|
end
|
|
1029
|
+
|
|
1030
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
1031
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
1032
|
+
# The ID of the price object.
|
|
1033
|
+
attr_accessor :price
|
|
1034
|
+
# Controls which subscription items the billing schedule applies to.
|
|
1035
|
+
attr_accessor :type
|
|
1036
|
+
|
|
1037
|
+
def initialize(price: nil, type: nil)
|
|
1038
|
+
@price = price
|
|
1039
|
+
@type = type
|
|
1040
|
+
end
|
|
1041
|
+
end
|
|
1042
|
+
|
|
1043
|
+
class BillFrom < ::Stripe::RequestParams
|
|
1044
|
+
class LineStartsAt < ::Stripe::RequestParams
|
|
1045
|
+
# The ID of a quote line.
|
|
1046
|
+
attr_accessor :id
|
|
1047
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1048
|
+
attr_accessor :index
|
|
1049
|
+
|
|
1050
|
+
def initialize(id: nil, index: nil)
|
|
1051
|
+
@id = id
|
|
1052
|
+
@index = index
|
|
1053
|
+
end
|
|
1054
|
+
end
|
|
1055
|
+
# Details of a Quote line to start the bill period from.
|
|
1056
|
+
attr_accessor :line_starts_at
|
|
1057
|
+
# A precise Unix timestamp.
|
|
1058
|
+
attr_accessor :timestamp
|
|
1059
|
+
# The type of method to specify the `bill_from` time.
|
|
1060
|
+
attr_accessor :type
|
|
1061
|
+
|
|
1062
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
|
1063
|
+
@line_starts_at = line_starts_at
|
|
1064
|
+
@timestamp = timestamp
|
|
1065
|
+
@type = type
|
|
1066
|
+
end
|
|
1067
|
+
end
|
|
1068
|
+
|
|
1069
|
+
class BillUntil < ::Stripe::RequestParams
|
|
1070
|
+
class Duration < ::Stripe::RequestParams
|
|
1071
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1072
|
+
attr_accessor :interval
|
|
1073
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1074
|
+
attr_accessor :interval_count
|
|
1075
|
+
|
|
1076
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1077
|
+
@interval = interval
|
|
1078
|
+
@interval_count = interval_count
|
|
1079
|
+
end
|
|
1080
|
+
end
|
|
1081
|
+
|
|
1082
|
+
class LineEndsAt < ::Stripe::RequestParams
|
|
1083
|
+
# The ID of a quote line.
|
|
1084
|
+
attr_accessor :id
|
|
1085
|
+
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1086
|
+
attr_accessor :index
|
|
1087
|
+
|
|
1088
|
+
def initialize(id: nil, index: nil)
|
|
1089
|
+
@id = id
|
|
1090
|
+
@index = index
|
|
1091
|
+
end
|
|
1092
|
+
end
|
|
1093
|
+
# Details of the duration over which to bill.
|
|
1094
|
+
attr_accessor :duration
|
|
1095
|
+
# Details of a Quote line item from which to bill until.
|
|
1096
|
+
attr_accessor :line_ends_at
|
|
1097
|
+
# A precise Unix timestamp.
|
|
1098
|
+
attr_accessor :timestamp
|
|
1099
|
+
# The type of method to specify the `bill_until` time.
|
|
1100
|
+
attr_accessor :type
|
|
1101
|
+
|
|
1102
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
|
1103
|
+
@duration = duration
|
|
1104
|
+
@line_ends_at = line_ends_at
|
|
1105
|
+
@timestamp = timestamp
|
|
1106
|
+
@type = type
|
|
1107
|
+
end
|
|
1108
|
+
end
|
|
1109
|
+
# Configure billing schedule differently for individual subscription items.
|
|
1110
|
+
attr_accessor :applies_to
|
|
1111
|
+
# The start of the period to bill from when the Quote is accepted.
|
|
1112
|
+
attr_accessor :bill_from
|
|
1113
|
+
# The end of the period to bill until when the Quote is accepted.
|
|
1114
|
+
attr_accessor :bill_until
|
|
1115
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
1116
|
+
attr_accessor :key
|
|
1117
|
+
|
|
1118
|
+
def initialize(applies_to: nil, bill_from: nil, bill_until: nil, key: nil)
|
|
1119
|
+
@applies_to = applies_to
|
|
1120
|
+
@bill_from = bill_from
|
|
1121
|
+
@bill_until = bill_until
|
|
1122
|
+
@key = key
|
|
1123
|
+
end
|
|
1124
|
+
end
|
|
925
1125
|
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
926
1126
|
attr_accessor :applies_to
|
|
927
1127
|
# Describes the period to bill for upon accepting the quote.
|
|
@@ -942,6 +1142,10 @@ module Stripe
|
|
|
942
1142
|
#
|
|
943
1143
|
# Prorations can be disabled by passing `none`.
|
|
944
1144
|
attr_accessor :proration_behavior
|
|
1145
|
+
# Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
|
|
1146
|
+
attr_accessor :billing_schedules
|
|
1147
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. 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.
|
|
1148
|
+
attr_accessor :phase_effective_at
|
|
945
1149
|
|
|
946
1150
|
def initialize(
|
|
947
1151
|
applies_to: nil,
|
|
@@ -950,7 +1154,9 @@ module Stripe
|
|
|
950
1154
|
customer: nil,
|
|
951
1155
|
description: nil,
|
|
952
1156
|
end_behavior: nil,
|
|
953
|
-
proration_behavior: nil
|
|
1157
|
+
proration_behavior: nil,
|
|
1158
|
+
billing_schedules: nil,
|
|
1159
|
+
phase_effective_at: nil
|
|
954
1160
|
)
|
|
955
1161
|
@applies_to = applies_to
|
|
956
1162
|
@bill_on_acceptance = bill_on_acceptance
|
|
@@ -959,6 +1165,8 @@ module Stripe
|
|
|
959
1165
|
@description = description
|
|
960
1166
|
@end_behavior = end_behavior
|
|
961
1167
|
@proration_behavior = proration_behavior
|
|
1168
|
+
@billing_schedules = billing_schedules
|
|
1169
|
+
@phase_effective_at = phase_effective_at
|
|
962
1170
|
end
|
|
963
1171
|
end
|
|
964
1172
|
|
|
@@ -23,6 +23,58 @@ module Stripe
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
27
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
28
|
+
# The ID of the price object.
|
|
29
|
+
attr_accessor :price
|
|
30
|
+
# Controls which subscription items the billing schedule applies to.
|
|
31
|
+
attr_accessor :type
|
|
32
|
+
|
|
33
|
+
def initialize(price: nil, type: nil)
|
|
34
|
+
@price = price
|
|
35
|
+
@type = type
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class BillUntil < ::Stripe::RequestParams
|
|
40
|
+
class Duration < ::Stripe::RequestParams
|
|
41
|
+
# Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
42
|
+
attr_accessor :interval
|
|
43
|
+
# The multiplier applied to the interval.
|
|
44
|
+
attr_accessor :interval_count
|
|
45
|
+
|
|
46
|
+
def initialize(interval: nil, interval_count: nil)
|
|
47
|
+
@interval = interval
|
|
48
|
+
@interval_count = interval_count
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
# Specifies the billing period.
|
|
52
|
+
attr_accessor :duration
|
|
53
|
+
# The end date of the billing schedule.
|
|
54
|
+
attr_accessor :timestamp
|
|
55
|
+
# Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
56
|
+
attr_accessor :type
|
|
57
|
+
|
|
58
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
59
|
+
@duration = duration
|
|
60
|
+
@timestamp = timestamp
|
|
61
|
+
@type = type
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
# Configure billing schedule differently for individual subscription items.
|
|
65
|
+
attr_accessor :applies_to
|
|
66
|
+
# The end date for the billing schedule.
|
|
67
|
+
attr_accessor :bill_until
|
|
68
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
|
69
|
+
attr_accessor :key
|
|
70
|
+
|
|
71
|
+
def initialize(applies_to: nil, bill_until: nil, key: nil)
|
|
72
|
+
@applies_to = applies_to
|
|
73
|
+
@bill_until = bill_until
|
|
74
|
+
@key = key
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
26
78
|
class DefaultSettings < ::Stripe::RequestParams
|
|
27
79
|
class AutomaticTax < ::Stripe::RequestParams
|
|
28
80
|
class Liability < ::Stripe::RequestParams
|
|
@@ -116,6 +168,8 @@ module Stripe
|
|
|
116
168
|
attr_accessor :on_behalf_of
|
|
117
169
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
118
170
|
attr_accessor :transfer_data
|
|
171
|
+
# 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.
|
|
172
|
+
attr_accessor :phase_effective_at
|
|
119
173
|
|
|
120
174
|
def initialize(
|
|
121
175
|
application_fee_percent: nil,
|
|
@@ -127,7 +181,8 @@ module Stripe
|
|
|
127
181
|
description: nil,
|
|
128
182
|
invoice_settings: nil,
|
|
129
183
|
on_behalf_of: nil,
|
|
130
|
-
transfer_data: nil
|
|
184
|
+
transfer_data: nil,
|
|
185
|
+
phase_effective_at: nil
|
|
131
186
|
)
|
|
132
187
|
@application_fee_percent = application_fee_percent
|
|
133
188
|
@automatic_tax = automatic_tax
|
|
@@ -139,6 +194,7 @@ module Stripe
|
|
|
139
194
|
@invoice_settings = invoice_settings
|
|
140
195
|
@on_behalf_of = on_behalf_of
|
|
141
196
|
@transfer_data = transfer_data
|
|
197
|
+
@phase_effective_at = phase_effective_at
|
|
142
198
|
end
|
|
143
199
|
end
|
|
144
200
|
|
|
@@ -720,6 +776,8 @@ module Stripe
|
|
|
720
776
|
attr_accessor :prebilling
|
|
721
777
|
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
|
722
778
|
attr_accessor :start_date
|
|
779
|
+
# Sets the billing schedules for the subscription schedule.
|
|
780
|
+
attr_accessor :billing_schedules
|
|
723
781
|
|
|
724
782
|
def initialize(
|
|
725
783
|
billing_behavior: nil,
|
|
@@ -733,7 +791,8 @@ module Stripe
|
|
|
733
791
|
metadata: nil,
|
|
734
792
|
phases: nil,
|
|
735
793
|
prebilling: nil,
|
|
736
|
-
start_date: nil
|
|
794
|
+
start_date: nil,
|
|
795
|
+
billing_schedules: nil
|
|
737
796
|
)
|
|
738
797
|
@billing_behavior = billing_behavior
|
|
739
798
|
@billing_mode = billing_mode
|
|
@@ -747,6 +806,7 @@ module Stripe
|
|
|
747
806
|
@phases = phases
|
|
748
807
|
@prebilling = prebilling
|
|
749
808
|
@start_date = start_date
|
|
809
|
+
@billing_schedules = billing_schedules
|
|
750
810
|
end
|
|
751
811
|
end
|
|
752
812
|
end
|