spree_api 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/v3/store/customers_controller.rb +1 -6
- data/app/controllers/spree/api/v3/webhooks/payments_controller.rb +2 -1
- data/app/serializers/spree/api/v3/admin/fulfillment_serializer.rb +2 -4
- data/app/serializers/spree/api/v3/delivery_rate_serializer.rb +25 -2
- data/app/serializers/spree/api/v3/fulfillment_serializer.rb +11 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83149ce5fb5f298d828f2266bafc070b187ae4991b58e8d0f818ffc97c86d3f1
|
|
4
|
+
data.tar.gz: 174d77410c9c542fa39c0aaa8f46043013f49a7ea65ac441e28d08ee388a052e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5b4ae5e127f166c53b143148277ff4d096db433553834f0e6f6f752ae2c7956b9066fd5f96061fab1eff2d74fffaeefa61309aee56284fae3d0b6c8c41c5c89
|
|
7
|
+
data.tar.gz: dd94385142e6fd7fdb2bbdc579089d0ad69e22c35a8cb3ccb80b46d6775ade8cab7eb6d6ebd92225ed795d7bda0916911d671bba6fdb0b8b70c03d80686d6249
|
|
@@ -10,7 +10,7 @@ module Spree
|
|
|
10
10
|
|
|
11
11
|
# POST /api/v3/store/customers
|
|
12
12
|
def create
|
|
13
|
-
user = Spree.user_class.new(
|
|
13
|
+
user = Spree.user_class.new(permitted_params.except(:current_password))
|
|
14
14
|
|
|
15
15
|
if user.save
|
|
16
16
|
refresh_token = Spree::RefreshToken.create_for(user, request_env: {
|
|
@@ -67,11 +67,6 @@ module Spree
|
|
|
67
67
|
}
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
def create_params
|
|
71
|
-
params.permit(:email, :password, :password_confirmation, :first_name, :last_name,
|
|
72
|
-
:phone, :accepts_email_marketing, metadata: {})
|
|
73
|
-
end
|
|
74
|
-
|
|
75
70
|
def permitted_params
|
|
76
71
|
params.permit(:email, :password, :password_confirmation, :first_name, :last_name,
|
|
77
72
|
:accepts_email_marketing, :phone, :current_password, metadata: {})
|
|
@@ -4,6 +4,7 @@ module Spree
|
|
|
4
4
|
module Webhooks
|
|
5
5
|
class PaymentsController < ActionController::API
|
|
6
6
|
include ActionController::RateLimiting
|
|
7
|
+
include Spree::Core::ControllerHelpers::Store
|
|
7
8
|
|
|
8
9
|
RATE_LIMIT_RESPONSE = -> {
|
|
9
10
|
[429, { 'Content-Type' => 'application/json', 'Retry-After' => '60' },
|
|
@@ -20,7 +21,7 @@ module Spree
|
|
|
20
21
|
# Verifies the webhook signature synchronously (returns 401 if invalid),
|
|
21
22
|
# then enqueues async processing and returns 200 immediately.
|
|
22
23
|
def create
|
|
23
|
-
payment_method =
|
|
24
|
+
payment_method = current_store.payment_methods.find_by_prefix_id!(params[:payment_method_id])
|
|
24
25
|
|
|
25
26
|
# Signature verification must be synchronous — invalid = 401
|
|
26
27
|
result = payment_method.parse_webhook_event(request.raw_post, request.headers)
|
|
@@ -6,12 +6,10 @@ module Spree
|
|
|
6
6
|
typelize metadata: 'Record<string, unknown> | null',
|
|
7
7
|
order_id: [:string, nullable: true],
|
|
8
8
|
stock_location_id: [:string, nullable: true],
|
|
9
|
-
adjustment_total: :string,
|
|
10
|
-
included_tax_total: :string, promo_total: :string,
|
|
9
|
+
adjustment_total: :string,
|
|
11
10
|
pre_tax_amount: :string
|
|
12
11
|
|
|
13
|
-
attributes :adjustment_total, :
|
|
14
|
-
:included_tax_total, :promo_total, :pre_tax_amount,
|
|
12
|
+
attributes :adjustment_total, :pre_tax_amount,
|
|
15
13
|
created_at: :iso8601, updated_at: :iso8601
|
|
16
14
|
|
|
17
15
|
attribute :metadata do |shipment|
|
|
@@ -3,18 +3,41 @@ module Spree
|
|
|
3
3
|
module V3
|
|
4
4
|
class DeliveryRateSerializer < BaseSerializer
|
|
5
5
|
typelize name: :string, selected: :boolean, delivery_method_id: :string,
|
|
6
|
-
cost: :string, display_cost: :string
|
|
6
|
+
cost: :string, display_cost: :string,
|
|
7
|
+
total: :string, display_total: :string,
|
|
8
|
+
additional_tax_total: :string, display_additional_tax_total: :string,
|
|
9
|
+
included_tax_total: :string, display_included_tax_total: :string,
|
|
10
|
+
tax_total: :string, display_tax_total: :string
|
|
7
11
|
|
|
8
12
|
attribute :delivery_method_id do |shipping_rate|
|
|
9
13
|
shipping_rate.shipping_method&.prefixed_id
|
|
10
14
|
end
|
|
11
15
|
|
|
12
|
-
attributes :name, :selected,
|
|
16
|
+
attributes :name, :selected,
|
|
17
|
+
:cost, :total,
|
|
18
|
+
:additional_tax_total, :included_tax_total,
|
|
19
|
+
:tax_total
|
|
13
20
|
|
|
14
21
|
attribute :display_cost do |shipping_rate|
|
|
15
22
|
shipping_rate.display_cost.to_s
|
|
16
23
|
end
|
|
17
24
|
|
|
25
|
+
attribute :display_total do |shipping_rate|
|
|
26
|
+
shipping_rate.display_total.to_s
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attribute :display_additional_tax_total do |shipping_rate|
|
|
30
|
+
shipping_rate.display_additional_tax_total.to_s
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
attribute :display_included_tax_total do |shipping_rate|
|
|
34
|
+
shipping_rate.display_included_tax_total.to_s
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
attribute :display_tax_total do |shipping_rate|
|
|
38
|
+
shipping_rate.display_tax_total.to_s
|
|
39
|
+
end
|
|
40
|
+
|
|
18
41
|
one :shipping_method, key: :delivery_method, resource: Spree.api.delivery_method_serializer
|
|
19
42
|
end
|
|
20
43
|
end
|
|
@@ -6,10 +6,20 @@ module Spree
|
|
|
6
6
|
tracking: [:string, nullable: true],
|
|
7
7
|
tracking_url: [:string, nullable: true], fulfilled_at: [:string, nullable: true],
|
|
8
8
|
cost: :string, display_cost: :string,
|
|
9
|
+
total: :string, display_total: :string,
|
|
10
|
+
discount_total: :string, display_discount_total: :string,
|
|
11
|
+
additional_tax_total: :string, display_additional_tax_total: :string,
|
|
12
|
+
included_tax_total: :string, display_included_tax_total: :string,
|
|
13
|
+
tax_total: :string, display_tax_total: :string,
|
|
9
14
|
items: 'Array<{ item_id: string; variant_id: string; quantity: number }>'
|
|
10
15
|
|
|
11
16
|
attributes :number, :tracking, :tracking_url,
|
|
12
|
-
:cost, :display_cost
|
|
17
|
+
:cost, :display_cost,
|
|
18
|
+
:total, :display_total,
|
|
19
|
+
:discount_total, :display_discount_total,
|
|
20
|
+
:additional_tax_total, :display_additional_tax_total,
|
|
21
|
+
:included_tax_total, :display_included_tax_total,
|
|
22
|
+
:tax_total, :display_tax_total
|
|
13
23
|
|
|
14
24
|
attribute :status do |shipment|
|
|
15
25
|
shipment.state
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.4.
|
|
4
|
+
version: 5.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rswag-specs
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - '='
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 5.4.
|
|
89
|
+
version: 5.4.1
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - '='
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 5.4.
|
|
96
|
+
version: 5.4.1
|
|
97
97
|
description: Spree's API
|
|
98
98
|
email:
|
|
99
99
|
- hello@spreecommerce.org
|
|
@@ -277,9 +277,9 @@ licenses:
|
|
|
277
277
|
- BSD-3-Clause
|
|
278
278
|
metadata:
|
|
279
279
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
280
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.4.
|
|
280
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.4.1
|
|
281
281
|
documentation_uri: https://docs.spreecommerce.org/
|
|
282
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.4.
|
|
282
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.4.1
|
|
283
283
|
post_install_message:
|
|
284
284
|
rdoc_options: []
|
|
285
285
|
require_paths:
|