orb-billing 1.46.0 → 1.48.0

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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -1
  3. data/README.md +1 -1
  4. data/lib/orb/models/credit_block_update_params.rb +34 -0
  5. data/lib/orb/models/credit_block_update_response.rb +332 -0
  6. data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
  7. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
  8. data/lib/orb/models/invoice_list_summary_response.rb +2 -1
  9. data/lib/orb/models/metric_archive_params.rb +20 -0
  10. data/lib/orb/models/metric_list_params.rb +21 -1
  11. data/lib/orb/models/metric_unarchive_params.rb +20 -0
  12. data/lib/orb/models/metric_update_params.rb +17 -1
  13. data/lib/orb/models/plan_update_params.rb +9 -1
  14. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  15. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
  16. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
  17. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
  18. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
  19. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
  20. data/lib/orb/models/webhook_endpoint.rb +28 -1
  21. data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
  22. data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
  23. data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
  24. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +5 -3
  25. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
  26. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +5 -3
  27. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +5 -3
  28. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +5 -3
  29. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +5 -3
  30. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +5 -3
  31. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +5 -3
  32. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +5 -3
  33. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +5 -3
  34. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +5 -3
  35. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +5 -3
  36. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +5 -3
  37. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +5 -3
  38. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +5 -3
  39. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +5 -3
  40. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +5 -3
  41. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +5 -3
  42. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +5 -3
  43. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
  44. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +9 -7
  45. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +9 -7
  46. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +5 -9
  47. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +9 -7
  48. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +9 -7
  49. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +9 -7
  50. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +9 -7
  51. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +9 -7
  52. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +9 -7
  53. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +9 -7
  54. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +5 -9
  55. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +5 -9
  56. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +5 -9
  57. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +5 -9
  58. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +9 -7
  59. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +9 -7
  60. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +9 -7
  61. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +9 -7
  62. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +9 -7
  63. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +9 -7
  64. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +9 -7
  65. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +9 -7
  66. data/lib/orb/models.rb +6 -0
  67. data/lib/orb/resources/credit_blocks.rb +35 -0
  68. data/lib/orb/resources/metrics.rb +61 -5
  69. data/lib/orb/resources/plans/external_plan_id.rb +6 -3
  70. data/lib/orb/resources/plans.rb +6 -3
  71. data/lib/orb/resources/webhook_endpoints.rb +6 -2
  72. data/lib/orb/version.rb +1 -1
  73. data/lib/orb.rb +4 -0
  74. data/rbi/orb/models/credit_block_update_params.rbi +53 -0
  75. data/rbi/orb/models/credit_block_update_response.rbi +693 -0
  76. data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
  77. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
  78. data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
  79. data/rbi/orb/models/metric_archive_params.rbi +33 -0
  80. data/rbi/orb/models/metric_list_params.rbi +29 -0
  81. data/rbi/orb/models/metric_unarchive_params.rbi +35 -0
  82. data/rbi/orb/models/metric_update_params.rbi +16 -0
  83. data/rbi/orb/models/plan_update_params.rbi +8 -0
  84. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  85. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
  86. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
  87. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
  88. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
  89. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
  90. data/rbi/orb/models/webhook_endpoint.rbi +39 -0
  91. data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
  92. data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
  93. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
  94. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +6 -3
  95. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
  96. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +6 -3
  97. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +6 -3
  98. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +6 -3
  99. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +6 -3
  100. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +6 -3
  101. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +6 -3
  102. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +6 -3
  103. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +6 -3
  104. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +6 -3
  105. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +6 -3
  106. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +6 -3
  107. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +6 -3
  108. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +6 -3
  109. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +6 -3
  110. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +6 -3
  111. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +6 -3
  112. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +6 -3
  113. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
  114. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +12 -9
  115. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +12 -9
  116. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +6 -12
  117. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +12 -9
  118. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +12 -9
  119. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +12 -9
  120. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +12 -9
  121. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +12 -9
  122. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +12 -9
  123. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +12 -9
  124. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +6 -12
  125. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +6 -12
  126. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +6 -12
  127. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +6 -12
  128. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +12 -9
  129. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +12 -9
  130. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +12 -9
  131. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +12 -9
  132. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +12 -9
  133. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +12 -9
  134. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +12 -9
  135. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +12 -9
  136. data/rbi/orb/models.rbi +6 -0
  137. data/rbi/orb/resources/credit_blocks.rbi +26 -0
  138. data/rbi/orb/resources/metrics.rbi +44 -3
  139. data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
  140. data/rbi/orb/resources/plans.rbi +6 -2
  141. data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
  142. data/sig/orb/models/credit_block_update_params.rbs +28 -0
  143. data/sig/orb/models/credit_block_update_response.rbs +263 -0
  144. data/sig/orb/models/metric_archive_params.rbs +23 -0
  145. data/sig/orb/models/metric_list_params.rbs +18 -1
  146. data/sig/orb/models/metric_unarchive_params.rbs +23 -0
  147. data/sig/orb/models/metric_update_params.rbs +14 -1
  148. data/sig/orb/models/plan_update_params.rbs +6 -1
  149. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
  150. data/sig/orb/models/webhook_endpoint.rbs +16 -0
  151. data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
  152. data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
  153. data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
  154. data/sig/orb/models.rbs +6 -0
  155. data/sig/orb/resources/credit_blocks.rbs +6 -0
  156. data/sig/orb/resources/metrics.rbs +13 -0
  157. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  158. data/sig/orb/resources/plans.rbs +1 -0
  159. data/sig/orb/resources/webhook_endpoints.rbs +2 -0
  160. metadata +13 -1
