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 3e3969a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 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> | '';

/**
* 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> | '';

/**
* 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
34 changes: 17 additions & 17 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> | '';

/**
* 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> | '';

/**
* 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 @@ -697,13 +697,13 @@ declare module 'stripe' {
/**
* If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
*/
transfer_data?: InvoiceUpdateParams.TransferData | null;
transfer_data?: InvoiceUpdateParams.TransferData | '';
}

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> | '';
}

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 3e3969a

Please sign in to comment.