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