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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
ProductCollectionGroupResponse =
|
|
6
|
+
ProductCollections::ProductCollectionGroupResponse
|
|
7
|
+
|
|
8
|
+
module ProductCollections
|
|
9
|
+
class ProductCollectionGroupResponse < Dodopayments::Internal::Type::BaseModel
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::ProductCollections::ProductCollectionGroupResponse,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :group_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
T::Array[
|
|
24
|
+
Dodopayments::ProductCollections::Groups::ProductCollectionProduct
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
attr_accessor :products
|
|
29
|
+
|
|
30
|
+
sig { returns(T::Boolean) }
|
|
31
|
+
attr_accessor :status
|
|
32
|
+
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_accessor :group_name
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
group_id: String,
|
|
39
|
+
products:
|
|
40
|
+
T::Array[
|
|
41
|
+
Dodopayments::ProductCollections::Groups::ProductCollectionProduct::OrHash
|
|
42
|
+
],
|
|
43
|
+
status: T::Boolean,
|
|
44
|
+
group_name: T.nilable(String)
|
|
45
|
+
).returns(T.attached_class)
|
|
46
|
+
end
|
|
47
|
+
def self.new(group_id:, products:, status:, group_name: nil)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
group_id: String,
|
|
54
|
+
products:
|
|
55
|
+
T::Array[
|
|
56
|
+
Dodopayments::ProductCollections::Groups::ProductCollectionProduct
|
|
57
|
+
],
|
|
58
|
+
status: T::Boolean,
|
|
59
|
+
group_name: T.nilable(String)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
def to_hash
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -29,12 +29,27 @@ module Dodopayments
|
|
|
29
29
|
sig { returns(T.nilable(Integer)) }
|
|
30
30
|
attr_accessor :amount
|
|
31
31
|
|
|
32
|
+
# Per-checkout-session overrides for credit entitlements already attached to this
|
|
33
|
+
# product. Each entry overrides the `credits_amount` granted by the referenced
|
|
34
|
+
# credit entitlement when this checkout session is fulfilled. The
|
|
35
|
+
# credit_entitlement_id must already be attached to the product.
|
|
36
|
+
sig do
|
|
37
|
+
returns(
|
|
38
|
+
T.nilable(T::Array[Dodopayments::ProductItemReq::CreditEntitlement])
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
attr_accessor :credit_entitlements
|
|
42
|
+
|
|
32
43
|
sig do
|
|
33
44
|
params(
|
|
34
45
|
product_id: String,
|
|
35
46
|
quantity: Integer,
|
|
36
47
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
37
|
-
amount: T.nilable(Integer)
|
|
48
|
+
amount: T.nilable(Integer),
|
|
49
|
+
credit_entitlements:
|
|
50
|
+
T.nilable(
|
|
51
|
+
T::Array[Dodopayments::ProductItemReq::CreditEntitlement::OrHash]
|
|
52
|
+
)
|
|
38
53
|
).returns(T.attached_class)
|
|
39
54
|
end
|
|
40
55
|
def self.new(
|
|
@@ -50,7 +65,12 @@ module Dodopayments
|
|
|
50
65
|
#
|
|
51
66
|
# If amount is not set for pay_what_you_want product, customer is allowed to
|
|
52
67
|
# select the amount.
|
|
53
|
-
amount: nil
|
|
68
|
+
amount: nil,
|
|
69
|
+
# Per-checkout-session overrides for credit entitlements already attached to this
|
|
70
|
+
# product. Each entry overrides the `credits_amount` granted by the referenced
|
|
71
|
+
# credit entitlement when this checkout session is fulfilled. The
|
|
72
|
+
# credit_entitlement_id must already be attached to the product.
|
|
73
|
+
credit_entitlements: nil
|
|
54
74
|
)
|
|
55
75
|
end
|
|
56
76
|
|
|
@@ -60,12 +80,63 @@ module Dodopayments
|
|
|
60
80
|
product_id: String,
|
|
61
81
|
quantity: Integer,
|
|
62
82
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon]),
|
|
63
|
-
amount: T.nilable(Integer)
|
|
83
|
+
amount: T.nilable(Integer),
|
|
84
|
+
credit_entitlements:
|
|
85
|
+
T.nilable(
|
|
86
|
+
T::Array[Dodopayments::ProductItemReq::CreditEntitlement]
|
|
87
|
+
)
|
|
64
88
|
}
|
|
65
89
|
)
|
|
66
90
|
end
|
|
67
91
|
def to_hash
|
|
68
92
|
end
|
|
93
|
+
|
|
94
|
+
class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
95
|
+
OrHash =
|
|
96
|
+
T.type_alias do
|
|
97
|
+
T.any(
|
|
98
|
+
Dodopayments::ProductItemReq::CreditEntitlement,
|
|
99
|
+
Dodopayments::Internal::AnyHash
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# ID of the credit entitlement to override. Must already be attached to the
|
|
104
|
+
# product.
|
|
105
|
+
sig { returns(String) }
|
|
106
|
+
attr_accessor :credit_entitlement_id
|
|
107
|
+
|
|
108
|
+
# Number of credits to grant for this checkout session, overriding the
|
|
109
|
+
# product-level `credits_amount` set on the credit entitlement mapping. Must be
|
|
110
|
+
# greater than zero.
|
|
111
|
+
sig { returns(String) }
|
|
112
|
+
attr_accessor :credits_amount
|
|
113
|
+
|
|
114
|
+
# Per-checkout-session override for a single credit entitlement attached to a
|
|
115
|
+
# product.
|
|
116
|
+
sig do
|
|
117
|
+
params(credit_entitlement_id: String, credits_amount: String).returns(
|
|
118
|
+
T.attached_class
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
def self.new(
|
|
122
|
+
# ID of the credit entitlement to override. Must already be attached to the
|
|
123
|
+
# product.
|
|
124
|
+
credit_entitlement_id:,
|
|
125
|
+
# Number of credits to grant for this checkout session, overriding the
|
|
126
|
+
# product-level `credits_amount` set on the credit entitlement mapping. Must be
|
|
127
|
+
# greater than zero.
|
|
128
|
+
credits_amount:
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
sig do
|
|
133
|
+
override.returns(
|
|
134
|
+
{ credit_entitlement_id: String, credits_amount: String }
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
def to_hash
|
|
138
|
+
end
|
|
139
|
+
end
|
|
69
140
|
end
|
|
70
141
|
end
|
|
71
142
|
end
|
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::RefundFailedWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Refund::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"refund.failed"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,37 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Refund,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
57
|
+
type: Symbol
|
|
60
58
|
}
|
|
61
59
|
)
|
|
62
60
|
end
|
|
63
61
|
def to_hash
|
|
64
62
|
end
|
|
65
|
-
|
|
66
|
-
# The event type
|
|
67
|
-
module Type
|
|
68
|
-
extend Dodopayments::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(Symbol, Dodopayments::RefundFailedWebhookEvent::Type)
|
|
73
|
-
end
|
|
74
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
-
|
|
76
|
-
REFUND_FAILED =
|
|
77
|
-
T.let(
|
|
78
|
-
:"refund.failed",
|
|
79
|
-
Dodopayments::RefundFailedWebhookEvent::Type::TaggedSymbol
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
sig do
|
|
83
|
-
override.returns(
|
|
84
|
-
T::Array[Dodopayments::RefundFailedWebhookEvent::Type::TaggedSymbol]
|
|
85
|
-
)
|
|
86
|
-
end
|
|
87
|
-
def self.values
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
63
|
end
|
|
91
64
|
end
|
|
92
65
|
end
|
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::RefundSucceededWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Refund::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"refund.succeeded"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,39 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Refund,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
57
|
+
type: Symbol
|
|
60
58
|
}
|
|
61
59
|
)
|
|
62
60
|
end
|
|
63
61
|
def to_hash
|
|
64
62
|
end
|
|
65
|
-
|
|
66
|
-
# The event type
|
|
67
|
-
module Type
|
|
68
|
-
extend Dodopayments::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(Symbol, Dodopayments::RefundSucceededWebhookEvent::Type)
|
|
73
|
-
end
|
|
74
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
-
|
|
76
|
-
REFUND_SUCCEEDED =
|
|
77
|
-
T.let(
|
|
78
|
-
:"refund.succeeded",
|
|
79
|
-
Dodopayments::RefundSucceededWebhookEvent::Type::TaggedSymbol
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
sig do
|
|
83
|
-
override.returns(
|
|
84
|
-
T::Array[
|
|
85
|
-
Dodopayments::RefundSucceededWebhookEvent::Type::TaggedSymbol
|
|
86
|
-
]
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
def self.values
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
63
|
end
|
|
93
64
|
end
|
|
94
65
|
end
|
|
@@ -134,14 +134,23 @@ module Dodopayments
|
|
|
134
134
|
sig { returns(T.nilable(T::Array[Dodopayments::CustomFieldResponse])) }
|
|
135
135
|
attr_accessor :custom_field_responses
|
|
136
136
|
|
|
137
|
-
#
|
|
137
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
138
|
+
# the invoice in place of the customer's personal name.
|
|
139
|
+
sig { returns(T.nilable(String)) }
|
|
140
|
+
attr_accessor :customer_business_name
|
|
141
|
+
|
|
142
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
138
143
|
sig { returns(T.nilable(Integer)) }
|
|
139
144
|
attr_accessor :discount_cycles_remaining
|
|
140
145
|
|
|
141
|
-
#
|
|
146
|
+
# DEPRECATED: Use discounts instead. Returns the first discount's ID if present.
|
|
142
147
|
sig { returns(T.nilable(String)) }
|
|
143
148
|
attr_accessor :discount_id
|
|
144
149
|
|
|
150
|
+
# All stacked discounts applied, ordered by position
|
|
151
|
+
sig { returns(T.nilable(T::Array[Dodopayments::DiscountDetail])) }
|
|
152
|
+
attr_accessor :discounts
|
|
153
|
+
|
|
145
154
|
# Timestamp when the subscription will expire
|
|
146
155
|
sig { returns(T.nilable(Time)) }
|
|
147
156
|
attr_accessor :expires_at
|
|
@@ -200,8 +209,10 @@ module Dodopayments
|
|
|
200
209
|
cancelled_at: T.nilable(Time),
|
|
201
210
|
custom_field_responses:
|
|
202
211
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse::OrHash]),
|
|
212
|
+
customer_business_name: T.nilable(String),
|
|
203
213
|
discount_cycles_remaining: T.nilable(Integer),
|
|
204
214
|
discount_id: T.nilable(String),
|
|
215
|
+
discounts: T.nilable(T::Array[Dodopayments::DiscountDetail::OrHash]),
|
|
205
216
|
expires_at: T.nilable(Time),
|
|
206
217
|
payment_method_id: T.nilable(String),
|
|
207
218
|
scheduled_change:
|
|
@@ -268,10 +279,15 @@ module Dodopayments
|
|
|
268
279
|
cancelled_at: nil,
|
|
269
280
|
# Customer's responses to custom fields collected during checkout
|
|
270
281
|
custom_field_responses: nil,
|
|
271
|
-
#
|
|
282
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
283
|
+
# the invoice in place of the customer's personal name.
|
|
284
|
+
customer_business_name: nil,
|
|
285
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
272
286
|
discount_cycles_remaining: nil,
|
|
273
|
-
#
|
|
287
|
+
# DEPRECATED: Use discounts instead. Returns the first discount's ID if present.
|
|
274
288
|
discount_id: nil,
|
|
289
|
+
# All stacked discounts applied, ordered by position
|
|
290
|
+
discounts: nil,
|
|
275
291
|
# Timestamp when the subscription will expire
|
|
276
292
|
expires_at: nil,
|
|
277
293
|
# Saved payment method id used for recurring charges
|
|
@@ -320,8 +336,10 @@ module Dodopayments
|
|
|
320
336
|
cancelled_at: T.nilable(Time),
|
|
321
337
|
custom_field_responses:
|
|
322
338
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse]),
|
|
339
|
+
customer_business_name: T.nilable(String),
|
|
323
340
|
discount_cycles_remaining: T.nilable(Integer),
|
|
324
341
|
discount_id: T.nilable(String),
|
|
342
|
+
discounts: T.nilable(T::Array[Dodopayments::DiscountDetail]),
|
|
325
343
|
expires_at: T.nilable(Time),
|
|
326
344
|
payment_method_id: T.nilable(String),
|
|
327
345
|
scheduled_change: T.nilable(Dodopayments::ScheduledPlanChange),
|
|
@@ -27,11 +27,7 @@ module Dodopayments
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
29
|
# The event type
|
|
30
|
-
sig
|
|
31
|
-
returns(
|
|
32
|
-
Dodopayments::SubscriptionActiveWebhookEvent::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.active"
|
|
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::SubscriptionActiveWebhookEvent::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::SubscriptionActiveWebhookEvent::Type)
|
|
78
|
-
end
|
|
79
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
80
|
-
|
|
81
|
-
SUBSCRIPTION_ACTIVE =
|
|
82
|
-
T.let(
|
|
83
|
-
:"subscription.active",
|
|
84
|
-
Dodopayments::SubscriptionActiveWebhookEvent::Type::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
T::Array[
|
|
90
|
-
Dodopayments::SubscriptionActiveWebhookEvent::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::SubscriptionCancelledWebhookEvent::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.cancelled"
|
|
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::SubscriptionCancelledWebhookEvent::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::SubscriptionCancelledWebhookEvent::Type)
|
|
78
|
-
end
|
|
79
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
80
|
-
|
|
81
|
-
SUBSCRIPTION_CANCELLED =
|
|
82
|
-
T.let(
|
|
83
|
-
:"subscription.cancelled",
|
|
84
|
-
Dodopayments::SubscriptionCancelledWebhookEvent::Type::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
T::Array[
|
|
90
|
-
Dodopayments::SubscriptionCancelledWebhookEvent::Type::TaggedSymbol
|
|
91
|
-
]
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
def self.values
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
65
|
end
|
|
98
66
|
end
|
|
99
67
|
end
|
|
@@ -57,10 +57,22 @@ module Dodopayments
|
|
|
57
57
|
sig { returns(T.nilable(Dodopayments::Currency::OrSymbol)) }
|
|
58
58
|
attr_accessor :billing_currency
|
|
59
59
|
|
|
60
|
-
#
|
|
60
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
61
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
62
|
+
# invoice instead of the customer's personal name.
|
|
63
|
+
sig { returns(T.nilable(String)) }
|
|
64
|
+
attr_accessor :customer_business_name
|
|
65
|
+
|
|
66
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
67
|
+
# discount_codes.
|
|
61
68
|
sig { returns(T.nilable(String)) }
|
|
62
69
|
attr_accessor :discount_code
|
|
63
70
|
|
|
71
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
72
|
+
# together with discount_code.
|
|
73
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
74
|
+
attr_accessor :discount_codes
|
|
75
|
+
|
|
64
76
|
# Override merchant default 3DS behaviour for this subscription
|
|
65
77
|
sig { returns(T.nilable(T::Boolean)) }
|
|
66
78
|
attr_accessor :force_3ds
|
|
@@ -162,7 +174,9 @@ module Dodopayments
|
|
|
162
174
|
allowed_payment_method_types:
|
|
163
175
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
164
176
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
177
|
+
customer_business_name: T.nilable(String),
|
|
165
178
|
discount_code: T.nilable(String),
|
|
179
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
166
180
|
force_3ds: T.nilable(T::Boolean),
|
|
167
181
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
168
182
|
metadata: T::Hash[Symbol, String],
|
|
@@ -202,8 +216,16 @@ module Dodopayments
|
|
|
202
216
|
# Fix the currency in which the end customer is billed. If Dodo Payments cannot
|
|
203
217
|
# support that currency for this transaction, it will not proceed
|
|
204
218
|
billing_currency: nil,
|
|
205
|
-
#
|
|
219
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
220
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
221
|
+
# invoice instead of the customer's personal name.
|
|
222
|
+
customer_business_name: nil,
|
|
223
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
224
|
+
# discount_codes.
|
|
206
225
|
discount_code: nil,
|
|
226
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
227
|
+
# together with discount_code.
|
|
228
|
+
discount_codes: nil,
|
|
207
229
|
# Override merchant default 3DS behaviour for this subscription
|
|
208
230
|
force_3ds: nil,
|
|
209
231
|
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
@@ -263,7 +285,9 @@ module Dodopayments
|
|
|
263
285
|
allowed_payment_method_types:
|
|
264
286
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
265
287
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
288
|
+
customer_business_name: T.nilable(String),
|
|
266
289
|
discount_code: T.nilable(String),
|
|
290
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
267
291
|
force_3ds: T.nilable(T::Boolean),
|
|
268
292
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
269
293
|
metadata: T::Hash[Symbol, String],
|
|
@@ -46,10 +46,15 @@ module Dodopayments
|
|
|
46
46
|
sig { returns(T.nilable(String)) }
|
|
47
47
|
attr_accessor :client_secret
|
|
48
48
|
|
|
49
|
-
#
|
|
49
|
+
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
50
|
+
# present.
|
|
50
51
|
sig { returns(T.nilable(String)) }
|
|
51
52
|
attr_accessor :discount_id
|
|
52
53
|
|
|
54
|
+
# All stacked discount IDs applied, in order of application
|
|
55
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
56
|
+
attr_accessor :discount_ids
|
|
57
|
+
|
|
53
58
|
# Expiry timestamp of the payment link
|
|
54
59
|
sig { returns(T.nilable(Time)) }
|
|
55
60
|
attr_accessor :expires_on
|
|
@@ -80,6 +85,7 @@ module Dodopayments
|
|
|
80
85
|
subscription_id: String,
|
|
81
86
|
client_secret: T.nilable(String),
|
|
82
87
|
discount_id: T.nilable(String),
|
|
88
|
+
discount_ids: T.nilable(T::Array[String]),
|
|
83
89
|
expires_on: T.nilable(Time),
|
|
84
90
|
one_time_product_cart:
|
|
85
91
|
T.nilable(
|
|
@@ -107,8 +113,11 @@ module Dodopayments
|
|
|
107
113
|
# Client secret used to load Dodo checkout SDK NOTE : Dodo checkout SDK will be
|
|
108
114
|
# coming soon
|
|
109
115
|
client_secret: nil,
|
|
110
|
-
#
|
|
116
|
+
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
117
|
+
# present.
|
|
111
118
|
discount_id: nil,
|
|
119
|
+
# All stacked discount IDs applied, in order of application
|
|
120
|
+
discount_ids: nil,
|
|
112
121
|
# Expiry timestamp of the payment link
|
|
113
122
|
expires_on: nil,
|
|
114
123
|
# One time products associated with the purchase of subscription
|
|
@@ -129,6 +138,7 @@ module Dodopayments
|
|
|
129
138
|
subscription_id: String,
|
|
130
139
|
client_secret: T.nilable(String),
|
|
131
140
|
discount_id: T.nilable(String),
|
|
141
|
+
discount_ids: T.nilable(T::Array[String]),
|
|
132
142
|
expires_on: T.nilable(Time),
|
|
133
143
|
one_time_product_cart:
|
|
134
144
|
T.nilable(
|