orb-billing 1.1.0 → 1.2.1

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/monetary_amount_discount_adjustment.rb +10 -1
  5. data/lib/orb/models/monetary_maximum_adjustment.rb +10 -1
  6. data/lib/orb/models/monetary_minimum_adjustment.rb +10 -1
  7. data/lib/orb/models/monetary_percentage_discount_adjustment.rb +10 -1
  8. data/lib/orb/models/monetary_usage_discount_adjustment.rb +10 -1
  9. data/lib/orb/models/plan_phase_amount_discount_adjustment.rb +10 -1
  10. data/lib/orb/models/plan_phase_maximum_adjustment.rb +10 -1
  11. data/lib/orb/models/plan_phase_minimum_adjustment.rb +10 -1
  12. data/lib/orb/models/plan_phase_percentage_discount_adjustment.rb +10 -1
  13. data/lib/orb/models/plan_phase_usage_discount_adjustment.rb +10 -1
  14. data/lib/orb/models/price.rb +280 -28
  15. data/lib/orb/version.rb +1 -1
  16. data/rbi/orb/models/monetary_amount_discount_adjustment.rbi +13 -3
  17. data/rbi/orb/models/monetary_maximum_adjustment.rbi +13 -3
  18. data/rbi/orb/models/monetary_minimum_adjustment.rbi +13 -3
  19. data/rbi/orb/models/monetary_percentage_discount_adjustment.rbi +13 -3
  20. data/rbi/orb/models/monetary_usage_discount_adjustment.rbi +10 -0
  21. data/rbi/orb/models/plan_phase_amount_discount_adjustment.rbi +13 -3
  22. data/rbi/orb/models/plan_phase_maximum_adjustment.rbi +13 -3
  23. data/rbi/orb/models/plan_phase_minimum_adjustment.rbi +13 -3
  24. data/rbi/orb/models/plan_phase_percentage_discount_adjustment.rbi +13 -3
  25. data/rbi/orb/models/plan_phase_usage_discount_adjustment.rbi +10 -0
  26. data/rbi/orb/models/price.rbi +280 -0
  27. data/sig/orb/models/monetary_amount_discount_adjustment.rbs +8 -3
  28. data/sig/orb/models/monetary_maximum_adjustment.rbs +8 -3
  29. data/sig/orb/models/monetary_minimum_adjustment.rbs +8 -3
  30. data/sig/orb/models/monetary_percentage_discount_adjustment.rbs +8 -3
  31. data/sig/orb/models/monetary_usage_discount_adjustment.rbs +5 -0
  32. data/sig/orb/models/plan_phase_amount_discount_adjustment.rbs +8 -3
  33. data/sig/orb/models/plan_phase_maximum_adjustment.rbs +8 -3
  34. data/sig/orb/models/plan_phase_minimum_adjustment.rbs +8 -3
  35. data/sig/orb/models/plan_phase_percentage_discount_adjustment.rbs +8 -3
  36. data/sig/orb/models/plan_phase_usage_discount_adjustment.rbs +5 -0
  37. data/sig/orb/models/price.rbs +140 -0
  38. metadata +2 -2
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -44,6 +44,11 @@ module Orb
44
44
  sig { returns(T.nilable(String)) }
45
45
  attr_accessor :reason
46
46
 
47
+ # The adjustment id this adjustment replaces. This adjustment will take the place
48
+ # of the replaced adjustment in plan version migrations.
49
+ sig { returns(T.nilable(String)) }
50
+ attr_accessor :replaces_adjustment_id
51
+
47
52
  sig do
48
53
  params(
49
54
  id: String,
@@ -54,7 +59,8 @@ module Orb
54
59
  applies_to_price_ids: T::Array[String],
55
60
  filters: T::Array[Orb::TransformPriceFilter::OrHash],
56
61
  is_invoice_level: T::Boolean,
57
- reason: T.nilable(String)
62
+ reason: T.nilable(String),
63
+ replaces_adjustment_id: T.nilable(String)
58
64
  ).returns(T.attached_class)
59
65
  end
