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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37a5895dd2b5d696adb46dd626413dbbf90366649cc8dbc064f551fa9c479cfd
|
|
4
|
+
data.tar.gz: 7a0d7cc47bf89c6de92c1018078438c8209a8bdb16f72c746f867e48a868f2f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4081412b2c3f6a61b73f4b9f5fe0aa570250e523cb0675f39a5d6ef242e66a086ca4b0b0a3546b607a1e8bc0d51e5fb267a4330b66d309a90f076f1267347973
|
|
7
|
+
data.tar.gz: 81c5473276481eff28bb2a62757133119f160a7c83abce993662a0073d90807f85a12cc3e2edd29117b9befb1944fabfa0b7a6d8b629ab0f22a3220ab58588ff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.11.0 (2026-05-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.10.0...v2.11.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.10.0...v2.11.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** fixed a breaking modal change ([ca90fef](https://github.com/dodopayments/dodopayments-ruby/commit/ca90fef9200c68c0686261728a7d1add4820cdb5))
|
|
10
|
+
* **api:** stainless fixes ([3b16e3f](https://github.com/dodopayments/dodopayments-ruby/commit/3b16e3f755914b312d060f705631c8e5f172beb7))
|
|
11
|
+
* **api:** updated openapi spec to v1.99.0 and added missing endpoints as well ([11e4b50](https://github.com/dodopayments/dodopayments-ruby/commit/11e4b50fb9a96cad609583025a02490e58677296))
|
|
12
|
+
|
|
13
|
+
## 2.10.0 (2026-05-14)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v2.9.1...v2.10.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.9.1...v2.10.0)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **api:** manual updates ([5bea624](https://github.com/dodopayments/dodopayments-ruby/commit/5bea6246c3a998c3587e24a9c345a41000a87e31))
|
|
20
|
+
* **api:** updated openapi spec to 1.98.0 ([4747cdf](https://github.com/dodopayments/dodopayments-ruby/commit/4747cdf437c49a58c4e70908e08e4bd853dd0859))
|
|
21
|
+
* **api:** updated openapi spec to v1.97.10 ([4b79dec](https://github.com/dodopayments/dodopayments-ruby/commit/4b79dec6275293cce30c1db6d682eeb4ee1f69b7))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **client:** elide content type header on requests without body ([036bd33](https://github.com/dodopayments/dodopayments-ruby/commit/036bd33ad42365dfd68d18274297dcb46887ab94))
|
|
27
|
+
|
|
3
28
|
## 2.9.1 (2026-05-04)
|
|
4
29
|
|
|
5
30
|
Full Changelog: [v2.9.0...v2.9.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.9.0...v2.9.1)
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "dodopayments", "~> 2.
|
|
29
|
+
gem "dodopayments", "~> 2.11.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -42,7 +42,7 @@ dodo_payments = Dodopayments::Client.new(
|
|
|
42
42
|
environment: "test_mode" # defaults to "live_mode"
|
|
43
43
|
)
|
|
44
44
|
|
|
45
|
-
checkout_session_response = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "
|
|
45
|
+
checkout_session_response = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
|
|
46
46
|
|
|
47
47
|
puts(checkout_session_response.session_id)
|
|
48
48
|
```
|
|
@@ -81,7 +81,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
|
|
|
81
81
|
|
|
82
82
|
```ruby
|
|
83
83
|
begin
|
|
84
|
-
checkout_session = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "
|
|
84
|
+
checkout_session = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
|
|
85
85
|
rescue Dodopayments::Errors::APIConnectionError => e
|
|
86
86
|
puts("The server could not be reached")
|
|
87
87
|
puts(e.cause) # an underlying Exception, likely raised within `net/http`
|
|
@@ -125,7 +125,7 @@ dodo_payments = Dodopayments::Client.new(
|
|
|
125
125
|
|
|
126
126
|
# Or, configure per-request:
|
|
127
127
|
dodo_payments.checkout_sessions.create(
|
|
128
|
-
product_cart: [{product_id: "
|
|
128
|
+
product_cart: [{product_id: "pdt_example", quantity: 1}],
|
|
129
129
|
request_options: {max_retries: 5}
|
|
130
130
|
)
|
|
131
131
|
```
|
|
@@ -142,7 +142,7 @@ dodo_payments = Dodopayments::Client.new(
|
|
|
142
142
|
|
|
143
143
|
# Or, configure per-request:
|
|
144
144
|
dodo_payments.checkout_sessions.create(
|
|
145
|
-
product_cart: [{product_id: "
|
|
145
|
+
product_cart: [{product_id: "pdt_example", quantity: 1}],
|
|
146
146
|
request_options: {timeout: 5}
|
|
147
147
|
)
|
|
148
148
|
```
|
|
@@ -176,7 +176,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
|
|
|
176
176
|
```ruby
|
|
177
177
|
checkout_session_response =
|
|
178
178
|
dodo_payments.checkout_sessions.create(
|
|
179
|
-
product_cart: [{product_id: "
|
|
179
|
+
product_cart: [{product_id: "pdt_example", quantity: 1}],
|
|
180
180
|
request_options: {
|
|
181
181
|
extra_query: {my_query_parameter: value},
|
|
182
182
|
extra_body: {my_body_parameter: value},
|
|
@@ -223,7 +223,7 @@ You can provide typesafe request parameters like so:
|
|
|
223
223
|
|
|
224
224
|
```ruby
|
|
225
225
|
dodo_payments.checkout_sessions.create(
|
|
226
|
-
product_cart: [Dodopayments::ProductItemReq.new(product_id: "
|
|
226
|
+
product_cart: [Dodopayments::ProductItemReq.new(product_id: "pdt_example", quantity: 1)]
|
|
227
227
|
)
|
|
228
228
|
```
|
|
229
229
|
|
|
@@ -231,11 +231,11 @@ Or, equivalently:
|
|
|
231
231
|
|
|
232
232
|
```ruby
|
|
233
233
|
# Hashes work, but are not typesafe:
|
|
234
|
-
dodo_payments.checkout_sessions.create(product_cart: [{product_id: "
|
|
234
|
+
dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
|
|
235
235
|
|
|
236
236
|
# You can also splat a full Params class:
|
|
237
237
|
params = Dodopayments::CheckoutSessionCreateParams.new(
|
|
238
|
-
product_cart: [Dodopayments::ProductItemReq.new(product_id: "
|
|
238
|
+
product_cart: [Dodopayments::ProductItemReq.new(product_id: "pdt_example", quantity: 1)]
|
|
239
239
|
)
|
|
240
240
|
dodo_payments.checkout_sessions.create(**params)
|
|
241
241
|
```
|
data/lib/dodopayments/client.rb
CHANGED
|
@@ -96,6 +96,9 @@ module Dodopayments
|
|
|
96
96
|
# @return [Dodopayments::Resources::Entitlements]
|
|
97
97
|
attr_reader :entitlements
|
|
98
98
|
|
|
99
|
+
# @return [Dodopayments::Resources::ProductCollections]
|
|
100
|
+
attr_reader :product_collections
|
|
101
|
+
|
|
99
102
|
# @api private
|
|
100
103
|
#
|
|
101
104
|
# @return [Hash{String=>String}]
|
|
@@ -195,6 +198,7 @@ module Dodopayments
|
|
|
195
198
|
@balances = Dodopayments::Resources::Balances.new(client: self)
|
|
196
199
|
@credit_entitlements = Dodopayments::Resources::CreditEntitlements.new(client: self)
|
|
197
200
|
@entitlements = Dodopayments::Resources::Entitlements.new(client: self)
|
|
201
|
+
@product_collections = Dodopayments::Resources::ProductCollections.new(client: self)
|
|
198
202
|
end
|
|
199
203
|
end
|
|
200
204
|
end
|
|
@@ -306,6 +306,8 @@ module Dodopayments
|
|
|
306
306
|
Dodopayments::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
headers.delete("content-type") if body.nil?
|
|
310
|
+
|
|
309
311
|
url = Dodopayments::Internal::Util.join_parsed_uri(
|
|
310
312
|
@base_url_components,
|
|
311
313
|
{**req, path: path, query: query}
|
|
@@ -6,14 +6,28 @@ module Dodopayments
|
|
|
6
6
|
# @api private
|
|
7
7
|
#
|
|
8
8
|
# @example
|
|
9
|
-
# # `
|
|
10
|
-
# case
|
|
11
|
-
# when Dodopayments::
|
|
12
|
-
# puts(
|
|
13
|
-
# when Dodopayments::
|
|
14
|
-
# puts(
|
|
9
|
+
# # `price` is a `Dodopayments::Price`
|
|
10
|
+
# case price
|
|
11
|
+
# when Dodopayments::Price::OneTimePrice
|
|
12
|
+
# puts(price.currency)
|
|
13
|
+
# when Dodopayments::Price::RecurringPrice
|
|
14
|
+
# puts(price.discount)
|
|
15
|
+
# when Dodopayments::Price::UsageBasedPrice
|
|
16
|
+
# puts(price.fixed_price)
|
|
15
17
|
# else
|
|
16
|
-
# puts(
|
|
18
|
+
# puts(price)
|
|
19
|
+
# end
|
|
20
|
+
#
|
|
21
|
+
# @example
|
|
22
|
+
# case price
|
|
23
|
+
# in {type: :one_time_price, currency: currency, discount: discount, price: price}
|
|
24
|
+
# puts(currency)
|
|
25
|
+
# in {type: :recurring_price, currency: currency, discount: discount, payment_frequency_count: payment_frequency_count}
|
|
26
|
+
# puts(discount)
|
|
27
|
+
# in {type: :usage_based_price, currency: currency, discount: discount, fixed_price: fixed_price}
|
|
28
|
+
# puts(fixed_price)
|
|
29
|
+
# else
|
|
30
|
+
# puts(price)
|
|
17
31
|
# end
|
|
18
32
|
module Union
|
|
19
33
|
include Dodopayments::Internal::Type::Converter
|
|
@@ -25,10 +25,10 @@ module Dodopayments
|
|
|
25
25
|
# @!attribute type
|
|
26
26
|
# The event type
|
|
27
27
|
#
|
|
28
|
-
# @return [Symbol,
|
|
29
|
-
required :type,
|
|
28
|
+
# @return [Symbol, :"abandoned_checkout.detected"]
|
|
29
|
+
required :type, const: :"abandoned_checkout.detected"
|
|
30
30
|
|
|
31
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"abandoned_checkout.detected")
|
|
32
32
|
# Some parameter documentations has been truncated, see
|
|
33
33
|
# {Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent} for more details.
|
|
34
34
|
#
|
|
@@ -38,7 +38,7 @@ module Dodopayments
|
|
|
38
38
|
#
|
|
39
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
40
40
|
#
|
|
41
|
-
# @param type [Symbol,
|
|
41
|
+
# @param type [Symbol, :"abandoned_checkout.detected"] The event type
|
|
42
42
|
|
|
43
43
|
# @see Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent#data
|
|
44
44
|
class Data < Dodopayments::Internal::Type::BaseModel
|
|
@@ -109,18 +109,6 @@ module Dodopayments
|
|
|
109
109
|
# @return [Array<Symbol>]
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
|
-
|
|
113
|
-
# The event type
|
|
114
|
-
#
|
|
115
|
-
# @see Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent#type
|
|
116
|
-
module Type
|
|
117
|
-
extend Dodopayments::Internal::Type::Enum
|
|
118
|
-
|
|
119
|
-
ABANDONED_CHECKOUT_DETECTED = :"abandoned_checkout.detected"
|
|
120
|
-
|
|
121
|
-
# @!method self.values
|
|
122
|
-
# @return [Array<Symbol>]
|
|
123
|
-
end
|
|
124
112
|
end
|
|
125
113
|
end
|
|
126
114
|
end
|
|
@@ -25,10 +25,10 @@ module Dodopayments
|
|
|
25
25
|
# @!attribute type
|
|
26
26
|
# The event type
|
|
27
27
|
#
|
|
28
|
-
# @return [Symbol,
|
|
29
|
-
required :type,
|
|
28
|
+
# @return [Symbol, :"abandoned_checkout.recovered"]
|
|
29
|
+
required :type, const: :"abandoned_checkout.recovered"
|
|
30
30
|
|
|
31
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"abandoned_checkout.recovered")
|
|
32
32
|
# Some parameter documentations has been truncated, see
|
|
33
33
|
# {Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent} for more details.
|
|
34
34
|
#
|
|
@@ -38,7 +38,7 @@ module Dodopayments
|
|
|
38
38
|
#
|
|
39
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
40
40
|
#
|
|
41
|
-
# @param type [Symbol,
|
|
41
|
+
# @param type [Symbol, :"abandoned_checkout.recovered"] The event type
|
|
42
42
|
|
|
43
43
|
# @see Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent#data
|
|
44
44
|
class Data < Dodopayments::Internal::Type::BaseModel
|
|
@@ -109,18 +109,6 @@ module Dodopayments
|
|
|
109
109
|
# @return [Array<Symbol>]
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
|
-
|
|
113
|
-
# The event type
|
|
114
|
-
#
|
|
115
|
-
# @see Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent#type
|
|
116
|
-
module Type
|
|
117
|
-
extend Dodopayments::Internal::Type::Enum
|
|
118
|
-
|
|
119
|
-
ABANDONED_CHECKOUT_RECOVERED = :"abandoned_checkout.recovered"
|
|
120
|
-
|
|
121
|
-
# @!method self.values
|
|
122
|
-
# @return [Array<Symbol>]
|
|
123
|
-
end
|
|
124
112
|
end
|
|
125
113
|
end
|
|
126
114
|
end
|
|
@@ -11,6 +11,18 @@ module Dodopayments
|
|
|
11
11
|
# @return [Boolean, nil]
|
|
12
12
|
optional :allow_currency_selection, Dodopayments::Internal::Type::Boolean
|
|
13
13
|
|
|
14
|
+
# @!attribute allow_customer_editing_business_name
|
|
15
|
+
# If true, the customer can supply or edit the business name associated with the
|
|
16
|
+
# tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
|
|
17
|
+
# either flag (or `allow_tax_id`) is sufficient to let the customer override the
|
|
18
|
+
# session's business name. Typically set together with
|
|
19
|
+
# `allow_customer_editing_tax_id`.
|
|
20
|
+
#
|
|
21
|
+
# Default is false
|
|
22
|
+
#
|
|
23
|
+
# @return [Boolean, nil]
|
|
24
|
+
optional :allow_customer_editing_business_name, Dodopayments::Internal::Type::Boolean
|
|
25
|
+
|
|
14
26
|
# @!attribute allow_customer_editing_city
|
|
15
27
|
#
|
|
16
28
|
# @return [Boolean, nil]
|
|
@@ -101,12 +113,14 @@ module Dodopayments
|
|
|
101
113
|
# @return [Boolean, nil]
|
|
102
114
|
optional :require_phone_number, Dodopayments::Internal::Type::Boolean
|
|
103
115
|
|
|
104
|
-
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
|
|
116
|
+
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
|
|
105
117
|
# Some parameter documentations has been truncated, see
|
|
106
118
|
# {Dodopayments::Models::CheckoutSessionFlags} for more details.
|
|
107
119
|
#
|
|
108
120
|
# @param allow_currency_selection [Boolean] if customer is allowed to change currency, set it to true
|
|
109
121
|
#
|
|
122
|
+
# @param allow_customer_editing_business_name [Boolean] If true, the customer can supply or edit the business name associated
|
|
123
|
+
#
|
|
110
124
|
# @param allow_customer_editing_city [Boolean]
|
|
111
125
|
#
|
|
112
126
|
# @param allow_customer_editing_country [Boolean]
|
|
@@ -61,6 +61,14 @@ module Dodopayments
|
|
|
61
61
|
# @return [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil]
|
|
62
62
|
optional :customer, union: -> { Dodopayments::CustomerRequest }, nil?: true
|
|
63
63
|
|
|
64
|
+
# @!attribute customer_business_name
|
|
65
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
66
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
67
|
+
# invoice instead of the customer's personal name.
|
|
68
|
+
#
|
|
69
|
+
# @return [String, nil]
|
|
70
|
+
optional :customer_business_name, String, nil?: true
|
|
71
|
+
|
|
64
72
|
# @!attribute customization
|
|
65
73
|
# Customization for the checkout session page
|
|
66
74
|
#
|
|
@@ -68,10 +76,21 @@ module Dodopayments
|
|
|
68
76
|
optional :customization, -> { Dodopayments::CheckoutSessionCustomization }
|
|
69
77
|
|
|
70
78
|
# @!attribute discount_code
|
|
79
|
+
# @deprecated Use `discount_id` instead.
|
|
80
|
+
#
|
|
81
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
82
|
+
# discount_codes.
|
|
71
83
|
#
|
|
72
84
|
# @return [String, nil]
|
|
73
85
|
optional :discount_code, String, nil?: true
|
|
74
86
|
|
|
87
|
+
# @!attribute discount_codes
|
|
88
|
+
# Stacked discount codes to apply, in order. Max 20. Cannot be used together with
|
|
89
|
+
# discount_code.
|
|
90
|
+
#
|
|
91
|
+
# @return [Array<String>, nil]
|
|
92
|
+
optional :discount_codes, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
93
|
+
|
|
75
94
|
# @!attribute feature_flags
|
|
76
95
|
#
|
|
77
96
|
# @return [Dodopayments::Models::CheckoutSessionFlags, nil]
|
|
@@ -151,7 +170,7 @@ module Dodopayments
|
|
|
151
170
|
# @return [String, nil]
|
|
152
171
|
optional :tax_id, String, nil?: true
|
|
153
172
|
|
|
154
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
|
|
173
|
+
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customer_business_name: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
|
|
155
174
|
# Some parameter documentations has been truncated, see
|
|
156
175
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
157
176
|
#
|
|
@@ -171,9 +190,13 @@ module Dodopayments
|
|
|
171
190
|
#
|
|
172
191
|
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Customer details for the session
|
|
173
192
|
#
|
|
193
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
194
|
+
#
|
|
174
195
|
# @param customization [Dodopayments::Models::CheckoutSessionCustomization] Customization for the checkout session page
|
|
175
196
|
#
|
|
176
|
-
# @param discount_code [String, nil]
|
|
197
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
198
|
+
#
|
|
199
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order. Max 20.
|
|
177
200
|
#
|
|
178
201
|
# @param feature_flags [Dodopayments::Models::CheckoutSessionFlags]
|
|
179
202
|
#
|
|
@@ -16,10 +16,42 @@ module Dodopayments
|
|
|
16
16
|
# @return [String, nil]
|
|
17
17
|
optional :checkout_url, String, nil?: true
|
|
18
18
|
|
|
19
|
-
# @!
|
|
19
|
+
# @!attribute client_secret
|
|
20
|
+
# Client secret used to load the Dodo Payments checkout SDK. Returned when
|
|
21
|
+
# `confirm: true` was passed and a PaymentIntent was created at session-creation
|
|
22
|
+
# time. `None` otherwise.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :client_secret, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute payment_id
|
|
28
|
+
# Underlying payment id when `confirm: true` was passed and a PaymentIntent was
|
|
29
|
+
# created at session-creation time. `None` otherwise.
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :payment_id, String, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute publishable_key
|
|
35
|
+
# Publishable key for the Dodo Payments checkout SDK. Returned when
|
|
36
|
+
# `confirm: true` was passed and a PaymentIntent was created at session-creation
|
|
37
|
+
# time. `None` otherwise.
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :publishable_key, String, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!method initialize(session_id:, checkout_url: nil, client_secret: nil, payment_id: nil, publishable_key: nil)
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Dodopayments::Models::CheckoutSessionResponse} for more details.
|
|
45
|
+
#
|
|
20
46
|
# @param session_id [String] The ID of the created checkout session
|
|
21
47
|
#
|
|
22
48
|
# @param checkout_url [String, nil] Checkout url (None when payment_method_id is provided)
|
|
49
|
+
#
|
|
50
|
+
# @param client_secret [String, nil] Client secret used to load the Dodo Payments checkout SDK. Returned when
|
|
51
|
+
#
|
|
52
|
+
# @param payment_id [String, nil] Underlying payment id when `confirm: true` was passed and a PaymentIntent
|
|
53
|
+
#
|
|
54
|
+
# @param publishable_key [String, nil] Publishable key for the Dodo Payments checkout SDK. Returned when
|
|
23
55
|
end
|
|
24
56
|
end
|
|
25
57
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.added"]
|
|
28
|
+
required :type, const: :"credit.added"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.added")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditAddedWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_ADDED = :"credit.added"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.added"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -24,17 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.balance_low"]
|
|
28
|
+
required :type, const: :"credit.balance_low"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.balance_low")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditBalanceLowWebhookEvent::Data] Webhook payload for credit.balance_low event
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
37
|
+
# @param type [Symbol, :"credit.balance_low"] The event type
|
|
38
38
|
|
|
39
39
|
# @see Dodopayments::Models::CreditBalanceLowWebhookEvent#data
|
|
40
40
|
class Data < Dodopayments::Internal::Type::BaseModel
|
|
@@ -90,18 +90,6 @@ module Dodopayments
|
|
|
90
90
|
# @param threshold_amount [String]
|
|
91
91
|
# @param threshold_percent [Integer]
|
|
92
92
|
end
|
|
93
|
-
|
|
94
|
-
# The event type
|
|
95
|
-
#
|
|
96
|
-
# @see Dodopayments::Models::CreditBalanceLowWebhookEvent#type
|
|
97
|
-
module Type
|
|
98
|
-
extend Dodopayments::Internal::Type::Enum
|
|
99
|
-
|
|
100
|
-
CREDIT_BALANCE_LOW = :"credit.balance_low"
|
|
101
|
-
|
|
102
|
-
# @!method self.values
|
|
103
|
-
# @return [Array<Symbol>]
|
|
104
|
-
end
|
|
105
93
|
end
|
|
106
94
|
end
|
|
107
95
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.deducted"]
|
|
28
|
+
required :type, const: :"credit.deducted"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.deducted")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditDeductedWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_DEDUCTED = :"credit.deducted"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.deducted"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.expired"]
|
|
28
|
+
required :type, const: :"credit.expired"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.expired")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditExpiredWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_EXPIRED = :"credit.expired"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.expired"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.manual_adjustment"]
|
|
28
|
+
required :type, const: :"credit.manual_adjustment"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.manual_adjustment")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditManualAdjustmentWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_MANUAL_ADJUSTMENT = :"credit.manual_adjustment"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.manual_adjustment"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.overage_charged"]
|
|
28
|
+
required :type, const: :"credit.overage_charged"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.overage_charged")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditOverageChargedWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_OVERAGE_CHARGED = :"credit.overage_charged"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.overage_charged"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -24,29 +24,17 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute type
|
|
25
25
|
# The event type
|
|
26
26
|
#
|
|
27
|
-
# @return [Symbol,
|
|
28
|
-
required :type,
|
|
27
|
+
# @return [Symbol, :"credit.overage_reset"]
|
|
28
|
+
required :type, const: :"credit.overage_reset"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"credit.overage_reset")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
|
-
# @param type [Symbol,
|
|
38
|
-
|
|
39
|
-
# The event type
|
|
40
|
-
#
|
|
41
|
-
# @see Dodopayments::Models::CreditOverageResetWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
CREDIT_OVERAGE_RESET = :"credit.overage_reset"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"credit.overage_reset"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|