Skip to content

Commit

Permalink
Codegen for openapi a8928d0
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Apr 18, 2022
1 parent f201fb1 commit bff5c41
Show file tree
Hide file tree
Showing 75 changed files with 1,707 additions and 18 deletions.
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class ChargePaymentMethodDetails : StripeEntity<ChargePaymentMethodDetail
[JsonProperty("card_present")]
public ChargePaymentMethodDetailsCardPresent CardPresent { get; set; }

[JsonProperty("customer_balance")]
public ChargePaymentMethodDetailsCustomerBalance CustomerBalance { get; set; }

[JsonProperty("eps")]
public ChargePaymentMethodDetailsEps Eps { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity<ChargePaymentM

/// <summary>
/// Whether this <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> is
/// eligible for incremental authorizations. Request support using
/// [request_incremental_authorization_support]
/// /docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support.
/// eligible for incremental authorizations. Request support using <a
/// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support</a>.
/// </summary>
[JsonProperty("incremental_authorization_supported")]
public bool? IncrementalAuthorizationSupported { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class ChargePaymentMethodDetailsCustomerBalance : StripeEntity<ChargePaymentMethodDetailsCustomerBalance>
{
}
}
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public class PaymentIntent : StripeEntity<PaymentIntent>, IHasId, IHasMetadata,
[JsonProperty("amount_capturable")]
public long AmountCapturable { get; set; }

[JsonProperty("amount_details")]
public PaymentIntentAmountDetails AmountDetails { get; set; }

/// <summary>
/// Amount that was collected by this PaymentIntent.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentAmountDetails : StripeEntity<PaymentIntentAmountDetails>
{
[JsonProperty("tip")]
public PaymentIntentAmountDetailsTip Tip { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentAmountDetailsTip : StripeEntity<PaymentIntentAmountDetailsTip>
{
/// <summary>
/// Portion of the amount that corresponds to a tip.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class PaymentIntentNextAction : StripeEntity<PaymentIntentNextAction>
[JsonProperty("card_await_notification")]
public PaymentIntentNextActionCardAwaitNotification CardAwaitNotification { get; set; }

[JsonProperty("display_bank_transfer_instructions")]
public PaymentIntentNextActionDisplayBankTransferInstructions DisplayBankTransferInstructions { get; set; }

[JsonProperty("konbini_display_details")]
public PaymentIntentNextActionKonbiniDisplayDetails KonbiniDisplayDetails { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEntity<PaymentIntentNextActionDisplayBankTransferInstructions>
{
/// <summary>
/// The remaining amount that needs to be transferred to complete the payment.
/// </summary>
[JsonProperty("amount_remaining")]
public long? AmountRemaining { get; set; }

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
/// currency</a>.
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// A list of financial addresses that can be used to fund the customer balance.
/// </summary>
[JsonProperty("financial_addresses")]
public List<PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress> FinancialAddresses { get; set; }

/// <summary>
/// A string identifying this payment. Instruct your customer to include this code in the
/// reference or memo field of their bank transfer.
/// </summary>
[JsonProperty("reference")]
public string Reference { get; set; }

/// <summary>
/// Type of bank transfer.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress : StripeEntity<PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress>
{
/// <summary>
/// The payment networks supported by this FinancialAddress.
/// </summary>
[JsonProperty("supported_networks")]
public List<string> SupportedNetworks { get; set; }

/// <summary>
/// The type of financial address.
/// One of: <c>iban</c>, or <c>zengin</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }

/// <summary>
/// Zengin Records contain Japan bank account details per the Zengin format.
/// </summary>
[JsonProperty("zengin")]
public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin Zengin { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin : StripeEntity<PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity<PaymentIntentPayme
[JsonProperty("card_present")]
public PaymentIntentPaymentMethodOptionsCardPresent CardPresent { get; set; }

[JsonProperty("customer_balance")]
public PaymentIntentPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; }

[JsonProperty("eps")]
public PaymentIntentPaymentMethodOptionsEps Eps { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity<Payment

/// <summary>
/// Request ability to <a
/// href="docs/terminal/features/incremental-authorizations">increment</a> this
/// PaymentIntent if the combination of MCC and card brand is eligible. Check <a
/// href="https://stripe.com/docs/terminal/features/incremental-authorizations">increment</a>
/// this PaymentIntent if the combination of MCC and card brand is eligible. Check <a
/// href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
/// in the <a href="https://stripe.com/docs/api/payment_intents/confirm">Confirm</a>
/// response to verify support.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentPaymentMethodOptionsCustomerBalance : StripeEntity<PaymentIntentPaymentMethodOptionsCustomerBalance>
{
[JsonProperty("bank_transfer")]
public PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; }

/// <summary>
/// The funding method type to be used when there are not enough funds in the customer
/// balance. Permitted values include: <c>bank_transfer</c>.
/// </summary>
[JsonProperty("funding_type")]
public string FundingType { get; set; }

/// <summary>
/// Indicates that you intend to make future payments with this PaymentIntent's payment
/// method.
///
/// Providing this parameter will <a
/// href="https://stripe.com/docs/payments/save-during-payment">attach the payment
/// method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is
/// confirmed and any required actions from the user are complete. If no Customer was
/// provided, the payment method can still be <a
/// href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer
/// after the transaction completes.
///
/// When processing card payments, Stripe also uses <c>setup_future_usage</c> to dynamically
/// optimize your payment flow and comply with regional legislation and network rules, such
/// as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.
/// </summary>
[JsonProperty("setup_future_usage")]
public string SetupFutureUsage { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity<PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer>
{
/// <summary>
/// List of address types that should be returned in the financial_addresses response. If
/// not specified, all valid types will be returned.
///
/// Permitted values include: <c>zengin</c>.
/// </summary>
[JsonProperty("requested_address_types")]
public List<string> RequestedAddressTypes { get; set; }

/// <summary>
/// The bank transfer type that this PaymentIntent is allowed to use for funding. Permitted
/// values include: <c>us_bank_account</c>, <c>eu_bank_account</c>, <c>id_bank_account</c>,
/// <c>gb_bank_account</c>, <c>jp_bank_account</c>, <c>mx_bank_account</c>,
/// <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_transfer</c>, <c>mx_bank_transfer</c>, or <c>us_bank_transfer</c>.
/// One of: <c>eu_bank_account</c>, <c>eu_bank_transfer</c>, <c>gb_bank_account</c>,
/// <c>gb_bank_transfer</c>, <c>id_bank_account</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_account</c>, <c>jp_bank_transfer</c>, <c>mx_bank_account</c>,
/// <c>mx_bank_transfer</c>, <c>us_bank_account</c>, or <c>us_bank_transfer</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
11 changes: 7 additions & 4 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public Customer Customer
internal ExpandableField<Customer> InternalCustomer { get; set; }
#endregion

[JsonProperty("customer_balance")]
public PaymentMethodCustomerBalance CustomerBalance { get; set; }

[JsonProperty("eps")]
public PaymentMethodEps Eps { get; set; }

Expand Down Expand Up @@ -160,10 +163,10 @@ public Customer Customer
/// PaymentMethod type.
/// One of: <c>acss_debit</c>, <c>afterpay_clearpay</c>, <c>alipay</c>,
/// <c>au_becs_debit</c>, <c>bacs_debit</c>, <c>bancontact</c>, <c>boleto</c>, <c>card</c>,
/// <c>card_present</c>, <c>eps</c>, <c>fpx</c>, <c>giropay</c>, <c>grabpay</c>,
/// <c>ideal</c>, <c>interac_present</c>, <c>klarna</c>, <c>konbini</c>, <c>oxxo</c>,
/// <c>p24</c>, <c>paynow</c>, <c>sepa_debit</c>, <c>sofort</c>, <c>us_bank_account</c>, or
/// <c>wechat_pay</c>.
/// <c>card_present</c>, <c>customer_balance</c>, <c>eps</c>, <c>fpx</c>, <c>giropay</c>,
/// <c>grabpay</c>, <c>ideal</c>, <c>interac_present</c>, <c>klarna</c>, <c>konbini</c>,
/// <c>oxxo</c>, <c>p24</c>, <c>paynow</c>, <c>sepa_debit</c>, <c>sofort</c>,
/// <c>us_bank_account</c>, or <c>wechat_pay</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class PaymentMethodCustomerBalance : StripeEntity<PaymentMethodCustomerBalance>
{
}
}
52 changes: 52 additions & 0 deletions src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// File generated from our OpenAPI spec
namespace Stripe.Terminal
{
using Newtonsoft.Json;

/// <summary>
/// A Configurations object represents how features should be configured for terminal
/// readers.
/// </summary>
public class Configuration : StripeEntity<Configuration>, IHasId, IHasObject
{
/// <summary>
/// Unique identifier for the object.
/// </summary>
[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
public string Object { get; set; }

[JsonProperty("bbpos_wisepos_e")]
public ConfigurationBbposWiseposE BbposWiseposE { get; set; }

/// <summary>
/// Whether this object is deleted or not.
/// </summary>
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
public bool? Deleted { get; set; }

/// <summary>
/// Whether this Configuration is the default for your account.
/// </summary>
[JsonProperty("is_account_default")]
public bool? IsAccountDefault { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
/// </summary>
[JsonProperty("livemode")]
public bool Livemode { get; set; }

[JsonProperty("tipping")]
public ConfigurationTipping Tipping { get; set; }

[JsonProperty("verifone_p400")]
public ConfigurationVerifoneP400 VerifoneP400 { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// File generated from our OpenAPI spec
namespace Stripe.Terminal
{
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class ConfigurationBbposWiseposE : StripeEntity<ConfigurationBbposWiseposE>
{
#region Expandable Splashscreen

/// <summary>
/// (ID of the File)
/// A File ID representing an image you would like displayed on the reader.
/// </summary>
[JsonIgnore]
public string SplashscreenId
{
get => this.InternalSplashscreen?.Id;
set => this.InternalSplashscreen = SetExpandableFieldId(value, this.InternalSplashscreen);
}

/// <summary>
/// (Expanded)
/// A File ID representing an image you would like displayed on the reader.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public File Splashscreen
{
get => this.InternalSplashscreen?.ExpandedObject;
set => this.InternalSplashscreen = SetExpandableFieldObject(value, this.InternalSplashscreen);
}

[JsonProperty("splashscreen")]
[JsonConverter(typeof(ExpandableFieldConverter<File>))]
internal ExpandableField<File> InternalSplashscreen { get; set; }
#endregion
}
}
Loading

0 comments on commit bff5c41

Please sign in to comment.