60
66
  def self.new(
@@ -73,7 +79,10 @@ module Orb
73
79
  # that apply to only one price.
74
80
  is_invoice_level:,
75
81
  # The reason for the adjustment.
76
- reason:
82
+ reason:,
83
+ # The adjustment id this adjustment replaces. This adjustment will take the place
84
+ # of the replaced adjustment in plan version migrations.
85
+ replaces_adjustment_id:
77
86
  )
78
87
  end
79
88
 
@@ -88,7 +97,8 @@ module Orb
88
97
  applies_to_price_ids: T::Array[String],
89
98
  filters: T::Array[Orb::TransformPriceFilter],
90
99
  is_invoice_level: T::Boolean,
91
- reason: T.nilable(String)
100
+ reason: T.nilable(String),
101
+ replaces_adjustment_id: T.nilable(String)
92
102
  }
93
103
  )
94
104
  end
@@ -42,6 +42,11 @@ module Orb
42
42
  sig { returns(T.nilable(String)) }
43
43
  attr_accessor :reason
44
44
 
45
+ # The adjustment id this adjustment replaces. This adjustment will take the place
46
+ # of the replaced adjustment in plan version migrations.
47
+ sig { returns(T.nilable(String)) }
48
+ attr_accessor :replaces_adjustment_id
49
+
45
50
  sig do
46
51
  params(
47
52
  id: String,
@@ -52,7 +57,8 @@ module Orb
52
57
  filters: T::Array[Orb::TransformPriceFilter::OrHash],
53
58
  is_invoice_level: T::Boolean,
54
59
  maximum_amount: String,
55
- reason: T.nilable(String)
60
+ reason: T.nilable(String),
61
+ replaces_adjustment_id: T.nilable(String)
56
62
  ).returns(T.attached_class)
57
63
  end
58
64
  def self.new(
@@ -71,7 +77,10 @@ module Orb
71
77
  # adjustment applies to.
72
78
  maximum_amount:,
73
79
  # The reason for the adjustment.
74
- reason:
80
+ reason:,
81
+ # The adjustment id this adjustment replaces. This adjustment will take the place
82
+ # of the replaced adjustment in plan version migrations.
83
+ replaces_adjustment_id:
75
84
  )
76
85
  end
77
86
 
@@ -86,7 +95,8 @@ module Orb
86
95
  filters: T::Array[Orb::TransformPriceFilter],
87
96
  is_invoice_level: T::Boolean,
88
97
  maximum_amount: String,
89
- reason: T.nilable(String)
98
+ reason: T.nilable(String),
99
+ replaces_adjustment_id: T.nilable(String)
90
100
  }
91
101
  )
92
102
  end
@@ -46,6 +46,11 @@ module Orb
46
46
  sig { returns(T.nilable(String)) }
47
47
  attr_accessor :reason
48
48
 
49
+ # The adjustment id this adjustment replaces. This adjustment will take the place
50
+ # of the replaced adjustment in plan version migrations.
51
+ sig { returns(T.nilable(String)) }
52
+ attr_accessor :replaces_adjustment_id
53
+
49
54
  sig do
50
55
  params(
51
56
  id: String,
@@ -57,7 +62,8 @@ module Orb
57
62
  is_invoice_level: T::Boolean,
58
63
  item_id: String,
59
64
  minimum_amount: String,
60
- reason: T.nilable(String)
65
+ reason: T.nilable(String),
66
+ replaces_adjustment_id: T.nilable(String)
61
67
  ).returns(T.attached_class)
62
68
  end
63
69
  def self.new(
@@ -78,7 +84,10 @@ module Orb
78
84
  # adjustment applies to.
79
85
  minimum_amount:,
80
86
  # The reason for the adjustment.
81
- reason:
87
+ reason:,
88
+ # The adjustment id this adjustment replaces. This adjustment will take the place
89
+ # of the replaced adjustment in plan version migrations.
90
+ replaces_adjustment_id:
82
91
  )
83
92
  end
84
93
 
@@ -94,7 +103,8 @@ module Orb
94
103
  is_invoice_level: T::Boolean,
95
104
  item_id: String,
96
105
  minimum_amount: String,