@@ -12,6 +12,8 @@ module Orb
12
12
  params(
13
13
  url: String,
14
14
  enabled_event_types: T.nilable(T::Array[String]),
15
+ payload_style:
16
+ T.nilable(Orb::WebhookEndpointCreateParams::PayloadStyle::OrSymbol),
15
17
  request_options: Orb::RequestOptions::OrHash
16
18
  ).returns(Orb::WebhookEndpointWithSecret)
17
19
  end
@@ -21,6 +23,9 @@ module Orb
21
23
  # The webhook event types to send to this endpoint. If omitted or null, all event
22
24
  # types are sent.
23
25
  enabled_event_types: nil,
26
+ # The payload style of the webhook events sent to this endpoint. If omitted or
27
+ # null, the account's default style is used.
28
+ payload_style: nil,
24
29
  request_options: {}
25
30
  )
26
31
  end
@@ -40,6 +45,8 @@ module Orb
40
45
  params(
41
46
  webhook_endpoint_id: String,
42
47
  enabled_event_types: T.nilable(T::Array[String]),
48
+ payload_style:
49
+ T.nilable(Orb::WebhookEndpointUpdateParams::PayloadStyle::OrSymbol),
43
50
  url: T.nilable(String),
44
51
  request_options: Orb::RequestOptions::OrHash
45
52
  ).returns(Orb::WebhookEndpoint)
@@ -49,6 +56,9 @@ module Orb
49
56
  # The webhook event types to send to this endpoint. Null sends all event types;
50
57
  # omit to leave them unchanged.
51
58
  enabled_event_types: nil,
59
+ # The payload style of the webhook events sent to this endpoint. Applies to events
60
+ # created after the change; omit to leave it unchanged.
61
+ payload_style: nil,
52
62
  # The HTTPS URL that Orb sends webhook events to.
53
63
  url: nil,
54
64
  request_options: {}
@@ -0,0 +1,28 @@
1
+ module Orb
2
+ module Models
3
+ type credit_block_update_params =
4
+ { block_id: String, metadata: ::Hash[Symbol, String?]? }
5
+ & Orb::Internal::Type::request_parameters
6
+
7
+ class CreditBlockUpdateParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ attr_accessor block_id: String
12
+
13
+ attr_accessor metadata: ::Hash[Symbol, String?]?
14
+
15
+ def initialize: (
16
+ block_id: String,
17
+ ?metadata: ::Hash[Symbol, String?]?,
18
+ ?request_options: Orb::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ block_id: String,
23
+ metadata: ::Hash[Symbol, String?]?,
24
+ request_options: Orb::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,263 @@
1
+ module Orb
2
+ module Models
3
+ type credit_block_update_response =
4
+ {
5
+ id: String,
6
+ balance: Float,
7
+ credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
8
+ effective_date: Time?,
9
+ expiry_date: Time?,
10
+ filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
11
+ maximum_initial_balance: Float?,
12
+ metadata: ::Hash[Symbol, String],
13
+ per_unit_cost_basis: String?,
14
+ status: Orb::Models::CreditBlockUpdateResponse::status,
15
+ credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
16
+ credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
17
+ }
18
+
19
+ class CreditBlockUpdateResponse < Orb::Internal::Type::BaseModel
20
+ attr_accessor id: String
21
+
22
+ attr_accessor balance: Float
23
+
24
+ attr_accessor credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source
25
+
26
+ attr_accessor effective_date: Time?
27
+
28
+ attr_accessor expiry_date: Time?
29
+
30
+ attr_accessor filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter]
31
+
32
+ attr_accessor maximum_initial_balance: Float?
33
+
34
+ attr_accessor metadata: ::Hash[Symbol, String]
35
+
36
+ attr_accessor per_unit_cost_basis: String?
37
+
38
+ attr_accessor status: Orb::Models::CreditBlockUpdateResponse::status
39
+
40
+ attr_accessor credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?
41
+
42
+ attr_accessor credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
43
+
44
+ def initialize: (
45
+ id: String,
46
+ balance: Float,
47
+ credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
48
+ effective_date: Time?,
49
+ expiry_date: Time?,
50
+ filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
51
+ maximum_initial_balance: Float?,
52
+ metadata: ::Hash[Symbol, String],
53
+ per_unit_cost_basis: String?,
54
+ status: Orb::Models::CreditBlockUpdateResponse::status,
55
+ ?credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
56
+ ?credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
57
+ ) -> void
58
+
59
+ def to_hash: -> {
60
+ id: String,
61
+ balance: Float,
62
+ credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
63
+ effective_date: Time?,
64
+ expiry_date: Time?,
65
+ filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
66
+ maximum_initial_balance: Float?,
67
+ metadata: ::Hash[Symbol, String],
68
+ per_unit_cost_basis: String?,
69
+ status: Orb::Models::CreditBlockUpdateResponse::status,
70
+ credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
71
+ credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
72
+ }
73
+
74
+ type credit_block_source = :allocation | :top_up | :commitment | :manual
75
+
76
+ module CreditBlockSource
77
+ extend Orb::Internal::Type::Enum
78
+
79
+ ALLOCATION: :allocation
80
+ TOP_UP: :top_up
81
+ COMMITMENT: :commitment
82
+ MANUAL: :manual
83
+
84
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::credit_block_source]
85
+ end
86
+
87
+ type filter =
88
+ {
89
+ field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
90
+ operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
91
+ values: ::Array[String]
92
+ }
93
+
94
+ class Filter < Orb::Internal::Type::BaseModel
95
+ attr_accessor field: Orb::Models::CreditBlockUpdateResponse::Filter::field
96
+
97
+ attr_accessor operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator
98
+
99
+ attr_accessor values: ::Array[String]
100
+
101
+ def initialize: (
102
+ field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
103
+ operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
104
+ values: ::Array[String]
105
+ ) -> void
106
+
107
+ def to_hash: -> {
108
+ field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
109
+ operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
110
+ values: ::Array[String]
111
+ }
112
+
113
+ type field =
114
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
115
+
116
+ module Field
117
+ extend Orb::Internal::Type::Enum
118
+
119
+ PRICE_ID: :price_id
120
+ ITEM_ID: :item_id
121
+ PRICE_TYPE: :price_type
122
+ CURRENCY: :currency
123
+ PRICING_UNIT_ID: :pricing_unit_id
124
+
125
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::Filter::field]
126
+ end
127
+
128
+ type operator = :includes | :excludes
129
+
130
+ module Operator
131
+ extend Orb::Internal::Type::Enum
132
+
133
+ INCLUDES: :includes
134
+ EXCLUDES: :excludes
135
+
136
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::Filter::operator]
137
+ end
138
+ end
139
+
140
+ type status = :active | :pending_payment
141
+
142
+ module Status
143
+ extend Orb::Internal::Type::Enum
144
+
145
+ ACTIVE: :active
146
+ PENDING_PAYMENT: :pending_payment
147
+
148
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::status]
149
+ end
150
+
151
+ type credit_allocation =
152
+ {
153
+ allows_rollover: bool,
154
+ currency: String,
155
+ custom_expiration: Orb::CustomExpiration?,
156
+ item_id: String,
157
+ filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
158
+ license_type_id: String?
159
+ }
160
+
161
+ class CreditAllocation < Orb::Internal::Type::BaseModel
162
+ attr_accessor allows_rollover: bool
163
+
164
+ attr_accessor currency: String
165
+
166
+ attr_accessor custom_expiration: Orb::CustomExpiration?
167
+
168
+ attr_accessor item_id: String
169
+
170
+ attr_reader filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]?
171
+
172
+ def filters=: (
173
+ ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]
174
+ ) -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]
175
+
176
+ attr_accessor license_type_id: String?
177
+
178
+ def initialize: (
179
+ allows_rollover: bool,
180
+ currency: String,
181
+ custom_expiration: Orb::CustomExpiration?,
182
+ item_id: String,
183
+ ?filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
184
+ ?license_type_id: String?
185
+ ) -> void
186
+
187
+ def to_hash: -> {
188
+ allows_rollover: bool,
189
+ currency: String,
190
+ custom_expiration: Orb::CustomExpiration?,
191
+ item_id: String,
192
+ filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
193
+ license_type_id: String?
194
+ }
195
+
196
+ type filter =
197
+ {
198
+ field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
199
+ operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
200
+ values: ::Array[String]
201
+ }
202
+
203
+ class Filter < Orb::Internal::Type::BaseModel
204
+ attr_accessor field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field
205
+
206
+ attr_accessor operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator
207
+
208
+ attr_accessor values: ::Array[String]
209
+
210
+ def initialize: (
211
+ field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
212
+ operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
213
+ values: ::Array[String]
214
+ ) -> void
215
+
216
+ def to_hash: -> {
217
+ field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
218
+ operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
219
+ values: ::Array[String]
220
+ }
221
+
222
+ type field =
223
+ :price_id | :item_id | :price_type | :currency | :pricing_unit_id
224
+
225
+ module Field
226
+ extend Orb::Internal::Type::Enum
227
+
228
+ PRICE_ID: :price_id
229
+ ITEM_ID: :item_id
230
+ PRICE_TYPE: :price_type
231
+ CURRENCY: :currency
232
+ PRICING_UNIT_ID: :pricing_unit_id
233
+
234
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field]
235
+ end
236
+
237
+ type operator = :includes | :excludes
238
+
239
+ module Operator
240
+ extend Orb::Internal::Type::Enum
241
+
242
+ INCLUDES: :includes
243
+ EXCLUDES: :excludes
244
+
245
+ def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator]
246
+ end
247
+ end
248
+ end
249
+
250
+ type credit_commitment = { id: String, subscription_id: String? }
251
+
252
+ class CreditCommitment < Orb::Internal::Type::BaseModel
253
+ attr_accessor id: String
254
+
255
+ attr_accessor subscription_id: String?
256
+
257
+ def initialize: (id: String, ?subscription_id: String?) -> void
258
+
259
+ def to_hash: -> { id: String, subscription_id: String? }
260
+ end
261
+ end
262
+ end
263
+ end
@@ -0,0 +1,23 @@
1
+ module Orb
2
+ module Models
3
+ type metric_archive_params =
4
+ { metric_id: String } & Orb::Internal::Type::request_parameters
5
+
6
+ class MetricArchiveParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ attr_accessor metric_id: String
11
+
12
+ def initialize: (
13
+ metric_id: String,
14
+ ?request_options: Orb::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ metric_id: String,
19
+ request_options: Orb::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -7,7 +7,8 @@ module Orb
7
7
  created_at_lt: Time?,
8
8
  created_at_lte: Time?,
9
9
  cursor: String?,
10
- limit: Integer
10
+ limit: Integer,
11
+ status: Orb::Models::MetricListParams::status?
11
12
  }
