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

Missing amazon_pay in CreateInvoicePaymentSettingsPaymentMethodTypes and InvoicesPaymentSettingsPaymentMethodTypes #643

Open
TmLev opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TmLev
Copy link
Contributor

TmLev commented Dec 3, 2024

Describe the bug

Webhook can't deserialize an invoice.paid event due to the CreateInvoicePaymentSettingsPaymentMethodTypes and InvoicesPaymentSettingsPaymentMethodTypes enums missing an amazon_pay variant.

Error:

Error("unknown variant `amazon_pay`, expected one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `card`, `cashapp`, `customer_balance`, `eps`, `fpx`, `giropay`, `grabpay`, `ideal`, `konbini`, `link`, `p24`, `paynow`, `paypal`, `promptpay`, `sepa_credit_transfer`, `sepa_debit`, `sofort`, `us_bank_account`, `wechat_pay`", line: 260, column: 2)

To Reproduce

  1. Receive an invoice.paid event with the following payment_method_types:

    "payment_method_types": [
      "acss_debit",
      "amazon_pay",
      "cashapp",
      "link",
      "us_bank_account",
      "card"
     ]
  2. Try to deserialize it:

    let raw = serde_json::json!("amazon_pay").to_string();
    let payment_method_type: CreateInvoicePaymentSettingsPaymentMethodTypes =
        serde_json::from_str(&raw).unwrap();
    println!("{:?}", payment_method_type);
  3. Error:

    Error("unknown variant `amazon_pay`, expected one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `card`, `cashapp`, `customer_balance`, `eps`, `fpx`, `giropay`, `grabpay`, `ideal`, `konbini`, `link`, `p24`, `paynow`, `paypal`, `promptpay`, `sepa_credit_transfer`, `sepa_debit`, `sofort`, `us_bank_account`, `wechat_pay`", line: 1, column: 12
    

Expected behavior

CreateInvoicePaymentSettingsPaymentMethodTypes and InvoicesPaymentSettingsPaymentMethodTypes should deserialize amazon_pay

Code snippets

No response

OS

Docker debian:bookworm-slim

Rust version

1.82.0

Library version

async-stripe 0.39.1

API version

2023-10-16

Additional context

Our API has been affected by this change on Stripe's side, making it return 400 errors.

@TmLev TmLev added the bug Something isn't working label Dec 3, 2024
@TmLev TmLev changed the title Missing amazon_pay in CreateInvoicePaymentSettingsPaymentMethodTypes Missing amazon_pay in CreateInvoicePaymentSettingsPaymentMethodTypes and InvoicesPaymentSettingsPaymentMethodTypes Dec 3, 2024
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

1 participant