97
- reason: T.nilable(String)
106
+ reason: T.nilable(String),
107
+ replaces_adjustment_id: T.nilable(String)
98
108
  }
99
109
  )
100
110
  end
@@ -47,6 +47,11 @@ module Orb
47
47
  sig { returns(T.nilable(String)) }
48
48
  attr_accessor :reason
49
49
 
50
+ # The adjustment id this adjustment replaces. This adjustment will take the place
51
+ # of the replaced adjustment in plan version migrations.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :replaces_adjustment_id
54
+
50
55
  sig do
51
56
  params(
52
57
  id: String,
@@ -57,7 +62,8 @@ module Orb
57
62
  filters: T::Array[Orb::TransformPriceFilter::OrHash],
58
63
  is_invoice_level: T::Boolean,
59
64
  percentage_discount: Float,
60
- reason: T.nilable(String)
65
+ reason: T.nilable(String),
66
+ replaces_adjustment_id: T.nilable(String)
61
67
  ).returns(T.attached_class)
62
68
  end
63
69
  def self.new(
@@ -76,7 +82,10 @@ module Orb
76
82
  # intervals this adjustment applies to in a given billing period.
77
83
  percentage_discount:,
78
84
  # The reason for the adjustment.
79
- reason:
85
+ reason:,
86
+ # The adjustment id this adjustment replaces. This adjustment will take the place
87
+ # of the replaced adjustment in plan version migrations.
88
+ replaces_adjustment_id:
80
89
  )
81
90
  end
82
91
 
@@ -91,7 +100,8 @@ module Orb
91
100
  filters: T::Array[Orb::TransformPriceFilter],
92
101
  is_invoice_level: T::Boolean,
93
102
  percentage_discount: Float,
94
- reason: T.nilable(String)
103
+ reason: T.nilable(String),
104
+ replaces_adjustment_id: T.nilable(String)
95
105
  }
96
106
  )
97
107
  end
@@ -39,6 +39,11 @@ module Orb
39
39
  sig { returns(T.nilable(String)) }
40
40
  attr_accessor :reason
41
41
 
42
+ # The adjustment id this adjustment replaces. This adjustment will take the place
43
+ # of the replaced adjustment in plan version migrations.
44
+ sig { returns(T.nilable(String)) }
45
+ attr_accessor :replaces_adjustment_id
46
+
42
47
  # The number of usage units by which to discount the price this adjustment applies
43
48
  # to in a given billing period.
44
49
  sig { returns(Float) }
@@ -54,6 +59,7 @@ module Orb
54
59
  filters: T::Array[Orb::TransformPriceFilter::OrHash],
55
60
  is_invoice_level: T::Boolean,
56
61
  reason: T.nilable(String),
62
+ replaces_adjustment_id: T.nilable(String),
57
63
  usage_discount: Float
58
64
  ).returns(T.attached_class)
59
65
  end
@@ -71,6 +77,9 @@ module Orb
71
77
  is_invoice_level:,
72
78
  # The reason for the adjustment.
73
79
  reason:,
80
+ # The adjustment id this adjustment replaces. This adjustment will take the place
81
+ # of the replaced adjustment in plan version migrations.
82
+ replaces_adjustment_id:,
74
83
  # The number of usage units by which to discount the price this adjustment applies
75
84
  # to in a given billing period.
76
85
  usage_discount:
@@ -88,6 +97,7 @@ module Orb
88
97
  filters: T::Array[Orb::TransformPriceFilter],
89
98
  is_invoice_level: T::Boolean,
90
99
  reason: T.nilable(String),
100
+ replaces_adjustment_id: T.nilable(String),
91
101
  usage_discount: Float
92
102
  }
93
103
  )
@@ -44,6 +44,11 @@ module Orb
44
44
  sig { returns(T.nilable(String)) }
45
45
  attr_accessor :reason
46
46
 
47
+ # The adjustment id this adjustment replaces. This adjustment will take the place
48
+ # of the replaced adjustment in plan version migrations.
49
+ sig { returns(T.nilable(String)) }
50
+ attr_accessor :replaces_adjustment_id
51
+
47
52
  sig do
