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,1532 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class InvoiceIssuedStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The ID of this webhook event.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ # The time at which this event was created, to the second.
20
+ sig { returns(Time) }
21
+ attr_accessor :created_at
22
+
23
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
24
+ # Fetch the invoice for those.
25
+ sig do
26
+ returns(Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice)
27
+ end
28
+ attr_reader :invoice
29
+
30
+ sig do
31
+ params(
32
+ invoice:
33
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::OrHash
34
+ ).void
35
+ end
36
+ attr_writer :invoice
37
+
38
+ # The serialization style this payload was rendered in, as configured on the
39
+ # endpoint.
40
+ sig do
41
+ returns(
42
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::TaggedSymbol
43
+ )
44
+ end
45
+ attr_accessor :payload_style
46
+
47
+ sig do
48
+ returns(Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Properties)
49
+ end
50
+ attr_reader :properties
51
+
52
+ sig do
53
+ params(
54
+ properties:
55
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Properties::OrHash
56
+ ).void
57
+ end
58
+ attr_writer :properties
59
+
60
+ # The event this payload describes.
61
+ sig do
62
+ returns(
63
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type::TaggedSymbol
64
+ )
65
+ end
66
+ attr_accessor :type
67
+
68
+ # Issued when an invoice transitions to the "issued" state.
69
+ sig do
70
+ params(
71
+ id: String,
72
+ created_at: Time,
73
+ invoice:
74
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::OrHash,
75
+ payload_style:
76
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::OrSymbol,
77
+ properties:
78
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Properties::OrHash,
79
+ type:
80
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type::OrSymbol
81
+ ).returns(T.attached_class)
82
+ end
83
+ def self.new(
84
+ # The ID of this webhook event.
85
+ id:,
86
+ # The time at which this event was created, to the second.
87
+ created_at:,
88
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
89
+ # Fetch the invoice for those.
90
+ invoice:,
91
+ # The serialization style this payload was rendered in, as configured on the
92
+ # endpoint.
93
+ payload_style:,
94
+ properties:,
95
+ # The event this payload describes.
96
+ type:
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ id: String,
104
+ created_at: Time,
105
+ invoice:
106
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice,
107
+ payload_style:
108
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::TaggedSymbol,
109
+ properties:
110
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Properties,
111
+ type:
112
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type::TaggedSymbol
113
+ }
114
+ )
115
+ end
116
+ def to_hash
117
+ end
118
+
119
+ class Invoice < Orb::Internal::Type::BaseModel
120
+ OrHash =
121
+ T.type_alias do
122
+ T.any(
123
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice,
124
+ Orb::Internal::AnyHash
125
+ )
126
+ end
127
+
128
+ sig { returns(String) }
129
+ attr_accessor :id
130
+
131
+ # This is the final amount required to be charged to the customer and reflects the
132
+ # application of the customer balance to the `total` of the invoice.
133
+ sig { returns(String) }
134
+ attr_accessor :amount_due
135
+
136
+ sig do
137
+ returns(
138
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::AutoCollection
139
+ )
140
+ end
141
+ attr_reader :auto_collection
142
+
143
+ sig do
144
+ params(
145
+ auto_collection:
146
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::AutoCollection::OrHash
147
+ ).void
148
+ end
149
+ attr_writer :auto_collection
150
+
151
+ sig { returns(T.nilable(Orb::Address)) }
152
+ attr_reader :billing_address
153
+
154
+ sig { params(billing_address: T.nilable(Orb::Address::OrHash)).void }
155
+ attr_writer :billing_address
156
+
157
+ # The creation time of the resource in Orb.
158
+ sig { returns(Time) }
159
+ attr_accessor :created_at
160
+
161
+ # A list of credit notes associated with the invoice
162
+ sig do
163
+ returns(
164
+ T::Array[
165
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CreditNote
166
+ ]
167
+ )
168
+ end
169
+ attr_accessor :credit_notes
170
+
171
+ # An ISO 4217 currency string or `credits`
172
+ sig { returns(String) }
173
+ attr_accessor :currency
174
+
175
+ sig { returns(Orb::CustomerMinified) }
176
+ attr_reader :customer
177
+
178
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
179
+ attr_writer :customer
180
+
181
+ sig do
182
+ returns(
183
+ T::Array[
184
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction
185
+ ]
186
+ )
187
+ end
188
+ attr_accessor :customer_balance_transactions
189
+
190
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
191
+ # added to the headers of invoices.
192
+ #
193
+ # ### Supported Tax ID Countries and Types
194
+ #
195
+ # | Country | Type | Description |
196
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
197
+ # | Albania | `al_tin` | Albania Tax Identification Number |
198
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
199
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
200
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
201
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
202
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
203
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
204
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
205
+ # | Austria | `eu_vat` | European VAT Number |
206
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
207
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
208
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
209
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
210
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
211
+ # | Belarus | `by_tin` | Belarus TIN Number |
212
+ # | Belgium | `eu_vat` | European VAT Number |
213
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
214
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
215
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
216
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
217
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
218
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
219
+ # | Bulgaria | `eu_vat` | European VAT Number |
220
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
221
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
222
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
223
+ # | Canada | `ca_bn` | Canadian BN |
224
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
225
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
226
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
227
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
228
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
229
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
230
+ # | Chile | `cl_tin` | Chilean TIN |
231
+ # | China | `cn_tin` | Chinese Tax ID |
232
+ # | Colombia | `co_nit` | Colombian NIT Number |
233
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
234
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
235
+ # | Croatia | `eu_vat` | European VAT Number |
236
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
237
+ # | Cyprus | `eu_vat` | European VAT Number |
238
+ # | Czech Republic | `eu_vat` | European VAT Number |
239
+ # | Denmark | `eu_vat` | European VAT Number |
240
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
241
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
242
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
243
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
244
+ # | Estonia | `eu_vat` | European VAT Number |
245
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
246
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
247
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
248
+ # | Finland | `eu_vat` | European VAT Number |
249
+ # | France | `eu_vat` | European VAT Number |
250
+ # | Georgia | `ge_vat` | Georgian VAT |
251
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
252
+ # | Germany | `eu_vat` | European VAT Number |
253
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
254
+ # | Greece | `eu_vat` | European VAT Number |
255
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
256
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
257
+ # | Hungary | `eu_vat` | European VAT Number |
258
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
259
+ # | Iceland | `is_vat` | Icelandic VAT |
260
+ # | India | `in_gst` | Indian GST Number |
261
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
262
+ # | Ireland | `eu_vat` | European VAT Number |
263
+ # | Israel | `il_vat` | Israel VAT |
264
+ # | Italy | `eu_vat` | European VAT Number |
265
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
266
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
267
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
268
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
269
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
270
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
271
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
272
+ # | Laos | `la_tin` | Laos Tax Identification Number |
273
+ # | Latvia | `eu_vat` | European VAT Number |
274
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
275
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
276
+ # | Lithuania | `eu_vat` | European VAT Number |
277
+ # | Luxembourg | `eu_vat` | European VAT Number |
278
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
279
+ # | Malaysia | `my_itn` | Malaysian ITN |
280
+ # | Malaysia | `my_sst` | Malaysian SST Number |
281
+ # | Malta | `eu_vat` | European VAT Number |
282
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
283
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
284
+ # | Moldova | `md_vat` | Moldova VAT Number |
285
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
286
+ # | Morocco | `ma_vat` | Morocco VAT Number |
287
+ # | Nepal | `np_pan` | Nepal PAN Number |
288
+ # | Netherlands | `eu_vat` | European VAT Number |
289
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
290
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
291
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
292
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
293
+ # | Norway | `no_vat` | Norwegian VAT Number |
294
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
295
+ # | Oman | `om_vat` | Omani VAT Number |
296
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
297
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
298
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
299
+ # | Poland | `eu_vat` | European VAT Number |
300
+ # | Poland | `pl_nip` | Polish Tax ID Number |
301
+ # | Portugal | `eu_vat` | European VAT Number |
302
+ # | Romania | `eu_vat` | European VAT Number |
303
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
304
+ # | Russia | `ru_inn` | Russian INN |
305
+ # | Russia | `ru_kpp` | Russian KPP |
306
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
307
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
308
+ # | Serbia | `rs_pib` | Serbian PIB Number |
309
+ # | Singapore | `sg_gst` | Singaporean GST |
310
+ # | Singapore | `sg_uen` | Singaporean UEN |
311
+ # | Slovakia | `eu_vat` | European VAT Number |
312
+ # | Slovenia | `eu_vat` | European VAT Number |
313
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
314
+ # | South Africa | `za_vat` | South African VAT Number |
315
+ # | South Korea | `kr_brn` | Korean BRN |
316
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
317
+ # | Spain | `eu_vat` | European VAT Number |
318
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
319
+ # | Suriname | `sr_fin` | Suriname FIN Number |
320
+ # | Sweden | `eu_vat` | European VAT Number |
321
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
322
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
323
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
324
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
325
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
326
+ # | Thailand | `th_vat` | Thai VAT |
327
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
328
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
329
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
330
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
331
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
332
+ # | United States | `us_ein` | United States EIN |
333
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
334
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
335
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
336
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
337
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
338
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
339
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
340
+ sig { returns(T.nilable(Orb::CustomerTaxID)) }
341
+ attr_reader :customer_tax_id
342
+
343
+ sig do
344
+ params(customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash)).void
345
+ end
346
+ attr_writer :customer_tax_id
347
+
348
+ # When the invoice payment is due. The due date is null if the invoice is not yet
349
+ # finalized.
350
+ sig { returns(T.nilable(Time)) }
351
+ attr_accessor :due_date
352
+
353
+ # If the invoice has a status of `draft`, this will be the time that the invoice
354
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
355
+ # true, the invoice will automatically begin issuing at this time.
356
+ sig { returns(T.nilable(Time)) }
357
+ attr_accessor :eligible_to_issue_at
358
+
359
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
360
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
361
+ sig { returns(T.nilable(String)) }
362
+ attr_accessor :hosted_invoice_url
363
+
364
+ # The scheduled date of the invoice
365
+ sig { returns(Time) }
366
+ attr_accessor :invoice_date
367
+
368
+ # Automatically generated invoice number to help track and reconcile invoices.
369
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
370
+ # account or customer.
371
+ sig { returns(String) }
372
+ attr_accessor :invoice_number
373
+
374
+ # The link to download the PDF representation of the `Invoice`.
375
+ sig { returns(T.nilable(String)) }
376
+ attr_accessor :invoice_pdf
377
+
378
+ sig do
379
+ returns(
380
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
381
+ )
382
+ end
383
+ attr_accessor :invoice_source
384
+
385
+ # If the invoice failed to issue, this will be the last time it failed to issue
386
+ # (even if it is now in a different state.)
387
+ sig { returns(T.nilable(Time)) }
388
+ attr_accessor :issue_failed_at
389
+
390
+ # If the invoice has been issued, this will be the time it transitioned to
391
+ # `issued` (even if it is now in a different state.)
392
+ sig { returns(T.nilable(Time)) }
393
+ attr_accessor :issued_at
394
+
395
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
396
+ sig { returns(T.nilable(String)) }
397
+ attr_accessor :memo
398
+
399
+ # User specified key-value pairs for the resource. If not present, this defaults
400
+ # to an empty dictionary. Individual keys can be removed by setting the value to
401
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
402
+ # `null`.
403
+ sig { returns(T::Hash[Symbol, String]) }
404
+ attr_accessor :metadata
405
+
406
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
407
+ # was paid.
408
+ sig { returns(T.nilable(Time)) }
409
+ attr_accessor :paid_at
410
+
411
+ # A list of payment attempts associated with the invoice
412
+ sig do
413
+ returns(
414
+ T::Array[
415
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt
416
+ ]
417
+ )
418
+ end
419
+ attr_accessor :payment_attempts
420
+
421
+ # If payment was attempted on this invoice but failed, this will be the time of
422
+ # the most recent attempt.
423
+ sig { returns(T.nilable(Time)) }
424
+ attr_accessor :payment_failed_at
425
+
426
+ # When payment for this invoice was received. For an invoice manually marked as
427
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
428
+ # through a payment provider, this is the settlement time reported by that
429
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
430
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
431
+ # when the invoice reached the `paid` status in Orb.
432
+ sig { returns(T.nilable(Time)) }
433
+ attr_accessor :payment_received_at
434
+
435
+ # If payment was attempted on this invoice, this will be the start time of the
436
+ # most recent attempt. This field is especially useful for delayed-notification
437
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
438
+ sig { returns(T.nilable(Time)) }
439
+ attr_accessor :payment_started_at
440
+
441
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
442
+ # scheduled to be issued.
443
+ sig { returns(T.nilable(Time)) }
444
+ attr_accessor :scheduled_issue_at
445
+
446
+ sig { returns(T.nilable(Orb::Address)) }
447
+ attr_reader :shipping_address
448
+
449
+ sig { params(shipping_address: T.nilable(Orb::Address::OrHash)).void }
450
+ attr_writer :shipping_address
451
+
452
+ sig do
453
+ returns(
454
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
455
+ )
456
+ end
457
+ attr_accessor :status
458
+
459
+ sig { returns(T.nilable(Orb::SubscriptionMinified)) }
460
+ attr_reader :subscription
461
+
462
+ sig do
463
+ params(
464
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash)
465
+ ).void
466
+ end
467
+ attr_writer :subscription
468
+
469
+ # If the invoice failed to sync, this will be the last time an external invoicing
470
+ # provider sync was attempted. This field will always be `null` for invoices using
471
+ # Orb Invoicing.
472
+ sig { returns(T.nilable(Time)) }
473
+ attr_accessor :sync_failed_at
474
+
475
+ # The total after any minimums and discounts have been applied.
476
+ sig { returns(String) }
477
+ attr_accessor :total
478
+
479
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
480
+ # was voided.
481
+ sig { returns(T.nilable(Time)) }
482
+ attr_accessor :voided_at
483
+
484
+ # This is true if the invoice will be automatically issued in the future, and
485
+ # false otherwise.
486
+ sig { returns(T::Boolean) }
487
+ attr_accessor :will_auto_issue
488
+
489
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
490
+ # Fetch the invoice for those.
491
+ sig do
492
+ params(
493
+ id: String,
494
+ amount_due: String,
495
+ auto_collection:
496
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::AutoCollection::OrHash,
497
+ billing_address: T.nilable(Orb::Address::OrHash),
498
+ created_at: Time,
499
+ credit_notes:
500
+ T::Array[
501
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CreditNote::OrHash
502
+ ],
503
+ currency: String,
504
+ customer: Orb::CustomerMinified::OrHash,
505
+ customer_balance_transactions:
506
+ T::Array[
507
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::OrHash
508
+ ],
509
+ customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash),
510
+ due_date: T.nilable(Time),
511
+ eligible_to_issue_at: T.nilable(Time),
512
+ hosted_invoice_url: T.nilable(String),
513
+ invoice_date: Time,
514
+ invoice_number: String,
515
+ invoice_pdf: T.nilable(String),
516
+ invoice_source:
517
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::OrSymbol,
518
+ issue_failed_at: T.nilable(Time),
519
+ issued_at: T.nilable(Time),
520
+ memo: T.nilable(String),
521
+ metadata: T::Hash[Symbol, String],
522
+ paid_at: T.nilable(Time),
523
+ payment_attempts:
524
+ T::Array[
525
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::OrHash
526
+ ],
527
+ payment_failed_at: T.nilable(Time),
528
+ payment_received_at: T.nilable(Time),
529
+ payment_started_at: T.nilable(Time),
530
+ scheduled_issue_at: T.nilable(Time),
531
+ shipping_address: T.nilable(Orb::Address::OrHash),
532
+ status:
533
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::OrSymbol,
534
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
535
+ sync_failed_at: T.nilable(Time),
536
+ total: String,
537
+ voided_at: T.nilable(Time),
538
+ will_auto_issue: T::Boolean
539
+ ).returns(T.attached_class)
540
+ end
541
+ def self.new(
542
+ id:,
543
+ # This is the final amount required to be charged to the customer and reflects the
544
+ # application of the customer balance to the `total` of the invoice.
545
+ amount_due:,
546
+ auto_collection:,
547
+ billing_address:,
548
+ # The creation time of the resource in Orb.
549
+ created_at:,
550
+ # A list of credit notes associated with the invoice
551
+ credit_notes:,
552
+ # An ISO 4217 currency string or `credits`
553
+ currency:,
554
+ customer:,
555
+ customer_balance_transactions:,
556
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
557
+ # added to the headers of invoices.
558
+ #
559
+ # ### Supported Tax ID Countries and Types
560
+ #
561
+ # | Country | Type | Description |
562
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
563
+ # | Albania | `al_tin` | Albania Tax Identification Number |
564
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
565
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
566
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
567
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
568
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
569
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
570
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
571
+ # | Austria | `eu_vat` | European VAT Number |
572
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
573
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
574
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
575
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
576
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
577
+ # | Belarus | `by_tin` | Belarus TIN Number |
578
+ # | Belgium | `eu_vat` | European VAT Number |
579
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
580
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
581
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
582
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
583
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
584
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
585
+ # | Bulgaria | `eu_vat` | European VAT Number |
586
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
587
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
588
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
589
+ # | Canada | `ca_bn` | Canadian BN |
590
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
591
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
592
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
593
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
594
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
595
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
596
+ # | Chile | `cl_tin` | Chilean TIN |
597
+ # | China | `cn_tin` | Chinese Tax ID |
598
+ # | Colombia | `co_nit` | Colombian NIT Number |
599
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
600
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
601
+ # | Croatia | `eu_vat` | European VAT Number |
602
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
603
+ # | Cyprus | `eu_vat` | European VAT Number |
604
+ # | Czech Republic | `eu_vat` | European VAT Number |
605
+ # | Denmark | `eu_vat` | European VAT Number |
606
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
607
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
608
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
609
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
610
+ # | Estonia | `eu_vat` | European VAT Number |
611
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
612
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
613
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
614
+ # | Finland | `eu_vat` | European VAT Number |
615
+ # | France | `eu_vat` | European VAT Number |
616
+ # | Georgia | `ge_vat` | Georgian VAT |
617
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
618
+ # | Germany | `eu_vat` | European VAT Number |
619
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
620
+ # | Greece | `eu_vat` | European VAT Number |
621
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
622
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
623
+ # | Hungary | `eu_vat` | European VAT Number |
624
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
625
+ # | Iceland | `is_vat` | Icelandic VAT |
626
+ # | India | `in_gst` | Indian GST Number |
627
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
628
+ # | Ireland | `eu_vat` | European VAT Number |
629
+ # | Israel | `il_vat` | Israel VAT |
630
+ # | Italy | `eu_vat` | European VAT Number |
631
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
632
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
633
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
634
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
635
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
636
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
637
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
638
+ # | Laos | `la_tin` | Laos Tax Identification Number |
639
+ # | Latvia | `eu_vat` | European VAT Number |
640
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
641
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
642
+ # | Lithuania | `eu_vat` | European VAT Number |
643
+ # | Luxembourg | `eu_vat` | European VAT Number |
644
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
645
+ # | Malaysia | `my_itn` | Malaysian ITN |
646
+ # | Malaysia | `my_sst` | Malaysian SST Number |
647
+ # | Malta | `eu_vat` | European VAT Number |
648
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
649
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
650
+ # | Moldova | `md_vat` | Moldova VAT Number |
651
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
652
+ # | Morocco | `ma_vat` | Morocco VAT Number |
653
+ # | Nepal | `np_pan` | Nepal PAN Number |
654
+ # | Netherlands | `eu_vat` | European VAT Number |
655
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
656
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
657
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
658
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
659
+ # | Norway | `no_vat` | Norwegian VAT Number |
660
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
661
+ # | Oman | `om_vat` | Omani VAT Number |
662
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
663
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
664
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
665
+ # | Poland | `eu_vat` | European VAT Number |
666
+ # | Poland | `pl_nip` | Polish Tax ID Number |
667
+ # | Portugal | `eu_vat` | European VAT Number |
668
+ # | Romania | `eu_vat` | European VAT Number |
669
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
670
+ # | Russia | `ru_inn` | Russian INN |
671
+ # | Russia | `ru_kpp` | Russian KPP |
672
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
673
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
674
+ # | Serbia | `rs_pib` | Serbian PIB Number |
675
+ # | Singapore | `sg_gst` | Singaporean GST |
676
+ # | Singapore | `sg_uen` | Singaporean UEN |
677
+ # | Slovakia | `eu_vat` | European VAT Number |
678
+ # | Slovenia | `eu_vat` | European VAT Number |
679
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
680
+ # | South Africa | `za_vat` | South African VAT Number |
681
+ # | South Korea | `kr_brn` | Korean BRN |
682
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
683
+ # | Spain | `eu_vat` | European VAT Number |
684
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
685
+ # | Suriname | `sr_fin` | Suriname FIN Number |
686
+ # | Sweden | `eu_vat` | European VAT Number |
687
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
688
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
689
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
690
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
691
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
692
+ # | Thailand | `th_vat` | Thai VAT |
693
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
694
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
695
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
696
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
697
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
698
+ # | United States | `us_ein` | United States EIN |
699
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
700
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
701
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
702
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
703
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
704
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
705
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
706
+ customer_tax_id:,
707
+ # When the invoice payment is due. The due date is null if the invoice is not yet
708
+ # finalized.
709
+ due_date:,
710
+ # If the invoice has a status of `draft`, this will be the time that the invoice
711
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
712
+ # true, the invoice will automatically begin issuing at this time.
713
+ eligible_to_issue_at:,
714
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
715
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
716
+ hosted_invoice_url:,
717
+ # The scheduled date of the invoice
718
+ invoice_date:,
719
+ # Automatically generated invoice number to help track and reconcile invoices.
720
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
721
+ # account or customer.
722
+ invoice_number:,
723
+ # The link to download the PDF representation of the `Invoice`.
724
+ invoice_pdf:,
725
+ invoice_source:,
726
+ # If the invoice failed to issue, this will be the last time it failed to issue
727
+ # (even if it is now in a different state.)
728
+ issue_failed_at:,
729
+ # If the invoice has been issued, this will be the time it transitioned to
730
+ # `issued` (even if it is now in a different state.)
731
+ issued_at:,
732
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
733
+ memo:,
734
+ # User specified key-value pairs for the resource. If not present, this defaults
735
+ # to an empty dictionary. Individual keys can be removed by setting the value to
736
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
737
+ # `null`.
738
+ metadata:,
739
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
740
+ # was paid.
741
+ paid_at:,
742
+ # A list of payment attempts associated with the invoice
743
+ payment_attempts:,
744
+ # If payment was attempted on this invoice but failed, this will be the time of
745
+ # the most recent attempt.
746
+ payment_failed_at:,
747
+ # When payment for this invoice was received. For an invoice manually marked as
748
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
749
+ # through a payment provider, this is the settlement time reported by that
750
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
751
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
752
+ # when the invoice reached the `paid` status in Orb.
753
+ payment_received_at:,
754
+ # If payment was attempted on this invoice, this will be the start time of the
755
+ # most recent attempt. This field is especially useful for delayed-notification
756
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
757
+ payment_started_at:,
758
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
759
+ # scheduled to be issued.
760
+ scheduled_issue_at:,
761
+ shipping_address:,
762
+ status:,
763
+ subscription:,
764
+ # If the invoice failed to sync, this will be the last time an external invoicing
765
+ # provider sync was attempted. This field will always be `null` for invoices using
766
+ # Orb Invoicing.
767
+ sync_failed_at:,
768
+ # The total after any minimums and discounts have been applied.
769
+ total:,
770
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
771
+ # was voided.
772
+ voided_at:,
773
+ # This is true if the invoice will be automatically issued in the future, and
774
+ # false otherwise.
775
+ will_auto_issue:
776
+ )
777
+ end
778
+
779
+ sig do
780
+ override.returns(
781
+ {
782
+ id: String,
783
+ amount_due: String,
784
+ auto_collection:
785
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::AutoCollection,
786
+ billing_address: T.nilable(Orb::Address),
787
+ created_at: Time,
788
+ credit_notes:
789
+ T::Array[
790
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CreditNote
791
+ ],
792
+ currency: String,
793
+ customer: Orb::CustomerMinified,
794
+ customer_balance_transactions:
795
+ T::Array[
796
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction
797
+ ],
798
+ customer_tax_id: T.nilable(Orb::CustomerTaxID),
799
+ due_date: T.nilable(Time),
800
+ eligible_to_issue_at: T.nilable(Time),
801
+ hosted_invoice_url: T.nilable(String),
802
+ invoice_date: Time,
803
+ invoice_number: String,
804
+ invoice_pdf: T.nilable(String),
805
+ invoice_source:
806
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol,
807
+ issue_failed_at: T.nilable(Time),
808
+ issued_at: T.nilable(Time),
809
+ memo: T.nilable(String),
810
+ metadata: T::Hash[Symbol, String],
811
+ paid_at: T.nilable(Time),
812
+ payment_attempts:
813
+ T::Array[
814
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt
815
+ ],
816
+ payment_failed_at: T.nilable(Time),
817
+ payment_received_at: T.nilable(Time),
818
+ payment_started_at: T.nilable(Time),
819
+ scheduled_issue_at: T.nilable(Time),
820
+ shipping_address: T.nilable(Orb::Address),
821
+ status:
822
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol,
823
+ subscription: T.nilable(Orb::SubscriptionMinified),
824
+ sync_failed_at: T.nilable(Time),
825
+ total: String,
826
+ voided_at: T.nilable(Time),
827
+ will_auto_issue: T::Boolean
828
+ }
829
+ )
830
+ end
831
+ def to_hash
832
+ end
833
+
834
+ class AutoCollection < Orb::Internal::Type::BaseModel
835
+ OrHash =
836
+ T.type_alias do
837
+ T.any(
838
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::AutoCollection,
839
+ Orb::Internal::AnyHash
840
+ )
841
+ end
842
+
843
+ # True only if auto-collection is enabled for this invoice.
844
+ sig { returns(T.nilable(T::Boolean)) }
845
+ attr_accessor :enabled
846
+
847
+ # If the invoice is scheduled for auto-collection, this field will reflect when
848
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
849
+ # is not enabled for this invoice, this field will be `null`.
850
+ sig { returns(T.nilable(Time)) }
851
+ attr_accessor :next_attempt_at
852
+
853
+ # Number of auto-collection payment attempts.
854
+ sig { returns(T.nilable(Integer)) }
855
+ attr_accessor :num_attempts
856
+
857
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
858
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
859
+ # this can be used to tell whether the invoice is currently in dunning (that is,
860
+ # `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
861
+ # dunning has been exhausted (`previously_attempted_at` is non-null, but
862
+ # `next_attempt_at` is null).
863
+ sig { returns(T.nilable(Time)) }
864
+ attr_accessor :previously_attempted_at
865
+
866
+ sig do
867
+ params(
868
+ enabled: T.nilable(T::Boolean),
869
+ next_attempt_at: T.nilable(Time),
870
+ num_attempts: T.nilable(Integer),
871
+ previously_attempted_at: T.nilable(Time)
872
+ ).returns(T.attached_class)
873
+ end
874
+ def self.new(
875
+ # True only if auto-collection is enabled for this invoice.
876
+ enabled:,
877
+ # If the invoice is scheduled for auto-collection, this field will reflect when
878
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
879
+ # is not enabled for this invoice, this field will be `null`.
880
+ next_attempt_at:,
881
+ # Number of auto-collection payment attempts.
882
+ num_attempts:,
883
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
884
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
885
+ # this can be used to tell whether the invoice is currently in dunning (that is,
886
+ # `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
887
+ # dunning has been exhausted (`previously_attempted_at` is non-null, but
888
+ # `next_attempt_at` is null).
889
+ previously_attempted_at:
890
+ )
891
+ end
892
+
893
+ sig do
894
+ override.returns(
895
+ {
896
+ enabled: T.nilable(T::Boolean),
897
+ next_attempt_at: T.nilable(Time),
898
+ num_attempts: T.nilable(Integer),
899
+ previously_attempted_at: T.nilable(Time)
900
+ }
901
+ )
902
+ end
903
+ def to_hash
904
+ end
905
+ end
906
+
907
+ class CreditNote < Orb::Internal::Type::BaseModel
908
+ OrHash =
909
+ T.type_alias do
910
+ T.any(
911
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CreditNote,
912
+ Orb::Internal::AnyHash
913
+ )
914
+ end
915
+
916
+ sig { returns(String) }
917
+ attr_accessor :id
918
+
919
+ sig { returns(String) }
920
+ attr_accessor :credit_note_number
921
+
922
+ # An optional memo supplied on the credit note.
923
+ sig { returns(T.nilable(String)) }
924
+ attr_accessor :memo
925
+
926
+ sig { returns(String) }
927
+ attr_accessor :reason
928
+
929
+ sig { returns(String) }
930
+ attr_accessor :total
931
+
932
+ sig { returns(String) }
933
+ attr_accessor :type
934
+
935
+ # If the credit note has a status of `void`, this gives a timestamp when the
936
+ # credit note was voided.
937
+ sig { returns(T.nilable(Time)) }
938
+ attr_accessor :voided_at
939
+
940
+ sig do
941
+ params(
942
+ id: String,
943
+ credit_note_number: String,
944
+ memo: T.nilable(String),
945
+ reason: String,
946
+ total: String,
947
+ type: String,
948
+ voided_at: T.nilable(Time)
949
+ ).returns(T.attached_class)
950
+ end
951
+ def self.new(
952
+ id:,
953
+ credit_note_number:,
954
+ # An optional memo supplied on the credit note.
955
+ memo:,
956
+ reason:,
957
+ total:,
958
+ type:,
959
+ # If the credit note has a status of `void`, this gives a timestamp when the
960
+ # credit note was voided.
961
+ voided_at:
962
+ )
963
+ end
964
+
965
+ sig do
966
+ override.returns(
967
+ {
968
+ id: String,
969
+ credit_note_number: String,
970
+ memo: T.nilable(String),
971
+ reason: String,
972
+ total: String,
973
+ type: String,
974
+ voided_at: T.nilable(Time)
975
+ }
976
+ )
977
+ end
978
+ def to_hash
979
+ end
980
+ end
981
+
982
+ class CustomerBalanceTransaction < Orb::Internal::Type::BaseModel
983
+ OrHash =
984
+ T.type_alias do
985
+ T.any(
986
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction,
987
+ Orb::Internal::AnyHash
988
+ )
989
+ end
990
+
991
+ # A unique id for this transaction.
992
+ sig { returns(String) }
993
+ attr_accessor :id
994
+
995
+ sig do
996
+ returns(
997
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
998
+ )
999
+ end
1000
+ attr_accessor :action
1001
+
1002
+ # The value of the amount changed in the transaction.
1003
+ sig { returns(String) }
1004
+ attr_accessor :amount
1005
+
1006
+ # The creation time of this transaction.
1007
+ sig { returns(Time) }
1008
+ attr_accessor :created_at
1009
+
1010
+ sig { returns(T.nilable(Orb::CreditNoteTiny)) }
1011
+ attr_reader :credit_note
1012
+
1013
+ sig do
1014
+ params(credit_note: T.nilable(Orb::CreditNoteTiny::OrHash)).void
1015
+ end
1016
+ attr_writer :credit_note
1017
+
1018
+ # An optional description provided for manual customer balance adjustments.
1019
+ sig { returns(T.nilable(String)) }
1020
+ attr_accessor :description
1021
+
1022
+ # The new value of the customer's balance prior to the transaction, in the
1023
+ # customer's currency.
1024
+ sig { returns(String) }
1025
+ attr_accessor :ending_balance
1026
+
1027
+ sig { returns(T.nilable(Orb::InvoiceTiny)) }
1028
+ attr_reader :invoice
1029
+
1030
+ sig { params(invoice: T.nilable(Orb::InvoiceTiny::OrHash)).void }
1031
+ attr_writer :invoice
1032
+
1033
+ # The original value of the customer's balance prior to the transaction, in the
1034
+ # customer's currency.
1035
+ sig { returns(String) }
1036
+ attr_accessor :starting_balance
1037
+
1038
+ sig do
1039
+ returns(
1040
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1041
+ )
1042
+ end
1043
+ attr_accessor :type
1044
+
1045
+ sig do
1046
+ params(
1047
+ id: String,
1048
+ action:
1049
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::OrSymbol,
1050
+ amount: String,
1051
+ created_at: Time,
1052
+ credit_note: T.nilable(Orb::CreditNoteTiny::OrHash),
1053
+ description: T.nilable(String),
1054
+ ending_balance: String,
1055
+ invoice: T.nilable(Orb::InvoiceTiny::OrHash),
1056
+ starting_balance: String,
1057
+ type:
1058
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::OrSymbol
1059
+ ).returns(T.attached_class)
1060
+ end
1061
+ def self.new(
1062
+ # A unique id for this transaction.
1063
+ id:,
1064
+ action:,
1065
+ # The value of the amount changed in the transaction.
1066
+ amount:,
1067
+ # The creation time of this transaction.
1068
+ created_at:,
1069
+ credit_note:,
1070
+ # An optional description provided for manual customer balance adjustments.
1071
+ description:,
1072
+ # The new value of the customer's balance prior to the transaction, in the
1073
+ # customer's currency.
1074
+ ending_balance:,
1075
+ invoice:,
1076
+ # The original value of the customer's balance prior to the transaction, in the
1077
+ # customer's currency.
1078
+ starting_balance:,
1079
+ type:
1080
+ )
1081
+ end
1082
+
1083
+ sig do
1084
+ override.returns(
1085
+ {
1086
+ id: String,
1087
+ action:
1088
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol,
1089
+ amount: String,
1090
+ created_at: Time,
1091
+ credit_note: T.nilable(Orb::CreditNoteTiny),
1092
+ description: T.nilable(String),
1093
+ ending_balance: String,
1094
+ invoice: T.nilable(Orb::InvoiceTiny),
1095
+ starting_balance: String,
1096
+ type:
1097
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1098
+ }
1099
+ )
1100
+ end
1101
+ def to_hash
1102
+ end
1103
+
1104
+ module Action
1105
+ extend Orb::Internal::Type::Enum
1106
+
1107
+ TaggedSymbol =
1108
+ T.type_alias do
1109
+ T.all(
1110
+ Symbol,
1111
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action
1112
+ )
1113
+ end
1114
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1115
+
1116
+ APPLIED_TO_INVOICE =
1117
+ T.let(
1118
+ :applied_to_invoice,
1119
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1120
+ )
1121
+ MANUAL_ADJUSTMENT =
1122
+ T.let(
1123
+ :manual_adjustment,
1124
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1125
+ )
1126
+ PRORATED_REFUND =
1127
+ T.let(
1128
+ :prorated_refund,
1129
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1130
+ )
1131
+ REVERT_PRORATED_REFUND =
1132
+ T.let(
1133
+ :revert_prorated_refund,
1134
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1135
+ )
1136
+ RETURN_FROM_VOIDING =
1137
+ T.let(
1138
+ :return_from_voiding,
1139
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1140
+ )
1141
+ CREDIT_NOTE_APPLIED =
1142
+ T.let(
1143
+ :credit_note_applied,
1144
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1145
+ )
1146
+ CREDIT_NOTE_VOIDED =
1147
+ T.let(
1148
+ :credit_note_voided,
1149
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1150
+ )
1151
+ OVERPAYMENT_REFUND =
1152
+ T.let(
1153
+ :overpayment_refund,
1154
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1155
+ )
1156
+ EXTERNAL_PAYMENT =
1157
+ T.let(
1158
+ :external_payment,
1159
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1160
+ )
1161
+ SMALL_INVOICE_CARRYOVER =
1162
+ T.let(
1163
+ :small_invoice_carryover,
1164
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1165
+ )
1166
+ PREPAID_COMMIT_CANCEL =
1167
+ T.let(
1168
+ :prepaid_commit_cancel,
1169
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1170
+ )
1171
+
1172
+ sig do
1173
+ override.returns(
1174
+ T::Array[
1175
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1176
+ ]
1177
+ )
1178
+ end
1179
+ def self.values
1180
+ end
1181
+ end
1182
+
1183
+ module Type
1184
+ extend Orb::Internal::Type::Enum
1185
+
1186
+ TaggedSymbol =
1187
+ T.type_alias do
1188
+ T.all(
1189
+ Symbol,
1190
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type
1191
+ )
1192
+ end
1193
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1194
+
1195
+ INCREMENT =
1196
+ T.let(
1197
+ :increment,
1198
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1199
+ )
1200
+ DECREMENT =
1201
+ T.let(
1202
+ :decrement,
1203
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1204
+ )
1205
+
1206
+ sig do
1207
+ override.returns(
1208
+ T::Array[
1209
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1210
+ ]
1211
+ )
1212
+ end
1213
+ def self.values
1214
+ end
1215
+ end
1216
+ end
1217
+
1218
+ module InvoiceSource
1219
+ extend Orb::Internal::Type::Enum
1220
+
1221
+ TaggedSymbol =
1222
+ T.type_alias do
1223
+ T.all(
1224
+ Symbol,
1225
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource
1226
+ )
1227
+ end
1228
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1229
+
1230
+ SUBSCRIPTION =
1231
+ T.let(
1232
+ :subscription,
1233
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1234
+ )
1235
+ PARTIAL =
1236
+ T.let(
1237
+ :partial,
1238
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1239
+ )
1240
+ ONE_OFF =
1241
+ T.let(
1242
+ :one_off,
1243
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1244
+ )
1245
+
1246
+ sig do
1247
+ override.returns(
1248
+ T::Array[
1249
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1250
+ ]
1251
+ )
1252
+ end
1253
+ def self.values
1254
+ end
1255
+ end
1256
+
1257
+ class PaymentAttempt < Orb::Internal::Type::BaseModel
1258
+ OrHash =
1259
+ T.type_alias do
1260
+ T.any(
1261
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt,
1262
+ Orb::Internal::AnyHash
1263
+ )
1264
+ end
1265
+
1266
+ # The ID of the payment attempt.
1267
+ sig { returns(String) }
1268
+ attr_accessor :id
1269
+
1270
+ # The amount of the payment attempt.
1271
+ sig { returns(String) }
1272
+ attr_accessor :amount
1273
+
1274
+ # The time at which the payment attempt was created.
1275
+ sig { returns(Time) }
1276
+ attr_accessor :created_at
1277
+
1278
+ # The payment provider that attempted to collect the payment.
1279
+ sig do
1280
+ returns(
1281
+ T.nilable(
1282
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1283
+ )
1284
+ )
1285
+ end
1286
+ attr_accessor :payment_provider
1287
+
1288
+ # The ID of the payment attempt in the payment provider.
1289
+ sig { returns(T.nilable(String)) }
1290
+ attr_accessor :payment_provider_id
1291
+
1292
+ # URL to the downloadable PDF version of the receipt. This field will be `null`
1293
+ # for payment attempts that did not succeed.
1294
+ sig { returns(T.nilable(String)) }
1295
+ attr_accessor :receipt_pdf
1296
+
1297
+ # Whether the payment attempt succeeded.
1298
+ sig { returns(T::Boolean) }
1299
+ attr_accessor :succeeded
1300
+
1301
+ sig do
1302
+ params(
1303
+ id: String,
1304
+ amount: String,
1305
+ created_at: Time,
1306
+ payment_provider:
1307
+ T.nilable(
1308
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::OrSymbol
1309
+ ),
1310
+ payment_provider_id: T.nilable(String),
1311
+ receipt_pdf: T.nilable(String),
1312
+ succeeded: T::Boolean
1313
+ ).returns(T.attached_class)
1314
+ end
1315
+ def self.new(
1316
+ # The ID of the payment attempt.
1317
+ id:,
1318
+ # The amount of the payment attempt.
1319
+ amount:,
1320
+ # The time at which the payment attempt was created.
1321
+ created_at:,
1322
+ # The payment provider that attempted to collect the payment.
1323
+ payment_provider:,
1324
+ # The ID of the payment attempt in the payment provider.
1325
+ payment_provider_id:,
1326
+ # URL to the downloadable PDF version of the receipt. This field will be `null`
1327
+ # for payment attempts that did not succeed.
1328
+ receipt_pdf:,
1329
+ # Whether the payment attempt succeeded.
1330
+ succeeded:
1331
+ )
1332
+ end
1333
+
1334
+ sig do
1335
+ override.returns(
1336
+ {
1337
+ id: String,
1338
+ amount: String,
1339
+ created_at: Time,
1340
+ payment_provider:
1341
+ T.nilable(
1342
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1343
+ ),
1344
+ payment_provider_id: T.nilable(String),
1345
+ receipt_pdf: T.nilable(String),
1346
+ succeeded: T::Boolean
1347
+ }
1348
+ )
1349
+ end
1350
+ def to_hash
1351
+ end
1352
+
1353
+ # The payment provider that attempted to collect the payment.
1354
+ module PaymentProvider
1355
+ extend Orb::Internal::Type::Enum
1356
+
1357
+ TaggedSymbol =
1358
+ T.type_alias do
1359
+ T.all(
1360
+ Symbol,
1361
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider
1362
+ )
1363
+ end
1364
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1365
+
1366
+ STRIPE =
1367
+ T.let(
1368
+ :stripe,
1369
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1370
+ )
1371
+ ADYEN =
1372
+ T.let(
1373
+ :adyen,
1374
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1375
+ )
1376
+
1377
+ sig do
1378
+ override.returns(
1379
+ T::Array[
1380
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1381
+ ]
1382
+ )
1383
+ end
1384
+ def self.values
1385
+ end
1386
+ end
1387
+ end
1388
+
1389
+ module Status
1390
+ extend Orb::Internal::Type::Enum
1391
+
1392
+ TaggedSymbol =
1393
+ T.type_alias do
1394
+ T.all(
1395
+ Symbol,
1396
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status
1397
+ )
1398
+ end
1399
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1400
+
1401
+ ISSUED =
1402
+ T.let(
1403
+ :issued,
1404
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1405
+ )
1406
+ PAID =
1407
+ T.let(
1408
+ :paid,
1409
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1410
+ )
1411
+ SYNCED =
1412
+ T.let(
1413
+ :synced,
1414
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1415
+ )
1416
+ VOID =
1417
+ T.let(
1418
+ :void,
1419
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1420
+ )
1421
+ DRAFT =
1422
+ T.let(
1423
+ :draft,
1424
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1425
+ )
1426
+
1427
+ sig do
1428
+ override.returns(
1429
+ T::Array[
1430
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Invoice::Status::TaggedSymbol
1431
+ ]
1432
+ )
1433
+ end
1434
+ def self.values
1435
+ end
1436
+ end
1437
+ end
1438
+
1439
+ # The serialization style this payload was rendered in, as configured on the
1440
+ # endpoint.
1441
+ module PayloadStyle
1442
+ extend Orb::Internal::Type::Enum
1443
+
1444
+ TaggedSymbol =
1445
+ T.type_alias do
1446
+ T.all(
1447
+ Symbol,
1448
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle
1449
+ )
1450
+ end
1451
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1452
+
1453
+ EXPANDED =
1454
+ T.let(
1455
+ :expanded,
1456
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::TaggedSymbol
1457
+ )
1458
+ STANDARD =
1459
+ T.let(
1460
+ :standard,
1461
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::TaggedSymbol
1462
+ )
1463
+
1464
+ sig do
1465
+ override.returns(
1466
+ T::Array[
1467
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::PayloadStyle::TaggedSymbol
1468
+ ]
1469
+ )
1470
+ end
1471
+ def self.values
1472
+ end
1473
+ end
1474
+
1475
+ class Properties < Orb::Internal::Type::BaseModel
1476
+ OrHash =
1477
+ T.type_alias do
1478
+ T.any(
1479
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Properties,
1480
+ Orb::Internal::AnyHash
1481
+ )
1482
+ end
1483
+
1484
+ sig { returns(T::Boolean) }
1485
+ attr_accessor :automatically_marked_as_paid
1486
+
1487
+ sig do
1488
+ params(automatically_marked_as_paid: T::Boolean).returns(
1489
+ T.attached_class
1490
+ )
1491
+ end
1492
+ def self.new(automatically_marked_as_paid:)
1493
+ end
1494
+
1495
+ sig { override.returns({ automatically_marked_as_paid: T::Boolean }) }
1496
+ def to_hash
1497
+ end
1498
+ end
1499
+
1500
+ # The event this payload describes.
1501
+ module Type
1502
+ extend Orb::Internal::Type::Enum
1503
+
1504
+ TaggedSymbol =
1505
+ T.type_alias do
1506
+ T.all(
1507
+ Symbol,
1508
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type
1509
+ )
1510
+ end
1511
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1512
+
1513
+ INVOICE_ISSUED =
1514
+ T.let(
1515
+ :"invoice.issued",
1516
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type::TaggedSymbol
1517
+ )
1518
+
1519
+ sig do
1520
+ override.returns(
1521
+ T::Array[
1522
+ Orb::Webhooks::InvoiceIssuedStandardWebhookEvent::Type::TaggedSymbol
1523
+ ]
1524
+ )
1525
+ end
1526
+ def self.values
1527
+ end
1528
+ end
1529
+ end
1530
+ end
1531
+ end
1532
+ end