Skip to content

Missing amazon_pay in CreateInvoicePaymentSettingsPaymentMethodTypes and InvoicesPaymentSettingsPaymentMethodTypes #643

Open
@TmLev

Description

@TmLev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions