Skip to content

Feat: adds PaymentItemType enum and PaymentItem.type #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 21, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make PaymentItem.type nullable
  • Loading branch information
marcoscaceres committed Feb 21, 2018
commit d7bb87fd7af6e7b019d480b18e3d84d2f6f0f618
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@

required DOMString label;
required PaymentCurrencyAmount amount;
boolean pending = false;
PaymentItemType type;
PaymentItemType? type;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this to be null. Just have them not supply it if they don't want to set it (or, set it to undefined).

};

Expand Down Expand Up @@ -1886,10 +1886,11 @@

type member
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is no type for the "normal" payment items, I wonder if this should be named "specialType" or something? It's probably fine as just type though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to just keep it as type.

A PaymentItemType enum value. A the value of type to
assist in the presentation of PaymentItem by, for example,
visually grouping types together or other otherwise distinguishing
them from other types (or from items that have no associated type).
A PaymentItemType enum value or null. A user agent MAY use the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here I would say "If supplied, a PaymentItemType enum value"

value of type to assist in the presentation of
PaymentItem by, for example, visually grouping types together
or other otherwise distinguishing them from other types (or from
items that have no associated type).
Expand Down