spree_api 4.1.12 → 4.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/v2/storefront/account/orders_controller.rb +2 -2
- data/app/models/spree/api_dependencies.rb +2 -1
- data/app/serializers/spree/v2/storefront/cart_serializer.rb +2 -1
- data/app/serializers/spree/v2/storefront/payment_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/store_credit_category_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/store_credit_serializer.rb +1 -1
- data/lib/spree/api/testing_support/v2/current_order.rb +2 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e97b8e826fb8c422cac7fd8f2c48ed976bd801d2cd6b6a83d2bc63e7502680f
|
4
|
+
data.tar.gz: 590a06b109db49907897f093deefddeba7a1c9179a899507a4afb6634ce1351d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e38f559497fd36c7bd4660352ad2761002a07d441eaacce603eb4c9ae11a27ae5241715ff071dee71acd487f8c8368ca61ce301660b0b052bdd0d1379400d56e
|
7
|
+
data.tar.gz: c441f94c2e98c93b06dd0afefbf1fb9cd0aa5b27fa1057182bd135f8bd3c6dfe5325c54e0504aa44c75ee39015fb67261f43b74b4acdeea5bf765adcacf1dd68
|
@@ -35,11 +35,11 @@ module Spree
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def collection_serializer
|
38
|
-
Spree::Api::Dependencies.
|
38
|
+
Spree::Api::Dependencies.storefront_order_serializer.constantize
|
39
39
|
end
|
40
40
|
|
41
41
|
def resource_serializer
|
42
|
-
Spree::Api::Dependencies.
|
42
|
+
Spree::Api::Dependencies.storefront_order_serializer.constantize
|
43
43
|
end
|
44
44
|
|
45
45
|
def collection_finder
|
@@ -14,7 +14,7 @@ module Spree
|
|
14
14
|
:storefront_collection_paginator, :storefront_user_serializer, :storefront_products_sorter, :storefront_products_finder,
|
15
15
|
:storefront_product_serializer, :storefront_taxon_serializer, :storefront_taxon_finder, :storefront_find_by_variant_finder,
|
16
16
|
:storefront_cart_update_service, :storefront_cart_estimate_shipping_rates_service, :storefront_estimated_shipment_serializer,
|
17
|
-
:storefront_store_serializer, :storefront_address_serializer,
|
17
|
+
:storefront_store_serializer, :storefront_address_serializer, :storefront_order_serializer,
|
18
18
|
:storefront_account_create_address_service, :storefront_account_update_address_service, :storefront_address_finder
|
19
19
|
].freeze
|
20
20
|
|
@@ -66,6 +66,7 @@ module Spree
|
|
66
66
|
@storefront_product_serializer = 'Spree::V2::Storefront::ProductSerializer'
|
67
67
|
@storefront_estimated_shipment_serializer = 'Spree::V2::Storefront::EstimatedShippingRateSerializer'
|
68
68
|
@storefront_store_serializer = 'Spree::V2::Storefront::StoreSerializer'
|
69
|
+
@storefront_order_serializer = 'Spree::V2::Storefront::CartSerializer'
|
69
70
|
|
70
71
|
# sorters
|
71
72
|
@storefront_order_sorter = Spree::Dependencies.order_sorter
|
@@ -9,7 +9,8 @@ module Spree
|
|
9
9
|
:display_included_tax_total, :tax_total, :currency, :state, :token, :email,
|
10
10
|
:display_item_total, :display_ship_total, :display_adjustment_total, :display_tax_total,
|
11
11
|
:promo_total, :display_promo_total, :item_count, :special_instructions, :display_total,
|
12
|
-
:pre_tax_item_amount, :display_pre_tax_item_amount, :pre_tax_total, :display_pre_tax_total
|
12
|
+
:pre_tax_item_amount, :display_pre_tax_item_amount, :pre_tax_total, :display_pre_tax_total,
|
13
|
+
:shipment_state, :payment_state
|
13
14
|
|
14
15
|
has_many :line_items
|
15
16
|
has_many :variants
|
@@ -27,6 +27,8 @@ shared_examples 'returns valid cart JSON' do
|
|
27
27
|
expect(json_response['data']).to have_type('cart')
|
28
28
|
expect(json_response['data']).to have_attribute(:number).with_value(order.number)
|
29
29
|
expect(json_response['data']).to have_attribute(:state).with_value(order.state)
|
30
|
+
expect(json_response['data']).to have_attribute(:payment_state).with_value(order.payment_state)
|
31
|
+
expect(json_response['data']).to have_attribute(:shipment_state).with_value(order.shipment_state)
|
30
32
|
expect(json_response['data']).to have_attribute(:token).with_value(order.token)
|
31
33
|
expect(json_response['data']).to have_attribute(:total).with_value(order.total.to_s)
|
32
34
|
expect(json_response['data']).to have_attribute(:item_total).with_value(order.item_total.to_s)
|
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: 4.1.
|
4
|
+
version: 4.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi-rspec
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.
|
33
|
+
version: 4.1.13
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.
|
40
|
+
version: 4.1.13
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rabl
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- app/serializers/spree/v2/storefront/shipping_rate_serializer.rb
|
170
170
|
- app/serializers/spree/v2/storefront/state_serializer.rb
|
171
171
|
- app/serializers/spree/v2/storefront/stock_location_serializer.rb
|
172
|
+
- app/serializers/spree/v2/storefront/store_credit_category_serializer.rb
|
172
173
|
- app/serializers/spree/v2/storefront/store_credit_event_serializer.rb
|
173
174
|
- app/serializers/spree/v2/storefront/store_credit_serializer.rb
|
174
175
|
- app/serializers/spree/v2/storefront/store_credit_type_serializer.rb
|
@@ -306,9 +307,9 @@ licenses:
|
|
306
307
|
- BSD-3-Clause
|
307
308
|
metadata:
|
308
309
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
309
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.
|
310
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.13
|
310
311
|
documentation_uri: https://guides.spreecommerce.org/
|
311
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.1.
|
312
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.1.13
|
312
313
|
post_install_message:
|
313
314
|
rdoc_options: []
|
314
315
|
require_paths:
|