Skip to content

Commit

Permalink
Fix array of interface types
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Feb 12, 2020
1 parent 7ef4cf0 commit 2460eb2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions types/2019-12-03/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ declare module 'stripe' {
/**
* Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
*/
custom_fields?: InvoiceSettings.CustomFields | null;
custom_fields?: Array<InvoiceSettings.CustomField> | null;

/**
* ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
Expand All @@ -297,7 +297,7 @@ declare module 'stripe' {
}

namespace InvoiceSettings {
interface CustomFields {
interface CustomField {
/**
* The name of the custom field. This may be up to 30 characters.
*/
Expand Down Expand Up @@ -464,7 +464,7 @@ declare module 'stripe' {
/**
* Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
*/
custom_fields?: InvoiceSettings.CustomFields | null;
custom_fields?: Array<InvoiceSettings.CustomField> | null;

/**
* ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
Expand All @@ -478,7 +478,7 @@ declare module 'stripe' {
}

namespace InvoiceSettings {
interface CustomFields {
interface CustomField {
/**
* The name of the custom field. This may be up to 30 characters.
*/
Expand Down
32 changes: 16 additions & 16 deletions types/2019-12-03/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,6 @@ declare module 'stripe' {

type CollectionMethod = 'charge_automatically' | 'send_invoice';

interface CustomField {
/**
* The name of the custom field.
*/
name: string;

/**
* The value of the custom field.
*/
value: string;
}

interface CustomerShipping {
address?: Address;

Expand Down Expand Up @@ -395,6 +383,18 @@ declare module 'stripe' {
| 'za_vat';
}

interface CustomField {
/**
* The name of the custom field.
*/
name: string;

/**
* The value of the custom field.
*/
value: string;
}

type Status =
| 'deleted'
| 'draft'
Expand Down Expand Up @@ -520,7 +520,7 @@ declare module 'stripe' {
/**
* A list of up to 4 custom fields to be displayed on the invoice.
*/
custom_fields?: InvoiceCreateParams.CustomFields | null;
custom_fields?: Array<InvoiceCreateParams.CustomField> | null;

/**
* The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
Expand Down Expand Up @@ -591,7 +591,7 @@ declare module 'stripe' {
namespace InvoiceCreateParams {
type CollectionMethod = 'charge_automatically' | 'send_invoice';

interface CustomFields {
interface CustomField {
/**
* The name of the custom field. This may be up to 30 characters.
*/
Expand Down Expand Up @@ -637,7 +637,7 @@ declare module 'stripe' {
/**
* A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
*/
custom_fields?: InvoiceUpdateParams.CustomFields | null;
custom_fields?: Array<InvoiceUpdateParams.CustomField> | null;

/**
* The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
Expand Down Expand Up @@ -703,7 +703,7 @@ declare module 'stripe' {
namespace InvoiceUpdateParams {
type CollectionMethod = 'charge_automatically' | 'send_invoice';

interface CustomFields {
interface CustomField {
/**
* The name of the custom field. This may be up to 30 characters.
*/
Expand Down
8 changes: 4 additions & 4 deletions types/2019-12-03/Orders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,11 @@ declare module 'stripe' {
/**
* List of items to return.
*/
items?: OrderReturnOrderParams.Items | null;
items?: Array<OrderReturnOrderParams.Item> | null;
}

namespace OrderReturnOrderParams {
interface Items {
interface Item {
/**
* The amount (price) for this order item to return.
*/
Expand All @@ -489,10 +489,10 @@ declare module 'stripe' {
/**
* The type of this order item. Must be `sku`, `tax`, or `shipping`.
*/
type?: Items.Type;
type?: Item.Type;
}

namespace Items {
namespace Item {
type Type = 'discount' | 'shipping' | 'sku' | 'tax';
}
}
Expand Down

0 comments on commit 2460eb2

Please sign in to comment.