Rachel Arnould
2652bc086a
Merge pull request #9755 from cillian/order-cycle-payment-methods
...
Let people choose which payment methods are available to customers on order cycles
2022-10-26 20:10:34 +02:00
Cillian O'Ruanaidh
62cd507fb9
Stub Spree::Config.stripe_connect_enabled instead of changing it before and back after tests
...
It's less code and sometimes there can be issues when config cache values are changed.
Co-authored-by: Maikel <maikel@email.org.au >
2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
4e6d64c0a1
Let people choose which payment methods are available to customers on order cycles
2022-10-21 17:21:31 +01:00
Matt-Yorkley
617164684c
Configure OIDC
2022-10-18 11:32:14 +11:00
Philipp Winkler
bf53a02270
Add api key toggle view checkbox
2022-08-07 09:48:49 +02:00
Maikel Linke
6c0d4cffe5
Allow customer's address update with country code
...
The customer endpoint now serves 2-letter ISO codes for countries and
accepts these for updates. It also serves and accepts region codes
(abbreviations) like VIC for Victoria.
Updates treat these fields as case-insensitive and either code or name
have to be present.
This commit also updates the Swagger documentation.
2022-07-19 09:49:42 +10:00
J. David Lowe
da2e7b404f
add Mayhem for API as a github workflow
2022-04-28 13:30:34 -07:00
Maikel Linke
379eda7c41
Add feature toggle for API v1 use
...
Dev, test and staging need to activate the feature toggle now before
it's accessible.
2022-03-28 11:04:30 +11:00
Maikel Linke
3e00ab261e
Spec customer relationships on API
2022-03-28 11:04:30 +11:00
Maikel Linke
5063f377c3
Enable relationship inclusion for customers#show
...
This will allow us to include address records.
2022-03-28 11:04:30 +11:00
Maikel Linke
d789fb32e9
Make customer's address writable on API
2022-03-28 11:04:30 +11:00
Maikel Linke
51420934f3
Add billing and shipping address to customer
2022-03-28 10:58:18 +11:00
Maikel Linke
adc7e97e62
Add tag list to customer endpoint
2022-03-28 10:55:58 +11:00
Maikel Linke
e5e8953a09
Add ToS acceptance to customer endpoint
...
It's another read-only attribute.
Please note that JSON:API specifies a format of `date-time` which we
don't adhere to because it uses a `Z` in front of the timezone offset
which doesn't seem to be included in the default json serialisation.
So I didn't add the format and left it as simple `string`. Problem?
2022-03-28 10:55:58 +11:00
Maikel Linke
aa6e5ae799
Report useful error message in missing parameter
2022-03-28 10:55:57 +11:00
Maikel Linke
8d12c7a692
Permit more customer attributes for update
2022-03-28 10:55:57 +11:00
Maikel Linke
41746459fa
Restrict allow_charges attribute to read-only
...
We want people to use the UI to change this attribute.
2022-03-28 10:55:57 +11:00
Maikel Linke
4aa70c1ffd
Render pagination errors
2022-03-02 11:59:35 +11:00
Maikel Linke
b89715149c
Sanitise pagination input for new API
2022-03-02 11:59:35 +11:00
Maikel Linke
75fc35574e
Make json_response test helper deal with error response
...
It raised an error:
NoMethodError:
undefined method `map' for nil:NilClass
2022-03-02 11:59:35 +11:00
Maikel Linke
414bf5d074
Don't list guest customer records to guest users
2022-03-02 11:59:35 +11:00
Matt-Yorkley
2e59812bc1
Refactor to make more use of schema refs, and regenerate swagger file
2022-03-02 11:59:33 +11:00
Matt-Yorkley
d66d6d6bd6
Update use of links on relationships
2022-03-02 11:58:04 +11:00
Matt-Yorkley
8e61428cce
Add 401 Unauthorized response test
2022-03-02 11:58:04 +11:00
Matt-Yorkley
028d02ccca
Test serialized relationship data
2022-03-02 11:55:46 +11:00
Matt-Yorkley
46f9d3ef81
Test permissions combined with Ransack searches
2022-03-02 11:55:46 +11:00
Matt-Yorkley
76f14a03c6
Add specs and JSON schemas
...
Include test helpers
2022-03-02 11:55:46 +11:00
Maikel Linke
8f5cb7bd91
Update swagger files, separate v0 and v1, delete old file
...
The new v1 doesn't contain any API endpoints yet. We will add them later
when they are ready.
2022-02-08 11:44:36 +11:00
Matt-Yorkley
1ee3d0f7a1
Drop embedded shops code
2022-01-26 19:58:39 +00:00
Filipe
75395f6f29
Merge pull request #8648 from Matt-Yorkley/csp
...
Configure CSP
2022-01-26 19:55:11 +00:00
Maikel Linke
ee85b9654d
Remove references to StripeConnect class
2022-01-24 12:35:45 +11:00
Matt-Yorkley
accb9228ee
Tidy up embedding specs
2022-01-18 12:22:06 +00:00
Matt-Yorkley
e8f3fe8510
Update header checks in tests
2022-01-18 12:22:06 +00:00
Matt-Yorkley
05abb63036
Remove X-Frame-Options header
...
This header is largely deprecated, and is functionally replaced here by use of the frame-ancestors CSP configuration
2022-01-18 12:19:54 +00:00
Matt-Yorkley
9583a3cc3d
Use order token param in specs
2022-01-14 19:41:08 +00:00
Matt-Yorkley
9f49a84e7f
Clarify use of access tokens used for viewing order details as a guest user
...
There are 4 or 5 different places in the app where we reference a :token and params[:token] for completely different purposes (they're not even vaguely the *same* token).
This is an attempt to clarify the places in the app where we use params[:token] in relation to *orders*, for allowing guest users (who are not logged in) to view details of an order they have placed (like after checkout completion), and differentiate it from the various other places where params[:token] can actually be used for something entirely different!
2021-12-16 13:35:55 +00:00
Matt-Yorkley
f101b06226
Update all references to paypal routes
2021-12-10 11:46:53 +00:00
Maikel Linke
6212ad18a8
Test for concurrent checkouts reliably
...
Apparently, controller specs are not thread safe and we got random test
failures. I converted it into a request spec and fine-tuned it to make
it more reliable.
2021-11-12 14:09:17 +11:00
Maikel
a3c31f7d86
Revert "Kill stripe connect"
2021-09-20 08:39:34 +10:00
Luis Ramos
60a8ae6675
Remove Stripe Connect gateway and related code
2021-09-10 14:43:24 +05:30
Jean-Baptiste Bellet
7656f5d20f
Add an order with no line_items, should not be returned by API
2021-09-08 10:44:04 +02:00
Jean-Baptiste Bellet
9c86adf0f4
Add line_items to each orders
...
Now, API returns only orders with line_items: add to each in specs.
2021-09-08 10:43:59 +02:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Andy Brett
b3e08b47b9
set Stripe api key directly instead of using allow
2021-06-01 22:33:12 +01:00
Luis Ramos
a1ac4e85ed
Replace update_attributes with update
2021-05-19 09:54:25 -07:00
Luis Ramos
47a5809100
Fix rspec syntax
2021-05-03 14:17:54 +01:00
Luis Ramos
706b854d8c
Fix rspec syntax
2021-04-08 10:03:11 -07:00
Matt-Yorkley
a2f6ff7b39
Update deprecated params in checkout spec
2021-04-04 19:19:06 +01:00
Andy Brett
025f1f2725
add routing tests
2021-03-27 11:21:18 -07:00
Andy Brett
5a19a14042
rename to v0
2021-03-27 11:21:18 -07:00