48
53
  params(
49
54
  id: String,
@@ -54,7 +59,8 @@ module Orb
54
59
  filters: T::Array[Orb::TransformPriceFilter::OrHash],
55
60
  is_invoice_level: T::Boolean,
56
61
  plan_phase_order: T.nilable(Integer),
57
- reason: T.nilable(String)
62
+ reason: T.nilable(String),
63
+ replaces_adjustment_id: T.nilable(String)
58
64
  ).returns(T.attached_class)
59
65
  end
60
66
  def self.new(
@@ -73,7 +79,10 @@ module Orb
73
79
  # The plan phase in which this adjustment is active.
74
80
  plan_phase_order:,
75
81
  # The reason for the adjustment.
76
- reason:
82
+ reason:,
83
+ # The adjustment id this adjustment replaces. This adjustment will take the place
84
+ # of the replaced adjustment in plan version migrations.
85
+ replaces_adjustment_id:
77
86
  )
78
87
  end
79
88
 
@@ -88,7 +97,8 @@ module Orb
88
97
  filters: T::Array[Orb::TransformPriceFilter],
89
98
  is_invoice_level: T::Boolean,
90
99
  plan_phase_order: T.nilable(Integer),
91
- reason: T.nilable(String)
100
+ reason: T.nilable(String),
101
+ replaces_adjustment_id: T.nilable(String)
92
102
  }
93
103
  )
94
104
  end
@@ -42,6 +42,11 @@ module Orb
42
42
  sig { returns(T.nilable(String)) }
43
43
  attr_accessor :reason
44
44
 
45
+ # The adjustment id this adjustment replaces. This adjustment will take the place
46
+ # of the replaced adjustment in plan version migrations.
47
+ sig { returns(T.nilable(String)) }
48
+ attr_accessor :replaces_adjustment_id
49
+
45
50
  sig do
46
51
  params(
47
52
  id: String,
@@ -52,7 +57,8 @@ module Orb
52
57
  is_invoice_level: T::Boolean,
53
58
  maximum_amount: String,
54
59
  plan_phase_order: T.nilable(Integer),
55
- reason: T.nilable(String)
60
+ reason: T.nilable(String),
61
+ replaces_adjustment_id: T.nilable(String)
56
62
  ).returns(T.attached_class)
57
63
  end
58
64
  def self.new(
@@ -71,7 +77,10 @@ module Orb
71
77
  # The plan phase in which this adjustment is active.
72
78
  plan_phase_order:,
73
79
  # The reason for the adjustment.
74
- reason:
80
+ reason:,
81
+ # The adjustment id this adjustment replaces. This adjustment will take the place
82
+ # of the replaced adjustment in plan version migrations.
83
+ replaces_adjustment_id:
75
84
  )
76
85
  end
77
86
 
@@ -86,7 +95,8 @@ module Orb
86
95
  is_invoice_level: T::Boolean,
87
96
  maximum_amount: String,
88
97
  plan_phase_order: T.nilable(Integer),
89
- reason: T.nilable(String)
98
+ reason: T.nilable(String),
99
+ replaces_adjustment_id: T.nilable(String)
90
100
  }
91
101
  )
92
102
  end
@@ -46,6 +46,11 @@ module Orb
46
46
  sig { returns(T.nilable(String)) }
47
47
  attr_accessor :reason
48
48
 
49
+ # The adjustment id this adjustment replaces. This adjustment will take the place
50
+ # of the replaced adjustment in plan version migrations.
51
+ sig { returns(T.nilable(String)) }
52
+ attr_accessor :replaces_adjustment_id
53
+
49
54
  sig do
50
55
  params(
51
56
  id: String,
@@ -57,7 +62,8 @@ module Orb
57
62
  item_id: String,
58
63
  minimum_amount: String,
59
64
  plan_phase_order: T.nilable(Integer),
60
- reason: T.nilable(String)
65
+ reason: T.nilable(String),
66
+ replaces_adjustment_id: T.nilable(String)
61
67
  ).returns(T.attached_class)
62
68
  end
