Skip to content
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

MWPW-162385 add wcsApiKey attribute #3203

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion libs/deps/mas/commerce.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions libs/deps/mas/mas.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libs/features/mas/commerce/src/mas-commerce-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class MasCommerceService extends HTMLElement {
'force-tax-exclusive',
'checkout-client-id',
'allow-override',
'wcs-api-key',
].forEach((attribute) => {
const value = this.getAttribute(attribute);
if (value != null) {
Expand Down
2 changes: 2 additions & 0 deletions libs/features/mas/commerce/test/mas-commerce-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('commerce service', () => {
'checkout-client-id': 'foobar',
'checkout-workflow-step': 'stepone',
'force-tax-exclusive': true,
'wcs-api-key': 'wcsTest',
});
expect(el.settings).to.deep.contains({
locale: 'fr_CA',
Expand All @@ -96,6 +97,7 @@ describe('commerce service', () => {
checkoutClientId: 'foobar',
checkoutWorkflowStep: 'email', // rejects invalid value
forceTaxExclusive: true,
wcsApiKey: 'wcsTest',
});
});

Expand Down
6 changes: 6 additions & 0 deletions libs/features/mas/docs/mas.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ <h3 id="attributes" tabindex="-1">Attributes <a class="header-anchor" href="#att
<td>en or locale langauge if set</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>wcs-api-key</code></td>
<td>api key used for making WCS calls</td>
<td><code>wcms-commerce-ims-ro-user-milo</code></td>
<td><code>false</code></td>
</tr>
</tbody>
</table>
<h3 id="methods" tabindex="-1">Methods <a class="header-anchor" href="#methods" href="#methods" title="Permalink to this heading">#</a></h3>
Expand Down
12 changes: 6 additions & 6 deletions libs/features/mas/mas/dist/mas.js

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions libs/features/mas/mas/mas.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ You do need to have mas.js on your page / application, including it can be done

### Attributes

| Name | Description | Default Value | Required |
| ------------------------ | --------------------------------------------------------------------------------------------------- | ---------------------------- | -------- |
| `allow-override` | enables override of commerce env/landscape via query parameters(commerce.env/commerce.landscape) |  `false` |  `false` |
| `checkout-client-id` | checkout client id |  `false` |  `false` |
| `checkout-workflow-step` | default checkout workflow step | `CheckoutWorkflowStep.EMAIL` | `false` |
| `country` | country of the offers to retrieve from WCS, determines the currency, price format, etc. | US or locale country if set | `false` |
|  `env` | commerce environment you want this page to use, either `stage` or `prod` |  `prod` |  `false` |
|  `force-tax-exclusive` | force all price display to be tax exclusive |  `false` |  `false` |
| `locale` | currency & price locale you need, must belong to one of the [supported locales](#supported-locales) | `en_US` | `false` |
| `language` | language of the price literal, e.g: per license | en or locale langauge if set | `false` |
| Name | Description | Default Value | Required |
| ------------------------ | --------------------------------------------------------------------------------------------------- | ------------------------------- | -------- |
| `allow-override` | enables override of commerce env/landscape via query parameters(commerce.env/commerce.landscape) |  `false` |  `false` |
| `checkout-client-id` | checkout client id |  `false` |  `false` |
| `checkout-workflow-step` | default checkout workflow step | `CheckoutWorkflowStep.EMAIL` | `false` |
| `country` | country of the offers to retrieve from WCS, determines the currency, price format, etc. | US or locale country if set | `false` |
|  `env` | commerce environment you want this page to use, either `stage` or `prod` |  `prod` |  `false` |
|  `force-tax-exclusive` | force all price display to be tax exclusive |  `false` |  `false` |
| `locale` | currency & price locale you need, must belong to one of the [supported locales](#supported-locales) | `en_US` | `false` |
| `language` | language of the price literal, e.g: per license | en or locale langauge if set | `false` |
| `wcs-api-key` | api key used for making WCS calls | `wcms-commerce-ims-ro-user-milo`| `false` |

### Methods

Expand Down
Loading