12
13
  & Orb::Internal::Type::request_parameters
13
14
 
@@ -29,6 +30,8 @@ module Orb
29
30
 
30
31
  def limit=: (Integer) -> Integer
31
32
 
33
+ attr_accessor status: Orb::Models::MetricListParams::status?
34
+
32
35
  def initialize: (
33
36
  ?created_at_gt: Time?,
34
37
  ?created_at_gte: Time?,
@@ -36,6 +39,7 @@ module Orb
36
39
  ?created_at_lte: Time?,
37
40
  ?cursor: String?,
38
41
  ?limit: Integer,
42
+ ?status: Orb::Models::MetricListParams::status?,
39
43
  ?request_options: Orb::request_opts
40
44
  ) -> void
41
45
 
@@ -46,8 +50,21 @@ module Orb
46
50
  created_at_lte: Time?,
47
51
  cursor: String?,
48
52
  limit: Integer,
53
+ status: Orb::Models::MetricListParams::status?,
49
54
  request_options: Orb::RequestOptions
50
55
  }
56
+
57
+ type status = :active | :archived | :draft
58
+
59
+ module Status
60
+ extend Orb::Internal::Type::Enum
61
+
62
+ ACTIVE: :active
63
+ ARCHIVED: :archived
64
+ DRAFT: :draft
65
+
66
+ def self?.values: -> ::Array[Orb::Models::MetricListParams::status]
67
+ end
51
68
  end
