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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38bd4bf2ae62f5f2019c58e30756ca2ff678469f4efa5264a82400abc9af6f48
4
- data.tar.gz: 199f6ebcf4a79862a238dd08ca444ec8938d85bb4f47b4386a71060efe8e5d21
3
+ metadata.gz: 0e97b8e826fb8c422cac7fd8f2c48ed976bd801d2cd6b6a83d2bc63e7502680f
4
+ data.tar.gz: 590a06b109db49907897f093deefddeba7a1c9179a899507a4afb6634ce1351d
5
5
  SHA512:
6
- metadata.gz: ed12d85f966d2b03b6c1efd27ab9641d74b669dfe11908b16045e907900b5f9514af54e41d1ec91e4034017a4f981f7040c7cf169536b406c150a2ac85505b47
7
- data.tar.gz: 11f665989207e8d720e7b06b1ca96c84b9d0540b08c7cbb9ce17fc154ca784917a3f7602ac3634569d258ce0c5f96cca3386e3e913db7acc456e575a19596093
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.storefront_cart_serializer.constantize
38
+ Spree::Api::Dependencies.storefront_order_serializer.constantize
39
39
  end
40
40
 
41
41
  def resource_serializer
42
- Spree::Api::Dependencies.storefront_cart_serializer.constantize
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
@@ -8,7 +8,7 @@ module Spree
8
8
  has_one :payment_method
9
9
 
10
10
  attributes :amount, :response_code, :number, :cvv_response_code, :cvv_response_message,
11
- :payment_method_id, :payment_method_name
11
+ :payment_method_id, :payment_method_name, :state
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module V2
3
+ module Storefront
4
+ class StoreCreditCategorySerializer < BaseSerializer
5
+ set_type :store_credit_category
6
+
7
+ attributes :name
8
+ end
9
+ end
10
+ end
11
+ end
@@ -4,7 +4,7 @@ module Spree
4
4
  class StoreCreditSerializer < BaseSerializer
5
5
  set_type :store_credit
6
6
 
7
- belongs_to :category
7
+ belongs_to :category, serializer: :store_credit_category
8
8
  has_many :store_credit_events
9
9
  belongs_to :credit_type,
10
10
  id_method_name: :type_id,
@@ -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.12
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-10 00:00:00.000000000 Z
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.12
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.12
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.12
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.12
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: