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
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::PaymentCancelledWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Payment::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"payment.cancelled"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,39 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Payment,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
57
|
+
type: Symbol
|
|
60
58
|
}
|
|
61
59
|
)
|
|
62
60
|
end
|
|
63
61
|
def to_hash
|
|
64
62
|
end
|
|
65
|
-
|
|
66
|
-
# The event type
|
|
67
|
-
module Type
|
|
68
|
-
extend Dodopayments::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(Symbol, Dodopayments::PaymentCancelledWebhookEvent::Type)
|
|
73
|
-
end
|
|
74
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
-
|
|
76
|
-
PAYMENT_CANCELLED =
|
|
77
|
-
T.let(
|
|
78
|
-
:"payment.cancelled",
|
|
79
|
-
Dodopayments::PaymentCancelledWebhookEvent::Type::TaggedSymbol
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
sig do
|
|
83
|
-
override.returns(
|
|
84
|
-
T::Array[
|
|
85
|
-
Dodopayments::PaymentCancelledWebhookEvent::Type::TaggedSymbol
|
|
86
|
-
]
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
def self.values
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
63
|
end
|
|
93
64
|
end
|
|
94
65
|
end
|
|
@@ -54,10 +54,22 @@ module Dodopayments
|
|
|
54
54
|
sig { returns(T.nilable(Dodopayments::Currency::OrSymbol)) }
|
|
55
55
|
attr_accessor :billing_currency
|
|
56
56
|
|
|
57
|
-
#
|
|
57
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
58
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
59
|
+
# invoice instead of the customer's personal name.
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_accessor :customer_business_name
|
|
62
|
+
|
|
63
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
64
|
+
# discount_codes.
|
|
58
65
|
sig { returns(T.nilable(String)) }
|
|
59
66
|
attr_accessor :discount_code
|
|
60
67
|
|
|
68
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
69
|
+
# together with discount_code.
|
|
70
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
71
|
+
attr_accessor :discount_codes
|
|
72
|
+
|
|
61
73
|
# Override merchant default 3DS behaviour for this payment
|
|
62
74
|
sig { returns(T.nilable(T::Boolean)) }
|
|
63
75
|
attr_accessor :force_3ds
|
|
@@ -131,7 +143,9 @@ module Dodopayments
|
|
|
131
143
|
allowed_payment_method_types:
|
|
132
144
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
133
145
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
146
|
+
customer_business_name: T.nilable(String),
|
|
134
147
|
discount_code: T.nilable(String),
|
|
148
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
135
149
|
force_3ds: T.nilable(T::Boolean),
|
|
136
150
|
metadata: T::Hash[Symbol, String],
|
|
137
151
|
payment_link: T.nilable(T::Boolean),
|
|
@@ -165,8 +179,16 @@ module Dodopayments
|
|
|
165
179
|
# Fix the currency in which the end customer is billed. If Dodo Payments cannot
|
|
166
180
|
# support that currency for this transaction, it will not proceed
|
|
167
181
|
billing_currency: nil,
|
|
168
|
-
#
|
|
182
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
183
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
184
|
+
# invoice instead of the customer's personal name.
|
|
185
|
+
customer_business_name: nil,
|
|
186
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
187
|
+
# discount_codes.
|
|
169
188
|
discount_code: nil,
|
|
189
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
190
|
+
# together with discount_code.
|
|
191
|
+
discount_codes: nil,
|
|
170
192
|
# Override merchant default 3DS behaviour for this payment
|
|
171
193
|
force_3ds: nil,
|
|
172
194
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
@@ -213,7 +235,9 @@ module Dodopayments
|
|
|
213
235
|
allowed_payment_method_types:
|
|
214
236
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
215
237
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
238
|
+
customer_business_name: T.nilable(String),
|
|
216
239
|
discount_code: T.nilable(String),
|
|
240
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
217
241
|
force_3ds: T.nilable(T::Boolean),
|
|
218
242
|
metadata: T::Hash[Symbol, String],
|
|
219
243
|
payment_link: T.nilable(T::Boolean),
|
|
@@ -37,10 +37,15 @@ module Dodopayments
|
|
|
37
37
|
sig { returns(Integer) }
|
|
38
38
|
attr_accessor :total_amount
|
|
39
39
|
|
|
40
|
-
#
|
|
40
|
+
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
41
|
+
# present.
|
|
41
42
|
sig { returns(T.nilable(String)) }
|
|
42
43
|
attr_accessor :discount_id
|
|
43
44
|
|
|
45
|
+
# All stacked discount IDs applied, in order of application
|
|
46
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
47
|
+
attr_accessor :discount_ids
|
|
48
|
+
|
|
44
49
|
# Expiry timestamp of the payment link
|
|
45
50
|
sig { returns(T.nilable(Time)) }
|
|
46
51
|
attr_accessor :expires_on
|
|
@@ -61,6 +66,7 @@ module Dodopayments
|
|
|
61
66
|
payment_id: String,
|
|
62
67
|
total_amount: Integer,
|
|
63
68
|
discount_id: T.nilable(String),
|
|
69
|
+
discount_ids: T.nilable(T::Array[String]),
|
|
64
70
|
expires_on: T.nilable(Time),
|
|
65
71
|
payment_link: T.nilable(String),
|
|
66
72
|
product_cart:
|
|
@@ -79,8 +85,11 @@ module Dodopayments
|
|
|
79
85
|
payment_id:,
|
|
80
86
|
# Total amount of the payment in smallest currency unit (e.g. cents)
|
|
81
87
|
total_amount:,
|
|
82
|
-
#
|
|
88
|
+
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
89
|
+
# present.
|
|
83
90
|
discount_id: nil,
|
|
91
|
+
# All stacked discount IDs applied, in order of application
|
|
92
|
+
discount_ids: nil,
|
|
84
93
|
# Expiry timestamp of the payment link
|
|
85
94
|
expires_on: nil,
|
|
86
95
|
# Optional URL to a hosted payment page
|
|
@@ -99,6 +108,7 @@ module Dodopayments
|
|
|
99
108
|
payment_id: String,
|
|
100
109
|
total_amount: Integer,
|
|
101
110
|
discount_id: T.nilable(String),
|
|
111
|
+
discount_ids: T.nilable(T::Array[String]),
|
|
102
112
|
expires_on: T.nilable(Time),
|
|
103
113
|
payment_link: T.nilable(String),
|
|
104
114
|
product_cart:
|
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::PaymentFailedWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Payment::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"payment.failed"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,39 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Payment,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
57
|
+
type: Symbol
|
|
60
58
|
}
|
|
61
59
|
)
|
|
62
60
|
end
|
|
63
61
|
def to_hash
|
|
64
62
|
end
|
|
65
|
-
|
|
66
|
-
# The event type
|
|
67
|
-
module Type
|
|
68
|
-
extend Dodopayments::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(Symbol, Dodopayments::PaymentFailedWebhookEvent::Type)
|
|
73
|
-
end
|
|
74
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
-
|
|
76
|
-
PAYMENT_FAILED =
|
|
77
|
-
T.let(
|
|
78
|
-
:"payment.failed",
|
|
79
|
-
Dodopayments::PaymentFailedWebhookEvent::Type::TaggedSymbol
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
sig do
|
|
83
|
-
override.returns(
|
|
84
|
-
T::Array[
|
|
85
|
-
Dodopayments::PaymentFailedWebhookEvent::Type::TaggedSymbol
|
|
86
|
-
]
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
def self.values
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
63
|
end
|
|
93
64
|
end
|
|
94
65
|
end
|
|
@@ -159,6 +159,7 @@ module Dodopayments
|
|
|
159
159
|
Dodopayments::PaymentMethodTypes::TaggedSymbol
|
|
160
160
|
)
|
|
161
161
|
SOFORT = T.let(:sofort, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
162
|
+
SUNBIT = T.let(:sunbit, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
162
163
|
SWISH = T.let(:swish, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
163
164
|
TOUCH_N_GO =
|
|
164
165
|
T.let(:touch_n_go, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::PaymentProcessingWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Payment::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"payment.processing"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,40 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Payment,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
60
|
-
Dodopayments::PaymentProcessingWebhookEvent::Type::TaggedSymbol
|
|
57
|
+
type: Symbol
|
|
61
58
|
}
|
|
62
59
|
)
|
|
63
60
|
end
|
|
64
61
|
def to_hash
|
|
65
62
|
end
|
|
66
|
-
|
|
67
|
-
# The event type
|
|
68
|
-
module Type
|
|
69
|
-
extend Dodopayments::Internal::Type::Enum
|
|
70
|
-
|
|
71
|
-
TaggedSymbol =
|
|
72
|
-
T.type_alias do
|
|
73
|
-
T.all(Symbol, Dodopayments::PaymentProcessingWebhookEvent::Type)
|
|
74
|
-
end
|
|
75
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
76
|
-
|
|
77
|
-
PAYMENT_PROCESSING =
|
|
78
|
-
T.let(
|
|
79
|
-
:"payment.processing",
|
|
80
|
-
Dodopayments::PaymentProcessingWebhookEvent::Type::TaggedSymbol
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
sig do
|
|
84
|
-
override.returns(
|
|
85
|
-
T::Array[
|
|
86
|
-
Dodopayments::PaymentProcessingWebhookEvent::Type::TaggedSymbol
|
|
87
|
-
]
|
|
88
|
-
)
|
|
89
|
-
end
|
|
90
|
-
def self.values
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
63
|
end
|
|
94
64
|
end
|
|
95
65
|
end
|
|
@@ -26,9 +26,7 @@ module Dodopayments
|
|
|
26
26
|
attr_accessor :timestamp
|
|
27
27
|
|
|
28
28
|
# The event type
|
|
29
|
-
sig
|
|
30
|
-
returns(Dodopayments::PaymentSucceededWebhookEvent::Type::TaggedSymbol)
|
|
31
|
-
end
|
|
29
|
+
sig { returns(Symbol) }
|
|
32
30
|
attr_accessor :type
|
|
33
31
|
|
|
34
32
|
sig do
|
|
@@ -36,7 +34,7 @@ module Dodopayments
|
|
|
36
34
|
business_id: String,
|
|
37
35
|
data: Dodopayments::Payment::OrHash,
|
|
38
36
|
timestamp: Time,
|
|
39
|
-
type:
|
|
37
|
+
type: Symbol
|
|
40
38
|
).returns(T.attached_class)
|
|
41
39
|
end
|
|
42
40
|
def self.new(
|
|
@@ -46,7 +44,7 @@ module Dodopayments
|
|
|
46
44
|
# The timestamp of when the event occurred
|
|
47
45
|
timestamp:,
|
|
48
46
|
# The event type
|
|
49
|
-
type:
|
|
47
|
+
type: :"payment.succeeded"
|
|
50
48
|
)
|
|
51
49
|
end
|
|
52
50
|
|
|
@@ -56,39 +54,12 @@ module Dodopayments
|
|
|
56
54
|
business_id: String,
|
|
57
55
|
data: Dodopayments::Payment,
|
|
58
56
|
timestamp: Time,
|
|
59
|
-
type:
|
|
57
|
+
type: Symbol
|
|
60
58
|
}
|
|
61
59
|
)
|
|
62
60
|
end
|
|
63
61
|
def to_hash
|
|
64
62
|
end
|
|
65
|
-
|
|
66
|
-
# The event type
|
|
67
|
-
module Type
|
|
68
|
-
extend Dodopayments::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(Symbol, Dodopayments::PaymentSucceededWebhookEvent::Type)
|
|
73
|
-
end
|
|
74
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
75
|
-
|
|
76
|
-
PAYMENT_SUCCEEDED =
|
|
77
|
-
T.let(
|
|
78
|
-
:"payment.succeeded",
|
|
79
|
-
Dodopayments::PaymentSucceededWebhookEvent::Type::TaggedSymbol
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
sig do
|
|
83
|
-
override.returns(
|
|
84
|
-
T::Array[
|
|
85
|
-
Dodopayments::PaymentSucceededWebhookEvent::Type::TaggedSymbol
|
|
86
|
-
]
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
def self.values
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
63
|
end
|
|
93
64
|
end
|
|
94
65
|
end
|
|
@@ -45,7 +45,7 @@ module Dodopayments
|
|
|
45
45
|
sig { returns(T::Boolean) }
|
|
46
46
|
attr_accessor :purchasing_power_parity
|
|
47
47
|
|
|
48
|
-
sig { returns(
|
|
48
|
+
sig { returns(Symbol) }
|
|
49
49
|
attr_accessor :type
|
|
50
50
|
|
|
51
51
|
# Indicates whether the customer can pay any amount they choose. If set to `true`,
|
|
@@ -73,10 +73,10 @@ module Dodopayments
|
|
|
73
73
|
discount: Integer,
|
|
74
74
|
price: Integer,
|
|
75
75
|
purchasing_power_parity: T::Boolean,
|
|
76
|
-
type: Dodopayments::Price::OneTimePrice::Type::OrSymbol,
|
|
77
76
|
pay_what_you_want: T::Boolean,
|
|
78
77
|
suggested_price: T.nilable(Integer),
|
|
79
|
-
tax_inclusive: T.nilable(T::Boolean)
|
|
78
|
+
tax_inclusive: T.nilable(T::Boolean),
|
|
79
|
+
type: Symbol
|
|
80
80
|
).returns(T.attached_class)
|
|
81
81
|
end
|
|
82
82
|
def self.new(
|
|
@@ -93,7 +93,6 @@ module Dodopayments
|
|
|
93
93
|
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
94
94
|
# Purchasing power parity feature is not available as of now.
|
|
95
95
|
purchasing_power_parity:,
|
|
96
|
-
type:,
|
|
97
96
|
# Indicates whether the customer can pay any amount they choose. If set to `true`,
|
|
98
97
|
# the [`price`](Self::price) field is the minimum amount.
|
|
99
98
|
pay_what_you_want: nil,
|
|
@@ -102,7 +101,8 @@ module Dodopayments
|
|
|
102
101
|
# ignored.
|
|
103
102
|
suggested_price: nil,
|
|
104
103
|
# Indicates if the price is tax inclusive.
|
|
105
|
-
tax_inclusive: nil
|
|
104
|
+
tax_inclusive: nil,
|
|
105
|
+
type: :one_time_price
|
|
106
106
|
)
|
|
107
107
|
end
|
|
108
108
|
|
|
@@ -113,7 +113,7 @@ module Dodopayments
|
|
|
113
113
|
discount: Integer,
|
|
114
114
|
price: Integer,
|
|
115
115
|
purchasing_power_parity: T::Boolean,
|
|
116
|
-
type:
|
|
116
|
+
type: Symbol,
|
|
117
117
|
pay_what_you_want: T::Boolean,
|
|
118
118
|
suggested_price: T.nilable(Integer),
|
|
119
119
|
tax_inclusive: T.nilable(T::Boolean)
|
|
@@ -122,30 +122,6 @@ module Dodopayments
|
|
|
122
122
|
end
|
|
123
123
|
def to_hash
|
|
124
124
|
end
|
|
125
|
-
|
|
126
|
-
module Type
|
|
127
|
-
extend Dodopayments::Internal::Type::Enum
|
|
128
|
-
|
|
129
|
-
TaggedSymbol =
|
|
130
|
-
T.type_alias do
|
|
131
|
-
T.all(Symbol, Dodopayments::Price::OneTimePrice::Type)
|
|
132
|
-
end
|
|
133
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
134
|
-
|
|
135
|
-
ONE_TIME_PRICE =
|
|
136
|
-
T.let(
|
|
137
|
-
:one_time_price,
|
|
138
|
-
Dodopayments::Price::OneTimePrice::Type::TaggedSymbol
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
sig do
|
|
142
|
-
override.returns(
|
|
143
|
-
T::Array[Dodopayments::Price::OneTimePrice::Type::TaggedSymbol]
|
|
144
|
-
)
|
|
145
|
-
end
|
|
146
|
-
def self.values
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
125
|
end
|
|
150
126
|
|
|
151
127
|
class RecurringPrice < Dodopayments::Internal::Type::BaseModel
|
|
@@ -193,7 +169,7 @@ module Dodopayments
|
|
|
193
169
|
sig { returns(Dodopayments::TimeInterval::OrSymbol) }
|
|
194
170
|
attr_accessor :subscription_period_interval
|
|
195
171
|
|
|
196
|
-
sig { returns(
|
|
172
|
+
sig { returns(Symbol) }
|
|
197
173
|
attr_accessor :type
|
|
198
174
|
|
|
199
175
|
# Indicates if the price is tax inclusive
|
|
@@ -218,9 +194,9 @@ module Dodopayments
|
|
|
218
194
|
purchasing_power_parity: T::Boolean,
|
|
219
195
|
subscription_period_count: Integer,
|
|
220
196
|
subscription_period_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
221
|
-
type: Dodopayments::Price::RecurringPrice::Type::OrSymbol,
|
|
222
197
|
tax_inclusive: T.nilable(T::Boolean),
|
|
223
|
-
trial_period_days: Integer
|
|
198
|
+
trial_period_days: Integer,
|
|
199
|
+
type: Symbol
|
|
224
200
|
).returns(T.attached_class)
|
|
225
201
|
end
|
|
226
202
|
def self.new(
|
|
@@ -244,11 +220,11 @@ module Dodopayments
|
|
|
244
220
|
subscription_period_count:,
|
|
245
221
|
# The time interval for the subscription period (e.g., day, month, year).
|
|
246
222
|
subscription_period_interval:,
|
|
247
|
-
type:,
|
|
248
223
|
# Indicates if the price is tax inclusive
|
|
249
224
|
tax_inclusive: nil,
|
|
250
225
|
# Number of days for the trial period. A value of `0` indicates no trial period.
|
|
251
|
-
trial_period_days: nil
|
|
226
|
+
trial_period_days: nil,
|
|
227
|
+
type: :recurring_price
|
|
252
228
|
)
|
|
253
229
|
end
|
|
254
230
|
|
|
@@ -264,7 +240,7 @@ module Dodopayments
|
|
|
264
240
|
subscription_period_count: Integer,
|
|
265
241
|
subscription_period_interval:
|
|
266
242
|
Dodopayments::TimeInterval::OrSymbol,
|
|
267
|
-
type:
|
|
243
|
+
type: Symbol,
|
|
268
244
|
tax_inclusive: T.nilable(T::Boolean),
|
|
269
245
|
trial_period_days: Integer
|
|
270
246
|
}
|
|
@@ -272,30 +248,6 @@ module Dodopayments
|
|
|
272
248
|
end
|
|
273
249
|
def to_hash
|
|
274
250
|
end
|
|
275
|
-
|
|
276
|
-
module Type
|
|
277
|
-
extend Dodopayments::Internal::Type::Enum
|
|
278
|
-
|
|
279
|
-
TaggedSymbol =
|
|
280
|
-
T.type_alias do
|
|
281
|
-
T.all(Symbol, Dodopayments::Price::RecurringPrice::Type)
|
|
282
|
-
end
|
|
283
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
284
|
-
|
|
285
|
-
RECURRING_PRICE =
|
|
286
|
-
T.let(
|
|
287
|
-
:recurring_price,
|
|
288
|
-
Dodopayments::Price::RecurringPrice::Type::TaggedSymbol
|
|
289
|
-
)
|
|
290
|
-
|
|
291
|
-
sig do
|
|
292
|
-
override.returns(
|
|
293
|
-
T::Array[Dodopayments::Price::RecurringPrice::Type::TaggedSymbol]
|
|
294
|
-
)
|
|
295
|
-
end
|
|
296
|
-
def self.values
|
|
297
|
-
end
|
|
298
|
-
end
|
|
299
251
|
end
|
|
300
252
|
|
|
301
253
|
class UsageBasedPrice < Dodopayments::Internal::Type::BaseModel
|
|
@@ -343,7 +295,7 @@ module Dodopayments
|
|
|
343
295
|
sig { returns(Dodopayments::TimeInterval::OrSymbol) }
|
|
344
296
|
attr_accessor :subscription_period_interval
|
|
345
297
|
|
|
346
|
-
sig { returns(
|
|
298
|
+
sig { returns(Symbol) }
|
|
347
299
|
attr_accessor :type
|
|
348
300
|
|
|
349
301
|
sig { returns(T.nilable(T::Array[Dodopayments::AddMeterToPrice])) }
|
|
@@ -364,9 +316,9 @@ module Dodopayments
|
|
|
364
316
|
purchasing_power_parity: T::Boolean,
|
|
365
317
|
subscription_period_count: Integer,
|
|
366
318
|
subscription_period_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
367
|
-
type: Dodopayments::Price::UsageBasedPrice::Type::OrSymbol,
|
|
368
319
|
meters: T.nilable(T::Array[Dodopayments::AddMeterToPrice::OrHash]),
|
|
369
|
-
tax_inclusive: T.nilable(T::Boolean)
|
|
320
|
+
tax_inclusive: T.nilable(T::Boolean),
|
|
321
|
+
type: Symbol
|
|
370
322
|
).returns(T.attached_class)
|
|
371
323
|
end
|
|
372
324
|
def self.new(
|
|
@@ -390,10 +342,10 @@ module Dodopayments
|
|
|
390
342
|
subscription_period_count:,
|
|
391
343
|
# The time interval for the subscription period (e.g., day, month, year).
|
|
392
344
|
subscription_period_interval:,
|
|
393
|
-
type:,
|
|
394
345
|
meters: nil,
|
|
395
346
|
# Indicates if the price is tax inclusive
|
|
396
|
-
tax_inclusive: nil
|
|
347
|
+
tax_inclusive: nil,
|
|
348
|
+
type: :usage_based_price
|
|
397
349
|
)
|
|
398
350
|
end
|
|
399
351
|
|
|
@@ -409,7 +361,7 @@ module Dodopayments
|
|
|
409
361
|
subscription_period_count: Integer,
|
|
410
362
|
subscription_period_interval:
|
|
411
363
|
Dodopayments::TimeInterval::OrSymbol,
|
|
412
|
-
type:
|
|
364
|
+
type: Symbol,
|
|
413
365
|
meters: T.nilable(T::Array[Dodopayments::AddMeterToPrice]),
|
|
414
366
|
tax_inclusive: T.nilable(T::Boolean)
|
|
415
367
|
}
|
|
@@ -417,30 +369,6 @@ module Dodopayments
|
|
|
417
369
|
end
|
|
418
370
|
def to_hash
|
|
419
371
|
end
|
|
420
|
-
|
|
421
|
-
module Type
|
|
422
|
-
extend Dodopayments::Internal::Type::Enum
|
|
423
|
-
|
|
424
|
-
TaggedSymbol =
|
|
425
|
-
T.type_alias do
|
|
426
|
-
T.all(Symbol, Dodopayments::Price::UsageBasedPrice::Type)
|
|
427
|
-
end
|
|
428
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
429
|
-
|
|
430
|
-
USAGE_BASED_PRICE =
|
|
431
|
-
T.let(
|
|
432
|
-
:usage_based_price,
|
|
433
|
-
Dodopayments::Price::UsageBasedPrice::Type::TaggedSymbol
|
|
434
|
-
)
|
|
435
|
-
|
|
436
|
-
sig do
|
|
437
|
-
override.returns(
|
|
438
|
-
T::Array[Dodopayments::Price::UsageBasedPrice::Type::TaggedSymbol]
|
|
439
|
-
)
|
|
440
|
-
end
|
|
441
|
-
def self.values
|
|
442
|
-
end
|
|
443
|
-
end
|
|
444
372
|
end
|
|
445
373
|
|
|
446
374
|
sig { override.returns(T::Array[Dodopayments::Price::Variants]) }
|