52
69
  end
53
70
  end
@@ -0,0 +1,23 @@
1
+ module Orb
2
+ module Models
3
+ type metric_unarchive_params =
4
+ { metric_id: String } & Orb::Internal::Type::request_parameters
5
+
6
+ class MetricUnarchiveParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ attr_accessor metric_id: String
11
+
12
+ def initialize: (
13
+ metric_id: String,
14
+ ?request_options: Orb::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ metric_id: String,
19
+ request_options: Orb::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -1,7 +1,12 @@
1
1
  module Orb
2
2
  module Models
3
3
  type metric_update_params =
4
- { metric_id: String, metadata: ::Hash[Symbol, String?]? }
4
+ {
5
+ metric_id: String,
6
+ description: String?,
7
+ metadata: ::Hash[Symbol, String?]?,
8
+ name: String?
9
+ }
5
10
  & Orb::Internal::Type::request_parameters
6
11
 
7
12
  class MetricUpdateParams < Orb::Internal::Type::BaseModel
@@ -10,17 +15,25 @@ module Orb
10
15
 
11
16
  attr_accessor metric_id: String
12
17
 
18
+ attr_accessor description: String?
19
+
13
20
  attr_accessor metadata: ::Hash[Symbol, String?]?
14
21
 
22
+ attr_accessor name: String?
23
+
15
24
  def initialize: (
16
25
  metric_id: String,
26
+ ?description: String?,
17
27
  ?metadata: ::Hash[Symbol, String?]?,
28
+ ?name: String?,
18
29
  ?request_options: Orb::request_opts
19
30
  ) -> void
20
31
 
21
32
  def to_hash: -> {
22
33
  metric_id: String,
34
+ description: String?,
23
35
  metadata: ::Hash[Symbol, String?]?,
36
+ name: String?,
24
37
  request_options: Orb::RequestOptions
25
38
  }
26
39
  end
@@ -5,7 +5,8 @@ module Orb
5
5
  plan_id: String,
6
6
  description: String?,
7
7
  external_plan_id: String?,
8
- metadata: ::Hash[Symbol, String?]?
8
+ metadata: ::Hash[Symbol, String?]?,
9
+ name: String?
9
10
  }
