Skip to content

Commit

Permalink
Add comments for query parameters (#2770)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe authored Sep 18, 2023
1 parent 50ab3ed commit dab0e63
Show file tree
Hide file tree
Showing 82 changed files with 782 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class AccountBankAccountOptions : INestedOptions
/// The type of entity that holds the account. It can be <c>company</c> or
/// <c>individual</c>. This field is required when attaching the bank account to a
/// <c>Customer</c> object.
/// One of: <c>company</c>, or <c>individual</c>.
/// </summary>
[JsonProperty("account_holder_type")]
public string AccountHolderType { get; set; }
Expand Down
14 changes: 14 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// A card or bank account to attach to the account for receiving <a
/// href="https://stripe.com/docs/connect/bank-debit-card-payouts">payouts</a> (you won’t be
/// able to use it for top-ups). You can provide either a token, like the ones returned by
/// <a href="https://stripe.com/docs/js">Stripe.js</a>, or a dictionary, as documented in
/// the <c>external_account</c> parameter for <a
/// href="https://stripe.com/docs/api#account_create_bank_account">bank account</a>
/// creation. &lt;br&gt;&lt;br&gt;By default, providing an external account sets it as the
/// new default external account for its currency, and deletes the old default if one
/// exists. To add additional external accounts without replacing the existing default for
/// the currency, use the <a
/// href="https://stripe.com/docs/api#account_create_bank_account">bank account</a> or <a
/// href="https://stripe.com/docs/api#account_create_card">card creation</a> APIs.
/// </summary>
[JsonProperty("external_account")]
[JsonConverter(typeof(AnyOfConverter))]
public AnyOf<string, AccountBankAccountOptions, AccountCardOptions> ExternalAccount { get; set; }
Expand Down
14 changes: 14 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// A card or bank account to attach to the account for receiving <a
/// href="https://stripe.com/docs/connect/bank-debit-card-payouts">payouts</a> (you won’t be
/// able to use it for top-ups). You can provide either a token, like the ones returned by
/// <a href="https://stripe.com/docs/js">Stripe.js</a>, or a dictionary, as documented in
/// the <c>external_account</c> parameter for <a
/// href="https://stripe.com/docs/api#account_create_bank_account">bank account</a>
/// creation. &lt;br&gt;&lt;br&gt;By default, providing an external account sets it as the
/// new default external account for its currency, and deletes the old default if one
/// exists. To add additional external accounts without replacing the existing default for
/// the currency, use the <a
/// href="https://stripe.com/docs/api#account_create_bank_account">bank account</a> or <a
/// href="https://stripe.com/docs/api#account_create_card">card creation</a> APIs.
/// </summary>
[JsonProperty("external_account")]
[JsonConverter(typeof(AnyOfConverter))]
public AnyOf<string, AccountBankAccountOptions, AccountCardOptions> ExternalAccount { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Stripe

public class ApplicationFeeListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return application fees for the charge specified by this charge ID.
/// </summary>
[JsonProperty("charge")]
public string Charge { get; set; }
}
Expand Down
7 changes: 7 additions & 0 deletions src/Stripe.net/Services/Apps/Secrets/SecretFindOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ namespace Stripe.Apps

public class SecretFindOptions : BaseOptions
{
/// <summary>
/// A name for the secret that's unique within the scope.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }

/// <summary>
/// Specifies the scoping of the secret. Requests originating from UI extensions can only
/// access account-scoped secrets or secrets scoped to their own user.
/// </summary>
[JsonProperty("scope")]
public SecretScopeOptions Scope { get; set; }
}
Expand Down
4 changes: 4 additions & 0 deletions src/Stripe.net/Services/Apps/Secrets/SecretListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace Stripe.Apps

public class SecretListOptions : ListOptions
{
/// <summary>
/// Specifies the scoping of the secret. Requests originating from UI extensions can only
/// access account-scoped secrets or secrets scoped to their own user.
/// </summary>
[JsonProperty("scope")]
public SecretScopeOptions Scope { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,44 @@ namespace Stripe

public class BalanceTransactionListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return transactions in a certain currency. 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>
/// For automatic Stripe payouts only, only returns transactions that were paid out on the
/// specified payout ID.
/// </summary>
[JsonProperty("payout")]
public string Payout { get; set; }

/// <summary>
/// Only returns the original transaction.
/// </summary>
[JsonProperty("source")]
public string Source { get; set; }

/// <summary>
/// Only returns transactions of the given type. One of: <c>adjustment</c>, <c>advance</c>,
/// <c>advance_funding</c>, <c>anticipation_repayment</c>, <c>application_fee</c>,
/// <c>application_fee_refund</c>, <c>charge</c>, <c>connect_collection_transfer</c>,
/// <c>contribution</c>, <c>issuing_authorization_hold</c>,
/// <c>issuing_authorization_release</c>, <c>issuing_dispute</c>,
/// <c>issuing_transaction</c>, <c>obligation_inbound</c>, <c>obligation_outbound</c>,
/// <c>obligation_reversal_inbound</c>, <c>obligation_reversal_outbound</c>,
/// <c>obligation_payout</c>, <c>obligation_payout_failure</c>, <c>payment</c>,
/// <c>payment_failure_refund</c>, <c>payment_refund</c>, <c>payment_reversal</c>,
/// <c>payout</c>, <c>payout_cancel</c>, <c>payout_failure</c>, <c>refund</c>,
/// <c>refund_failure</c>, <c>reserve_transaction</c>, <c>reserved_funds</c>,
/// <c>stripe_fee</c>, <c>stripe_fx_fee</c>, <c>tax_fee</c>, <c>topup</c>,
/// <c>topup_reversal</c>, <c>transfer</c>, <c>transfer_cancel</c>, <c>transfer_failure</c>,
/// or <c>transfer_refund</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ namespace Stripe.BillingPortal

public class ConfigurationListOptions : ListOptions
{
/// <summary>
/// Only return configurations that are active or inactive (e.g., pass <c>true</c> to only
/// list active configurations).
/// </summary>
[JsonProperty("active")]
public bool? Active { get; set; }

/// <summary>
/// Only return the default or non-default configurations (e.g., pass <c>true</c> to only
/// list the default configuration).
/// </summary>
[JsonProperty("is_default")]
public bool? IsDefault { get; set; }
}
Expand Down
6 changes: 6 additions & 0 deletions src/Stripe.net/Services/Cards/CardUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("documents")]
public CardDocumentsOptions Documents { get; set; }

/// <summary>
/// Two digit number representing the card’s expiration month.
/// </summary>
[JsonProperty("exp_month")]
public long? ExpMonth { get; set; }

/// <summary>
/// Four digit number representing the card’s expiration year.
/// </summary>
[JsonProperty("exp_year")]
public long? ExpYear { get; set; }

Expand Down
13 changes: 13 additions & 0 deletions src/Stripe.net/Services/Charges/ChargeCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("shipping")]
public ChargeShippingOptions Shipping { get; set; }

/// <summary>
/// A payment source to be charged. This can be the ID of a <a
/// href="https://stripe.com/docs/api#cards">card</a> (i.e., credit or debit card), a <a
/// href="https://stripe.com/docs/api#bank_accounts">bank account</a>, a <a
/// href="https://stripe.com/docs/api#sources">source</a>, a <a
/// href="https://stripe.com/docs/api#tokens">token</a>, or a <a
/// href="https://stripe.com/docs/connect/account-debits#charging-a-connected-account">connected
/// account</a>. For certain sources---namely, <a
/// href="https://stripe.com/docs/api#cards">cards</a>, <a
/// href="https://stripe.com/docs/api#bank_accounts">bank accounts</a>, and attached <a
/// href="https://stripe.com/docs/api#sources">sources</a>---you must also pass the ID of
/// the associated customer.
/// </summary>
[JsonProperty("source")]
[JsonConverter(typeof(AnyOfConverter))]
public AnyOf<string, CardCreateNestedOptions> Source { get; set; }
Expand Down
10 changes: 10 additions & 0 deletions src/Stripe.net/Services/Charges/ChargeListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ namespace Stripe

public class ChargeListOptions : ListOptionsWithCreated
{
/// <summary>
/// Only return charges for the customer specified by this customer ID.
/// </summary>
[JsonProperty("customer")]
public string Customer { get; set; }

/// <summary>
/// Only return charges that were created by the PaymentIntent specified by this
/// PaymentIntent ID.
/// </summary>
[JsonProperty("payment_intent")]
public string PaymentIntent { get; set; }

/// <summary>
/// Only return charges for this transfer group.
/// </summary>
[JsonProperty("transfer_group")]
public string TransferGroup { get; set; }
}
Expand Down
15 changes: 15 additions & 0 deletions src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,33 @@ namespace Stripe.Checkout

public class SessionListOptions : ListOptions
{
/// <summary>
/// Only return the Checkout Sessions for the Customer specified.
/// </summary>
[JsonProperty("customer")]
public string Customer { get; set; }

/// <summary>
/// Only return the Checkout Sessions for the Customer details specified.
/// </summary>
[JsonProperty("customer_details")]
public SessionCustomerDetailsOptions CustomerDetails { get; set; }

/// <summary>
/// Only return the Checkout Session for the PaymentIntent specified.
/// </summary>
[JsonProperty("payment_intent")]
public string PaymentIntent { get; set; }

/// <summary>
/// Only return the Checkout Sessions for the Payment Link specified.
/// </summary>
[JsonProperty("payment_link")]
public string PaymentLink { get; set; }

/// <summary>
/// Only return the Checkout Session for the subscription specified.
/// </summary>
[JsonProperty("subscription")]
public string Subscription { get; set; }
}
Expand Down
6 changes: 6 additions & 0 deletions src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ namespace Stripe

public class CreditNoteListOptions : ListOptions
{
/// <summary>
/// Only return credit notes for the customer specified by this customer ID.
/// </summary>
[JsonProperty("customer")]
public string Customer { get; set; }

/// <summary>
/// Only return credit notes for the invoice specified by this invoice ID.
/// </summary>
[JsonProperty("invoice")]
public string Invoice { get; set; }
}
Expand Down
49 changes: 49 additions & 0 deletions src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,89 @@ namespace Stripe

public class CreditNotePreviewOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// The integer amount in cents (or local equivalent) representing the total amount of the
/// credit note.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }

/// <summary>
/// The integer amount in cents (or local equivalent) representing the amount to credit the
/// customer's balance, which will be automatically applied to their next invoice.
/// </summary>
[JsonProperty("credit_amount")]
public long? CreditAmount { get; set; }

/// <summary>
/// The date when this credit note is in effect. Same as <c>created</c> unless overwritten.
/// When defined, this value replaces the system-generated 'Date of issue' printed on the
/// credit note PDF.
/// </summary>
[JsonProperty("effective_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? EffectiveAt { get; set; }

/// <summary>
/// ID of the invoice.
/// </summary>
[JsonProperty("invoice")]
public string Invoice { get; set; }

/// <summary>
/// Line items that make up the credit note.
/// </summary>
[JsonProperty("lines")]
public List<CreditNoteLineOptions> Lines { get; set; }

/// <summary>
/// The credit note's memo appears on the credit note PDF.
/// </summary>
[JsonProperty("memo")]
public string Memo { get; set; }

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
/// attach to an object. This can be useful for storing additional information about the
/// object in a structured format. Individual keys can be unset by posting an empty value to
/// them. All keys can be unset by posting an empty value to <c>metadata</c>.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The integer amount in cents (or local equivalent) representing the amount that is
/// credited outside of Stripe.
/// </summary>
[JsonProperty("out_of_band_amount")]
public long? OutOfBandAmount { get; set; }

/// <summary>
/// Reason for issuing this credit note, one of <c>duplicate</c>, <c>fraudulent</c>,
/// <c>order_change</c>, or <c>product_unsatisfactory</c>.
/// One of: <c>duplicate</c>, <c>fraudulent</c>, <c>order_change</c>, or
/// <c>product_unsatisfactory</c>.
/// </summary>
[JsonProperty("reason")]
public string Reason { get; set; }

/// <summary>
/// ID of an existing refund to link this credit note to.
/// </summary>
[JsonProperty("refund")]
public string Refund { get; set; }

/// <summary>
/// The integer amount in cents (or local equivalent) representing the amount to refund. If
/// set, a refund will be created for the charge associated with the invoice.
/// </summary>
[JsonProperty("refund_amount")]
public long? RefundAmount { get; set; }

/// <summary>
/// When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is
/// included in the credit note.
/// </summary>
[JsonProperty("shipping_cost")]
public CreditNoteShippingCostOptions ShippingCost { get; set; }
}
Expand Down
8 changes: 8 additions & 0 deletions src/Stripe.net/Services/Customers/CustomerListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ namespace Stripe

public class CustomerListOptions : ListOptionsWithCreated
{
/// <summary>
/// A case-sensitive filter on the list based on the customer's <c>email</c> field. The
/// value must be a string.
/// </summary>
[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// Provides a list of customers that are associated with the specified test clock. The
/// response will not include customers with test clocks if this parameter is not set.
/// </summary>
[JsonProperty("test_clock")]
public string TestClock { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ namespace Stripe

public class CustomerListPaymentMethodsOptions : ListOptions
{
/// <summary>
/// An optional filter on the list, based on the object <c>type</c> field. Without the
/// filter, the list includes all current and future payment method types. If your
/// integration expects only one type of payment method in the response, make sure to
/// provide a type value in the request.
/// One of: <c>acss_debit</c>, <c>affirm</c>, <c>afterpay_clearpay</c>, <c>alipay</c>,
/// <c>au_becs_debit</c>, <c>bacs_debit</c>, <c>bancontact</c>, <c>blik</c>, <c>boleto</c>,
/// <c>card</c>, <c>cashapp</c>, <c>customer_balance</c>, <c>eps</c>, <c>fpx</c>,
/// <c>giropay</c>, <c>grabpay</c>, <c>ideal</c>, <c>klarna</c>, <c>konbini</c>,
/// <c>link</c>, <c>oxxo</c>, <c>p24</c>, <c>paynow</c>, <c>paypal</c>, <c>pix</c>,
/// <c>promptpay</c>, <c>sepa_debit</c>, <c>sofort</c>, <c>us_bank_account</c>,
/// <c>wechat_pay</c>, or <c>zip</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
Expand Down
Loading

0 comments on commit dab0e63

Please sign in to comment.