63
69
  def self.new(
@@ -78,7 +84,10 @@ module Orb
78
84
  # The plan phase in which this adjustment is active.
79
85
  plan_phase_order:,
80
86
  # The reason for the adjustment.
81
- reason:
87
+ reason:,
88
+ # The adjustment id this adjustment replaces. This adjustment will take the place
89
+ # of the replaced adjustment in plan version migrations.
90
+ replaces_adjustment_id:
82
91
  )
83
92
  end
84
93
 
@@ -94,7 +103,8 @@ module Orb
94
103
  item_id: String,
95
104
  minimum_amount: String,
96
105
  plan_phase_order: T.nilable(Integer),
97
- reason: T.nilable(String)
106
+ reason: T.nilable(String),
107
+ replaces_adjustment_id: T.nilable(String)
98
108
  }
99
109
  )
100
110
  end
@@ -47,6 +47,11 @@ module Orb
47
47
  sig { returns(T.nilable(String)) }
48
48
  attr_accessor :reason
49
49
 
50
+ # The adjustment id this adjustment replaces. This adjustment will take the place
51
+ # of the replaced adjustment in plan version migrations.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :replaces_adjustment_id
54
+
50
55
  sig do
51
56
  params(
52
57
  id: String,
@@ -57,7 +62,8 @@ module Orb
57
62
  is_invoice_level: T::Boolean,
58
63
  percentage_discount: Float,
59
64
  plan_phase_order: T.nilable(Integer),
60
- reason: T.nilable(String)
65
+ reason: T.nilable(String),
66
+ replaces_adjustment_id: T.nilable(String)
61
67
  ).returns(T.attached_class)
62
68
  end
63
69
  def self.new(
@@ -76,7 +82,10 @@ module Orb
76
82
  # The plan phase in which this adjustment is active.
77
83
  plan_phase_order:,
78
84
  # The reason for the adjustment.
79
- reason:
85
+ reason:,
86
+ # The adjustment id this adjustment replaces. This adjustment will take the place
87
+ # of the replaced adjustment in plan version migrations.
88
+ replaces_adjustment_id:
80
89
  )
81
90
  end
82
91
 
@@ -91,7 +100,8 @@ module Orb
91
100
  is_invoice_level: T::Boolean,
92
101
  percentage_discount: Float,
93
102
  plan_phase_order: T.nilable(Integer),
94
- reason: T.nilable(String)
103
+ reason: T.nilable(String),
104
+ replaces_adjustment_id: T.nilable(String)
95
105
  }
96
106
  )
97
107
  end
@@ -39,6 +39,11 @@ module Orb
39
39
  sig { returns(T.nilable(String)) }
40
40
  attr_accessor :reason
41
41
 
42
+ # The adjustment id this adjustment replaces. This adjustment will take the place
43
+ # of the replaced adjustment in plan version migrations.
44
+ sig { returns(T.nilable(String)) }
45
+ attr_accessor :replaces_adjustment_id
46
+
42
47
  # The number of usage units by which to discount the price this adjustment applies
43
48
  # to in a given billing period.
44
49
  sig { returns(Float) }
@@ -54,6 +59,7 @@ module Orb
54
59
  is_invoice_level: T::Boolean,
55
60
  plan_phase_order: T.nilable(Integer),
56
61
  reason: T.nilable(String),
62
+ replaces_adjustment_id: T.nilable(String),
57
63
  usage_discount: Float
58
64
  ).returns(T.attached_class)
59
65
  end
@@ -71,6 +77,9 @@ module Orb
71
77
  plan_phase_order:,
72
78
  # The reason for the adjustment.
73
79
  reason:,
80
+ # The adjustment id this adjustment replaces. This adjustment will take the place
81
+ # of the replaced adjustment in plan version migrations.
82
+ replaces_adjustment_id:,
74
83
  # The number of usage units by which to discount the price this adjustment applies
75
84
  # to in a given billing period.
76
85
  usage_discount:
@@ -88,6 +97,7 @@ module Orb
88
97
  is_invoice_level: T::Boolean,
89
98
  plan_phase_order: T.nilable(Integer),
90
99
  reason: T.nilable(String),
100
+ replaces_adjustment_id: T.nilable(String),
91
101
  usage_discount: Float
92
102
  }
93
103
  )