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,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class ProductCollectionGroupDetails < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute products
|
|
8
|
+
# Products in this group
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Dodopayments::Models::ProductCollections::GroupProduct>]
|
|
11
|
+
required :products,
|
|
12
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::GroupProduct] }
|
|
13
|
+
|
|
14
|
+
# @!attribute group_name
|
|
15
|
+
# Optional group name. Multiple groups can have null names, but named groups must
|
|
16
|
+
# be unique per collection
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :group_name, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute status
|
|
22
|
+
# Status of the group (defaults to true if not provided)
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean, nil]
|
|
25
|
+
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!method initialize(products:, group_name: nil, status: nil)
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails} for
|
|
30
|
+
# more details.
|
|
31
|
+
#
|
|
32
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Products in this group
|
|
33
|
+
#
|
|
34
|
+
# @param group_name [String, nil] Optional group name. Multiple groups can have null names, but named groups must
|
|
35
|
+
#
|
|
36
|
+
# @param status [Boolean, nil] Status of the group (defaults to true if not provided)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
ProductCollectionGroupDetails = ProductCollections::ProductCollectionGroupDetails
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
# @see Dodopayments::Resources::ProductCollections::Groups#create
|
|
7
|
+
class ProductCollectionGroupResponse < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute group_id
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :group_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute products
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<Dodopayments::Models::ProductCollections::Groups::ProductCollectionProduct>]
|
|
16
|
+
required :products,
|
|
17
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::Groups::ProductCollectionProduct] }
|
|
18
|
+
|
|
19
|
+
# @!attribute status
|
|
20
|
+
#
|
|
21
|
+
# @return [Boolean]
|
|
22
|
+
required :status, Dodopayments::Internal::Type::Boolean
|
|
23
|
+
|
|
24
|
+
# @!attribute group_name
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :group_name, String, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!method initialize(group_id:, products:, status:, group_name: nil)
|
|
30
|
+
# @param group_id [String]
|
|
31
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::Groups::ProductCollectionProduct>]
|
|
32
|
+
# @param status [Boolean]
|
|
33
|
+
# @param group_name [String, nil]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
ProductCollectionGroupResponse = ProductCollections::ProductCollectionGroupResponse
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -70,7 +70,7 @@ module Dodopayments
|
|
|
70
70
|
nil?: true
|
|
71
71
|
|
|
72
72
|
# @!attribute license_key_activation_message
|
|
73
|
-
# @deprecated
|
|
73
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
74
74
|
#
|
|
75
75
|
# Optional message displayed during license key activation
|
|
76
76
|
#
|
|
@@ -81,7 +81,7 @@ module Dodopayments
|
|
|
81
81
|
optional :license_key_activation_message, String, nil?: true
|
|
82
82
|
|
|
83
83
|
# @!attribute license_key_activations_limit
|
|
84
|
-
# @deprecated
|
|
84
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
85
85
|
#
|
|
86
86
|
# The number of times the license key can be activated. Must be 0 or greater
|
|
87
87
|
#
|
|
@@ -103,7 +103,7 @@ module Dodopayments
|
|
|
103
103
|
optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
|
|
104
104
|
|
|
105
105
|
# @!attribute license_key_enabled
|
|
106
|
-
# @deprecated
|
|
106
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
107
107
|
#
|
|
108
108
|
# When true, generates and sends a license key to your customer. Defaults to false
|
|
109
109
|
#
|
|
@@ -32,7 +32,18 @@ module Dodopayments
|
|
|
32
32
|
# @return [Integer, nil]
|
|
33
33
|
optional :amount, Integer, nil?: true
|
|
34
34
|
|
|
35
|
-
# @!
|
|
35
|
+
# @!attribute credit_entitlements
|
|
36
|
+
# Per-checkout-session overrides for credit entitlements already attached to this
|
|
37
|
+
# product. Each entry overrides the `credits_amount` granted by the referenced
|
|
38
|
+
# credit entitlement when this checkout session is fulfilled. The
|
|
39
|
+
# credit_entitlement_id must already be attached to the product.
|
|
40
|
+
#
|
|
41
|
+
# @return [Array<Dodopayments::Models::ProductItemReq::CreditEntitlement>, nil]
|
|
42
|
+
optional :credit_entitlements,
|
|
43
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductItemReq::CreditEntitlement] },
|
|
44
|
+
nil?: true
|
|
45
|
+
|
|
46
|
+
# @!method initialize(product_id:, quantity:, addons: nil, amount: nil, credit_entitlements: nil)
|
|
36
47
|
# Some parameter documentations has been truncated, see
|
|
37
48
|
# {Dodopayments::Models::ProductItemReq} for more details.
|
|
38
49
|
#
|
|
@@ -43,6 +54,36 @@ module Dodopayments
|
|
|
43
54
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] only valid if product is a subscription
|
|
44
55
|
#
|
|
45
56
|
# @param amount [Integer, nil] Amount the customer pays if pay_what_you_want is enabled. If disabled then amoun
|
|
57
|
+
#
|
|
58
|
+
# @param credit_entitlements [Array<Dodopayments::Models::ProductItemReq::CreditEntitlement>, nil] Per-checkout-session overrides for credit entitlements already attached
|
|
59
|
+
|
|
60
|
+
class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
61
|
+
# @!attribute credit_entitlement_id
|
|
62
|
+
# ID of the credit entitlement to override. Must already be attached to the
|
|
63
|
+
# product.
|
|
64
|
+
#
|
|
65
|
+
# @return [String]
|
|
66
|
+
required :credit_entitlement_id, String
|
|
67
|
+
|
|
68
|
+
# @!attribute credits_amount
|
|
69
|
+
# Number of credits to grant for this checkout session, overriding the
|
|
70
|
+
# product-level `credits_amount` set on the credit entitlement mapping. Must be
|
|
71
|
+
# greater than zero.
|
|
72
|
+
#
|
|
73
|
+
# @return [String]
|
|
74
|
+
required :credits_amount, String
|
|
75
|
+
|
|
76
|
+
# @!method initialize(credit_entitlement_id:, credits_amount:)
|
|
77
|
+
# Some parameter documentations has been truncated, see
|
|
78
|
+
# {Dodopayments::Models::ProductItemReq::CreditEntitlement} for more details.
|
|
79
|
+
#
|
|
80
|
+
# Per-checkout-session override for a single credit entitlement attached to a
|
|
81
|
+
# product.
|
|
82
|
+
#
|
|
83
|
+
# @param credit_entitlement_id [String] ID of the credit entitlement to override. Must already be attached to the produc
|
|
84
|
+
#
|
|
85
|
+
# @param credits_amount [String] Number of credits to grant for this checkout session, overriding the
|
|
86
|
+
end
|
|
46
87
|
end
|
|
47
88
|
end
|
|
48
89
|
end
|
|
@@ -64,7 +64,7 @@ module Dodopayments
|
|
|
64
64
|
optional :image_id, String, nil?: true
|
|
65
65
|
|
|
66
66
|
# @!attribute license_key_activation_message
|
|
67
|
-
# @deprecated
|
|
67
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
68
68
|
#
|
|
69
69
|
# Message sent to the customer upon license key activation.
|
|
70
70
|
#
|
|
@@ -77,7 +77,7 @@ module Dodopayments
|
|
|
77
77
|
optional :license_key_activation_message, String, nil?: true
|
|
78
78
|
|
|
79
79
|
# @!attribute license_key_activations_limit
|
|
80
|
-
# @deprecated
|
|
80
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
81
81
|
#
|
|
82
82
|
# Limit for the number of activations for the license key.
|
|
83
83
|
#
|
|
@@ -101,7 +101,7 @@ module Dodopayments
|
|
|
101
101
|
optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
|
|
102
102
|
|
|
103
103
|
# @!attribute license_key_enabled
|
|
104
|
-
# @deprecated
|
|
104
|
+
# @deprecated Use the dedicated entitlements API to configure license-key delivery.
|
|
105
105
|
#
|
|
106
106
|
# Whether the product requires a license key.
|
|
107
107
|
#
|
|
@@ -23,29 +23,17 @@ module Dodopayments
|
|
|
23
23
|
# @!attribute type
|
|
24
24
|
# The event type
|
|
25
25
|
#
|
|
26
|
-
# @return [Symbol,
|
|
27
|
-
required :type,
|
|
26
|
+
# @return [Symbol, :"refund.failed"]
|
|
27
|
+
required :type, const: :"refund.failed"
|
|
28
28
|
|
|
29
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"refund.failed")
|
|
30
30
|
# @param business_id [String] The business identifier
|
|
31
31
|
#
|
|
32
32
|
# @param data [Dodopayments::Models::Refund]
|
|
33
33
|
#
|
|
34
34
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
35
|
#
|
|
36
|
-
# @param type [Symbol,
|
|
37
|
-
|
|
38
|
-
# The event type
|
|
39
|
-
#
|
|
40
|
-
# @see Dodopayments::Models::RefundFailedWebhookEvent#type
|
|
41
|
-
module Type
|
|
42
|
-
extend Dodopayments::Internal::Type::Enum
|
|
43
|
-
|
|
44
|
-
REFUND_FAILED = :"refund.failed"
|
|
45
|
-
|
|
46
|
-
# @!method self.values
|
|
47
|
-
# @return [Array<Symbol>]
|
|
48
|
-
end
|
|
36
|
+
# @param type [Symbol, :"refund.failed"] The event type
|
|
49
37
|
end
|
|
50
38
|
end
|
|
51
39
|
end
|
|
@@ -23,29 +23,17 @@ module Dodopayments
|
|
|
23
23
|
# @!attribute type
|
|
24
24
|
# The event type
|
|
25
25
|
#
|
|
26
|
-
# @return [Symbol,
|
|
27
|
-
required :type,
|
|
26
|
+
# @return [Symbol, :"refund.succeeded"]
|
|
27
|
+
required :type, const: :"refund.succeeded"
|
|
28
28
|
|
|
29
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"refund.succeeded")
|
|
30
30
|
# @param business_id [String] The business identifier
|
|
31
31
|
#
|
|
32
32
|
# @param data [Dodopayments::Models::Refund]
|
|
33
33
|
#
|
|
34
34
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
35
|
#
|
|
36
|
-
# @param type [Symbol,
|
|
37
|
-
|
|
38
|
-
# The event type
|
|
39
|
-
#
|
|
40
|
-
# @see Dodopayments::Models::RefundSucceededWebhookEvent#type
|
|
41
|
-
module Type
|
|
42
|
-
extend Dodopayments::Internal::Type::Enum
|
|
43
|
-
|
|
44
|
-
REFUND_SUCCEEDED = :"refund.succeeded"
|
|
45
|
-
|
|
46
|
-
# @!method self.values
|
|
47
|
-
# @return [Array<Symbol>]
|
|
48
|
-
end
|
|
36
|
+
# @param type [Symbol, :"refund.succeeded"] The event type
|
|
49
37
|
end
|
|
50
38
|
end
|
|
51
39
|
end
|
|
@@ -178,18 +178,33 @@ module Dodopayments
|
|
|
178
178
|
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CustomFieldResponse] },
|
|
179
179
|
nil?: true
|
|
180
180
|
|
|
181
|
+
# @!attribute customer_business_name
|
|
182
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
183
|
+
# the invoice in place of the customer's personal name.
|
|
184
|
+
#
|
|
185
|
+
# @return [String, nil]
|
|
186
|
+
optional :customer_business_name, String, nil?: true
|
|
187
|
+
|
|
181
188
|
# @!attribute discount_cycles_remaining
|
|
182
|
-
#
|
|
189
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
183
190
|
#
|
|
184
191
|
# @return [Integer, nil]
|
|
185
192
|
optional :discount_cycles_remaining, Integer, nil?: true
|
|
186
193
|
|
|
187
194
|
# @!attribute discount_id
|
|
188
|
-
#
|
|
195
|
+
# DEPRECATED: Use discounts instead. Returns the first discount's ID if present.
|
|
189
196
|
#
|
|
190
197
|
# @return [String, nil]
|
|
191
198
|
optional :discount_id, String, nil?: true
|
|
192
199
|
|
|
200
|
+
# @!attribute discounts
|
|
201
|
+
# All stacked discounts applied, ordered by position
|
|
202
|
+
#
|
|
203
|
+
# @return [Array<Dodopayments::Models::DiscountDetail>, nil]
|
|
204
|
+
optional :discounts,
|
|
205
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DiscountDetail] },
|
|
206
|
+
nil?: true
|
|
207
|
+
|
|
193
208
|
# @!attribute expires_at
|
|
194
209
|
# Timestamp when the subscription will expire
|
|
195
210
|
#
|
|
@@ -214,7 +229,7 @@ module Dodopayments
|
|
|
214
229
|
# @return [String, nil]
|
|
215
230
|
optional :tax_id, String, nil?: true
|
|
216
231
|
|
|
217
|
-
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancellation_comment: nil, cancellation_feedback: nil, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil)
|
|
232
|
+
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancellation_comment: nil, cancellation_feedback: nil, cancelled_at: nil, custom_field_responses: nil, customer_business_name: nil, discount_cycles_remaining: nil, discount_id: nil, discounts: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil)
|
|
218
233
|
# Some parameter documentations has been truncated, see
|
|
219
234
|
# {Dodopayments::Models::Subscription} for more details.
|
|
220
235
|
#
|
|
@@ -276,9 +291,13 @@ module Dodopayments
|
|
|
276
291
|
#
|
|
277
292
|
# @param custom_field_responses [Array<Dodopayments::Models::CustomFieldResponse>, nil] Customer's responses to custom fields collected during checkout
|
|
278
293
|
#
|
|
279
|
-
# @param
|
|
294
|
+
# @param customer_business_name [String, nil] Business / legal name associated with the tax id (B2B). When set this is
|
|
295
|
+
#
|
|
296
|
+
# @param discount_cycles_remaining [Integer, nil] DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
297
|
+
#
|
|
298
|
+
# @param discount_id [String, nil] DEPRECATED: Use discounts instead. Returns the first discount's ID if present.
|
|
280
299
|
#
|
|
281
|
-
# @param
|
|
300
|
+
# @param discounts [Array<Dodopayments::Models::DiscountDetail>, nil] All stacked discounts applied, ordered by position
|
|
282
301
|
#
|
|
283
302
|
# @param expires_at [Time, nil] Timestamp when the subscription will expire
|
|
284
303
|
#
|
|
@@ -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, :"subscription.active"]
|
|
28
|
+
required :type, const: :"subscription.active"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.active")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
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::SubscriptionActiveWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
SUBSCRIPTION_ACTIVE = :"subscription.active"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"subscription.active"] 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, :"subscription.cancelled"]
|
|
28
|
+
required :type, const: :"subscription.cancelled"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.cancelled")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
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::SubscriptionCancelledWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
SUBSCRIPTION_CANCELLED = :"subscription.cancelled"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"subscription.cancelled"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -57,12 +57,30 @@ module Dodopayments
|
|
|
57
57
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
58
58
|
optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
59
59
|
|
|
60
|
+
# @!attribute customer_business_name
|
|
61
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
62
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
63
|
+
# invoice instead of the customer's personal name.
|
|
64
|
+
#
|
|
65
|
+
# @return [String, nil]
|
|
66
|
+
optional :customer_business_name, String, nil?: true
|
|
67
|
+
|
|
60
68
|
# @!attribute discount_code
|
|
61
|
-
#
|
|
69
|
+
# @deprecated Use `discount_id` instead.
|
|
70
|
+
#
|
|
71
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
72
|
+
# discount_codes.
|
|
62
73
|
#
|
|
63
74
|
# @return [String, nil]
|
|
64
75
|
optional :discount_code, String, nil?: true
|
|
65
76
|
|
|
77
|
+
# @!attribute discount_codes
|
|
78
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
79
|
+
# together with discount_code.
|
|
80
|
+
#
|
|
81
|
+
# @return [Array<String>, nil]
|
|
82
|
+
optional :discount_codes, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
83
|
+
|
|
66
84
|
# @!attribute force_3ds
|
|
67
85
|
# Override merchant default 3DS behaviour for this subscription
|
|
68
86
|
#
|
|
@@ -161,7 +179,7 @@ module Dodopayments
|
|
|
161
179
|
# @return [Integer, nil]
|
|
162
180
|
optional :trial_period_days, Integer, nil?: true
|
|
163
181
|
|
|
164
|
-
# @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
182
|
+
# @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, customer_business_name: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
165
183
|
# Some parameter documentations has been truncated, see
|
|
166
184
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
167
185
|
#
|
|
@@ -179,7 +197,11 @@ module Dodopayments
|
|
|
179
197
|
#
|
|
180
198
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
181
199
|
#
|
|
182
|
-
# @param
|
|
200
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
201
|
+
#
|
|
202
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
203
|
+
#
|
|
204
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
183
205
|
#
|
|
184
206
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this subscription
|
|
185
207
|
#
|
|
@@ -49,11 +49,20 @@ module Dodopayments
|
|
|
49
49
|
optional :client_secret, String, nil?: true
|
|
50
50
|
|
|
51
51
|
# @!attribute discount_id
|
|
52
|
-
#
|
|
52
|
+
# @deprecated Use `discounts` instead.
|
|
53
|
+
#
|
|
54
|
+
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
55
|
+
# present.
|
|
53
56
|
#
|
|
54
57
|
# @return [String, nil]
|
|
55
58
|
optional :discount_id, String, nil?: true
|
|
56
59
|
|
|
60
|
+
# @!attribute discount_ids
|
|
61
|
+
# All stacked discount IDs applied, in order of application
|
|
62
|
+
#
|
|
63
|
+
# @return [Array<String>, nil]
|
|
64
|
+
optional :discount_ids, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
65
|
+
|
|
57
66
|
# @!attribute expires_on
|
|
58
67
|
# Expiry timestamp of the payment link
|
|
59
68
|
#
|
|
@@ -74,7 +83,7 @@ module Dodopayments
|
|
|
74
83
|
# @return [String, nil]
|
|
75
84
|
optional :payment_link, String, nil?: true
|
|
76
85
|
|
|
77
|
-
# @!method initialize(addons:, customer:, metadata:, payment_id:, recurring_pre_tax_amount:, subscription_id:, client_secret: nil, discount_id: nil, expires_on: nil, one_time_product_cart: nil, payment_link: nil)
|
|
86
|
+
# @!method initialize(addons:, customer:, metadata:, payment_id:, recurring_pre_tax_amount:, subscription_id:, client_secret: nil, discount_id: nil, discount_ids: nil, expires_on: nil, one_time_product_cart: nil, payment_link: nil)
|
|
78
87
|
# Some parameter documentations has been truncated, see
|
|
79
88
|
# {Dodopayments::Models::SubscriptionCreateResponse} for more details.
|
|
80
89
|
#
|
|
@@ -92,7 +101,9 @@ module Dodopayments
|
|
|
92
101
|
#
|
|
93
102
|
# @param client_secret [String, nil] Client secret used to load Dodo checkout SDK
|
|
94
103
|
#
|
|
95
|
-
# @param discount_id [String, nil]
|
|
104
|
+
# @param discount_id [String, nil] DEPRECATED: Use discount_ids instead. Returns the first discount's ID if present
|
|
105
|
+
#
|
|
106
|
+
# @param discount_ids [Array<String>, nil] All stacked discount IDs applied, in order of application
|
|
96
107
|
#
|
|
97
108
|
# @param expires_on [Time, nil] Expiry timestamp of the payment link
|
|
98
109
|
#
|
|
@@ -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, :"subscription.expired"]
|
|
28
|
+
required :type, const: :"subscription.expired"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.expired")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
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::SubscriptionExpiredWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
SUBSCRIPTION_EXPIRED = :"subscription.expired"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"subscription.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, :"subscription.failed"]
|
|
28
|
+
required :type, const: :"subscription.failed"
|
|
29
29
|
|
|
30
|
-
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.failed")
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
33
|
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
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::SubscriptionFailedWebhookEvent#type
|
|
42
|
-
module Type
|
|
43
|
-
extend Dodopayments::Internal::Type::Enum
|
|
44
|
-
|
|
45
|
-
SUBSCRIPTION_FAILED = :"subscription.failed"
|
|
46
|
-
|
|
47
|
-
# @!method self.values
|
|
48
|
-
# @return [Array<Symbol>]
|
|
49
|
-
end
|
|
37
|
+
# @param type [Symbol, :"subscription.failed"] The event type
|
|
50
38
|
end
|
|
51
39
|
end
|
|
52
40
|
end
|
|
@@ -34,6 +34,13 @@ module Dodopayments
|
|
|
34
34
|
# @return [Dodopayments::Models::CustomerLimitedDetails]
|
|
35
35
|
required :customer, -> { Dodopayments::CustomerLimitedDetails }
|
|
36
36
|
|
|
37
|
+
# @!attribute discounts
|
|
38
|
+
# All stacked discounts applied, in order of application
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<Dodopayments::Models::SubscriptionListResponse::Discount>]
|
|
41
|
+
required :discounts,
|
|
42
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::SubscriptionListResponse::Discount] }
|
|
43
|
+
|
|
37
44
|
# @!attribute metadata
|
|
38
45
|
# Additional custom data associated with the subscription
|
|
39
46
|
#
|
|
@@ -132,14 +139,21 @@ module Dodopayments
|
|
|
132
139
|
# @return [Time, nil]
|
|
133
140
|
optional :cancelled_at, Time, nil?: true
|
|
134
141
|
|
|
142
|
+
# @!attribute customer_business_name
|
|
143
|
+
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
144
|
+
# the invoice in place of the customer's personal name.
|
|
145
|
+
#
|
|
146
|
+
# @return [String, nil]
|
|
147
|
+
optional :customer_business_name, String, nil?: true
|
|
148
|
+
|
|
135
149
|
# @!attribute discount_cycles_remaining
|
|
136
|
-
#
|
|
150
|
+
# DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
137
151
|
#
|
|
138
152
|
# @return [Integer, nil]
|
|
139
153
|
optional :discount_cycles_remaining, Integer, nil?: true
|
|
140
154
|
|
|
141
155
|
# @!attribute discount_id
|
|
142
|
-
#
|
|
156
|
+
# DEPRECATED: Use discounts instead.
|
|
143
157
|
#
|
|
144
158
|
# @return [String, nil]
|
|
145
159
|
optional :discount_id, String, nil?: true
|
|
@@ -168,7 +182,7 @@ module Dodopayments
|
|
|
168
182
|
# @return [String, nil]
|
|
169
183
|
optional :tax_id, String, nil?: true
|
|
170
184
|
|
|
171
|
-
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, product_name: nil, scheduled_change: nil, tax_id: nil)
|
|
185
|
+
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, discounts:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, customer_business_name: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, product_name: nil, scheduled_change: nil, tax_id: nil)
|
|
172
186
|
# Some parameter documentations has been truncated, see
|
|
173
187
|
# {Dodopayments::Models::SubscriptionListResponse} for more details.
|
|
174
188
|
#
|
|
@@ -184,6 +198,8 @@ module Dodopayments
|
|
|
184
198
|
#
|
|
185
199
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Customer details associated with the subscription
|
|
186
200
|
#
|
|
201
|
+
# @param discounts [Array<Dodopayments::Models::SubscriptionListResponse::Discount>] All stacked discounts applied, in order of application
|
|
202
|
+
#
|
|
187
203
|
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the subscription
|
|
188
204
|
#
|
|
189
205
|
# @param next_billing_date [Time] Timestamp of the next scheduled billing. Indicates the end of current billing pe
|
|
@@ -216,9 +232,11 @@ module Dodopayments
|
|
|
216
232
|
#
|
|
217
233
|
# @param cancelled_at [Time, nil] Cancelled timestamp if the subscription is cancelled
|
|
218
234
|
#
|
|
219
|
-
# @param
|
|
235
|
+
# @param customer_business_name [String, nil] Business / legal name associated with the tax id (B2B). When set this is
|
|
236
|
+
#
|
|
237
|
+
# @param discount_cycles_remaining [Integer, nil] DEPRECATED: Use discounts[].cycles_remaining instead.
|
|
220
238
|
#
|
|
221
|
-
# @param discount_id [String, nil]
|
|
239
|
+
# @param discount_id [String, nil] DEPRECATED: Use discounts instead.
|
|
222
240
|
#
|
|
223
241
|
# @param payment_method_id [String, nil] Saved payment method id used for recurring charges
|
|
224
242
|
#
|
|
@@ -227,6 +245,28 @@ module Dodopayments
|
|
|
227
245
|
# @param scheduled_change [Dodopayments::Models::ScheduledPlanChange, nil] Scheduled plan change details, if any
|
|
228
246
|
#
|
|
229
247
|
# @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
|
|
248
|
+
|
|
249
|
+
class Discount < Dodopayments::Internal::Type::BaseModel
|
|
250
|
+
# @!attribute discount_id
|
|
251
|
+
# The unique discount ID
|
|
252
|
+
#
|
|
253
|
+
# @return [String]
|
|
254
|
+
required :discount_id, String
|
|
255
|
+
|
|
256
|
+
# @!attribute discount_cycles_remaining
|
|
257
|
+
# Remaining billing cycles for this discount on this subscription
|
|
258
|
+
#
|
|
259
|
+
# @return [Integer, nil]
|
|
260
|
+
optional :discount_cycles_remaining, Integer, nil?: true
|
|
261
|
+
|
|
262
|
+
# @!method initialize(discount_id:, discount_cycles_remaining: nil)
|
|
263
|
+
# Lightweight discount info for list endpoints. Array order represents position
|
|
264
|
+
# (no explicit position field).
|
|
265
|
+
#
|
|
266
|
+
# @param discount_id [String] The unique discount ID
|
|
267
|
+
#
|
|
268
|
+
# @param discount_cycles_remaining [Integer, nil] Remaining billing cycles for this discount on this subscription
|
|
269
|
+
end
|
|
230
270
|
end
|
|
231
271
|
end
|
|
232
272
|
end
|