10
11
  & Orb::Internal::Type::request_parameters
11
12
 
@@ -21,11 +22,14 @@ module Orb
21
22
 
22
23
  attr_accessor metadata: ::Hash[Symbol, String?]?
23
24
 
25
+ attr_accessor name: String?
26
+
24
27
  def initialize: (
25
28
  plan_id: String,
26
29
  ?description: String?,
27
30
  ?external_plan_id: String?,
28
31
  ?metadata: ::Hash[Symbol, String?]?,
32
+ ?name: String?,
29
33
  ?request_options: Orb::request_opts
30
34
  ) -> void
31
35
 
@@ -34,6 +38,7 @@ module Orb
34
38
  description: String?,
35
39
  external_plan_id: String?,
36
40
  metadata: ::Hash[Symbol, String?]?,
41
+ name: String?,
37
42
  request_options: Orb::RequestOptions
38
43
  }
39
44
  end
@@ -6,7 +6,8 @@ module Orb
6
6
  other_external_plan_id: String,
7
7
  description: String?,
8
8
  external_plan_id: String?,
9
- metadata: ::Hash[Symbol, String?]?
9
+ metadata: ::Hash[Symbol, String?]?,
10
+ name: String?
10
11
  }
11
12
  & Orb::Internal::Type::request_parameters
12
13
 
@@ -22,11 +23,14 @@ module Orb
22
23
 
23
24
  attr_accessor metadata: ::Hash[Symbol, String?]?
24
25
 
26
+ attr_accessor name: String?
27
+
25
28
  def initialize: (
26
29
  other_external_plan_id: String,
27
30
  ?description: String?,
28
31
  ?external_plan_id: String?,
29
32
  ?metadata: ::Hash[Symbol, String?]?,
33
+ ?name: String?,
30
34
  ?request_options: Orb::request_opts
31
35
  ) -> void
32
36
 
@@ -35,6 +39,7 @@ module Orb
35
39
  description: String?,
36
40
  external_plan_id: String?,
37
41
  metadata: ::Hash[Symbol, String?]?,
42
+ name: String?,
38
43
  request_options: Orb::RequestOptions
39
44
  }
40
45
  end
@@ -6,6 +6,7 @@ module Orb
6
6
  created_at: Time,
7
7
  enabled: bool,
8
8
  enabled_event_types: ::Array[String]?,
9
+ payload_style: Orb::Models::WebhookEndpoint::payload_style,
9
10
  url: String
10
11
  }
11
12
 
@@ -18,6 +19,8 @@ module Orb
18
19
 
19
20
  attr_accessor enabled_event_types: ::Array[String]?
20
21
 
22
+ attr_accessor payload_style: Orb::Models::WebhookEndpoint::payload_style
23
+
21
24
  attr_accessor url: String
22
25
 
23
26
  def initialize: (
@@ -25,6 +28,7 @@ module Orb
25
28
  created_at: Time,
26
29
  enabled: bool,
27
30
  enabled_event_types: ::Array[String]?,
31
+ payload_style: Orb::Models::WebhookEndpoint::payload_style,
28
32
  url: String
29
33
  ) -> void
30
34
 
@@ -33,8 +37,20 @@ module Orb
33
37
  created_at: Time,
34
38
  enabled: bool,
35
39
  enabled_event_types: ::Array[String]?,
40
+ payload_style: Orb::Models::WebhookEndpoint::payload_style,
36
41
  url: String
37
42
  }
