Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubscriptionPaymentBehavior is inaccessible #301

Closed
anna-is-cute opened this issue Nov 15, 2022 · 1 comment
Closed

SubscriptionPaymentBehavior is inaccessible #301

anna-is-cute opened this issue Nov 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@anna-is-cute
Copy link

Describe the bug

The SubscriptionPaymentBehavior enum is not accessible for CreateSubscription::payment_behavior (docs also don't make it a link).

There is an enum with the same name (which is not compatible) in the generated billing::subscription_item module, as well.
image

To Reproduce

    let mut create_subscription = CreateSubscription::new(customer_id);
    create_subscription.payment_behavior = Some(SubscriptionPaymentBehavior::DefaultIncomplete);
error[E0308]: mismatched types
   --> src/stripe/intent.rs:89:49
    |
89  |     create_subscription.payment_behavior = Some(SubscriptionPaymentBehavior::DefaultIncomplete);
    |                                            ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `stripe::resources::generated::billing::subscription::SubscriptionPaymentBehavior`, found enum `SubscriptionPaymentBehavior`
    |                                            |
    |                                            arguments to this enum variant are incorrect
    |

Expected behavior

The enum should be accessible.

Code snippets

No response

OS

Fedora 36

Rust version

rustc 1.66.0-nightly (2019147c5 2022-09-19)

Library version

0.15

API version

2022-08-01

Additional context

No response

@anna-is-cute anna-is-cute added the bug Something isn't working label Nov 15, 2022
@arlyon
Copy link
Owner

arlyon commented Nov 17, 2022

Hi! Thanks for using async-stripe. On master, #296 was recently landed that re-exports everything in the generated module so you can fall back to that in the case that duplicate classes cause the one you want to be swallowed.

Closing in favour of #154 which has more context.

@arlyon arlyon closed this as completed Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants