dodopayments 2.9.1 → 2.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +9 -9
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/internal/transport/base_client.rb +2 -0
- data/lib/dodopayments/internal/type/union.rb +21 -7
- data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +4 -16
- data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/checkout_session_flags.rb +15 -1
- data/lib/dodopayments/models/checkout_session_request.rb +25 -2
- data/lib/dodopayments/models/checkout_session_response.rb +33 -1
- data/lib/dodopayments/models/credit_added_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_deducted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_manual_adjustment_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_charged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rolled_over_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rollover_forfeited_webhook_event.rb +4 -16
- data/lib/dodopayments/models/discount_detail.rb +143 -0
- data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_lost_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_opened_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_won_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +4 -16
- data/lib/dodopayments/models/filter_type.rb +71 -0
- data/lib/dodopayments/models/github_permission.rb +19 -0
- data/lib/dodopayments/models/integration_config.rb +3 -19
- data/lib/dodopayments/models/integration_config_response.rb +3 -19
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/license_key_created_webhook_event.rb +4 -16
- data/lib/dodopayments/models/meter_filter.rb +3 -331
- data/lib/dodopayments/models/payment.rb +15 -3
- data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_create_params.rb +25 -3
- data/lib/dodopayments/models/payment_create_response.rb +14 -3
- data/lib/dodopayments/models/payment_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_method_types.rb +1 -0
- data/lib/dodopayments/models/payment_processing_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payout_list_response.rb +6 -3
- data/lib/dodopayments/models/price.rb +20 -48
- data/lib/dodopayments/models/product.rb +3 -3
- data/lib/dodopayments/models/product_collection.rb +74 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +47 -0
- data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
- data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
- data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
- data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
- data/lib/dodopayments/models/product_collections/group_create_params.rb +22 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_product.rb +26 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +41 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +15 -0
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
- data/lib/dodopayments/models/product_collections/groups/product_collection_product.rb +132 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_details.rb +42 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_response.rb +39 -0
- data/lib/dodopayments/models/product_create_params.rb +3 -3
- data/lib/dodopayments/models/product_item_req.rb +42 -1
- data/lib/dodopayments/models/product_update_params.rb +3 -3
- data/lib/dodopayments/models/refund_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription.rb +24 -5
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_create_params.rb +25 -3
- data/lib/dodopayments/models/subscription_create_response.rb +14 -3
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_list_response.rb +45 -5
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +21 -49
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_update_params.rb +12 -1
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +19 -37
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -16
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/update_subscription_plan_req.rb +17 -6
- data/lib/dodopayments/models/webhook_event_type.rb +1 -2
- data/lib/dodopayments/models/webhook_payload.rb +52 -143
- data/lib/dodopayments/models.rb +24 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +12 -4
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +6 -2
- data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
- data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
- data/lib/dodopayments/resources/product_collections.rb +179 -0
- data/lib/dodopayments/resources/subscriptions.rb +20 -10
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +29 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/checkout_session_flags.rbi +23 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +26 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +43 -5
- data/rbi/dodopayments/models/credit_added_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_deducted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_manual_adjustment_webhook_event.rbi +4 -39
- data/rbi/dodopayments/models/credit_overage_charged_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_rolled_over_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_rollover_forfeited_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/discount_detail.rbi +161 -0
- data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +4 -39
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/filter_type.rbi +112 -0
- data/rbi/dodopayments/models/github_permission.rbi +26 -0
- data/rbi/dodopayments/models/integration_config.rbi +3 -59
- data/rbi/dodopayments/models/integration_config_response.rbi +3 -59
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/meter_filter.rbi +3 -572
- data/rbi/dodopayments/models/payment.rbi +10 -2
- data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_create_params.rbi +26 -2
- data/rbi/dodopayments/models/payment_create_response.rbi +12 -2
- data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_method_types.rbi +1 -0
- data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/price.rbi +18 -90
- data/rbi/dodopayments/models/product_collection.rbi +108 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +40 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_product.rbi +46 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +68 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +17 -0
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
- data/rbi/dodopayments/models/product_collections/groups/product_collection_product.rbi +148 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_details.rbi +67 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_response.rbi +68 -0
- data/rbi/dodopayments/models/product_item_req.rbi +74 -3
- data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -31
- data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/subscription.rbi +22 -4
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_create_params.rbi +26 -2
- data/rbi/dodopayments/models/subscription_create_response.rbi +12 -2
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_list_response.rbi +77 -4
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +18 -123
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_update_params.rbi +14 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +28 -112
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +18 -8
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -4
- data/rbi/dodopayments/models/webhook_payload.rbi +46 -466
- data/rbi/dodopayments/models.rbi +31 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +22 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/payments.rbi +11 -1
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +88 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +37 -13
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/checkout_session_flags.rbs +7 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +10 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +27 -3
- data/sig/dodopayments/models/credit_added_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_deducted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_manual_adjustment_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_charged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rolled_over_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rollover_forfeited_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/discount_detail.rbs +95 -0
- data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/filter_type.rbs +52 -0
- data/sig/dodopayments/models/github_permission.rbs +17 -0
- data/sig/dodopayments/models/integration_config.rbs +4 -18
- data/sig/dodopayments/models/integration_config_response.rbs +4 -18
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/meter_filter.rbs +4 -252
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_create_params.rbs +10 -0
- data/sig/dodopayments/models/payment_create_response.rbs +5 -0
- data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_method_types.rbs +2 -0
- data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/price.rbs +15 -45
- data/sig/dodopayments/models/product_collection.rbs +55 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +41 -0
- data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
- data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
- data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +27 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_product.rbs +17 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +40 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +12 -0
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
- data/sig/dodopayments/models/product_collections/groups/product_collection_product.rbs +99 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_details.rbs +34 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_response.rbs +39 -0
- data/sig/dodopayments/models/product_item_req.rbs +27 -3
- data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription.rbs +10 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_create_params.rbs +10 -0
- data/sig/dodopayments/models/subscription_create_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_list_response.rbs +29 -0
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +15 -45
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +17 -57
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -4
- data/sig/dodopayments/models/webhook_payload.rbs +50 -213
- data/sig/dodopayments/models.rbs +24 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +4 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/payments.rbs +2 -0
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
- data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
- data/sig/dodopayments/resources/product_collections.rbs +56 -0
- data/sig/dodopayments/resources/subscriptions.rbs +6 -1
- metadata +89 -2
|
@@ -27,11 +27,7 @@ module Dodopayments
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
29
|
# The event type
|
|
30
|
-
sig
|
|
31
|
-
returns(
|
|
32
|
-
Dodopayments::SubscriptionExpiredWebhookEvent::Type::TaggedSymbol
|
|
33
|
-
)
|
|
34
|
-
end
|
|
30
|
+
sig { returns(Symbol) }
|
|
35
31
|
attr_accessor :type
|
|
36
32
|
|
|
37
33
|
sig do
|
|
@@ -39,7 +35,7 @@ module Dodopayments
|
|
|
39
35
|
business_id: String,
|
|
40
36
|
data: Dodopayments::Subscription::OrHash,
|
|
41
37
|
timestamp: Time,
|
|
42
|
-
type:
|
|
38
|
+
type: Symbol
|
|
43
39
|
).returns(T.attached_class)
|
|
44
40
|
end
|
|
45
41
|
def self.new(
|
|
@@ -50,7 +46,7 @@ module Dodopayments
|
|
|
50
46
|
# The timestamp of when the event occurred
|
|
51
47
|
timestamp:,
|
|
52
48
|
# The event type
|
|
53
|
-
type:
|
|
49
|
+
type: :"subscription.expired"
|
|
54
50
|
)
|
|
55
51
|
end
|
|
56
52
|
|
|
@@ -60,40 +56,12 @@ module Dodopayments
|
|
|
60
56
|
business_id: String,
|
|
61
57
|
data: Dodopayments::Subscription,
|
|
62
58
|
timestamp: Time,
|
|
63
|
-
type:
|
|
64
|
-
Dodopayments::SubscriptionExpiredWebhookEvent::Type::TaggedSymbol
|
|
59
|
+
type: Symbol
|
|
65
60
|
}
|
|
66
61
|
)
|
|
67
62
|
end
|
|
68
63
|
def to_hash
|
|
69
64
|
end
|
|
70
|
-
|
|
71
|
-
# The event type
|
|
72
|
-
module Type
|
|
73
|
-
extend Dodopayments::Internal::Type::Enum
|
|
74
|
-
|
|
75
|
-
TaggedSymbol =
|
|
76
|
-
T.type_alias do
|
|
77
|
-
T.all(Symbol, Dodopayments::SubscriptionExpiredWebhookEvent::Type)
|
|
78
|
-
end
|
|
79
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
80
|
-
|
|
81
|
-
SUBSCRIPTION_EXPIRED =
|
|
82
|
-
T.let(
|
|
83
|
-
:"subscription.expired",
|
|
84
|
-
Dodopayments::SubscriptionExpiredWebhookEvent::Type::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
T::Array[
|
|
90
|
-
Dodopayments::SubscriptionExpiredWebhookEvent::Type::TaggedSymbol
|
|
91
|
-
]
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
def self.values
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
65
|
end
|
|
98
66
|
end
|
|
99
67
|
end
|
|
@@ -27,11 +27,7 @@ module Dodopayments
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
29
|
# The event type
|
|
30
|
-
sig
|
|
31
|
-
returns(
|
|
32
|
-
Dodopayments::SubscriptionFailedWebhookEvent::Type::TaggedSymbol
|
|
33
|
-
)
|
|
34
|
-
end
|
|
30
|
+
sig { returns(Symbol) }
|
|
35
31
|
attr_accessor :type
|
|
36
32
|
|
|
37
33
|
sig do
|
|
@@ -39,7 +35,7 @@ module Dodopayments
|
|
|
39
35
|
business_id: String,
|
|
40
36
|
data: Dodopayments::Subscription::OrHash,
|
|
41
37
|
timestamp: Time,
|
|
42
|
-
type:
|
|
38
|
+
type: Symbol
|
|
43
39
|
).returns(T.attached_class)
|
|
44
40
|
end
|
|
45
41
|
def self.new(
|
|
@@ -50,7 +46,7 @@ module Dodopayments
|
|
|
50
46
|
# The timestamp of when the event occurred
|
|
51
47
|
timestamp:,
|
|
52
48
|
# The event type
|
|
53
|
-
type:
|
|
49
|
+
type: :"subscription.failed"
|
|
54
50
|
)
|
|
55
51
|
end
|
|
56
52
|
|
|
@@ -60,40 +56,12 @@ module Dodopayments
|
|
|
60
56
|
business_id: String,
|
|
61
57
|
data: Dodopayments::Subscription,
|
|
62
58
|
timestamp: Time,
|
|
63
|
-
type:
|
|
64
|
-
Dodopayments::SubscriptionFailedWebhookEvent::Type::TaggedSymbol
|
|
59
|
+
type: Symbol
|
|
65
60
|
}
|
|
66
61
|
)
|
|
67
62
|
end
|
|
68
63
|
def to_hash
|
|
69
64
|
end
|
|
70
|
-
|
|
71
|
-
# The event type
|
|
72
|
-
module Type
|
|
73
|
-
extend Dodopayments::Internal::Type::Enum
|
|
74
|
-
|
|
75
|
-
TaggedSymbol =
|
|
76
|
-
T.type_alias do
|
|
77
|
-
T.all(Symbol, Dodopayments::SubscriptionFailedWebhookEvent::Type)
|
|
78
|
-
end
|
|
79
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
80
|
-
|
|
81
|
-
SUBSCRIPTION_FAILED =
|
|
82
|
-
T.let(
|
|
83
|
-
:"subscription.failed",
|
|
84
|
-
Dodopayments::SubscriptionFailedWebhookEvent::Type::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
T::Array[
|
|
90
|
-
Dodopayments::SubscriptionFailedWebhookEvent::Type::TaggedSymbol
|
|
91
|
-
]
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
def self.values
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
65
|
end
|
|
98
66
|
end
|
|
99
67
|
end
|
|
@@ -39,6 +39,14 @@ module Dodopayments
|
|
|
39
39
|
end
|
|
40
40
|
attr_writer :customer
|
|
41
41
|
|
|
42
|
+
# All stacked discounts applied, in order of application
|
|
43
|
+
sig do
|
|
44
|
+
returns(
|
|
45
|
+
T::Array[Dodopayments::Models::SubscriptionListResponse::Discount]
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
attr_accessor :discounts
|
|
49
|
+
|
|
42
50
|
# Additional custom data associated with the subscription
|
|
43
51
|
sig { returns(T::Hash[Symbol, String]) }
|
|
44
52
|
attr_accessor :metadata
|
|
@@ -105,11 +113,16 @@ module Dodopayments
|
|
|
105
113
|
sig { returns(T.nilable(Time)) }
|
|
106
114
|
attr_accessor :cancelled_at
|
|
107
115
|
|
|
108
|
-
#
|
|
116
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
117
|
+
# the invoice in place of the customer's personal name.
|
|
118
|
+
sig { returns(T.nilable(String)) }
|
|
119
|
+
attr_accessor :customer_business_name
|
|
120
|
+
|
|
121
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
109
122
|
sig { returns(T.nilable(Integer)) }
|
|
110
123
|
attr_accessor :discount_cycles_remaining
|
|
111
124
|
|
|
112
|
-
#
|
|
125
|
+
# DEPRECATED: Use discounts instead.
|
|
113
126
|
sig { returns(T.nilable(String)) }
|
|
114
127
|
attr_accessor :discount_id
|
|
115
128
|
|
|
@@ -144,6 +157,10 @@ module Dodopayments
|
|
|
144
157
|
created_at: Time,
|
|
145
158
|
currency: Dodopayments::Currency::OrSymbol,
|
|
146
159
|
customer: Dodopayments::CustomerLimitedDetails::OrHash,
|
|
160
|
+
discounts:
|
|
161
|
+
T::Array[
|
|
162
|
+
Dodopayments::Models::SubscriptionListResponse::Discount::OrHash
|
|
163
|
+
],
|
|
147
164
|
metadata: T::Hash[Symbol, String],
|
|
148
165
|
next_billing_date: Time,
|
|
149
166
|
on_demand: T::Boolean,
|
|
@@ -160,6 +177,7 @@ module Dodopayments
|
|
|
160
177
|
tax_inclusive: T::Boolean,
|
|
161
178
|
trial_period_days: Integer,
|
|
162
179
|
cancelled_at: T.nilable(Time),
|
|
180
|
+
customer_business_name: T.nilable(String),
|
|
163
181
|
discount_cycles_remaining: T.nilable(Integer),
|
|
164
182
|
discount_id: T.nilable(String),
|
|
165
183
|
payment_method_id: T.nilable(String),
|
|
@@ -180,6 +198,8 @@ module Dodopayments
|
|
|
180
198
|
currency:,
|
|
181
199
|
# Customer details associated with the subscription
|
|
182
200
|
customer:,
|
|
201
|
+
# All stacked discounts applied, in order of application
|
|
202
|
+
discounts:,
|
|
183
203
|
# Additional custom data associated with the subscription
|
|
184
204
|
metadata:,
|
|
185
205
|
# Timestamp of the next scheduled billing. Indicates the end of current billing
|
|
@@ -214,9 +234,12 @@ module Dodopayments
|
|
|
214
234
|
trial_period_days:,
|
|
215
235
|
# Cancelled timestamp if the subscription is cancelled
|
|
216
236
|
cancelled_at: nil,
|
|
217
|
-
#
|
|
237
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
238
|
+
# the invoice in place of the customer's personal name.
|
|
239
|
+
customer_business_name: nil,
|
|
240
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
218
241
|
discount_cycles_remaining: nil,
|
|
219
|
-
#
|
|
242
|
+
# DEPRECATED: Use discounts instead.
|
|
220
243
|
discount_id: nil,
|
|
221
244
|
# Saved payment method id used for recurring charges
|
|
222
245
|
payment_method_id: nil,
|
|
@@ -237,6 +260,10 @@ module Dodopayments
|
|
|
237
260
|
created_at: Time,
|
|
238
261
|
currency: Dodopayments::Currency::TaggedSymbol,
|
|
239
262
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
263
|
+
discounts:
|
|
264
|
+
T::Array[
|
|
265
|
+
Dodopayments::Models::SubscriptionListResponse::Discount
|
|
266
|
+
],
|
|
240
267
|
metadata: T::Hash[Symbol, String],
|
|
241
268
|
next_billing_date: Time,
|
|
242
269
|
on_demand: T::Boolean,
|
|
@@ -255,6 +282,7 @@ module Dodopayments
|
|
|
255
282
|
tax_inclusive: T::Boolean,
|
|
256
283
|
trial_period_days: Integer,
|
|
257
284
|
cancelled_at: T.nilable(Time),
|
|
285
|
+
customer_business_name: T.nilable(String),
|
|
258
286
|
discount_cycles_remaining: T.nilable(Integer),
|
|
259
287
|
discount_id: T.nilable(String),
|
|
260
288
|
payment_method_id: T.nilable(String),
|
|
@@ -266,6 +294,51 @@ module Dodopayments
|
|
|
266
294
|
end
|
|
267
295
|
def to_hash
|
|
268
296
|
end
|
|
297
|
+
|
|
298
|
+
class Discount < Dodopayments::Internal::Type::BaseModel
|
|
299
|
+
OrHash =
|
|
300
|
+
T.type_alias do
|
|
301
|
+
T.any(
|
|
302
|
+
Dodopayments::Models::SubscriptionListResponse::Discount,
|
|
303
|
+
Dodopayments::Internal::AnyHash
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# The unique discount ID
|
|
308
|
+
sig { returns(String) }
|
|
309
|
+
attr_accessor :discount_id
|
|
310
|
+
|
|
311
|
+
# Remaining billing cycles for this discount on this subscription
|
|
312
|
+
sig { returns(T.nilable(Integer)) }
|
|
313
|
+
attr_accessor :discount_cycles_remaining
|
|
314
|
+
|
|
315
|
+
# Lightweight discount info for list endpoints. Array order represents position
|
|
316
|
+
# (no explicit position field).
|
|
317
|
+
sig do
|
|
318
|
+
params(
|
|
319
|
+
discount_id: String,
|
|
320
|
+
discount_cycles_remaining: T.nilable(Integer)
|
|
321
|
+
).returns(T.attached_class)
|
|
322
|
+
end
|
|
323
|
+
def self.new(
|
|
324
|
+
# The unique discount ID
|
|
325
|
+
discount_id:,
|
|
326
|
+
# Remaining billing cycles for this discount on this subscription
|
|
327
|
+
discount_cycles_remaining: nil
|
|
328
|
+
)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
sig do
|
|
332
|
+
override.returns(
|
|
333
|
+
{
|
|
334
|
+
discount_id: String,
|
|
335
|
+
discount_cycles_remaining: T.nilable(Integer)
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
def to_hash
|
|
340
|
+
end
|
|
341
|
+
end
|
|
269
342
|
end
|
|
270
343
|
end
|
|
271
344
|
end
|
|
@@ -27,11 +27,7 @@ module Dodopayments
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
29
|
# The event type
|
|
30
|
-
sig
|
|
31
|
-
returns(
|
|
32
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Type::TaggedSymbol
|
|
33
|
-
)
|
|
34
|
-
end
|
|
30
|
+
sig { returns(Symbol) }
|
|
35
31
|
attr_accessor :type
|
|
36
32
|
|
|
37
33
|
sig do
|
|
@@ -39,7 +35,7 @@ module Dodopayments
|
|
|
39
35
|
business_id: String,
|
|
40
36
|
data: Dodopayments::Subscription::OrHash,
|
|
41
37
|
timestamp: Time,
|
|
42
|
-
type:
|
|
38
|
+
type: Symbol
|
|
43
39
|
).returns(T.attached_class)
|
|
44
40
|
end
|
|
45
41
|
def self.new(
|
|
@@ -50,7 +46,7 @@ module Dodopayments
|
|
|
50
46
|
# The timestamp of when the event occurred
|
|
51
47
|
timestamp:,
|
|
52
48
|
# The event type
|
|
53
|
-
type:
|
|
49
|
+
type: :"subscription.on_hold"
|
|
54
50
|
)
|
|
55
51
|
end
|
|
56
52
|
|
|
@@ -60,40 +56,12 @@ module Dodopayments
|
|
|
60
56
|
business_id: String,
|
|
61
57
|
data: Dodopayments::Subscription,
|
|
62
58
|
timestamp: Time,
|
|
63
|
-
type:
|
|
64
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Type::TaggedSymbol
|
|
59
|
+
type: Symbol
|
|
65
60
|
}
|
|
66
61
|
)
|
|
67
62
|
end
|
|
68
63
|
def to_hash
|
|
69
64
|
end
|
|
70
|
-
|
|
71
|
-
# The event type
|
|
72
|
-
module Type
|
|
73
|
-
extend Dodopayments::Internal::Type::Enum
|
|
74
|
-
|
|
75
|
-
TaggedSymbol =
|
|
76
|
-
T.type_alias do
|
|
77
|
-
T.all(Symbol, Dodopayments::SubscriptionOnHoldWebhookEvent::Type)
|
|
78
|
-
end
|
|
79
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
80
|
-
|
|
81
|
-
SUBSCRIPTION_ON_HOLD =
|
|
82
|
-
T.let(
|
|
83
|
-
:"subscription.on_hold",
|
|
84
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Type::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
T::Array[
|
|
90
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Type::TaggedSymbol
|
|
91
|
-
]
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
def self.values
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
65
|
end
|
|
98
66
|
end
|
|
99
67
|
end
|
|
@@ -27,11 +27,7 @@ module Dodopayments
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
29
|
# The event type
|
|
30
|
-
sig
|
|
31
|
-
returns(
|
|
32
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::TaggedSymbol
|
|
33
|
-
)
|
|
34
|
-
end
|
|
30
|
+
sig { returns(Symbol) }
|
|
35
31
|
attr_accessor :type
|
|
36
32
|
|
|
37
33
|
sig do
|
|
@@ -39,8 +35,7 @@ module Dodopayments
|
|
|
39
35
|
business_id: String,
|
|
40
36
|
data: Dodopayments::Subscription::OrHash,
|
|
41
37
|
timestamp: Time,
|
|
42
|
-
type:
|
|
43
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::OrSymbol
|
|
38
|
+
type: Symbol
|
|
44
39
|
).returns(T.attached_class)
|
|
45
40
|
end
|
|
46
41
|
def self.new(
|
|
@@ -51,7 +46,7 @@ module Dodopayments
|
|
|
51
46
|
# The timestamp of when the event occurred
|
|
52
47
|
timestamp:,
|
|
53
48
|
# The event type
|
|
54
|
-
type:
|
|
49
|
+
type: :"subscription.plan_changed"
|
|
55
50
|
)
|
|
56
51
|
end
|
|
57
52
|
|
|
@@ -61,43 +56,12 @@ module Dodopayments
|
|
|
61
56
|
business_id: String,
|
|
62
57
|
data: Dodopayments::Subscription,
|
|
63
58
|
timestamp: Time,
|
|
64
|
-
type:
|
|
65
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::TaggedSymbol
|
|
59
|
+
type: Symbol
|
|
66
60
|
}
|
|
67
61
|
)
|
|
68
62
|
end
|
|
69
63
|
def to_hash
|
|
70
64
|
end
|
|
71
|
-
|
|
72
|
-
# The event type
|
|
73
|
-
module Type
|
|
74
|
-
extend Dodopayments::Internal::Type::Enum
|
|
75
|
-
|
|
76
|
-
TaggedSymbol =
|
|
77
|
-
T.type_alias do
|
|
78
|
-
T.all(
|
|
79
|
-
Symbol,
|
|
80
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
84
|
-
|
|
85
|
-
SUBSCRIPTION_PLAN_CHANGED =
|
|
86
|
-
T.let(
|
|
87
|
-
:"subscription.plan_changed",
|
|
88
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::TaggedSymbol
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
sig do
|
|
92
|
-
override.returns(
|
|
93
|
-
T::Array[
|
|
94
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::TaggedSymbol
|
|
95
|
-
]
|
|
96
|
-
)
|
|
97
|
-
end
|
|
98
|
-
def self.values
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
65
|
end
|
|
102
66
|
end
|
|
103
67
|
end
|
|
@@ -174,11 +174,7 @@ module Dodopayments
|
|
|
174
174
|
sig { returns(T::Boolean) }
|
|
175
175
|
attr_accessor :tax_inclusive
|
|
176
176
|
|
|
177
|
-
sig
|
|
178
|
-
returns(
|
|
179
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
|
|
180
|
-
)
|
|
181
|
-
end
|
|
177
|
+
sig { returns(Symbol) }
|
|
182
178
|
attr_accessor :type
|
|
183
179
|
|
|
184
180
|
sig { returns(Integer) }
|
|
@@ -204,13 +200,12 @@ module Dodopayments
|
|
|
204
200
|
proration_factor: Float,
|
|
205
201
|
quantity: Integer,
|
|
206
202
|
tax_inclusive: T::Boolean,
|
|
207
|
-
type:
|
|
208
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::OrSymbol,
|
|
209
203
|
unit_price: Integer,
|
|
210
204
|
description: T.nilable(String),
|
|
211
205
|
name: T.nilable(String),
|
|
212
206
|
tax: T.nilable(Integer),
|
|
213
|
-
tax_rate: T.nilable(Float)
|
|
207
|
+
tax_rate: T.nilable(Float),
|
|
208
|
+
type: Symbol
|
|
214
209
|
).returns(T.attached_class)
|
|
215
210
|
end
|
|
216
211
|
def self.new(
|
|
@@ -220,12 +215,12 @@ module Dodopayments
|
|
|
220
215
|
proration_factor:,
|
|
221
216
|
quantity:,
|
|
222
217
|
tax_inclusive:,
|
|
223
|
-
type:,
|
|
224
218
|
unit_price:,
|
|
225
219
|
description: nil,
|
|
226
220
|
name: nil,
|
|
227
221
|
tax: nil,
|
|
228
|
-
tax_rate: nil
|
|
222
|
+
tax_rate: nil,
|
|
223
|
+
type: :subscription
|
|
229
224
|
)
|
|
230
225
|
end
|
|
231
226
|
|
|
@@ -238,8 +233,7 @@ module Dodopayments
|
|
|
238
233
|
proration_factor: Float,
|
|
239
234
|
quantity: Integer,
|
|
240
235
|
tax_inclusive: T::Boolean,
|
|
241
|
-
type:
|
|
242
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol,
|
|
236
|
+
type: Symbol,
|
|
243
237
|
unit_price: Integer,
|
|
244
238
|
description: T.nilable(String),
|
|
245
239
|
name: T.nilable(String),
|
|
@@ -250,35 +244,6 @@ module Dodopayments
|
|
|
250
244
|
end
|
|
251
245
|
def to_hash
|
|
252
246
|
end
|
|
253
|
-
|
|
254
|
-
module Type
|
|
255
|
-
extend Dodopayments::Internal::Type::Enum
|
|
256
|
-
|
|
257
|
-
TaggedSymbol =
|
|
258
|
-
T.type_alias do
|
|
259
|
-
T.all(
|
|
260
|
-
Symbol,
|
|
261
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type
|
|
262
|
-
)
|
|
263
|
-
end
|
|
264
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
265
|
-
|
|
266
|
-
SUBSCRIPTION =
|
|
267
|
-
T.let(
|
|
268
|
-
:subscription,
|
|
269
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
sig do
|
|
273
|
-
override.returns(
|
|
274
|
-
T::Array[
|
|
275
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
|
|
276
|
-
]
|
|
277
|
-
)
|
|
278
|
-
end
|
|
279
|
-
def self.values
|
|
280
|
-
end
|
|
281
|
-
end
|
|
282
247
|
end
|
|
283
248
|
|
|
284
249
|
class Addon < Dodopayments::Internal::Type::BaseModel
|
|
@@ -316,11 +281,7 @@ module Dodopayments
|
|
|
316
281
|
sig { returns(Float) }
|
|
317
282
|
attr_accessor :tax_rate
|
|
318
283
|
|
|
319
|
-
sig
|
|
320
|
-
returns(
|
|
321
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
|
|
322
|
-
)
|
|
323
|
-
end
|
|
284
|
+
sig { returns(Symbol) }
|
|
324
285
|
attr_accessor :type
|
|
325
286
|
|
|
326
287
|
sig { returns(Integer) }
|
|
@@ -342,11 +303,10 @@ module Dodopayments
|
|
|
342
303
|
tax_category: Dodopayments::TaxCategory::OrSymbol,
|
|
343
304
|
tax_inclusive: T::Boolean,
|
|
344
305
|
tax_rate: Float,
|
|
345
|
-
type:
|
|
346
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::OrSymbol,
|
|
347
306
|
unit_price: Integer,
|
|
348
307
|
description: T.nilable(String),
|
|
349
|
-
tax: T.nilable(Integer)
|
|
308
|
+
tax: T.nilable(Integer),
|
|
309
|
+
type: Symbol
|
|
350
310
|
).returns(T.attached_class)
|
|
351
311
|
end
|
|
352
312
|
def self.new(
|
|
@@ -360,10 +320,10 @@ module Dodopayments
|
|
|
360
320
|
tax_category:,
|
|
361
321
|
tax_inclusive:,
|
|
362
322
|
tax_rate:,
|
|
363
|
-
type:,
|
|
364
323
|
unit_price:,
|
|
365
324
|
description: nil,
|
|
366
|
-
tax: nil
|
|
325
|
+
tax: nil,
|
|
326
|
+
type: :addon
|
|
367
327
|
)
|
|
368
328
|
end
|
|
369
329
|
|
|
@@ -378,8 +338,7 @@ module Dodopayments
|
|
|
378
338
|
tax_category: Dodopayments::TaxCategory::TaggedSymbol,
|
|
379
339
|
tax_inclusive: T::Boolean,
|
|
380
340
|
tax_rate: Float,
|
|
381
|
-
type:
|
|
382
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol,
|
|
341
|
+
type: Symbol,
|
|
383
342
|
unit_price: Integer,
|
|
384
343
|
description: T.nilable(String),
|
|
385
344
|
tax: T.nilable(Integer)
|
|
@@ -388,35 +347,6 @@ module Dodopayments
|
|
|
388
347
|
end
|
|
389
348
|
def to_hash
|
|
390
349
|
end
|
|
391
|
-
|
|
392
|
-
module Type
|
|
393
|
-
extend Dodopayments::Internal::Type::Enum
|
|
394
|
-
|
|
395
|
-
TaggedSymbol =
|
|
396
|
-
T.type_alias do
|
|
397
|
-
T.all(
|
|
398
|
-
Symbol,
|
|
399
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type
|
|
400
|
-
)
|
|
401
|
-
end
|
|
402
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
403
|
-
|
|
404
|
-
ADDON =
|
|
405
|
-
T.let(
|
|
406
|
-
:addon,
|
|
407
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
|
|
408
|
-
)
|
|
409
|
-
|
|
410
|
-
sig do
|
|
411
|
-
override.returns(
|
|
412
|
-
T::Array[
|
|
413
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
|
|
414
|
-
]
|
|
415
|
-
)
|
|
416
|
-
end
|
|
417
|
-
def self.values
|
|
418
|
-
end
|
|
419
|
-
end
|
|
420
350
|
end
|
|
421
351
|
|
|
422
352
|
class Meter < Dodopayments::Internal::Type::BaseModel
|
|
@@ -455,11 +385,7 @@ module Dodopayments
|
|
|
455
385
|
sig { returns(Float) }
|
|
456
386
|
attr_accessor :tax_rate
|
|
457
387
|
|
|
458
|
-
sig
|
|
459
|
-
returns(
|
|
460
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
|
|
461
|
-
)
|
|
462
|
-
end
|
|
388
|
+
sig { returns(Symbol) }
|
|
463
389
|
attr_accessor :type
|
|
464
390
|
|
|
465
391
|
sig { returns(String) }
|
|
@@ -482,11 +408,10 @@ module Dodopayments
|
|
|
482
408
|
subtotal: Integer,
|
|
483
409
|
tax_inclusive: T::Boolean,
|
|
484
410
|
tax_rate: Float,
|
|
485
|
-
type:
|
|
486
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::OrSymbol,
|
|
487
411
|
units_consumed: String,
|
|
488
412
|
description: T.nilable(String),
|
|
489
|
-
tax: T.nilable(Integer)
|
|
413
|
+
tax: T.nilable(Integer),
|
|
414
|
+
type: Symbol
|
|
490
415
|
).returns(T.attached_class)
|
|
491
416
|
end
|
|
492
417
|
def self.new(
|
|
@@ -499,10 +424,10 @@ module Dodopayments
|
|
|
499
424
|
subtotal:,
|
|
500
425
|
tax_inclusive:,
|
|
501
426
|
tax_rate:,
|
|
502
|
-
type:,
|
|
503
427
|
units_consumed:,
|
|
504
428
|
description: nil,
|
|
505
|
-
tax: nil
|
|
429
|
+
tax: nil,
|
|
430
|
+
type: :meter
|
|
506
431
|
)
|
|
507
432
|
end
|
|
508
433
|
|
|
@@ -518,8 +443,7 @@ module Dodopayments
|
|
|
518
443
|
subtotal: Integer,
|
|
519
444
|
tax_inclusive: T::Boolean,
|
|
520
445
|
tax_rate: Float,
|
|
521
|
-
type:
|
|
522
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol,
|
|
446
|
+
type: Symbol,
|
|
523
447
|
units_consumed: String,
|
|
524
448
|
description: T.nilable(String),
|
|
525
449
|
tax: T.nilable(Integer)
|
|
@@ -528,35 +452,6 @@ module Dodopayments
|
|
|
528
452
|
end
|
|
529
453
|
def to_hash
|
|
530
454
|
end
|
|
531
|
-
|
|
532
|
-
module Type
|
|
533
|
-
extend Dodopayments::Internal::Type::Enum
|
|
534
|
-
|
|
535
|
-
TaggedSymbol =
|
|
536
|
-
T.type_alias do
|
|
537
|
-
T.all(
|
|
538
|
-
Symbol,
|
|
539
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type
|
|
540
|
-
)
|
|
541
|
-
end
|
|
542
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
543
|
-
|
|
544
|
-
METER =
|
|
545
|
-
T.let(
|
|
546
|
-
:meter,
|
|
547
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
|
|
548
|
-
)
|
|
549
|
-
|
|
550
|
-
sig do
|
|
551
|
-
override.returns(
|
|
552
|
-
T::Array[
|
|
553
|
-
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
|
|
554
|
-
]
|
|
555
|
-
)
|
|
556
|
-
end
|
|
557
|
-
def self.values
|
|
558
|
-
end
|
|
559
|
-
end
|
|
560
455
|
end
|
|
561
456
|
|
|
562
457
|
sig do
|