orb-billing 1.45.0 → 1.47.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 (316) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/README.md +1 -1
  4. data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
  5. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
  6. data/lib/orb/models/invoice_list_summary_response.rb +2 -1
  7. data/lib/orb/models/metric_list_params.rb +21 -1
  8. data/lib/orb/models/metric_update_params.rb +17 -1
  9. data/lib/orb/models/plan_update_params.rb +9 -1
  10. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  11. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
  12. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
  13. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
  14. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
  15. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
  16. data/lib/orb/models/webhook_endpoint.rb +28 -1
  17. data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
  18. data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
  19. data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
  20. data/lib/orb/models/webhooks/backfill_reflected_standard_webhook_event.rb +206 -0
  21. data/lib/orb/models/webhooks/backfill_reverted_standard_webhook_event.rb +206 -0
  22. data/lib/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rb +131 -0
  23. data/lib/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +537 -0
  24. data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +531 -0
  25. data/lib/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rb +188 -0
  26. data/lib/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rb +183 -0
  27. data/lib/orb/models/webhooks/credit_note_issued_standard_webhook_event.rb +90 -0
  28. data/lib/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rb +92 -0
  29. data/lib/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rb +198 -0
  30. data/lib/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rb +193 -0
  31. data/lib/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rb +240 -0
  32. data/lib/orb/models/webhooks/customer_created_standard_webhook_event.rb +106 -0
  33. data/lib/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rb +597 -0
  34. data/lib/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rb +603 -0
  35. data/lib/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rb +597 -0
  36. data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +509 -0
  37. data/lib/orb/models/webhooks/customer_edited_standard_webhook_event.rb +371 -0
  38. data/lib/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rb +130 -0
  39. data/lib/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rb +124 -0
  40. data/lib/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rb +134 -0
  41. data/lib/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rb +94 -0
  42. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +974 -0
  43. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +968 -0
  44. data/lib/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rb +367 -0
  45. data/lib/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rb +113 -0
  46. data/lib/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rb +101 -0
  47. data/lib/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rb +101 -0
  48. data/lib/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rb +95 -0
  49. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +996 -0
  50. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +990 -0
  51. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +994 -0
  52. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +944 -0
  53. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +1367 -0
  54. data/lib/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rb +151 -0
  55. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +887 -0
  56. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +886 -0
  57. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +889 -0
  58. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +901 -0
  59. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +878 -0
  60. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +901 -0
  61. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +895 -0
  62. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +910 -0
  63. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +892 -0
  64. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +894 -0
  65. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +877 -0
  66. data/lib/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rb +125 -0
  67. data/lib/orb/models/webhooks/payment_method_created_standard_webhook_event.rb +184 -0
  68. data/lib/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rb +184 -0
  69. data/lib/orb/models/webhooks/plan_created_standard_webhook_event.rb +119 -0
  70. data/lib/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rb +139 -0
  71. data/lib/orb/models/webhooks/plan_edited_standard_webhook_event.rb +159 -0
  72. data/lib/orb/models/webhooks/plan_version_created_standard_webhook_event.rb +138 -0
  73. data/lib/orb/models/webhooks/price_edited_standard_webhook_event.rb +132 -0
  74. data/lib/orb/models/webhooks/resource_event_test_standard_webhook_event.rb +92 -0
  75. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +974 -0
  76. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +969 -0
  77. data/lib/orb/models/webhooks/standard_unwrap_standard_params.rb +16 -0
  78. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +322 -0
  79. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +316 -0
  80. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +663 -0
  81. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +237 -0
  82. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +237 -0
  83. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +692 -0
  84. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +221 -0
  85. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +273 -0
  86. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +219 -0
  87. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +255 -0
  88. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +689 -0
  89. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +218 -0
  90. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +240 -0
  91. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +683 -0
  92. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +249 -0
  93. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +233 -0
  94. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +250 -0
  95. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +248 -0
  96. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +693 -0
  97. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +221 -0
  98. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +222 -0
  99. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +700 -0
  100. data/lib/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rb +270 -0
  101. data/lib/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rb +264 -0
  102. data/lib/orb/models/webhooks/unwrap_standard_webhook_event.rb +258 -0
  103. data/lib/orb/models.rb +2 -0
  104. data/lib/orb/resources/metrics.rb +15 -5
  105. data/lib/orb/resources/plans/external_plan_id.rb +6 -3
  106. data/lib/orb/resources/plans.rb +6 -3
  107. data/lib/orb/resources/webhook_endpoints.rb +6 -2
  108. data/lib/orb/resources/webhooks/standard.rb +24 -0
  109. data/lib/orb/resources/webhooks.rb +4 -0
  110. data/lib/orb/version.rb +1 -1
  111. data/lib/orb.rb +84 -0
  112. data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
  113. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
  114. data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
  115. data/rbi/orb/models/metric_list_params.rbi +29 -0
  116. data/rbi/orb/models/metric_update_params.rbi +16 -0
  117. data/rbi/orb/models/plan_update_params.rbi +8 -0
  118. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  119. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
  120. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
  121. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
  122. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
  123. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
  124. data/rbi/orb/models/webhook_endpoint.rbi +39 -0
  125. data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
  126. data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
  127. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
  128. data/rbi/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbi +349 -0
  129. data/rbi/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbi +347 -0
  130. data/rbi/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbi +273 -0
  131. data/rbi/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +1106 -0
  132. data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +1095 -0
  133. data/rbi/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbi +377 -0
  134. data/rbi/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbi +366 -0
  135. data/rbi/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbi +166 -0
  136. data/rbi/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbi +166 -0
  137. data/rbi/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbi +403 -0
  138. data/rbi/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbi +392 -0
  139. data/rbi/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbi +493 -0
  140. data/rbi/orb/models/webhooks/customer_created_standard_webhook_event.rbi +198 -0
  141. data/rbi/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbi +1151 -0
  142. data/rbi/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbi +1158 -0
  143. data/rbi/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbi +1151 -0
  144. data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +1044 -0
  145. data/rbi/orb/models/webhooks/customer_edited_standard_webhook_event.rbi +678 -0
  146. data/rbi/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbi +236 -0
  147. data/rbi/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbi +230 -0
  148. data/rbi/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbi +275 -0
  149. data/rbi/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbi +192 -0
  150. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  151. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  152. data/rbi/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbi +670 -0
  153. data/rbi/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbi +210 -0
  154. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbi +195 -0
  155. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbi +195 -0
  156. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbi +188 -0
  157. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +1716 -0
  158. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +1711 -0
  159. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +1716 -0
  160. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +1631 -0
  161. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +2340 -0
  162. data/rbi/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbi +324 -0
  163. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +1532 -0
  164. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +1532 -0
  165. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +1537 -0
  166. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +1552 -0
  167. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +1497 -0
  168. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +1557 -0
  169. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +1550 -0
  170. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +1566 -0
  171. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +1545 -0
  172. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +1547 -0
  173. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +1497 -0
  174. data/rbi/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbi +233 -0
  175. data/rbi/orb/models/webhooks/payment_method_created_standard_webhook_event.rbi +331 -0
  176. data/rbi/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbi +331 -0
  177. data/rbi/orb/models/webhooks/plan_created_standard_webhook_event.rbi +216 -0
  178. data/rbi/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbi +277 -0
  179. data/rbi/orb/models/webhooks/plan_edited_standard_webhook_event.rbi +337 -0
  180. data/rbi/orb/models/webhooks/plan_version_created_standard_webhook_event.rbi +271 -0
  181. data/rbi/orb/models/webhooks/price_edited_standard_webhook_event.rbi +311 -0
  182. data/rbi/orb/models/webhooks/resource_event_test_standard_webhook_event.rbi +191 -0
  183. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  184. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  185. data/rbi/orb/models/webhooks/standard_unwrap_standard_params.rbi +32 -0
  186. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +609 -0
  187. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +598 -0
  188. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +1296 -0
  189. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +433 -0
  190. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +435 -0
  191. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +1298 -0
  192. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +398 -0
  193. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +520 -0
  194. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +398 -0
  195. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +458 -0
  196. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +1315 -0
  197. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +422 -0
  198. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +471 -0
  199. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +1313 -0
  200. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +453 -0
  201. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +433 -0
  202. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +457 -0
  203. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +457 -0
  204. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +1299 -0
  205. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +398 -0
  206. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +398 -0
  207. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +1305 -0
  208. data/rbi/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbi +516 -0
  209. data/rbi/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbi +505 -0
  210. data/rbi/orb/models/webhooks/unwrap_standard_webhook_event.rbi +107 -0
  211. data/rbi/orb/models.rbi +2 -0
  212. data/rbi/orb/resources/metrics.rbi +16 -3
  213. data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
  214. data/rbi/orb/resources/plans.rbi +6 -2
  215. data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
  216. data/rbi/orb/resources/webhooks/standard.rbi +107 -0
  217. data/rbi/orb/resources/webhooks.rbi +3 -0
  218. data/sig/orb/models/metric_list_params.rbs +18 -1
  219. data/sig/orb/models/metric_update_params.rbs +14 -1
  220. data/sig/orb/models/plan_update_params.rbs +6 -1
  221. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
  222. data/sig/orb/models/webhook_endpoint.rbs +16 -0
  223. data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
  224. data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
  225. data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
  226. data/sig/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbs +148 -0
  227. data/sig/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbs +148 -0
  228. data/sig/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbs +112 -0
  229. data/sig/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +435 -0
  230. data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +430 -0
  231. data/sig/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbs +165 -0
  232. data/sig/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbs +160 -0
  233. data/sig/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbs +68 -0
  234. data/sig/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbs +68 -0
  235. data/sig/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbs +160 -0
  236. data/sig/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbs +155 -0
  237. data/sig/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbs +189 -0
  238. data/sig/orb/models/webhooks/customer_created_standard_webhook_event.rbs +68 -0
  239. data/sig/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbs +396 -0
  240. data/sig/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbs +401 -0
  241. data/sig/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbs +396 -0
  242. data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +386 -0
  243. data/sig/orb/models/webhooks/customer_edited_standard_webhook_event.rbs +157 -0
  244. data/sig/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbs +110 -0
  245. data/sig/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbs +105 -0
  246. data/sig/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbs +122 -0
  247. data/sig/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbs +73 -0
  248. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  249. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  250. data/sig/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbs +331 -0
  251. data/sig/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbs +91 -0
  252. data/sig/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbs +75 -0
  253. data/sig/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbs +75 -0
  254. data/sig/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbs +73 -0
  255. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +638 -0
  256. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +633 -0
  257. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +623 -0
  258. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +586 -0
  259. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +859 -0
  260. data/sig/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbs +129 -0
  261. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +527 -0
  262. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +527 -0
  263. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +527 -0
  264. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +540 -0
  265. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +517 -0
  266. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +544 -0
  267. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +538 -0
  268. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +549 -0
  269. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +536 -0
  270. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +536 -0
  271. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +517 -0
  272. data/sig/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbs +100 -0
  273. data/sig/orb/models/webhooks/payment_method_created_standard_webhook_event.rbs +130 -0
  274. data/sig/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbs +130 -0
  275. data/sig/orb/models/webhooks/plan_created_standard_webhook_event.rbs +90 -0
  276. data/sig/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbs +112 -0
  277. data/sig/orb/models/webhooks/plan_edited_standard_webhook_event.rbs +134 -0
  278. data/sig/orb/models/webhooks/plan_version_created_standard_webhook_event.rbs +109 -0
  279. data/sig/orb/models/webhooks/price_edited_standard_webhook_event.rbs +95 -0
  280. data/sig/orb/models/webhooks/resource_event_test_standard_webhook_event.rbs +75 -0
  281. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  282. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  283. data/sig/orb/models/webhooks/standard_unwrap_standard_params.rbs +17 -0
  284. data/sig/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbs +256 -0
  285. data/sig/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbs +251 -0
  286. data/sig/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbs +466 -0
  287. data/sig/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbs +169 -0
  288. data/sig/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbs +169 -0
  289. data/sig/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbs +475 -0
  290. data/sig/orb/models/webhooks/subscription_created_standard_webhook_event.rbs +159 -0
  291. data/sig/orb/models/webhooks/subscription_edited_standard_webhook_event.rbs +218 -0
  292. data/sig/orb/models/webhooks/subscription_ended_standard_webhook_event.rbs +159 -0
  293. data/sig/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbs +191 -0
  294. data/sig/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbs +487 -0
  295. data/sig/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbs +176 -0
  296. data/sig/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbs +198 -0
  297. data/sig/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbs +482 -0
  298. data/sig/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbs +182 -0
  299. data/sig/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbs +169 -0
  300. data/sig/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbs +186 -0
  301. data/sig/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbs +186 -0
  302. data/sig/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbs +475 -0
  303. data/sig/orb/models/webhooks/subscription_started_standard_webhook_event.rbs +159 -0
  304. data/sig/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbs +159 -0
  305. data/sig/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbs +480 -0
  306. data/sig/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbs +223 -0
  307. data/sig/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbs +218 -0
  308. data/sig/orb/models/webhooks/unwrap_standard_webhook_event.rbs +94 -0
  309. data/sig/orb/models.rbs +2 -0
  310. data/sig/orb/resources/metrics.rbs +3 -0
  311. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  312. data/sig/orb/resources/plans.rbs +1 -0
  313. data/sig/orb/resources/webhook_endpoints.rbs +2 -0
  314. data/sig/orb/resources/webhooks/standard.rbs +93 -0
  315. data/sig/orb/resources/webhooks.rbs +2 -0
  316. metadata +253 -1
@@ -0,0 +1,1367 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class InvoiceEditedStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of this webhook event.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The time at which this event was created, to the second.
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute invoice
20
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
21
+ # Fetch the invoice for those.
22
+ #
23
+ # @return [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice]
24
+ required :invoice, -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice }
25
+
26
+ # @!attribute payload_style
27
+ # The serialization style this payload was rendered in, as configured on the
28
+ # endpoint.
29
+ #
30
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::PayloadStyle]
31
+ required :payload_style, enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::PayloadStyle }
32
+
33
+ # @!attribute properties
34
+ #
35
+ # @return [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties]
36
+ required :properties, -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties }
37
+
38
+ # @!attribute type
39
+ # The event this payload describes.
40
+ #
41
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Type]
42
+ required :type, enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Type }
43
+
44
+ # @!method initialize(id:, created_at:, invoice:, payload_style:, properties:, type:)
45
+ # Some parameter documentations has been truncated, see
46
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent} for more details.
47
+ #
48
+ # Issued when a draft invoice has been edited.
49
+ #
50
+ # @param id [String] The ID of this webhook event.
51
+ #
52
+ # @param created_at [Time] The time at which this event was created, to the second.
53
+ #
54
+ # @param invoice [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice] An invoice without its line items, subtotal, discounts, minimums or maximums. Fe
55
+ #
56
+ # @param payload_style [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::PayloadStyle] The serialization style this payload was rendered in, as configured on the endpo
57
+ #
58
+ # @param properties [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties]
59
+ #
60
+ # @param type [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Type] The event this payload describes.
61
+
62
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent#invoice
63
+ class Invoice < Orb::Internal::Type::BaseModel
64
+ # @!attribute id
65
+ #
66
+ # @return [String]
67
+ required :id, String
68
+
69
+ # @!attribute amount_due
70
+ # This is the final amount required to be charged to the customer and reflects the
71
+ # application of the customer balance to the `total` of the invoice.
72
+ #
73
+ # @return [String]
74
+ required :amount_due, String
75
+
76
+ # @!attribute auto_collection
77
+ #
78
+ # @return [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::AutoCollection]
79
+ required :auto_collection,
80
+ -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::AutoCollection }
81
+
82
+ # @!attribute billing_address
83
+ #
84
+ # @return [Orb::Models::Address, nil]
85
+ required :billing_address, -> { Orb::Address }, nil?: true
86
+
87
+ # @!attribute created_at
88
+ # The creation time of the resource in Orb.
89
+ #
90
+ # @return [Time]
91
+ required :created_at, Time
92
+
93
+ # @!attribute credit_notes
94
+ # A list of credit notes associated with the invoice
95
+ #
96
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CreditNote>]
97
+ required :credit_notes,
98
+ -> { Orb::Internal::Type::ArrayOf[Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CreditNote] }
99
+
100
+ # @!attribute currency
101
+ # An ISO 4217 currency string or `credits`
102
+ #
103
+ # @return [String]
104
+ required :currency, String
105
+
106
+ # @!attribute customer
107
+ #
108
+ # @return [Orb::Models::CustomerMinified]
109
+ required :customer, -> { Orb::CustomerMinified }
110
+
111
+ # @!attribute customer_balance_transactions
112
+ #
113
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction>]
114
+ required :customer_balance_transactions,
115
+ -> { Orb::Internal::Type::ArrayOf[Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction] }
116
+
117
+ # @!attribute customer_tax_id
118
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
119
+ # added to the headers of invoices.
120
+ #
121
+ # ### Supported Tax ID Countries and Types
122
+ #
123
+ # | Country | Type | Description |
124
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
125
+ # | Albania | `al_tin` | Albania Tax Identification Number |
126
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
127
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
128
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
129
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
130
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
131
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
132
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
133
+ # | Austria | `eu_vat` | European VAT Number |
134
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
135
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
136
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
137
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
138
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
139
+ # | Belarus | `by_tin` | Belarus TIN Number |
140
+ # | Belgium | `eu_vat` | European VAT Number |
141
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
142
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
143
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
144
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
145
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
146
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
147
+ # | Bulgaria | `eu_vat` | European VAT Number |
148
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
149
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
150
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
151
+ # | Canada | `ca_bn` | Canadian BN |
152
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
153
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
154
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
155
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
156
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
157
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
158
+ # | Chile | `cl_tin` | Chilean TIN |
159
+ # | China | `cn_tin` | Chinese Tax ID |
160
+ # | Colombia | `co_nit` | Colombian NIT Number |
161
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
162
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
163
+ # | Croatia | `eu_vat` | European VAT Number |
164
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
165
+ # | Cyprus | `eu_vat` | European VAT Number |
166
+ # | Czech Republic | `eu_vat` | European VAT Number |
167
+ # | Denmark | `eu_vat` | European VAT Number |
168
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
169
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
170
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
171
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
172
+ # | Estonia | `eu_vat` | European VAT Number |
173
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
174
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
175
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
176
+ # | Finland | `eu_vat` | European VAT Number |
177
+ # | France | `eu_vat` | European VAT Number |
178
+ # | Georgia | `ge_vat` | Georgian VAT |
179
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
180
+ # | Germany | `eu_vat` | European VAT Number |
181
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
182
+ # | Greece | `eu_vat` | European VAT Number |
183
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
184
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
185
+ # | Hungary | `eu_vat` | European VAT Number |
186
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
187
+ # | Iceland | `is_vat` | Icelandic VAT |
188
+ # | India | `in_gst` | Indian GST Number |
189
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
190
+ # | Ireland | `eu_vat` | European VAT Number |
191
+ # | Israel | `il_vat` | Israel VAT |
192
+ # | Italy | `eu_vat` | European VAT Number |
193
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
194
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
195
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
196
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
197
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
198
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
199
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
200
+ # | Laos | `la_tin` | Laos Tax Identification Number |
201
+ # | Latvia | `eu_vat` | European VAT Number |
202
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
203
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
204
+ # | Lithuania | `eu_vat` | European VAT Number |
205
+ # | Luxembourg | `eu_vat` | European VAT Number |
206
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
207
+ # | Malaysia | `my_itn` | Malaysian ITN |
208
+ # | Malaysia | `my_sst` | Malaysian SST Number |
209
+ # | Malta | `eu_vat` | European VAT Number |
210
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
211
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
212
+ # | Moldova | `md_vat` | Moldova VAT Number |
213
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
214
+ # | Morocco | `ma_vat` | Morocco VAT Number |
215
+ # | Nepal | `np_pan` | Nepal PAN Number |
216
+ # | Netherlands | `eu_vat` | European VAT Number |
217
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
218
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
219
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
220
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
221
+ # | Norway | `no_vat` | Norwegian VAT Number |
222
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
223
+ # | Oman | `om_vat` | Omani VAT Number |
224
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
225
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
226
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
227
+ # | Poland | `eu_vat` | European VAT Number |
228
+ # | Poland | `pl_nip` | Polish Tax ID Number |
229
+ # | Portugal | `eu_vat` | European VAT Number |
230
+ # | Romania | `eu_vat` | European VAT Number |
231
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
232
+ # | Russia | `ru_inn` | Russian INN |
233
+ # | Russia | `ru_kpp` | Russian KPP |
234
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
235
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
236
+ # | Serbia | `rs_pib` | Serbian PIB Number |
237
+ # | Singapore | `sg_gst` | Singaporean GST |
238
+ # | Singapore | `sg_uen` | Singaporean UEN |
239
+ # | Slovakia | `eu_vat` | European VAT Number |
240
+ # | Slovenia | `eu_vat` | European VAT Number |
241
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
242
+ # | South Africa | `za_vat` | South African VAT Number |
243
+ # | South Korea | `kr_brn` | Korean BRN |
244
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
245
+ # | Spain | `eu_vat` | European VAT Number |
246
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
247
+ # | Suriname | `sr_fin` | Suriname FIN Number |
248
+ # | Sweden | `eu_vat` | European VAT Number |
249
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
250
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
251
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
252
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
253
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
254
+ # | Thailand | `th_vat` | Thai VAT |
255
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
256
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
257
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
258
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
259
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
260
+ # | United States | `us_ein` | United States EIN |
261
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
262
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
263
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
264
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
265
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
266
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
267
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
268
+ #
269
+ # @return [Orb::Models::CustomerTaxID, nil]
270
+ required :customer_tax_id, -> { Orb::CustomerTaxID }, nil?: true
271
+
272
+ # @!attribute due_date
273
+ # When the invoice payment is due. The due date is null if the invoice is not yet
274
+ # finalized.
275
+ #
276
+ # @return [Time, nil]
277
+ required :due_date, Time, nil?: true
278
+
279
+ # @!attribute eligible_to_issue_at
280
+ # If the invoice has a status of `draft`, this will be the time that the invoice
281
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
282
+ # true, the invoice will automatically begin issuing at this time.
283
+ #
284
+ # @return [Time, nil]
285
+ required :eligible_to_issue_at, Time, nil?: true
286
+
287
+ # @!attribute hosted_invoice_url
288
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
289
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
290
+ #
291
+ # @return [String, nil]
292
+ required :hosted_invoice_url, String, nil?: true
293
+
294
+ # @!attribute invoice_date
295
+ # The scheduled date of the invoice
296
+ #
297
+ # @return [Time]
298
+ required :invoice_date, Time
299
+
300
+ # @!attribute invoice_number
301
+ # Automatically generated invoice number to help track and reconcile invoices.
302
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
303
+ # account or customer.
304
+ #
305
+ # @return [String]
306
+ required :invoice_number, String
307
+
308
+ # @!attribute invoice_pdf
309
+ # The link to download the PDF representation of the `Invoice`.
310
+ #
311
+ # @return [String, nil]
312
+ required :invoice_pdf, String, nil?: true
313
+
314
+ # @!attribute invoice_source
315
+ #
316
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::InvoiceSource]
317
+ required :invoice_source,
318
+ enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::InvoiceSource }
319
+
320
+ # @!attribute issue_failed_at
321
+ # If the invoice failed to issue, this will be the last time it failed to issue
322
+ # (even if it is now in a different state.)
323
+ #
324
+ # @return [Time, nil]
325
+ required :issue_failed_at, Time, nil?: true
326
+
327
+ # @!attribute issued_at
328
+ # If the invoice has been issued, this will be the time it transitioned to
329
+ # `issued` (even if it is now in a different state.)
330
+ #
331
+ # @return [Time, nil]
332
+ required :issued_at, Time, nil?: true
333
+
334
+ # @!attribute memo
335
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
336
+ #
337
+ # @return [String, nil]
338
+ required :memo, String, nil?: true
339
+
340
+ # @!attribute metadata
341
+ # User specified key-value pairs for the resource. If not present, this defaults
342
+ # to an empty dictionary. Individual keys can be removed by setting the value to
343
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
344
+ # `null`.
345
+ #
346
+ # @return [Hash{Symbol=>String}]
347
+ required :metadata, Orb::Internal::Type::HashOf[String]
348
+
349
+ # @!attribute paid_at
350
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
351
+ # was paid.
352
+ #
353
+ # @return [Time, nil]
354
+ required :paid_at, Time, nil?: true
355
+
356
+ # @!attribute payment_attempts
357
+ # A list of payment attempts associated with the invoice
358
+ #
359
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt>]
360
+ required :payment_attempts,
361
+ -> { Orb::Internal::Type::ArrayOf[Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt] }
362
+
363
+ # @!attribute payment_failed_at
364
+ # If payment was attempted on this invoice but failed, this will be the time of
365
+ # the most recent attempt.
366
+ #
367
+ # @return [Time, nil]
368
+ required :payment_failed_at, Time, nil?: true
369
+
370
+ # @!attribute payment_received_at
371
+ # When payment for this invoice was received. For an invoice manually marked as
372
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
373
+ # through a payment provider, this is the settlement time reported by that
374
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
375
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
376
+ # when the invoice reached the `paid` status in Orb.
377
+ #
378
+ # @return [Time, nil]
379
+ required :payment_received_at, Time, nil?: true
380
+
381
+ # @!attribute payment_started_at
382
+ # If payment was attempted on this invoice, this will be the start time of the
383
+ # most recent attempt. This field is especially useful for delayed-notification
384
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
385
+ #
386
+ # @return [Time, nil]
387
+ required :payment_started_at, Time, nil?: true
388
+
389
+ # @!attribute scheduled_issue_at
390
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
391
+ # scheduled to be issued.
392
+ #
393
+ # @return [Time, nil]
394
+ required :scheduled_issue_at, Time, nil?: true
395
+
396
+ # @!attribute shipping_address
397
+ #
398
+ # @return [Orb::Models::Address, nil]
399
+ required :shipping_address, -> { Orb::Address }, nil?: true
400
+
401
+ # @!attribute status
402
+ #
403
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::Status]
404
+ required :status, enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::Status }
405
+
406
+ # @!attribute subscription
407
+ #
408
+ # @return [Orb::Models::SubscriptionMinified, nil]
409
+ required :subscription, -> { Orb::SubscriptionMinified }, nil?: true
410
+
411
+ # @!attribute sync_failed_at
412
+ # If the invoice failed to sync, this will be the last time an external invoicing
413
+ # provider sync was attempted. This field will always be `null` for invoices using
414
+ # Orb Invoicing.
415
+ #
416
+ # @return [Time, nil]
417
+ required :sync_failed_at, Time, nil?: true
418
+
419
+ # @!attribute total
420
+ # The total after any minimums and discounts have been applied.
421
+ #
422
+ # @return [String]
423
+ required :total, String
424
+
425
+ # @!attribute voided_at
426
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
427
+ # was voided.
428
+ #
429
+ # @return [Time, nil]
430
+ required :voided_at, Time, nil?: true
431
+
432
+ # @!attribute will_auto_issue
433
+ # This is true if the invoice will be automatically issued in the future, and
434
+ # false otherwise.
435
+ #
436
+ # @return [Boolean]
437
+ required :will_auto_issue, Orb::Internal::Type::Boolean
438
+
439
+ # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
440
+ # Some parameter documentations has been truncated, see
441
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice} for more
442
+ # details.
443
+ #
444
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
445
+ # Fetch the invoice for those.
446
+ #
447
+ # @param id [String]
448
+ #
449
+ # @param amount_due [String] This is the final amount required to be charged to the customer and reflects the
450
+ #
451
+ # @param auto_collection [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::AutoCollection]
452
+ #
453
+ # @param billing_address [Orb::Models::Address, nil]
454
+ #
455
+ # @param created_at [Time] The creation time of the resource in Orb.
456
+ #
457
+ # @param credit_notes [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CreditNote>] A list of credit notes associated with the invoice
458
+ #
459
+ # @param currency [String] An ISO 4217 currency string or `credits`
460
+ #
461
+ # @param customer [Orb::Models::CustomerMinified]
462
+ #
463
+ # @param customer_balance_transactions [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction>]
464
+ #
465
+ # @param customer_tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
466
+ #
467
+ # @param due_date [Time, nil] When the invoice payment is due. The due date is null if the invoice is not yet
468
+ #
469
+ # @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
470
+ #
471
+ # @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
472
+ #
473
+ # @param invoice_date [Time] The scheduled date of the invoice
474
+ #
475
+ # @param invoice_number [String] Automatically generated invoice number to help track and reconcile invoices. Inv
476
+ #
477
+ # @param invoice_pdf [String, nil] The link to download the PDF representation of the `Invoice`.
478
+ #
479
+ # @param invoice_source [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::InvoiceSource]
480
+ #
481
+ # @param issue_failed_at [Time, nil] If the invoice failed to issue, this will be the last time it failed to issue (e
482
+ #
483
+ # @param issued_at [Time, nil] If the invoice has been issued, this will be the time it transitioned to `issued
484
+ #
485
+ # @param memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
486
+ #
487
+ # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
488
+ #
489
+ # @param paid_at [Time, nil] If the invoice has a status of `paid`, this gives a timestamp when the invoice w
490
+ #
491
+ # @param payment_attempts [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt>] A list of payment attempts associated with the invoice
492
+ #
493
+ # @param payment_failed_at [Time, nil] If payment was attempted on this invoice but failed, this will be the time of th
494
+ #
495
+ # @param payment_received_at [Time, nil] When payment for this invoice was received. For an invoice manually marked as pa
496
+ #
497
+ # @param payment_started_at [Time, nil] If payment was attempted on this invoice, this will be the start time of the mos
498
+ #
499
+ # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
500
+ #
501
+ # @param shipping_address [Orb::Models::Address, nil]
502
+ #
503
+ # @param status [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::Status]
504
+ #
505
+ # @param subscription [Orb::Models::SubscriptionMinified, nil]
506
+ #
507
+ # @param sync_failed_at [Time, nil] If the invoice failed to sync, this will be the last time an external invoicing
508
+ #
509
+ # @param total [String] The total after any minimums and discounts have been applied.
510
+ #
511
+ # @param voided_at [Time, nil] If the invoice has a status of `void`, this gives a timestamp when the invoice w
512
+ #
513
+ # @param will_auto_issue [Boolean] This is true if the invoice will be automatically issued in the future, and fals
514
+
515
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice#auto_collection
516
+ class AutoCollection < Orb::Internal::Type::BaseModel
517
+ # @!attribute enabled
518
+ # True only if auto-collection is enabled for this invoice.
519
+ #
520
+ # @return [Boolean, nil]
521
+ required :enabled, Orb::Internal::Type::Boolean, nil?: true
522
+
523
+ # @!attribute next_attempt_at
524
+ # If the invoice is scheduled for auto-collection, this field will reflect when
525
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
526
+ # is not enabled for this invoice, this field will be `null`.
527
+ #
528
+ # @return [Time, nil]
529
+ required :next_attempt_at, Time, nil?: true
530
+
531
+ # @!attribute num_attempts
532
+ # Number of auto-collection payment attempts.
533
+ #
534
+ # @return [Integer, nil]
535
+ required :num_attempts, Integer, nil?: true
536
+
537
+ # @!attribute previously_attempted_at
538
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
539
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
540
+ # this can be used to tell whether the invoice is currently in dunning (that is,
541
+ # `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
542
+ # dunning has been exhausted (`previously_attempted_at` is non-null, but
543
+ # `next_attempt_at` is null).
544
+ #
545
+ # @return [Time, nil]
546
+ required :previously_attempted_at, Time, nil?: true
547
+
548
+ # @!method initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:)
549
+ # Some parameter documentations has been truncated, see
550
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::AutoCollection}
551
+ # for more details.
552
+ #
553
+ # @param enabled [Boolean, nil] True only if auto-collection is enabled for this invoice.
554
+ #
555
+ # @param next_attempt_at [Time, nil] If the invoice is scheduled for auto-collection, this field will reflect when th
556
+ #
557
+ # @param num_attempts [Integer, nil] Number of auto-collection payment attempts.
558
+ #
559
+ # @param previously_attempted_at [Time, nil] If Orb has ever attempted payment auto-collection for this invoice, this field w
560
+ end
561
+
562
+ class CreditNote < Orb::Internal::Type::BaseModel
563
+ # @!attribute id
564
+ #
565
+ # @return [String]
566
+ required :id, String
567
+
568
+ # @!attribute credit_note_number
569
+ #
570
+ # @return [String]
571
+ required :credit_note_number, String
572
+
573
+ # @!attribute memo
574
+ # An optional memo supplied on the credit note.
575
+ #
576
+ # @return [String, nil]
577
+ required :memo, String, nil?: true
578
+
579
+ # @!attribute reason
580
+ #
581
+ # @return [String]
582
+ required :reason, String
583
+
584
+ # @!attribute total
585
+ #
586
+ # @return [String]
587
+ required :total, String
588
+
589
+ # @!attribute type
590
+ #
591
+ # @return [String]
592
+ required :type, String
593
+
594
+ # @!attribute voided_at
595
+ # If the credit note has a status of `void`, this gives a timestamp when the
596
+ # credit note was voided.
597
+ #
598
+ # @return [Time, nil]
599
+ required :voided_at, Time, nil?: true
600
+
601
+ # @!method initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:)
602
+ # Some parameter documentations has been truncated, see
603
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CreditNote}
604
+ # for more details.
605
+ #
606
+ # @param id [String]
607
+ #
608
+ # @param credit_note_number [String]
609
+ #
610
+ # @param memo [String, nil] An optional memo supplied on the credit note.
611
+ #
612
+ # @param reason [String]
613
+ #
614
+ # @param total [String]
615
+ #
616
+ # @param type [String]
617
+ #
618
+ # @param voided_at [Time, nil] If the credit note has a status of `void`, this gives a timestamp when the credi
619
+ end
620
+
621
+ class CustomerBalanceTransaction < Orb::Internal::Type::BaseModel
622
+ # @!attribute id
623
+ # A unique id for this transaction.
624
+ #
625
+ # @return [String]
626
+ required :id, String
627
+
628
+ # @!attribute action
629
+ #
630
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action]
631
+ required :action,
632
+ enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action }
633
+
634
+ # @!attribute amount
635
+ # The value of the amount changed in the transaction.
636
+ #
637
+ # @return [String]
638
+ required :amount, String
639
+
640
+ # @!attribute created_at
641
+ # The creation time of this transaction.
642
+ #
643
+ # @return [Time]
644
+ required :created_at, Time
645
+
646
+ # @!attribute credit_note
647
+ #
648
+ # @return [Orb::Models::CreditNoteTiny, nil]
649
+ required :credit_note, -> { Orb::CreditNoteTiny }, nil?: true
650
+
651
+ # @!attribute description
652
+ # An optional description provided for manual customer balance adjustments.
653
+ #
654
+ # @return [String, nil]
655
+ required :description, String, nil?: true
656
+
657
+ # @!attribute ending_balance
658
+ # The new value of the customer's balance prior to the transaction, in the
659
+ # customer's currency.
660
+ #
661
+ # @return [String]
662
+ required :ending_balance, String
663
+
664
+ # @!attribute invoice
665
+ #
666
+ # @return [Orb::Models::InvoiceTiny, nil]
667
+ required :invoice, -> { Orb::InvoiceTiny }, nil?: true
668
+
669
+ # @!attribute starting_balance
670
+ # The original value of the customer's balance prior to the transaction, in the
671
+ # customer's currency.
672
+ #
673
+ # @return [String]
674
+ required :starting_balance, String
675
+
676
+ # @!attribute type
677
+ #
678
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type]
679
+ required :type,
680
+ enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type }
681
+
682
+ # @!method initialize(id:, action:, amount:, created_at:, credit_note:, description:, ending_balance:, invoice:, starting_balance:, type:)
683
+ # Some parameter documentations has been truncated, see
684
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction}
685
+ # for more details.
686
+ #
687
+ # @param id [String] A unique id for this transaction.
688
+ #
689
+ # @param action [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action]
690
+ #
691
+ # @param amount [String] The value of the amount changed in the transaction.
692
+ #
693
+ # @param created_at [Time] The creation time of this transaction.
694
+ #
695
+ # @param credit_note [Orb::Models::CreditNoteTiny, nil]
696
+ #
697
+ # @param description [String, nil] An optional description provided for manual customer balance adjustments.
698
+ #
699
+ # @param ending_balance [String] The new value of the customer's balance prior to the transaction, in the custome
700
+ #
701
+ # @param invoice [Orb::Models::InvoiceTiny, nil]
702
+ #
703
+ # @param starting_balance [String] The original value of the customer's balance prior to the transaction, in the cu
704
+ #
705
+ # @param type [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type]
706
+
707
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction#action
708
+ module Action
709
+ extend Orb::Internal::Type::Enum
710
+
711
+ APPLIED_TO_INVOICE = :applied_to_invoice
712
+ MANUAL_ADJUSTMENT = :manual_adjustment
713
+ PRORATED_REFUND = :prorated_refund
714
+ REVERT_PRORATED_REFUND = :revert_prorated_refund
715
+ RETURN_FROM_VOIDING = :return_from_voiding
716
+ CREDIT_NOTE_APPLIED = :credit_note_applied
717
+ CREDIT_NOTE_VOIDED = :credit_note_voided
718
+ OVERPAYMENT_REFUND = :overpayment_refund
719
+ EXTERNAL_PAYMENT = :external_payment
720
+ SMALL_INVOICE_CARRYOVER = :small_invoice_carryover
721
+ PREPAID_COMMIT_CANCEL = :prepaid_commit_cancel
722
+
723
+ # @!method self.values
724
+ # @return [Array<Symbol>]
725
+ end
726
+
727
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::CustomerBalanceTransaction#type
728
+ module Type
729
+ extend Orb::Internal::Type::Enum
730
+
731
+ INCREMENT = :increment
732
+ DECREMENT = :decrement
733
+
734
+ # @!method self.values
735
+ # @return [Array<Symbol>]
736
+ end
737
+ end
738
+
739
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice#invoice_source
740
+ module InvoiceSource
741
+ extend Orb::Internal::Type::Enum
742
+
743
+ SUBSCRIPTION = :subscription
744
+ PARTIAL = :partial
745
+ ONE_OFF = :one_off
746
+
747
+ # @!method self.values
748
+ # @return [Array<Symbol>]
749
+ end
750
+
751
+ class PaymentAttempt < Orb::Internal::Type::BaseModel
752
+ # @!attribute id
753
+ # The ID of the payment attempt.
754
+ #
755
+ # @return [String]
756
+ required :id, String
757
+
758
+ # @!attribute amount
759
+ # The amount of the payment attempt.
760
+ #
761
+ # @return [String]
762
+ required :amount, String
763
+
764
+ # @!attribute created_at
765
+ # The time at which the payment attempt was created.
766
+ #
767
+ # @return [Time]
768
+ required :created_at, Time
769
+
770
+ # @!attribute payment_provider
771
+ # The payment provider that attempted to collect the payment.
772
+ #
773
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider, nil]
774
+ required :payment_provider,
775
+ enum: -> {
776
+ Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider
777
+ },
778
+ nil?: true
779
+
780
+ # @!attribute payment_provider_id
781
+ # The ID of the payment attempt in the payment provider.
782
+ #
783
+ # @return [String, nil]
784
+ required :payment_provider_id, String, nil?: true
785
+
786
+ # @!attribute receipt_pdf
787
+ # URL to the downloadable PDF version of the receipt. This field will be `null`
788
+ # for payment attempts that did not succeed.
789
+ #
790
+ # @return [String, nil]
791
+ required :receipt_pdf, String, nil?: true
792
+
793
+ # @!attribute succeeded
794
+ # Whether the payment attempt succeeded.
795
+ #
796
+ # @return [Boolean]
797
+ required :succeeded, Orb::Internal::Type::Boolean
798
+
799
+ # @!method initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, receipt_pdf:, succeeded:)
800
+ # Some parameter documentations has been truncated, see
801
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt}
802
+ # for more details.
803
+ #
804
+ # @param id [String] The ID of the payment attempt.
805
+ #
806
+ # @param amount [String] The amount of the payment attempt.
807
+ #
808
+ # @param created_at [Time] The time at which the payment attempt was created.
809
+ #
810
+ # @param payment_provider [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider, nil] The payment provider that attempted to collect the payment.
811
+ #
812
+ # @param payment_provider_id [String, nil] The ID of the payment attempt in the payment provider.
813
+ #
814
+ # @param receipt_pdf [String, nil] URL to the downloadable PDF version of the receipt. This field will be `null` fo
815
+ #
816
+ # @param succeeded [Boolean] Whether the payment attempt succeeded.
817
+
818
+ # The payment provider that attempted to collect the payment.
819
+ #
820
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice::PaymentAttempt#payment_provider
821
+ module PaymentProvider
822
+ extend Orb::Internal::Type::Enum
823
+
824
+ STRIPE = :stripe
825
+ ADYEN = :adyen
826
+
827
+ # @!method self.values
828
+ # @return [Array<Symbol>]
829
+ end
830
+ end
831
+
832
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Invoice#status
833
+ module Status
834
+ extend Orb::Internal::Type::Enum
835
+
836
+ ISSUED = :issued
837
+ PAID = :paid
838
+ SYNCED = :synced
839
+ VOID = :void
840
+ DRAFT = :draft
841
+
842
+ # @!method self.values
843
+ # @return [Array<Symbol>]
844
+ end
845
+ end
846
+
847
+ # The serialization style this payload was rendered in, as configured on the
848
+ # endpoint.
849
+ #
850
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent#payload_style
851
+ module PayloadStyle
852
+ extend Orb::Internal::Type::Enum
853
+
854
+ EXPANDED = :expanded
855
+ STANDARD = :standard
856
+
857
+ # @!method self.values
858
+ # @return [Array<Symbol>]
859
+ end
860
+
861
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent#properties
862
+ class Properties < Orb::Internal::Type::BaseModel
863
+ # @!attribute previous_attributes
864
+ # `due_date` is an ISO-8601 string rather than a datetime: the untyped message
865
+ # called `.isoformat()` on it, so it keeps microseconds where the webhook JSON
866
+ # provider would have truncated them.
867
+ #
868
+ # @return [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes]
869
+ required :previous_attributes,
870
+ -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes }
871
+
872
+ # @!method initialize(previous_attributes:)
873
+ # Some parameter documentations has been truncated, see
874
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties} for more
875
+ # details.
876
+ #
877
+ # @param previous_attributes [Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes] `due_date` is an ISO-8601 string rather than a datetime: the untyped message cal
878
+
879
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties#previous_attributes
880
+ class PreviousAttributes < Orb::Internal::Type::BaseModel
881
+ # @!attribute amount_due
882
+ #
883
+ # @return [String, nil]
884
+ optional :amount_due, String, nil?: true
885
+
886
+ # @!attribute discounts
887
+ #
888
+ # @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>, nil]
889
+ optional :discounts,
890
+ -> {
891
+ Orb::Internal::Type::ArrayOf[union: Orb::InvoiceLevelDiscount]
892
+ },
893
+ nil?: true
894
+
895
+ # @!attribute due_date
896
+ #
897
+ # @return [String, nil]
898
+ optional :due_date, String, nil?: true
899
+
900
+ # @!attribute line_items
901
+ #
902
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem>, nil]
903
+ optional :line_items,
904
+ -> {
905
+ Orb::Internal::Type::ArrayOf[Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem]
906
+ },
907
+ nil?: true
908
+
909
+ # @!attribute maximum
910
+ #
911
+ # @return [Orb::Models::Maximum, nil]
912
+ optional :maximum, -> { Orb::Maximum }, nil?: true
913
+
914
+ # @!attribute metadata
915
+ #
916
+ # @return [Hash{Symbol=>String}, nil]
917
+ optional :metadata, Orb::Internal::Type::HashOf[String], nil?: true
918
+
919
+ # @!attribute minimum
920
+ #
921
+ # @return [Orb::Models::Minimum, nil]
922
+ optional :minimum, -> { Orb::Minimum }, nil?: true
923
+
924
+ # @!attribute net_terms
925
+ #
926
+ # @return [Integer, nil]
927
+ optional :net_terms, Integer, nil?: true
928
+
929
+ # @!attribute subtotal
930
+ #
931
+ # @return [String, nil]
932
+ optional :subtotal, String, nil?: true
933
+
934
+ # @!attribute total
935
+ #
936
+ # @return [String, nil]
937
+ optional :total, String, nil?: true
938
+
939
+ # @!method initialize(amount_due: nil, discounts: nil, due_date: nil, line_items: nil, maximum: nil, metadata: nil, minimum: nil, net_terms: nil, subtotal: nil, total: nil)
940
+ # `due_date` is an ISO-8601 string rather than a datetime: the untyped message
941
+ # called `.isoformat()` on it, so it keeps microseconds where the webhook JSON
942
+ # provider would have truncated them.
943
+ #
944
+ # @param amount_due [String, nil]
945
+ # @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>, nil]
946
+ # @param due_date [String, nil]
947
+ # @param line_items [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem>, nil]
948
+ # @param maximum [Orb::Models::Maximum, nil]
949
+ # @param metadata [Hash{Symbol=>String}, nil]
950
+ # @param minimum [Orb::Models::Minimum, nil]
951
+ # @param net_terms [Integer, nil]
952
+ # @param subtotal [String, nil]
953
+ # @param total [String, nil]
954
+
955
+ class LineItem < Orb::Internal::Type::BaseModel
956
+ # @!attribute id
957
+ # A unique ID for this line item.
958
+ #
959
+ # @return [String]
960
+ required :id, String
961
+
962
+ # @!attribute adjusted_subtotal
963
+ # The line amount after any adjustments and before overage conversion, credits and
964
+ # partial invoicing.
965
+ #
966
+ # @return [String]
967
+ required :adjusted_subtotal, String
968
+
969
+ # @!attribute adjustments
970
+ # All adjustments applied to the line item in the order they were applied based on
971
+ # invoice calculations (ie. usage discounts -> amount discounts -> percentage
972
+ # discounts -> minimums -> maximums).
973
+ #
974
+ # @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>]
975
+ required :adjustments,
976
+ -> do
977
+ Orb::Internal::Type::ArrayOf[
978
+ union: Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment
979
+ ]
980
+ end
981
+
982
+ # @!attribute amount
983
+ # The final amount for a line item after all adjustments and pre paid credits have
984
+ # been applied.
985
+ #
986
+ # @return [String]
987
+ required :amount, String
988
+
989
+ # @!attribute credits_applied
990
+ # The number of prepaid credits applied.
991
+ #
992
+ # @return [String]
993
+ required :credits_applied, String
994
+
995
+ # @!attribute end_date
996
+ # The end date of the range of time applied for this line item's price.
997
+ #
998
+ # @return [Time]
999
+ required :end_date, Time
1000
+
1001
+ # @!attribute filter
1002
+ # An additional filter that was used to calculate the usage for this line item.
1003
+ #
1004
+ # @return [String, nil]
1005
+ required :filter, String, nil?: true
1006
+
1007
+ # @!attribute grouping
1008
+ # [DEPRECATED] For configured prices that are split by a grouping key, this will
1009
+ # be populated with the key and a value. The `amount` and `subtotal` will be the
1010
+ # values for this particular grouping.
1011
+ #
1012
+ # @return [String, nil]
1013
+ required :grouping, String, nil?: true
1014
+
1015
+ # @!attribute name
1016
+ # The name of the price associated with this line item.
1017
+ #
1018
+ # @return [String]
1019
+ required :name, String
1020
+
1021
+ # @!attribute partially_invoiced_amount
1022
+ # Any amount applied from a partial invoice
1023
+ #
1024
+ # @return [String]
1025
+ required :partially_invoiced_amount, String
1026
+
1027
+ # @!attribute price
1028
+ # The Price resource represents a price that can be billed on a subscription,
1029
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1030
+ # take a quantity and determine an amount to bill.
1031
+ #
1032
+ # Orb supports a few different pricing models out of the box. Each of these models
1033
+ # is serialized differently in a given Price object. The model_type field
1034
+ # determines the key for the configuration object that is present.
1035
+ #
1036
+ # For more on the types of prices, see
1037
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1038
+ #
1039
+ # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
1040
+ required :price, union: -> { Orb::Price }
1041
+
1042
+ # @!attribute quantity
1043
+ # Either the fixed fee quantity or the usage during the service period.
1044
+ #
1045
+ # @return [Float]
1046
+ required :quantity, Float
1047
+
1048
+ # @!attribute start_date
1049
+ # The start date of the range of time applied for this line item's price.
1050
+ #
1051
+ # @return [Time]
1052
+ required :start_date, Time
1053
+
1054
+ # @!attribute sub_line_items
1055
+ # For complex pricing structures, the line item can be broken down further in
1056
+ # `sub_line_items`.
1057
+ #
1058
+ # @return [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>]
1059
+ required :sub_line_items,
1060
+ -> do
1061
+ Orb::Internal::Type::ArrayOf[
1062
+ union: Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::SubLineItem
1063
+ ]
1064
+ end
1065
+
1066
+ # @!attribute subtotal
1067
+ # The line amount before any adjustments.
1068
+ #
1069
+ # @return [String]
1070
+ required :subtotal, String
1071
+
1072
+ # @!attribute tax_amounts
1073
+ # An array of tax rates and their incurred tax amounts. Empty if no tax
1074
+ # integration is configured.
1075
+ #
1076
+ # @return [Array<Orb::Models::TaxAmount>]
1077
+ required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] }
1078
+
1079
+ # @!attribute usage_customer_ids
1080
+ # A list of customer ids that were used to calculate the usage for this line item.
1081
+ #
1082
+ # @return [Array<String>, nil]
1083
+ required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
1084
+
1085
+ # @!method initialize(id:, adjusted_subtotal:, adjustments:, amount:, credits_applied:, end_date:, filter:, grouping:, name:, partially_invoiced_amount:, price:, quantity:, start_date:, sub_line_items:, subtotal:, tax_amounts:, usage_customer_ids:)
1086
+ # Some parameter documentations has been truncated, see
1087
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem}
1088
+ # for more details.
1089
+ #
1090
+ # @param id [String] A unique ID for this line item.
1091
+ #
1092
+ # @param adjusted_subtotal [String] The line amount after any adjustments and before overage conversion, credits and
1093
+ #
1094
+ # @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on
1095
+ #
1096
+ # @param amount [String] The final amount for a line item after all adjustments and pre paid credits have
1097
+ #
1098
+ # @param credits_applied [String] The number of prepaid credits applied.
1099
+ #
1100
+ # @param end_date [Time] The end date of the range of time applied for this line item's price.
1101
+ #
1102
+ # @param filter [String, nil] An additional filter that was used to calculate the usage for this line item.
1103
+ #
1104
+ # @param grouping [String, nil] [DEPRECATED] For configured prices that are split by a grouping key, this will b
1105
+ #
1106
+ # @param name [String] The name of the price associated with this line item.
1107
+ #
1108
+ # @param partially_invoiced_amount [String] Any amount applied from a partial invoice
1109
+ #
1110
+ # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
1111
+ #
1112
+ # @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
1113
+ #
1114
+ # @param start_date [Time] The start date of the range of time applied for this line item's price.
1115
+ #
1116
+ # @param sub_line_items [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>] For complex pricing structures, the line item can be broken down further in `sub
1117
+ #
1118
+ # @param subtotal [String] The line amount before any adjustments.
1119
+ #
1120
+ # @param tax_amounts [Array<Orb::Models::TaxAmount>] An array of tax rates and their incurred tax amounts. Empty if no tax integratio
1121
+ #
1122
+ # @param usage_customer_ids [Array<String>, nil] A list of customer ids that were used to calculate the usage for this line item.
1123
+
1124
+ module Adjustment
1125
+ extend Orb::Internal::Type::Union
1126
+
1127
+ discriminator :adjustment_type
1128
+
1129
+ variant :usage_discount, -> { Orb::MonetaryUsageDiscountAdjustment }
1130
+
1131
+ variant :amount_discount, -> { Orb::MonetaryAmountDiscountAdjustment }
1132
+
1133
+ variant :percentage_discount, -> { Orb::MonetaryPercentageDiscountAdjustment }
1134
+
1135
+ variant :tiered_percentage_discount,
1136
+ -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount }
1137
+
1138
+ variant :minimum, -> { Orb::MonetaryMinimumAdjustment }
1139
+
1140
+ variant :maximum, -> { Orb::MonetaryMaximumAdjustment }
1141
+
1142
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
1143
+ # @!attribute id
1144
+ #
1145
+ # @return [String]
1146
+ required :id, String
1147
+
1148
+ # @!attribute adjustment_type
1149
+ #
1150
+ # @return [Symbol, :tiered_percentage_discount]
1151
+ required :adjustment_type, const: :tiered_percentage_discount
1152
+
1153
+ # @!attribute amount
1154
+ # The value applied by an adjustment.
1155
+ #
1156
+ # @return [String]
1157
+ required :amount, String
1158
+
1159
+ # @!attribute applies_to_price_ids
1160
+ # @deprecated
1161
+ #
1162
+ # The price IDs that this adjustment applies to.
1163
+ #
1164
+ # @return [Array<String>]
1165
+ required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
1166
+
1167
+ # @!attribute filters
1168
+ # The filters that determine which prices to apply this adjustment to.
1169
+ #
1170
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>]
1171
+ required :filters,
1172
+ -> do
1173
+ Orb::Internal::Type::ArrayOf[
1174
+ Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter
1175
+ ]
1176
+ end
1177
+
1178
+ # @!attribute is_invoice_level
1179
+ # True for adjustments that apply to an entire invoice, false for adjustments that
1180
+ # apply to only one price.
1181
+ #
1182
+ # @return [Boolean]
1183
+ required :is_invoice_level, Orb::Internal::Type::Boolean
1184
+
1185
+ # @!attribute reason
1186
+ # The reason for the adjustment.
1187
+ #
1188
+ # @return [String, nil]
1189
+ required :reason, String, nil?: true
1190
+
1191
+ # @!attribute replaces_adjustment_id
1192
+ # The adjustment id this adjustment replaces. This adjustment will take the place
1193
+ # of the replaced adjustment in plan version migrations.
1194
+ #
1195
+ # @return [String, nil]
1196
+ required :replaces_adjustment_id, String, nil?: true
1197
+
1198
+ # @!attribute tiers
1199
+ # The ordered, contiguous bands of cumulative eligible spend, each discounted at
1200
+ # its own percentage (progressive fill-a-tier), applied to the prices this
1201
+ # adjustment covers in a given billing period.
1202
+ #
1203
+ # @return [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>]
1204
+ required :tiers,
1205
+ -> do
1206
+ Orb::Internal::Type::ArrayOf[
1207
+ Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier
1208
+ ]
1209
+ end
1210
+
1211
+ # @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
1212
+ # Some parameter documentations has been truncated, see
1213
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount}
1214
+ # for more details.
1215
+ #
1216
+ # @param id [String]
1217
+ #
1218
+ # @param amount [String] The value applied by an adjustment.
1219
+ #
1220
+ # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
1221
+ #
1222
+ # @param filters [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
1223
+ #
1224
+ # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
1225
+ #
1226
+ # @param reason [String, nil] The reason for the adjustment.
1227
+ #
1228
+ # @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
1229
+ #
1230
+ # @param tiers [Array<Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
1231
+ #
1232
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
1233
+
1234
+ class Filter < Orb::Internal::Type::BaseModel
1235
+ # @!attribute field
1236
+ # The property of the price to filter on.
1237
+ #
1238
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field]
1239
+ required :field,
1240
+ enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field }
1241
+
1242
+ # @!attribute operator
1243
+ # Should prices that match the filter be included or excluded.
1244
+ #
1245
+ # @return [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator]
1246
+ required :operator,
1247
+ enum: -> { Orb::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator }
1248
+
1249
+ # @!attribute values
1250
+ # The IDs or values that match this filter.
1251
+ #
1252
+ # @return [Array<String>]
1253
+ required :values, Orb::Internal::Type::ArrayOf[String]
1254
+
1255
+ # @!method initialize(field:, operator:, values:)
1256
+ # @param field [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
1257
+ #
1258
+ # @param operator [Symbol, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
1259
+ #
1260
+ # @param values [Array<String>] The IDs or values that match this filter.
1261
+
1262
+ # The property of the price to filter on.
1263
+ #
1264
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#field
1265
+ module Field
1266
+ extend Orb::Internal::Type::Enum
1267
+
1268
+ PRICE_ID = :price_id
1269
+ ITEM_ID = :item_id
1270
+ PRICE_TYPE = :price_type
1271
+ CURRENCY = :currency
1272
+ PRICING_UNIT_ID = :pricing_unit_id
1273
+
1274
+ # @!method self.values
1275
+ # @return [Array<Symbol>]
1276
+ end
1277
+
1278
+ # Should prices that match the filter be included or excluded.
1279
+ #
1280
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#operator
1281
+ module Operator
1282
+ extend Orb::Internal::Type::Enum
1283
+
1284
+ INCLUDES = :includes
1285
+ EXCLUDES = :excludes
1286
+
1287
+ # @!method self.values
1288
+ # @return [Array<Symbol>]
1289
+ end
1290
+ end
1291
+
1292
+ class Tier < Orb::Internal::Type::BaseModel
1293
+ # @!attribute lower_bound
1294
+ # Exclusive lower bound of cumulative spend for this tier.
1295
+ #
1296
+ # @return [Float]
1297
+ required :lower_bound, Float
1298
+
1299
+ # @!attribute percentage
1300
+ # The percentage (between 0 and 1) discounted from spend that falls within this
1301
+ # tier.
1302
+ #
1303
+ # @return [Float]
1304
+ required :percentage, Float
1305
+
1306
+ # @!attribute upper_bound
1307
+ # Inclusive upper bound of cumulative spend for this tier; null for the final
1308
+ # open-ended tier.
1309
+ #
1310
+ # @return [Float, nil]
1311
+ optional :upper_bound, Float, nil?: true
1312
+
1313
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
1314
+ # Some parameter documentations has been truncated, see
1315
+ # {Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier}
1316
+ # for more details.
1317
+ #
1318
+ # One band of a tiered percentage discount. Bounds are denominated in the
1319
+ # discount's currency. `lower_bound` is the exclusive start of the band and
1320
+ # `upper_bound` is the inclusive end; `upper_bound` is null only for the
1321
+ # open-ended final tier.
1322
+ #
1323
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
1324
+ #
1325
+ # @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
1326
+ #
1327
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
1328
+ end
1329
+ end
1330
+
1331
+ # @!method self.variants
1332
+ # @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)]
1333
+ end
1334
+
1335
+ module SubLineItem
1336
+ extend Orb::Internal::Type::Union
1337
+
1338
+ discriminator :type
1339
+
1340
+ variant :matrix, -> { Orb::MatrixSubLineItem }
1341
+
1342
+ variant :tier, -> { Orb::TierSubLineItem }
1343
+
1344
+ variant :"'null'", -> { Orb::OtherSubLineItem }
1345
+
1346
+ # @!method self.variants
1347
+ # @return [Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)]
1348
+ end
1349
+ end
1350
+ end
1351
+ end
1352
+
1353
+ # The event this payload describes.
1354
+ #
1355
+ # @see Orb::Models::Webhooks::InvoiceEditedStandardWebhookEvent#type
1356
+ module Type
1357
+ extend Orb::Internal::Type::Enum
1358
+
1359
+ INVOICE_EDITED = :"invoice.edited"
1360
+
1361
+ # @!method self.values
1362
+ # @return [Array<Symbol>]
1363
+ end
1364
+ end
1365
+ end
1366
+ end
1367
+ end