spree_api 5.1.8 → 5.2.0.rc1
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/concerns/spree/api/v2/storefront/order_concern.rb +1 -1
- data/app/controllers/spree/api/v2/platform/resource_controller.rb +9 -1
- data/app/controllers/spree/api/v2/storefront/policies_controller.rb +31 -0
- data/app/controllers/spree/api/v2/storefront/post_categories_controller.rb +35 -0
- data/app/controllers/spree/api/v2/storefront/posts_controller.rb +51 -0
- data/app/controllers/spree/api/v2/storefront/products_controller.rb +6 -5
- data/app/models/concerns/spree/webhooks/has_webhooks.rb +3 -1
- data/app/models/spree/webhooks/subscriber.rb +12 -1
- data/app/serializers/concerns/spree/api/v2/public_metafields_concern.rb +15 -0
- data/app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb +7 -0
- data/app/serializers/spree/api/v2/platform/metafield_serializer.rb +21 -0
- data/app/serializers/spree/v2/storefront/address_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/cart_serializer.rb +11 -9
- data/app/serializers/spree/v2/storefront/credit_card_serializer.rb +3 -1
- data/app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/gift_card_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/line_item_serializer.rb +4 -2
- data/app/serializers/spree/v2/storefront/metafield_serializer.rb +19 -0
- data/app/serializers/spree/v2/storefront/option_type_serializer.rb +3 -1
- data/app/serializers/spree/v2/storefront/option_value_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/{promotion_serializer.rb → order_promotion_serializer.rb} +3 -1
- data/app/serializers/spree/v2/storefront/order_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/payment_method_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/payment_serializer.rb +4 -2
- data/app/serializers/spree/v2/storefront/payment_source_serializer.rb +4 -2
- data/app/serializers/spree/v2/storefront/policy_serializer.rb +19 -0
- data/app/serializers/spree/v2/storefront/post_category_serializer.rb +23 -0
- data/app/serializers/spree/v2/storefront/post_serializer.rb +51 -0
- data/app/serializers/spree/v2/storefront/product_serializer.rb +8 -7
- data/app/serializers/spree/v2/storefront/shipment_serializer.rb +6 -4
- data/app/serializers/spree/v2/storefront/shipping_method_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/shipping_rate_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/store_credit_serializer.rb +5 -3
- data/app/serializers/spree/v2/storefront/store_serializer.rb +2 -1
- data/app/serializers/spree/v2/storefront/taxon_serializer.rb +7 -5
- data/app/serializers/spree/v2/storefront/taxonomy_serializer.rb +2 -0
- data/app/serializers/spree/v2/storefront/user_serializer.rb +2 -2
- data/app/serializers/spree/v2/storefront/variant_serializer.rb +4 -3
- data/app/serializers/spree/v2/storefront/wished_item_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/wishlist_serializer.rb +1 -1
- data/app/services/spree/webhooks/subscribers/queue_requests.rb +5 -1
- data/config/routes.rb +4 -0
- data/lib/spree/api/dependencies.rb +27 -0
- metadata +16 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e19f525a706c6e563c811fabc0b5651ea2e9c52b35b146b9722874dec3190f25
|
|
4
|
+
data.tar.gz: cccf27bf698f5f1b1566309f44e7b219a316611752c0089d582fa0fcbbe7fb67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 581570627fa3b3d808127d66c2cdbe7d2fd7fedda9b1be6dc01a7f7db8c31b2c96507181220c395cb338561c14e1f3894be00b7ba06a82a6bdae7289ef8f0e78
|
|
7
|
+
data.tar.gz: 56612e608b806be5f50f645365b26a710e045f7e2fe508f68106eb04a0d5f34d7a0e53fa326aa95aec7371a4886c85e4058f5457483ceb308cd7230add0fd5de
|
|
@@ -117,7 +117,7 @@ module Spree
|
|
|
117
117
|
[]
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
model_class.json_api_permitted_attributes + store_ids + metadata_params
|
|
120
|
+
model_class.json_api_permitted_attributes + store_ids + metadata_params + metafields_params
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
def metadata_params
|
|
@@ -128,6 +128,14 @@ module Spree
|
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
+
def metafields_params
|
|
132
|
+
if Spree::MetafieldDefinition.available_resources.map(&:name).include?(model_class.name) && model_class.method_defined?(:metafields)
|
|
133
|
+
[{ metafields_attributes: Spree::PermittedAttributes.metafield_attributes }]
|
|
134
|
+
else
|
|
135
|
+
[]
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
131
139
|
def permitted_resource_params
|
|
132
140
|
params.require(model_param_name).permit(spree_permitted_attributes)
|
|
133
141
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
module Storefront
|
|
5
|
+
class PoliciesController < ::Spree::Api::V2::ResourceController
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
def collection_serializer
|
|
9
|
+
Spree::Api::Dependencies.storefront_policy_serializer.constantize
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def resource_serializer
|
|
13
|
+
Spree::Api::Dependencies.storefront_policy_serializer.constantize
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def resource
|
|
17
|
+
@resource ||= find_with_fallback_default_locale { scope.find_by(slug: params[:id]) } || scope.find(params[:id])
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def model_class
|
|
21
|
+
Spree::Policy
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def scope_includes
|
|
25
|
+
[:rich_text_translations]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
module Storefront
|
|
5
|
+
class PostCategoriesController < ::Spree::Api::V2::ResourceController
|
|
6
|
+
protected
|
|
7
|
+
|
|
8
|
+
def collection
|
|
9
|
+
@collection ||= scope
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def resource
|
|
13
|
+
@resource ||= find_with_fallback_default_locale { scope.friendly.find(params[:id]) } || scope.friendly.find(params[:id])
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def collection_serializer
|
|
17
|
+
Spree::V2::Storefront::PostCategorySerializer
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def resource_serializer
|
|
21
|
+
Spree::V2::Storefront::PostCategorySerializer
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def model_class
|
|
25
|
+
Spree::PostCategory
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def serializer_params
|
|
29
|
+
super.merge(include_posts: action_name == 'show')
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
module Storefront
|
|
5
|
+
class PostsController < ::Spree::Api::V2::ResourceController
|
|
6
|
+
protected
|
|
7
|
+
|
|
8
|
+
def sorted_collection
|
|
9
|
+
collection_sorter.new(collection, params, allowed_sort_attributes).call
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def collection
|
|
13
|
+
@collection ||= collection_finder.new(scope: scope, params: finder_params).execute
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def resource
|
|
17
|
+
@resource ||= find_with_fallback_default_locale { scope.friendly.find(params[:id]) } || scope.friendly.find(params[:id])
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def collection_finder
|
|
21
|
+
Spree::Api::Dependencies.storefront_posts_finder.constantize
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def collection_sorter
|
|
25
|
+
Spree::Api::Dependencies.storefront_posts_sorter.constantize
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def collection_serializer
|
|
29
|
+
Spree::V2::Storefront::PostSerializer
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def resource_serializer
|
|
33
|
+
Spree::V2::Storefront::PostSerializer
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def model_class
|
|
37
|
+
Spree::Post
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def scope
|
|
41
|
+
super.published.includes(:post_category, image_attachment: :blob)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def allowed_sort_attributes
|
|
45
|
+
super << :published_at << :title
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -16,14 +16,15 @@ module Spree
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def resource
|
|
19
|
-
#
|
|
20
|
-
variant_includes
|
|
19
|
+
# using FriendlyId so old slugs still work
|
|
20
|
+
@resource ||= find_with_fallback_default_locale { scope.includes(variants: variant_includes, master: variant_includes).friendly.find(params[:id]) } || scope.includes(variants: variant_includes, master: variant_includes).friendly.find(params[:id])
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def variant_includes
|
|
24
|
+
[
|
|
21
25
|
:prices,
|
|
22
26
|
{ option_values: [:option_type] }
|
|
23
27
|
]
|
|
24
|
-
|
|
25
|
-
# using FriendlyId so old slugs still work
|
|
26
|
-
@resource ||= find_with_fallback_default_locale { scope.includes(variants: variant_includes, master: variant_includes).friendly.find(params[:id]) } || scope.includes(variants: variant_includes, master: variant_includes).friendly.find(params[:id])
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
def collection_sorter
|
|
@@ -82,7 +82,9 @@ module Spree
|
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
def no_webhooks_subscribers?(event_name)
|
|
85
|
-
|
|
85
|
+
Spree::Current.webhooks_subscribers.none? do |subscriber|
|
|
86
|
+
subscriber.supports_event?(event_name)
|
|
87
|
+
end
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
def webhooks_request_options
|
|
@@ -11,7 +11,6 @@ module Spree
|
|
|
11
11
|
has_secure_token :secret_key
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
has_many :events, inverse_of: :subscriber
|
|
16
15
|
|
|
17
16
|
validates :url, 'spree/url': true, presence: true
|
|
@@ -29,6 +28,14 @@ module Spree
|
|
|
29
28
|
events.order(:created_at).last&.created_at
|
|
30
29
|
end
|
|
31
30
|
|
|
31
|
+
# Returns true if the subscriber supports the given event
|
|
32
|
+
#
|
|
33
|
+
# @param event [String] The event to check, e.g. 'product.create'
|
|
34
|
+
# @return [Boolean]
|
|
35
|
+
def supports_event?(event)
|
|
36
|
+
subscriptions.include?(event) || subscriptions.include?('*')
|
|
37
|
+
end
|
|
38
|
+
|
|
32
39
|
def self.with_urls_for(event)
|
|
33
40
|
where(
|
|
34
41
|
case ActiveRecord::Base.connection.adapter_name
|
|
@@ -55,6 +62,10 @@ module Spree
|
|
|
55
62
|
end
|
|
56
63
|
end
|
|
57
64
|
|
|
65
|
+
def name
|
|
66
|
+
url
|
|
67
|
+
end
|
|
68
|
+
|
|
58
69
|
private
|
|
59
70
|
|
|
60
71
|
def check_uri_path
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
module PublicMetafieldsConcern
|
|
5
|
+
extend ActiveSupport::Concern
|
|
6
|
+
|
|
7
|
+
included do
|
|
8
|
+
has_many :metafields, serializer: Spree::Api::Dependencies.storefront_metafield_serializer.constantize,
|
|
9
|
+
record_type: :metafield,
|
|
10
|
+
object_method_name: :public_metafields
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -17,6 +17,13 @@ module Spree
|
|
|
17
17
|
object.public_send(method_name).to_s
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
|
+
|
|
21
|
+
metafield_enabled_resources = Spree::MetafieldDefinition.available_resources || []
|
|
22
|
+
if metafield_enabled_resources.map(&:name).include?(model_klazz.name) && model_klazz.method_defined?(:metafields)
|
|
23
|
+
base.has_many :metafields, serializer: Spree::Api::Dependencies.platform_metafield_serializer.constantize,
|
|
24
|
+
record_type: :metafield,
|
|
25
|
+
object_method_name: :metafields
|
|
26
|
+
end
|
|
20
27
|
end
|
|
21
28
|
|
|
22
29
|
def self.display_getter_methods(model_klazz)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Api
|
|
3
|
+
module V2
|
|
4
|
+
module Platform
|
|
5
|
+
class MetafieldSerializer < BaseSerializer
|
|
6
|
+
set_type :metafield
|
|
7
|
+
|
|
8
|
+
attributes :name, :type, :display_on
|
|
9
|
+
|
|
10
|
+
attribute :key do |metafield|
|
|
11
|
+
metafield.full_key
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attribute :value do |metafield|
|
|
15
|
+
metafield.serialize_value
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -2,6 +2,8 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class CartSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :cart
|
|
6
8
|
|
|
7
9
|
attributes :number, :item_total, :total, :ship_total, :adjustment_total, :created_at,
|
|
@@ -40,25 +42,25 @@ module Spree
|
|
|
40
42
|
cart.display_total_minus_store_credits.amount_in_cents
|
|
41
43
|
end
|
|
42
44
|
|
|
43
|
-
has_many :line_items
|
|
44
|
-
has_many :variants
|
|
45
|
-
has_many :promotions, object_method_name: :valid_promotions, id_method_name: :valid_promotion_ids
|
|
46
|
-
has_many :payments do |cart|
|
|
45
|
+
has_many :line_items, serializer: Spree::Api::Dependencies.storefront_line_item_serializer.constantize
|
|
46
|
+
has_many :variants, serializer: Spree::Api::Dependencies.storefront_variant_serializer.constantize
|
|
47
|
+
has_many :promotions, serializer: Spree::Api::Dependencies.storefront_order_promotion_serializer.constantize, object_method_name: :valid_promotions, id_method_name: :valid_promotion_ids
|
|
48
|
+
has_many :payments, serializer: Spree::Api::Dependencies.storefront_payment_serializer.constantize do |cart|
|
|
47
49
|
cart.payments.valid
|
|
48
50
|
end
|
|
49
|
-
has_many :shipments
|
|
51
|
+
has_many :shipments, serializer: Spree::Api::Dependencies.storefront_shipment_serializer.constantize
|
|
50
52
|
|
|
51
|
-
belongs_to :user
|
|
53
|
+
belongs_to :user, serializer: Spree::Api::Dependencies.storefront_user_serializer.constantize
|
|
52
54
|
belongs_to :billing_address,
|
|
53
55
|
id_method_name: :bill_address_id,
|
|
54
|
-
serializer:
|
|
56
|
+
serializer: Spree::Api::Dependencies.storefront_address_serializer.constantize,
|
|
55
57
|
record_type: :address
|
|
56
58
|
|
|
57
59
|
belongs_to :shipping_address,
|
|
58
60
|
id_method_name: :ship_address_id,
|
|
59
|
-
serializer:
|
|
61
|
+
serializer: Spree::Api::Dependencies.storefront_address_serializer.constantize,
|
|
60
62
|
record_type: :address
|
|
61
|
-
belongs_to :gift_card, serializer:
|
|
63
|
+
belongs_to :gift_card, serializer: Spree::Api::Dependencies.storefront_gift_card_serializer.constantize
|
|
62
64
|
end
|
|
63
65
|
end
|
|
64
66
|
end
|
|
@@ -2,11 +2,13 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class CreditCardSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :credit_card
|
|
6
8
|
|
|
7
9
|
attributes :cc_type, :last_digits, :month, :year, :name, :default, :gateway_payment_profile_id, :public_metadata
|
|
8
10
|
|
|
9
|
-
belongs_to :payment_method
|
|
11
|
+
belongs_to :payment_method, serializer: Spree::Api::Dependencies.storefront_payment_method_serializer.constantize
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
@@ -12,7 +12,7 @@ module Spree
|
|
|
12
12
|
shipping_rate.shipping_method_id.to_s
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
belongs_to :shipping_method
|
|
15
|
+
belongs_to :shipping_method, serializer: Spree::Api::Dependencies.storefront_shipping_method_serializer.constantize
|
|
16
16
|
|
|
17
17
|
attribute :final_price do |shipping_rate|
|
|
18
18
|
shipping_rate.cost
|
|
@@ -2,6 +2,8 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class LineItemSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :line_item
|
|
6
8
|
|
|
7
9
|
attributes :name, :quantity, :price, :slug, :options_text, :currency,
|
|
@@ -13,8 +15,8 @@ module Spree
|
|
|
13
15
|
:pre_tax_amount, :display_pre_tax_amount, :compare_at_amount, :display_compare_at_amount,
|
|
14
16
|
:public_metadata
|
|
15
17
|
|
|
16
|
-
belongs_to :variant
|
|
17
|
-
has_many :digital_links
|
|
18
|
+
belongs_to :variant, serializer: Spree::Api::Dependencies.storefront_variant_serializer.constantize
|
|
19
|
+
has_many :digital_links, serializer: Spree::Api::Dependencies.storefront_digital_link_serializer.constantize
|
|
18
20
|
end
|
|
19
21
|
end
|
|
20
22
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module V2
|
|
3
|
+
module Storefront
|
|
4
|
+
class MetafieldSerializer < BaseSerializer
|
|
5
|
+
set_type :metafield
|
|
6
|
+
|
|
7
|
+
attributes :name, :type
|
|
8
|
+
|
|
9
|
+
attribute :key do |metafield|
|
|
10
|
+
metafield.full_key
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attribute :value do |metafield|
|
|
14
|
+
metafield.serialize_value
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -2,11 +2,13 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class OptionTypeSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :option_type
|
|
6
8
|
|
|
7
9
|
attributes :name, :presentation, :position, :public_metadata
|
|
8
10
|
|
|
9
|
-
has_many :option_values
|
|
11
|
+
has_many :option_values, serializer: Spree::Api::Dependencies.storefront_option_value_serializer.constantize
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
data/app/serializers/spree/v2/storefront/{promotion_serializer.rb → order_promotion_serializer.rb}
RENAMED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
# this is actually a serializer for Spree::OrderPromotion, not Spree::Promotion
|
|
2
|
+
# we should fix this in the future
|
|
1
3
|
module Spree
|
|
2
4
|
module V2
|
|
3
5
|
module Storefront
|
|
4
|
-
class
|
|
6
|
+
class OrderPromotionSerializer < BaseSerializer
|
|
5
7
|
set_id :promotion_id
|
|
6
8
|
set_type :promotion
|
|
7
9
|
|
|
@@ -2,15 +2,17 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class PaymentSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :payment
|
|
6
8
|
|
|
7
9
|
has_one :source, polymorphic: true
|
|
8
|
-
has_one :payment_method
|
|
10
|
+
has_one :payment_method, serializer: Spree::Api::Dependencies.storefront_payment_method_serializer.constantize
|
|
9
11
|
|
|
10
12
|
attributes :amount, :response_code, :number, :cvv_response_code, :cvv_response_message, :payment_method_name, :state, :public_metadata
|
|
11
13
|
|
|
12
14
|
attribute :payment_method_id do |payment|
|
|
13
|
-
payment.payment_method_id
|
|
15
|
+
payment.payment_method_id&.to_s
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
end
|
|
@@ -2,8 +2,10 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class PaymentSourceSerializer < BaseSerializer
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
7
|
+
belongs_to :payment_method, serializer: Spree::Api::Dependencies.storefront_payment_method_serializer.constantize
|
|
8
|
+
belongs_to :user, serializer: Spree::Api::Dependencies.storefront_user_serializer.constantize
|
|
7
9
|
end
|
|
8
10
|
end
|
|
9
11
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module V2
|
|
3
|
+
module Storefront
|
|
4
|
+
class PolicySerializer < BaseSerializer
|
|
5
|
+
set_type :policy
|
|
6
|
+
|
|
7
|
+
attributes :name, :slug, :created_at, :updated_at
|
|
8
|
+
|
|
9
|
+
attribute :body do |object|
|
|
10
|
+
object.body.to_plain_text
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attribute :body_html do |object|
|
|
14
|
+
object.body.to_s
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module V2
|
|
3
|
+
module Storefront
|
|
4
|
+
class PostCategorySerializer < ::Spree::Api::V2::BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
7
|
+
set_type :post_category
|
|
8
|
+
|
|
9
|
+
attributes :title, :slug, :created_at, :updated_at
|
|
10
|
+
|
|
11
|
+
attribute :description do |category|
|
|
12
|
+
category.description.to_plain_text if category.description.present?
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
has_many :posts, serializer: Spree::Api::Dependencies.storefront_post_serializer.constantize, record_type: :post, if: proc { |_record, params|
|
|
16
|
+
params[:include_posts] == true
|
|
17
|
+
} do |category|
|
|
18
|
+
category.posts.published.by_newest
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module V2
|
|
3
|
+
module Storefront
|
|
4
|
+
class PostSerializer < ::Spree::Api::V2::BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
7
|
+
set_type :post
|
|
8
|
+
|
|
9
|
+
attributes :title, :slug, :published_at, :meta_title, :meta_description, :created_at, :updated_at
|
|
10
|
+
|
|
11
|
+
attribute :excerpt do |post|
|
|
12
|
+
post.excerpt.to_plain_text if post.excerpt.present?
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
attribute :content do |post|
|
|
16
|
+
post.content.to_plain_text if post.content.present?
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
attribute :content_html do |post|
|
|
20
|
+
post.content.to_s if post.content.present?
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
attribute :description do |post|
|
|
24
|
+
post.description
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
attribute :shortened_description do |post|
|
|
28
|
+
post.shortened_description
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
attribute :author_name do |post|
|
|
32
|
+
post.author_name
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
attribute :post_category_title do |post|
|
|
36
|
+
post.post_category_title
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
attribute :tags do |post|
|
|
40
|
+
post.tag_list
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
attribute :image_url do |post, params|
|
|
44
|
+
url_helpers.cdn_image_url(post.image.attachment) if post.image.present? && post.image.attached?
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
belongs_to :post_category, serializer: Spree::Api::Dependencies.storefront_post_category_serializer.constantize, record_type: :post_category
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -3,6 +3,7 @@ module Spree
|
|
|
3
3
|
module Storefront
|
|
4
4
|
class ProductSerializer < BaseSerializer
|
|
5
5
|
include ::Spree::Api::V2::DisplayMoneyHelper
|
|
6
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
7
|
|
|
7
8
|
set_type :product
|
|
8
9
|
|
|
@@ -51,11 +52,11 @@ module Spree
|
|
|
51
52
|
attribute :tags, &:tag_list
|
|
52
53
|
attribute :labels, &:label_list
|
|
53
54
|
|
|
54
|
-
has_many :variants
|
|
55
|
-
has_many :option_types
|
|
56
|
-
has_many :product_properties
|
|
55
|
+
has_many :variants, serializer: Spree::Api::Dependencies.storefront_variant_serializer.constantize
|
|
56
|
+
has_many :option_types, serializer: Spree::Api::Dependencies.storefront_option_type_serializer.constantize
|
|
57
|
+
has_many :product_properties, serializer: Spree::Api::Dependencies.storefront_product_property_serializer.constantize
|
|
57
58
|
|
|
58
|
-
has_many :taxons, serializer:
|
|
59
|
+
has_many :taxons, serializer: Spree::Api::Dependencies.storefront_taxon_serializer.constantize, record_type: :taxon do |object, params|
|
|
59
60
|
object.taxons_for_store(params[:store]).order(:id)
|
|
60
61
|
end
|
|
61
62
|
|
|
@@ -64,19 +65,19 @@ module Spree
|
|
|
64
65
|
object_method_name: :variant_images,
|
|
65
66
|
id_method_name: :variant_image_ids,
|
|
66
67
|
record_type: :image,
|
|
67
|
-
serializer:
|
|
68
|
+
serializer: Spree::Api::Dependencies.storefront_image_serializer.constantize
|
|
68
69
|
|
|
69
70
|
has_one :default_variant,
|
|
70
71
|
object_method_name: :default_variant,
|
|
71
72
|
id_method_name: :default_variant_id,
|
|
72
73
|
record_type: :variant,
|
|
73
|
-
serializer:
|
|
74
|
+
serializer: Spree::Api::Dependencies.storefront_variant_serializer.constantize
|
|
74
75
|
|
|
75
76
|
has_one :primary_variant,
|
|
76
77
|
object_method_name: :master,
|
|
77
78
|
id_method_name: :master_id,
|
|
78
79
|
record_type: :variant,
|
|
79
|
-
serializer:
|
|
80
|
+
serializer: Spree::Api::Dependencies.storefront_variant_serializer.constantize
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
end
|
|
@@ -2,6 +2,8 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class ShipmentSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :shipment
|
|
6
8
|
|
|
7
9
|
attributes :number, :final_price, :display_final_price,
|
|
@@ -11,11 +13,11 @@ module Spree
|
|
|
11
13
|
shipment.free?
|
|
12
14
|
end
|
|
13
15
|
|
|
14
|
-
has_many :shipping_rates
|
|
15
|
-
has_one :selected_shipping_rate, serializer:
|
|
16
|
+
has_many :shipping_rates, serializer: Spree::Api::Dependencies.storefront_shipping_rate_serializer.constantize
|
|
17
|
+
has_one :selected_shipping_rate, serializer: Spree::Api::Dependencies.storefront_shipping_rate_serializer.constantize
|
|
16
18
|
|
|
17
|
-
belongs_to :stock_location
|
|
18
|
-
has_many :line_items do |shipment|
|
|
19
|
+
belongs_to :stock_location, serializer: Spree::Api::Dependencies.storefront_stock_location_serializer.constantize
|
|
20
|
+
has_many :line_items, serializer: Spree::Api::Dependencies.storefront_line_item_serializer.constantize do |shipment|
|
|
19
21
|
shipment.line_items
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -11,7 +11,7 @@ module Spree
|
|
|
11
11
|
shipping_rate.shipping_method_id.to_s
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
belongs_to :shipping_method
|
|
14
|
+
belongs_to :shipping_method, serializer: Spree::Api::Dependencies.storefront_shipping_method_serializer.constantize
|
|
15
15
|
|
|
16
16
|
attribute :free do |shipping_rate|
|
|
17
17
|
shipping_rate.free?
|
|
@@ -2,13 +2,15 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class StoreCreditSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :store_credit
|
|
6
8
|
|
|
7
|
-
belongs_to :category, serializer:
|
|
8
|
-
has_many :store_credit_events
|
|
9
|
+
belongs_to :category, serializer: Spree::Api::Dependencies.storefront_store_credit_category_serializer.constantize
|
|
10
|
+
has_many :store_credit_events, serializer: Spree::Api::Dependencies.storefront_store_credit_event_serializer.constantize
|
|
9
11
|
belongs_to :credit_type,
|
|
10
12
|
id_method_name: :type_id,
|
|
11
|
-
serializer:
|
|
13
|
+
serializer: Spree::Api::Dependencies.storefront_store_credit_type_serializer.constantize
|
|
12
14
|
|
|
13
15
|
attributes :amount, :amount_used, :created_at, :public_metadata
|
|
14
16
|
end
|
|
@@ -3,6 +3,7 @@ module Spree
|
|
|
3
3
|
module Storefront
|
|
4
4
|
class StoreSerializer < BaseSerializer
|
|
5
5
|
include Spree::Api::V2::StoreMediaSerializerImagesConcern
|
|
6
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
7
|
|
|
7
8
|
set_type :store
|
|
8
9
|
|
|
@@ -10,7 +11,7 @@ module Spree
|
|
|
10
11
|
:default, :supported_currencies, :facebook, :twitter, :instagram, :default_locale,
|
|
11
12
|
:customer_support_email, :description, :address, :contact_phone, :supported_locales
|
|
12
13
|
|
|
13
|
-
has_one :default_country, serializer:
|
|
14
|
+
has_one :default_country, serializer: Spree::Api::Dependencies.storefront_country_serializer.constantize, record_type: :country, id_method_name: :default_country_id
|
|
14
15
|
end
|
|
15
16
|
end
|
|
16
17
|
end
|
|
@@ -2,6 +2,8 @@ module Spree
|
|
|
2
2
|
module V2
|
|
3
3
|
module Storefront
|
|
4
4
|
class TaxonSerializer < BaseSerializer
|
|
5
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
|
+
|
|
5
7
|
set_type :taxon
|
|
6
8
|
|
|
7
9
|
attributes :name, :pretty_name, :permalink, :seo_title, :meta_title, :meta_description,
|
|
@@ -35,18 +37,18 @@ module Spree
|
|
|
35
37
|
taxon.localized_slugs_for_store(params[:store])
|
|
36
38
|
end
|
|
37
39
|
|
|
38
|
-
belongs_to :parent, record_type: :taxon, serializer:
|
|
39
|
-
belongs_to :taxonomy, record_type: :taxonomy
|
|
40
|
+
belongs_to :parent, record_type: :taxon, serializer: Spree::Api::Dependencies.storefront_taxon_serializer.constantize
|
|
41
|
+
belongs_to :taxonomy, record_type: :taxonomy, serializer: Spree::Api::Dependencies.storefront_taxonomy_serializer.constantize
|
|
40
42
|
|
|
41
|
-
has_many :children, record_type: :taxon, serializer:
|
|
42
|
-
has_many :products, record_type: :product,
|
|
43
|
+
has_many :children, record_type: :taxon, serializer: Spree::Api::Dependencies.storefront_taxon_serializer.constantize
|
|
44
|
+
has_many :products, record_type: :product, serializer: Spree::Api::Dependencies.storefront_product_serializer.constantize,
|
|
43
45
|
if: proc { |_taxon, params| params && params[:include_products] == true }
|
|
44
46
|
|
|
45
47
|
has_one :image,
|
|
46
48
|
object_method_name: :icon,
|
|
47
49
|
id_method_name: :icon_id,
|
|
48
50
|
record_type: :taxon_image,
|
|
49
|
-
serializer:
|
|
51
|
+
serializer: Spree::Api::Dependencies.storefront_taxon_image_serializer.constantize
|
|
50
52
|
end
|
|
51
53
|
end
|
|
52
54
|
end
|
|
@@ -20,13 +20,13 @@ module Spree
|
|
|
20
20
|
id_method_name: :bill_address_id,
|
|
21
21
|
object_method_name: :bill_address,
|
|
22
22
|
record_type: :address,
|
|
23
|
-
serializer:
|
|
23
|
+
serializer: Spree::Api::Dependencies.storefront_address_serializer.constantize
|
|
24
24
|
|
|
25
25
|
has_one :default_shipping_address,
|
|
26
26
|
id_method_name: :ship_address_id,
|
|
27
27
|
object_method_name: :ship_address,
|
|
28
28
|
record_type: :address,
|
|
29
|
-
serializer:
|
|
29
|
+
serializer: Spree::Api::Dependencies.storefront_address_serializer.constantize
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -3,6 +3,7 @@ module Spree
|
|
|
3
3
|
module Storefront
|
|
4
4
|
class VariantSerializer < BaseSerializer
|
|
5
5
|
include ::Spree::Api::V2::DisplayMoneyHelper
|
|
6
|
+
include Spree::Api::V2::PublicMetafieldsConcern
|
|
6
7
|
|
|
7
8
|
set_type :variant
|
|
8
9
|
|
|
@@ -40,9 +41,9 @@ module Spree
|
|
|
40
41
|
display_compare_at_price(product, params[:currency])
|
|
41
42
|
end
|
|
42
43
|
|
|
43
|
-
belongs_to :product
|
|
44
|
-
has_many :images
|
|
45
|
-
has_many :option_values
|
|
44
|
+
belongs_to :product, serializer: Spree::Api::Dependencies.storefront_product_serializer.constantize
|
|
45
|
+
has_many :images, serializer: Spree::Api::Dependencies.storefront_image_serializer.constantize
|
|
46
|
+
has_many :option_values, serializer: Spree::Api::Dependencies.storefront_option_value_serializer.constantize
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
end
|
|
@@ -15,7 +15,11 @@ module Spree
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
17
|
def filtered_subscribers(event_name, webhook_payload_body, record, options)
|
|
18
|
-
Spree::
|
|
18
|
+
Spree::Current.webhooks_subscribers.map do |subscriber|
|
|
19
|
+
if subscriber.supports_event?(event_name)
|
|
20
|
+
subscriber
|
|
21
|
+
end
|
|
22
|
+
end.compact
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
end
|
data/config/routes.rb
CHANGED
|
@@ -53,6 +53,7 @@ Spree::Core::Engine.add_routes do
|
|
|
53
53
|
|
|
54
54
|
resources :menus, only: %i[index show]
|
|
55
55
|
resources :cms_pages, only: %i[index show]
|
|
56
|
+
resources :policies, only: %i[index show]
|
|
56
57
|
|
|
57
58
|
resources :wishlists do
|
|
58
59
|
get :default, on: :collection
|
|
@@ -66,6 +67,9 @@ Spree::Core::Engine.add_routes do
|
|
|
66
67
|
end
|
|
67
68
|
end
|
|
68
69
|
|
|
70
|
+
resources :posts, only: %i[index show]
|
|
71
|
+
resources :post_categories, only: %i[index show]
|
|
72
|
+
|
|
69
73
|
get '/digitals/:token', to: 'digitals#download', as: 'digital'
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -65,14 +65,40 @@ module Spree
|
|
|
65
65
|
storefront_product_serializer: 'Spree::V2::Storefront::ProductSerializer',
|
|
66
66
|
storefront_estimated_shipment_serializer: 'Spree::V2::Storefront::EstimatedShippingRateSerializer',
|
|
67
67
|
storefront_store_serializer: 'Spree::V2::Storefront::StoreSerializer',
|
|
68
|
+
storefront_policy_serializer: 'Spree::V2::Storefront::PolicySerializer',
|
|
68
69
|
storefront_order_serializer: 'Spree::V2::Storefront::OrderSerializer',
|
|
69
70
|
storefront_variant_serializer: 'Spree::V2::Storefront::VariantSerializer',
|
|
71
|
+
storefront_image_serializer: 'Spree::V2::Storefront::ImageSerializer',
|
|
72
|
+
storefront_line_item_serializer: 'Spree::V2::Storefront::LineItemSerializer',
|
|
73
|
+
storefront_option_type_serializer: 'Spree::V2::Storefront::OptionTypeSerializer',
|
|
74
|
+
storefront_option_value_serializer: 'Spree::V2::Storefront::OptionValueSerializer',
|
|
75
|
+
storefront_post_category_serializer: 'Spree::V2::Storefront::PostCategorySerializer',
|
|
76
|
+
storefront_post_serializer: 'Spree::V2::Storefront::PostSerializer',
|
|
77
|
+
storefront_product_property_serializer: 'Spree::V2::Storefront::ProductPropertySerializer',
|
|
78
|
+
storefront_order_promotion_serializer: 'Spree::V2::Storefront::OrderPromotionSerializer',
|
|
79
|
+
storefront_shipping_method_serializer: 'Spree::V2::Storefront::ShippingMethodSerializer',
|
|
80
|
+
storefront_shipping_rate_serializer: 'Spree::V2::Storefront::ShippingRateSerializer',
|
|
81
|
+
storefront_stock_location_serializer: 'Spree::V2::Storefront::StockLocationSerializer',
|
|
82
|
+
storefront_store_credit_category_serializer: 'Spree::V2::Storefront::StoreCreditCategorySerializer',
|
|
83
|
+
storefront_store_credit_event_serializer: 'Spree::V2::Storefront::StoreCreditEventSerializer',
|
|
84
|
+
storefront_store_credit_type_serializer: 'Spree::V2::Storefront::StoreCreditTypeSerializer',
|
|
85
|
+
storefront_digital_link_serializer: 'Spree::V2::Storefront::DigitalLinkSerializer',
|
|
86
|
+
storefront_gift_card_serializer: 'Spree::V2::Storefront::GiftCardSerializer',
|
|
87
|
+
storefront_taxonomy_serializer: 'Spree::V2::Storefront::TaxonomySerializer',
|
|
88
|
+
storefront_taxon_image_serializer: 'Spree::V2::Storefront::TaxonImageSerializer',
|
|
89
|
+
storefront_wishlist_serializer: 'Spree::V2::Storefront::WishlistSerializer',
|
|
90
|
+
storefront_wished_item_serializer: 'Spree::V2::Storefront::WishedItemSerializer',
|
|
91
|
+
storefront_metafield_serializer: 'Spree::V2::Storefront::MetafieldSerializer',
|
|
92
|
+
|
|
93
|
+
# platform serializers
|
|
94
|
+
platform_metafield_serializer: 'Spree::Api::V2::Platform::MetafieldSerializer',
|
|
70
95
|
|
|
71
96
|
# sorters
|
|
72
97
|
storefront_collection_sorter: -> { Spree::Dependencies.collection_sorter },
|
|
73
98
|
storefront_order_sorter: -> { Spree::Dependencies.collection_sorter },
|
|
74
99
|
storefront_products_sorter: -> { Spree::Dependencies.products_sorter },
|
|
75
100
|
platform_products_sorter: -> { Spree::Dependencies.products_sorter },
|
|
101
|
+
storefront_posts_sorter: -> { Spree::Dependencies.posts_sorter },
|
|
76
102
|
|
|
77
103
|
# paginators
|
|
78
104
|
storefront_collection_paginator: -> { Spree::Dependencies.collection_paginator },
|
|
@@ -87,6 +113,7 @@ module Spree
|
|
|
87
113
|
storefront_credit_card_finder: -> { Spree::Dependencies.credit_card_finder },
|
|
88
114
|
storefront_find_by_variant_finder: -> { Spree::Dependencies.line_item_by_variant_finder },
|
|
89
115
|
storefront_products_finder: -> { Spree::Dependencies.products_finder },
|
|
116
|
+
storefront_posts_finder: -> { Spree::Dependencies.posts_finder },
|
|
90
117
|
storefront_taxon_finder: -> { Spree::Dependencies.taxon_finder },
|
|
91
118
|
storefront_variant_finder: -> { Spree::Dependencies.variant_finder },
|
|
92
119
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.2.0.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Bigg
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2025-
|
|
13
|
+
date: 2025-11-04 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: jsonapi-rspec
|
|
@@ -102,14 +102,14 @@ dependencies:
|
|
|
102
102
|
requirements:
|
|
103
103
|
- - '='
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: 5.
|
|
105
|
+
version: 5.2.0.rc1
|
|
106
106
|
type: :runtime
|
|
107
107
|
prerelease: false
|
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements:
|
|
110
110
|
- - '='
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 5.
|
|
112
|
+
version: 5.2.0.rc1
|
|
113
113
|
description: Spree's API
|
|
114
114
|
email:
|
|
115
115
|
- hello@spreecommerce.org
|
|
@@ -181,6 +181,9 @@ files:
|
|
|
181
181
|
- app/controllers/spree/api/v2/storefront/countries_controller.rb
|
|
182
182
|
- app/controllers/spree/api/v2/storefront/digitals_controller.rb
|
|
183
183
|
- app/controllers/spree/api/v2/storefront/order_status_controller.rb
|
|
184
|
+
- app/controllers/spree/api/v2/storefront/policies_controller.rb
|
|
185
|
+
- app/controllers/spree/api/v2/storefront/post_categories_controller.rb
|
|
186
|
+
- app/controllers/spree/api/v2/storefront/posts_controller.rb
|
|
184
187
|
- app/controllers/spree/api/v2/storefront/products_controller.rb
|
|
185
188
|
- app/controllers/spree/api/v2/storefront/stores_controller.rb
|
|
186
189
|
- app/controllers/spree/api/v2/storefront/taxons_controller.rb
|
|
@@ -210,6 +213,7 @@ files:
|
|
|
210
213
|
- app/models/spree/webhooks/subscriber.rb
|
|
211
214
|
- app/presenters/spree/api/products/filters_presenter.rb
|
|
212
215
|
- app/serializers/concerns/spree/api/v2/image_transformation_concern.rb
|
|
216
|
+
- app/serializers/concerns/spree/api/v2/public_metafields_concern.rb
|
|
213
217
|
- app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb
|
|
214
218
|
- app/serializers/concerns/spree/api/v2/taxon_image_transformation_concern.rb
|
|
215
219
|
- app/serializers/spree/api/v2/base_serializer.rb
|
|
@@ -231,6 +235,7 @@ files:
|
|
|
231
235
|
- app/serializers/spree/api/v2/platform/inventory_unit_serializer.rb
|
|
232
236
|
- app/serializers/spree/api/v2/platform/line_item_serializer.rb
|
|
233
237
|
- app/serializers/spree/api/v2/platform/log_entry_serializer.rb
|
|
238
|
+
- app/serializers/spree/api/v2/platform/metafield_serializer.rb
|
|
234
239
|
- app/serializers/spree/api/v2/platform/option_type_serializer.rb
|
|
235
240
|
- app/serializers/spree/api/v2/platform/option_value_serializer.rb
|
|
236
241
|
- app/serializers/spree/api/v2/platform/order_promotion_serializer.rb
|
|
@@ -296,15 +301,19 @@ files:
|
|
|
296
301
|
- app/serializers/spree/v2/storefront/gift_card_serializer.rb
|
|
297
302
|
- app/serializers/spree/v2/storefront/image_serializer.rb
|
|
298
303
|
- app/serializers/spree/v2/storefront/line_item_serializer.rb
|
|
304
|
+
- app/serializers/spree/v2/storefront/metafield_serializer.rb
|
|
299
305
|
- app/serializers/spree/v2/storefront/option_type_serializer.rb
|
|
300
306
|
- app/serializers/spree/v2/storefront/option_value_serializer.rb
|
|
307
|
+
- app/serializers/spree/v2/storefront/order_promotion_serializer.rb
|
|
301
308
|
- app/serializers/spree/v2/storefront/order_serializer.rb
|
|
302
309
|
- app/serializers/spree/v2/storefront/payment_method_serializer.rb
|
|
303
310
|
- app/serializers/spree/v2/storefront/payment_serializer.rb
|
|
304
311
|
- app/serializers/spree/v2/storefront/payment_source_serializer.rb
|
|
312
|
+
- app/serializers/spree/v2/storefront/policy_serializer.rb
|
|
313
|
+
- app/serializers/spree/v2/storefront/post_category_serializer.rb
|
|
314
|
+
- app/serializers/spree/v2/storefront/post_serializer.rb
|
|
305
315
|
- app/serializers/spree/v2/storefront/product_property_serializer.rb
|
|
306
316
|
- app/serializers/spree/v2/storefront/product_serializer.rb
|
|
307
|
-
- app/serializers/spree/v2/storefront/promotion_serializer.rb
|
|
308
317
|
- app/serializers/spree/v2/storefront/shipment_serializer.rb
|
|
309
318
|
- app/serializers/spree/v2/storefront/shipping_category_serializer.rb
|
|
310
319
|
- app/serializers/spree/v2/storefront/shipping_method_serializer.rb
|
|
@@ -369,9 +378,9 @@ licenses:
|
|
|
369
378
|
- BSD-3-Clause
|
|
370
379
|
metadata:
|
|
371
380
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
372
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.
|
|
381
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.0.rc1
|
|
373
382
|
documentation_uri: https://docs.spreecommerce.org/
|
|
374
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.
|
|
383
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.0.rc1
|
|
375
384
|
post_install_message:
|
|
376
385
|
rdoc_options: []
|
|
377
386
|
require_paths:
|