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
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: 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, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, customer_business_name: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: 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, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for the payment
|
|
14
14
|
#
|
|
@@ -22,7 +22,11 @@ module Dodopayments
|
|
|
22
22
|
#
|
|
23
23
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
26
|
+
#
|
|
27
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
28
|
+
#
|
|
29
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
26
30
|
#
|
|
27
31
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
|
|
28
32
|
#
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
class Groups
|
|
7
|
+
class Items
|
|
8
|
+
# @overload create(group_id, id:, products:, request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
11
|
+
#
|
|
12
|
+
# @param id [String] Path param: Product Collection Id
|
|
13
|
+
#
|
|
14
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Body param: Products to add to the group
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<Dodopayments::Models::ProductCollections::Groups::ProductCollectionProduct>]
|
|
19
|
+
#
|
|
20
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemCreateParams
|
|
21
|
+
def create(group_id, params)
|
|
22
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemCreateParams.dump_request(params)
|
|
23
|
+
id =
|
|
24
|
+
parsed.delete(:id) do
|
|
25
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
26
|
+
end
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :post,
|
|
29
|
+
path: ["product-collections/%1$s/groups/%2$s/items", id, group_id],
|
|
30
|
+
body: parsed,
|
|
31
|
+
model: Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::Groups::ProductCollectionProduct],
|
|
32
|
+
options: options
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @overload update(item_id, id:, group_id:, status:, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param item_id [String] Path param: Collection item Id (product membership in group)
|
|
39
|
+
#
|
|
40
|
+
# @param id [String] Path param: Product Collection Id
|
|
41
|
+
#
|
|
42
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
43
|
+
#
|
|
44
|
+
# @param status [Boolean] Body param: Status of the product in the group
|
|
45
|
+
#
|
|
46
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
+
#
|
|
48
|
+
# @return [nil]
|
|
49
|
+
#
|
|
50
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemUpdateParams
|
|
51
|
+
def update(item_id, params)
|
|
52
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemUpdateParams.dump_request(params)
|
|
53
|
+
id =
|
|
54
|
+
parsed.delete(:id) do
|
|
55
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
56
|
+
end
|
|
57
|
+
group_id =
|
|
58
|
+
parsed.delete(:group_id) do
|
|
59
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
60
|
+
end
|
|
61
|
+
@client.request(
|
|
62
|
+
method: :patch,
|
|
63
|
+
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
64
|
+
body: parsed,
|
|
65
|
+
model: NilClass,
|
|
66
|
+
options: options
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# @overload delete(item_id, id:, group_id:, request_options: {})
|
|
71
|
+
#
|
|
72
|
+
# @param item_id [String] Collection item Id (product membership in group)
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] Product Collection Id
|
|
75
|
+
#
|
|
76
|
+
# @param group_id [String] Product Collection Group Id
|
|
77
|
+
#
|
|
78
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
79
|
+
#
|
|
80
|
+
# @return [nil]
|
|
81
|
+
#
|
|
82
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemDeleteParams
|
|
83
|
+
def delete(item_id, params)
|
|
84
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemDeleteParams.dump_request(params)
|
|
85
|
+
id =
|
|
86
|
+
parsed.delete(:id) do
|
|
87
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
88
|
+
end
|
|
89
|
+
group_id =
|
|
90
|
+
parsed.delete(:group_id) do
|
|
91
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
92
|
+
end
|
|
93
|
+
@client.request(
|
|
94
|
+
method: :delete,
|
|
95
|
+
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
96
|
+
model: NilClass,
|
|
97
|
+
options: options
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @api private
|
|
102
|
+
#
|
|
103
|
+
# @param client [Dodopayments::Client]
|
|
104
|
+
def initialize(client:)
|
|
105
|
+
@client = client
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
class Groups
|
|
7
|
+
# @return [Dodopayments::Resources::ProductCollections::Groups::Items]
|
|
8
|
+
attr_reader :items
|
|
9
|
+
|
|
10
|
+
# Some parameter documentations has been truncated, see
|
|
11
|
+
# {Dodopayments::Models::ProductCollections::GroupCreateParams} for more details.
|
|
12
|
+
#
|
|
13
|
+
# @overload create(id, products:, group_name: nil, status: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param id [String] Product Collection Id
|
|
16
|
+
#
|
|
17
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Products in this group
|
|
18
|
+
#
|
|
19
|
+
# @param group_name [String, nil] Optional group name. Multiple groups can have null names, but named groups must
|
|
20
|
+
#
|
|
21
|
+
# @param status [Boolean, nil] Status of the group (defaults to true if not provided)
|
|
22
|
+
#
|
|
23
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
|
+
#
|
|
25
|
+
# @return [Dodopayments::Models::ProductCollections::ProductCollectionGroupResponse]
|
|
26
|
+
#
|
|
27
|
+
# @see Dodopayments::Models::ProductCollections::GroupCreateParams
|
|
28
|
+
def create(id, params)
|
|
29
|
+
parsed, options = Dodopayments::ProductCollections::GroupCreateParams.dump_request(params)
|
|
30
|
+
@client.request(
|
|
31
|
+
method: :post,
|
|
32
|
+
path: ["product-collections/%1$s/groups", id],
|
|
33
|
+
body: parsed,
|
|
34
|
+
model: Dodopayments::ProductCollections::ProductCollectionGroupResponse,
|
|
35
|
+
options: options
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {Dodopayments::Models::ProductCollections::GroupUpdateParams} for more details.
|
|
41
|
+
#
|
|
42
|
+
# @overload update(group_id, id:, group_name: nil, product_order: nil, status: nil, request_options: {})
|
|
43
|
+
#
|
|
44
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
45
|
+
#
|
|
46
|
+
# @param id [String] Path param: Product Collection Id
|
|
47
|
+
#
|
|
48
|
+
# @param group_name [String, nil] Body param: Optional group name update: Some(Some(name)) = set name, Some(None)
|
|
49
|
+
#
|
|
50
|
+
# @param product_order [Array<String>, nil] Body param: Optional new order for products in this group (array of product_coll
|
|
51
|
+
#
|
|
52
|
+
# @param status [Boolean, nil] Body param: Optional status update
|
|
53
|
+
#
|
|
54
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
|
+
#
|
|
56
|
+
# @return [nil]
|
|
57
|
+
#
|
|
58
|
+
# @see Dodopayments::Models::ProductCollections::GroupUpdateParams
|
|
59
|
+
def update(group_id, params)
|
|
60
|
+
parsed, options = Dodopayments::ProductCollections::GroupUpdateParams.dump_request(params)
|
|
61
|
+
id =
|
|
62
|
+
parsed.delete(:id) do
|
|
63
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
64
|
+
end
|
|
65
|
+
@client.request(
|
|
66
|
+
method: :patch,
|
|
67
|
+
path: ["product-collections/%1$s/groups/%2$s", id, group_id],
|
|
68
|
+
body: parsed,
|
|
69
|
+
model: NilClass,
|
|
70
|
+
options: options
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @overload delete(group_id, id:, request_options: {})
|
|
75
|
+
#
|
|
76
|
+
# @param group_id [String] Product Collection Group Id
|
|
77
|
+
#
|
|
78
|
+
# @param id [String] Product Collection Id
|
|
79
|
+
#
|
|
80
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
81
|
+
#
|
|
82
|
+
# @return [nil]
|
|
83
|
+
#
|
|
84
|
+
# @see Dodopayments::Models::ProductCollections::GroupDeleteParams
|
|
85
|
+
def delete(group_id, params)
|
|
86
|
+
parsed, options = Dodopayments::ProductCollections::GroupDeleteParams.dump_request(params)
|
|
87
|
+
id =
|
|
88
|
+
parsed.delete(:id) do
|
|
89
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
90
|
+
end
|
|
91
|
+
@client.request(
|
|
92
|
+
method: :delete,
|
|
93
|
+
path: ["product-collections/%1$s/groups/%2$s", id, group_id],
|
|
94
|
+
model: NilClass,
|
|
95
|
+
options: options
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @api private
|
|
100
|
+
#
|
|
101
|
+
# @param client [Dodopayments::Client]
|
|
102
|
+
def initialize(client:)
|
|
103
|
+
@client = client
|
|
104
|
+
@items = Dodopayments::Resources::ProductCollections::Groups::Items.new(client: client)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
# @return [Dodopayments::Resources::ProductCollections::Groups]
|
|
7
|
+
attr_reader :groups
|
|
8
|
+
|
|
9
|
+
# @overload create(groups:, name:, brand_id: nil, description: nil, request_options: {})
|
|
10
|
+
#
|
|
11
|
+
# @param groups [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails>] Groups of products in this collection
|
|
12
|
+
#
|
|
13
|
+
# @param name [String] Name of the product collection
|
|
14
|
+
#
|
|
15
|
+
# @param brand_id [String, nil] Brand id for the collection, if not provided will default to primary brand
|
|
16
|
+
#
|
|
17
|
+
# @param description [String, nil] Optional description of the product collection
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
|
+
#
|
|
21
|
+
# @return [Dodopayments::Models::ProductCollection]
|
|
22
|
+
#
|
|
23
|
+
# @see Dodopayments::Models::ProductCollectionCreateParams
|
|
24
|
+
def create(params)
|
|
25
|
+
parsed, options = Dodopayments::ProductCollectionCreateParams.dump_request(params)
|
|
26
|
+
@client.request(
|
|
27
|
+
method: :post,
|
|
28
|
+
path: "product-collections",
|
|
29
|
+
body: parsed,
|
|
30
|
+
model: Dodopayments::ProductCollection,
|
|
31
|
+
options: options
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @overload retrieve(id, request_options: {})
|
|
36
|
+
#
|
|
37
|
+
# @param id [String] Product Collection Id
|
|
38
|
+
#
|
|
39
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
40
|
+
#
|
|
41
|
+
# @return [Dodopayments::Models::ProductCollection]
|
|
42
|
+
#
|
|
43
|
+
# @see Dodopayments::Models::ProductCollectionRetrieveParams
|
|
44
|
+
def retrieve(id, params = {})
|
|
45
|
+
@client.request(
|
|
46
|
+
method: :get,
|
|
47
|
+
path: ["product-collections/%1$s", id],
|
|
48
|
+
model: Dodopayments::ProductCollection,
|
|
49
|
+
options: params[:request_options]
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @overload update(id, brand_id: nil, description: nil, group_order: nil, image_id: nil, name: nil, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param id [String] Product Collection Id
|
|
56
|
+
#
|
|
57
|
+
# @param brand_id [String, nil] Optional brand_id update
|
|
58
|
+
#
|
|
59
|
+
# @param description [String, nil] Optional description update - pass null to remove, omit to keep unchanged
|
|
60
|
+
#
|
|
61
|
+
# @param group_order [Array<String>, nil] Optional new order for groups (array of group UUIDs in desired order)
|
|
62
|
+
#
|
|
63
|
+
# @param image_id [String, nil] Optional image update - pass null to remove, omit to keep unchanged
|
|
64
|
+
#
|
|
65
|
+
# @param name [String, nil] Optional new name for the collection
|
|
66
|
+
#
|
|
67
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
68
|
+
#
|
|
69
|
+
# @return [nil]
|
|
70
|
+
#
|
|
71
|
+
# @see Dodopayments::Models::ProductCollectionUpdateParams
|
|
72
|
+
def update(id, params = {})
|
|
73
|
+
parsed, options = Dodopayments::ProductCollectionUpdateParams.dump_request(params)
|
|
74
|
+
@client.request(
|
|
75
|
+
method: :patch,
|
|
76
|
+
path: ["product-collections/%1$s", id],
|
|
77
|
+
body: parsed,
|
|
78
|
+
model: NilClass,
|
|
79
|
+
options: options
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# @overload list(archived: nil, brand_id: nil, page_number: nil, page_size: nil, request_options: {})
|
|
84
|
+
#
|
|
85
|
+
# @param archived [Boolean] List archived collections
|
|
86
|
+
#
|
|
87
|
+
# @param brand_id [String] Filter by Brand id
|
|
88
|
+
#
|
|
89
|
+
# @param page_number [Integer] Page number default is 0
|
|
90
|
+
#
|
|
91
|
+
# @param page_size [Integer] Page size default is 10 max is 100
|
|
92
|
+
#
|
|
93
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
94
|
+
#
|
|
95
|
+
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::ProductCollectionListResponse>]
|
|
96
|
+
#
|
|
97
|
+
# @see Dodopayments::Models::ProductCollectionListParams
|
|
98
|
+
def list(params = {})
|
|
99
|
+
parsed, options = Dodopayments::ProductCollectionListParams.dump_request(params)
|
|
100
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
101
|
+
@client.request(
|
|
102
|
+
method: :get,
|
|
103
|
+
path: "product-collections",
|
|
104
|
+
query: query,
|
|
105
|
+
page: Dodopayments::Internal::DefaultPageNumberPagination,
|
|
106
|
+
model: Dodopayments::Models::ProductCollectionListResponse,
|
|
107
|
+
options: options
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @overload delete(id, request_options: {})
|
|
112
|
+
#
|
|
113
|
+
# @param id [String] Product Collection Id
|
|
114
|
+
#
|
|
115
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
116
|
+
#
|
|
117
|
+
# @return [nil]
|
|
118
|
+
#
|
|
119
|
+
# @see Dodopayments::Models::ProductCollectionDeleteParams
|
|
120
|
+
def delete(id, params = {})
|
|
121
|
+
@client.request(
|
|
122
|
+
method: :delete,
|
|
123
|
+
path: ["product-collections/%1$s", id],
|
|
124
|
+
model: NilClass,
|
|
125
|
+
options: params[:request_options]
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @overload unarchive(id, request_options: {})
|
|
130
|
+
#
|
|
131
|
+
# @param id [String] Product Collection Id
|
|
132
|
+
#
|
|
133
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
|
+
#
|
|
135
|
+
# @return [Dodopayments::Models::ProductCollectionUnarchiveResponse]
|
|
136
|
+
#
|
|
137
|
+
# @see Dodopayments::Models::ProductCollectionUnarchiveParams
|
|
138
|
+
def unarchive(id, params = {})
|
|
139
|
+
@client.request(
|
|
140
|
+
method: :post,
|
|
141
|
+
path: ["product-collections/%1$s/unarchive", id],
|
|
142
|
+
model: Dodopayments::Models::ProductCollectionUnarchiveResponse,
|
|
143
|
+
options: params[:request_options]
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @overload update_images(id, force_update: nil, request_options: {})
|
|
148
|
+
#
|
|
149
|
+
# @param id [String] Product Collection Id
|
|
150
|
+
#
|
|
151
|
+
# @param force_update [Boolean, nil] If true, generates a new image ID to force cache invalidation
|
|
152
|
+
#
|
|
153
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
154
|
+
#
|
|
155
|
+
# @return [Dodopayments::Models::ProductCollectionUpdateImagesResponse]
|
|
156
|
+
#
|
|
157
|
+
# @see Dodopayments::Models::ProductCollectionUpdateImagesParams
|
|
158
|
+
def update_images(id, params = {})
|
|
159
|
+
parsed, options = Dodopayments::ProductCollectionUpdateImagesParams.dump_request(params)
|
|
160
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
161
|
+
@client.request(
|
|
162
|
+
method: :put,
|
|
163
|
+
path: ["product-collections/%1$s/images", id],
|
|
164
|
+
query: query,
|
|
165
|
+
model: Dodopayments::Models::ProductCollectionUpdateImagesResponse,
|
|
166
|
+
options: options
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @api private
|
|
171
|
+
#
|
|
172
|
+
# @param client [Dodopayments::Client]
|
|
173
|
+
def initialize(client:)
|
|
174
|
+
@client = client
|
|
175
|
+
@groups = Dodopayments::Resources::ProductCollections::Groups.new(client: client)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(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: {})
|
|
11
|
+
# @overload create(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: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
|
|
14
14
|
#
|
|
@@ -24,7 +24,11 @@ module Dodopayments
|
|
|
24
24
|
#
|
|
25
25
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
26
26
|
#
|
|
27
|
-
# @param
|
|
27
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
28
|
+
#
|
|
29
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
30
|
+
#
|
|
31
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
28
32
|
#
|
|
29
33
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this subscription
|
|
30
34
|
#
|
|
@@ -91,7 +95,7 @@ module Dodopayments
|
|
|
91
95
|
# Some parameter documentations has been truncated, see
|
|
92
96
|
# {Dodopayments::Models::SubscriptionUpdateParams} for more details.
|
|
93
97
|
#
|
|
94
|
-
# @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
|
|
98
|
+
# @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
|
|
95
99
|
#
|
|
96
100
|
# @param subscription_id [String] Subscription Id
|
|
97
101
|
#
|
|
@@ -107,6 +111,8 @@ module Dodopayments
|
|
|
107
111
|
#
|
|
108
112
|
# @param credit_entitlement_cart [Array<Dodopayments::Models::SubscriptionUpdateParams::CreditEntitlementCart>, nil] Update credit entitlement cart settings
|
|
109
113
|
#
|
|
114
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
115
|
+
#
|
|
110
116
|
# @param customer_name [String, nil]
|
|
111
117
|
#
|
|
112
118
|
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
|
@@ -192,7 +198,7 @@ module Dodopayments
|
|
|
192
198
|
# Some parameter documentations has been truncated, see
|
|
193
199
|
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
|
194
200
|
#
|
|
195
|
-
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
201
|
+
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
196
202
|
#
|
|
197
203
|
# @param subscription_id [String] Subscription Id
|
|
198
204
|
#
|
|
@@ -206,7 +212,9 @@ module Dodopayments
|
|
|
206
212
|
#
|
|
207
213
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
208
214
|
#
|
|
209
|
-
# @param discount_code [String, nil]
|
|
215
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
216
|
+
#
|
|
217
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply to the new plan. Max 20.
|
|
210
218
|
#
|
|
211
219
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
212
220
|
#
|
|
@@ -268,7 +276,7 @@ module Dodopayments
|
|
|
268
276
|
# Some parameter documentations has been truncated, see
|
|
269
277
|
# {Dodopayments::Models::SubscriptionPreviewChangePlanParams} for more details.
|
|
270
278
|
#
|
|
271
|
-
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
279
|
+
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
272
280
|
#
|
|
273
281
|
# @param subscription_id [String] Subscription Id
|
|
274
282
|
#
|
|
@@ -282,7 +290,9 @@ module Dodopayments
|
|
|
282
290
|
#
|
|
283
291
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
284
292
|
#
|
|
285
|
-
# @param discount_code [String, nil]
|
|
293
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
294
|
+
#
|
|
295
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply to the new plan. Max 20.
|
|
286
296
|
#
|
|
287
297
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
288
298
|
#
|
|
@@ -399,11 +409,11 @@ module Dodopayments
|
|
|
399
409
|
)
|
|
400
410
|
end
|
|
401
411
|
|
|
402
|
-
# @overload update_payment_method(subscription_id,
|
|
412
|
+
# @overload update_payment_method(subscription_id, payment_method:, request_options: {})
|
|
403
413
|
#
|
|
404
414
|
# @param subscription_id [String] Subscription Id
|
|
405
415
|
#
|
|
406
|
-
# @param
|
|
416
|
+
# @param payment_method [Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::PaymentMethod::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::PaymentMethod::Existing]
|
|
407
417
|
#
|
|
408
418
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
409
419
|
#
|
|
@@ -415,7 +425,7 @@ module Dodopayments
|
|
|
415
425
|
@client.request(
|
|
416
426
|
method: :post,
|
|
417
427
|
path: ["subscriptions/%1$s/update-payment-method", subscription_id],
|
|
418
|
-
body: parsed[:
|
|
428
|
+
body: parsed[:payment_method],
|
|
419
429
|
model: Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse,
|
|
420
430
|
options: options
|
|
421
431
|
)
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -56,6 +56,7 @@ require_relative "dodopayments/client"
|
|
|
56
56
|
require_relative "dodopayments/internal/cursor_page_pagination"
|
|
57
57
|
require_relative "dodopayments/internal/default_page_number_pagination"
|
|
58
58
|
require_relative "dodopayments/models/checkout_session_request"
|
|
59
|
+
require_relative "dodopayments/models/product_collections/product_collection_group_details"
|
|
59
60
|
require_relative "dodopayments/models/update_subscription_plan_req"
|
|
60
61
|
require_relative "dodopayments/models/entitlements/entitlement_grant"
|
|
61
62
|
require_relative "dodopayments/models/credit_entitlements/credit_ledger_entry"
|
|
@@ -162,6 +163,7 @@ require_relative "dodopayments/models/digital_product_delivery_file"
|
|
|
162
163
|
require_relative "dodopayments/models/discount"
|
|
163
164
|
require_relative "dodopayments/models/discount_create_params"
|
|
164
165
|
require_relative "dodopayments/models/discount_delete_params"
|
|
166
|
+
require_relative "dodopayments/models/discount_detail"
|
|
165
167
|
require_relative "dodopayments/models/discount_list_params"
|
|
166
168
|
require_relative "dodopayments/models/discount_retrieve_by_code_params"
|
|
167
169
|
require_relative "dodopayments/models/discount_retrieve_params"
|
|
@@ -202,10 +204,13 @@ require_relative "dodopayments/models/entitlement_update_params"
|
|
|
202
204
|
require_relative "dodopayments/models/event"
|
|
203
205
|
require_relative "dodopayments/models/event_input"
|
|
204
206
|
require_relative "dodopayments/models/filter_operator"
|
|
207
|
+
require_relative "dodopayments/models/filter_type"
|
|
208
|
+
require_relative "dodopayments/models/github_permission"
|
|
205
209
|
require_relative "dodopayments/models/integration_config"
|
|
206
210
|
require_relative "dodopayments/models/integration_config_response"
|
|
207
211
|
require_relative "dodopayments/models/intent_status"
|
|
208
212
|
require_relative "dodopayments/models/invoices/payment_retrieve_params"
|
|
213
|
+
require_relative "dodopayments/models/invoices/payment_retrieve_payout_params"
|
|
209
214
|
require_relative "dodopayments/models/invoices/payment_retrieve_refund_params"
|
|
210
215
|
require_relative "dodopayments/models/license_activate_params"
|
|
211
216
|
require_relative "dodopayments/models/license_activate_response"
|
|
@@ -261,6 +266,27 @@ require_relative "dodopayments/models/payouts/breakup_retrieve_response"
|
|
|
261
266
|
require_relative "dodopayments/models/price"
|
|
262
267
|
require_relative "dodopayments/models/product"
|
|
263
268
|
require_relative "dodopayments/models/product_archive_params"
|
|
269
|
+
require_relative "dodopayments/models/product_collection"
|
|
270
|
+
require_relative "dodopayments/models/product_collection_create_params"
|
|
271
|
+
require_relative "dodopayments/models/product_collection_delete_params"
|
|
272
|
+
require_relative "dodopayments/models/product_collection_list_params"
|
|
273
|
+
require_relative "dodopayments/models/product_collection_list_response"
|
|
274
|
+
require_relative "dodopayments/models/product_collection_retrieve_params"
|
|
275
|
+
require_relative "dodopayments/models/product_collections/group_create_params"
|
|
276
|
+
require_relative "dodopayments/models/product_collections/group_delete_params"
|
|
277
|
+
require_relative "dodopayments/models/product_collections/group_product"
|
|
278
|
+
require_relative "dodopayments/models/product_collections/groups/item_create_params"
|
|
279
|
+
require_relative "dodopayments/models/product_collections/groups/item_create_response"
|
|
280
|
+
require_relative "dodopayments/models/product_collections/groups/item_delete_params"
|
|
281
|
+
require_relative "dodopayments/models/product_collections/groups/item_update_params"
|
|
282
|
+
require_relative "dodopayments/models/product_collections/groups/product_collection_product"
|
|
283
|
+
require_relative "dodopayments/models/product_collections/group_update_params"
|
|
284
|
+
require_relative "dodopayments/models/product_collections/product_collection_group_response"
|
|
285
|
+
require_relative "dodopayments/models/product_collection_unarchive_params"
|
|
286
|
+
require_relative "dodopayments/models/product_collection_unarchive_response"
|
|
287
|
+
require_relative "dodopayments/models/product_collection_update_images_params"
|
|
288
|
+
require_relative "dodopayments/models/product_collection_update_images_response"
|
|
289
|
+
require_relative "dodopayments/models/product_collection_update_params"
|
|
264
290
|
require_relative "dodopayments/models/product_create_params"
|
|
265
291
|
require_relative "dodopayments/models/product_entitlement_summary"
|
|
266
292
|
require_relative "dodopayments/models/product_item_req"
|
|
@@ -365,6 +391,9 @@ require_relative "dodopayments/resources/payments"
|
|
|
365
391
|
require_relative "dodopayments/resources/payouts"
|
|
366
392
|
require_relative "dodopayments/resources/payouts/breakup"
|
|
367
393
|
require_relative "dodopayments/resources/payouts/breakup/details"
|
|
394
|
+
require_relative "dodopayments/resources/product_collections"
|
|
395
|
+
require_relative "dodopayments/resources/product_collections/groups"
|
|
396
|
+
require_relative "dodopayments/resources/product_collections/groups/items"
|
|
368
397
|
require_relative "dodopayments/resources/products"
|
|
369
398
|
require_relative "dodopayments/resources/products/images"
|
|
370
399
|
require_relative "dodopayments/resources/products/short_links"
|
data/rbi/dodopayments/client.rbi
CHANGED
|
@@ -95,6 +95,9 @@ module Dodopayments
|
|
|
95
95
|
sig { returns(Dodopayments::Resources::Entitlements) }
|
|
96
96
|
attr_reader :entitlements
|
|
97
97
|
|
|
98
|
+
sig { returns(Dodopayments::Resources::ProductCollections) }
|
|
99
|
+
attr_reader :product_collections
|
|
100
|
+
|
|
98
101
|
# @api private
|
|
99
102
|
sig { override.returns(T::Hash[String, String]) }
|
|
100
103
|
private def auth_headers
|