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