43
+
44
+ type payload_style = :expanded | :standard
45
+
46
+ module PayloadStyle
47
+ extend Orb::Internal::Type::Enum
48
+
49
+ EXPANDED: :expanded
50
+ STANDARD: :standard
51
+
52
+ def self?.values: -> ::Array[Orb::Models::WebhookEndpoint::payload_style]
53
+ end
38
54
  end
39
55
  end
40
56
  end
@@ -1,7 +1,11 @@
1
1
  module Orb
2
2
  module Models
3
3
  type webhook_endpoint_create_params =
4
- { url: String, enabled_event_types: ::Array[String]? }
4
+ {
5
+ url: String,
6
+ enabled_event_types: ::Array[String]?,
7
+ payload_style: Orb::Models::WebhookEndpointCreateParams::payload_style?
8
+ }
5
9
  & Orb::Internal::Type::request_parameters
6
10
 
7
11
  class WebhookEndpointCreateParams < Orb::Internal::Type::BaseModel
@@ -12,17 +16,32 @@ module Orb
12
16
 
13
17
  attr_accessor enabled_event_types: ::Array[String]?
14
18
 
19
+ attr_accessor payload_style: Orb::Models::WebhookEndpointCreateParams::payload_style?
20
+
15
21
  def initialize: (
16
22
  url: String,
17
23
  ?enabled_event_types: ::Array[String]?,
24
+ ?payload_style: Orb::Models::WebhookEndpointCreateParams::payload_style?,
18
25
  ?request_options: Orb::request_opts
19
26
  ) -> void
20
27
 
21
28
  def to_hash: -> {
22
29
  url: String,
23
30
  enabled_event_types: ::Array[String]?,
31
+ payload_style: Orb::Models::WebhookEndpointCreateParams::payload_style?,
24
32
  request_options: Orb::RequestOptions
25
33
  }
34
+
35
+ type payload_style = :expanded | :standard
36
+
37
+ module PayloadStyle
38
+ extend Orb::Internal::Type::Enum
39
+
40
+ EXPANDED: :expanded
41
+ STANDARD: :standard
42
+
43
+ def self?.values: -> ::Array[Orb::Models::WebhookEndpointCreateParams::payload_style]
44
+ end
26
45
  end
27
46
  end
28
47
  end
@@ -4,6 +4,7 @@ module Orb
4
4
  {
5
5
  webhook_endpoint_id: String,
6
6
  enabled_event_types: ::Array[String]?,
7
+ payload_style: Orb::Models::WebhookEndpointUpdateParams::payload_style?,
7
8
  url: String?
8
9
  }
9
10
  & Orb::Internal::Type::request_parameters
@@ -16,11 +17,14 @@ module Orb
16
17
 
17
18
  attr_accessor enabled_event_types: ::Array[String]?
18
19
 
20
+ attr_accessor payload_style: Orb::Models::WebhookEndpointUpdateParams::payload_style?
21
+
19
22
  attr_accessor url: String?
20
23
 
21
24
  def initialize: (
22
25
  webhook_endpoint_id: String,
23
26
  ?enabled_event_types: ::Array[String]?,
27
+ ?payload_style: Orb::Models::WebhookEndpointUpdateParams::payload_style?,
24
28
  ?url: String?,
25
29
  ?request_options: Orb::request_opts
26
30
  ) -> void
@@ -28,9 +32,21 @@ module Orb
28
32
  def to_hash: -> {
29
33
  webhook_endpoint_id: String,
30
34
  enabled_event_types: ::Array[String]?,
35
+ payload_style: Orb::Models::WebhookEndpointUpdateParams::payload_style?,
31
36
  url: String?,
32
37
  request_options: Orb::RequestOptions
33
38
  }
39
+
40
+ type payload_style = :expanded | :standard
41
+
42
+ module PayloadStyle
43
+ extend Orb::Internal::Type::Enum
44
+
45
+ EXPANDED: :expanded
46
+ STANDARD: :standard
47
+
48
+ def self?.values: -> ::Array[Orb::Models::WebhookEndpointUpdateParams::payload_style]
49
+ end
34
50
  end
35
51
  end
36
52
  end