solidus_graphql_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +93 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +62 -0
- data/CHANGELOG.md +0 -0
- data/CONTRIBUTING.md +57 -0
- data/Gemfile +33 -0
- data/LICENSE +26 -0
- data/LICENSE.md +26 -0
- data/README.md +245 -0
- data/Rakefile +43 -0
- data/app/controllers/spree/graphql_controller.rb +49 -0
- data/bin/console +17 -0
- data/bin/rails +9 -0
- data/bin/rails-engine +16 -0
- data/bin/rails-sandbox +18 -0
- data/bin/rake +8 -0
- data/bin/sandbox +84 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +6 -0
- data/config/routes.rb +5 -0
- data/lib/generators/solidus_graphql_api/install/install_generator.rb +8 -0
- data/lib/solidus_graphql_api.rb +11 -0
- data/lib/solidus_graphql_api/batch_loader.rb +114 -0
- data/lib/solidus_graphql_api/batch_loader/belongs_to.rb +30 -0
- data/lib/solidus_graphql_api/batch_loader/has_many.rb +24 -0
- data/lib/solidus_graphql_api/batch_loader/has_many_through.rb +42 -0
- data/lib/solidus_graphql_api/batch_loader/has_one.rb +22 -0
- data/lib/solidus_graphql_api/configuration.rb +19 -0
- data/lib/solidus_graphql_api/context.rb +76 -0
- data/lib/solidus_graphql_api/engine.rb +25 -0
- data/lib/solidus_graphql_api/factories.rb +11 -0
- data/lib/solidus_graphql_api/factories/address_factory.rb +8 -0
- data/lib/solidus_graphql_api/factories/country_factory.rb +12 -0
- data/lib/solidus_graphql_api/factories/store_factory.rb +16 -0
- data/lib/solidus_graphql_api/factories/taxonomy_factory.rb +26 -0
- data/lib/solidus_graphql_api/mutations/.keep +0 -0
- data/lib/solidus_graphql_api/mutations/base_mutation.rb +45 -0
- data/lib/solidus_graphql_api/mutations/checkout/add_addresses_to_checkout.rb +41 -0
- data/lib/solidus_graphql_api/mutations/checkout/add_payment_to_checkout.rb +45 -0
- data/lib/solidus_graphql_api/mutations/checkout/add_to_cart.rb +30 -0
- data/lib/solidus_graphql_api/mutations/checkout/advance_checkout.rb +27 -0
- data/lib/solidus_graphql_api/mutations/checkout/apply_coupon_code.rb +32 -0
- data/lib/solidus_graphql_api/mutations/checkout/complete_checkout.rb +31 -0
- data/lib/solidus_graphql_api/mutations/checkout/create_order.rb +27 -0
- data/lib/solidus_graphql_api/mutations/checkout/empty_cart.rb +29 -0
- data/lib/solidus_graphql_api/mutations/checkout/next_checkout_state.rb +27 -0
- data/lib/solidus_graphql_api/mutations/checkout/remove_from_cart.rb +33 -0
- data/lib/solidus_graphql_api/mutations/checkout/select_shipping_rate.rb +40 -0
- data/lib/solidus_graphql_api/mutations/checkout/set_order_email.rb +29 -0
- data/lib/solidus_graphql_api/mutations/checkout/update_cart_quantity.rb +41 -0
- data/lib/solidus_graphql_api/mutations/user/mark_default_address.rb +31 -0
- data/lib/solidus_graphql_api/mutations/user/remove_from_address_book.rb +25 -0
- data/lib/solidus_graphql_api/mutations/user/save_in_address_book.rb +30 -0
- data/lib/solidus_graphql_api/queries/address/country_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/address/state_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/completed_orders_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/countries_query.rb +11 -0
- data/lib/solidus_graphql_api/queries/country/states_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/line_item/variant_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/option_type/option_values_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/adjustments_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/billing_address_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/line_items_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/payments_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/shipments_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/order/shipping_address_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/product/master_variant_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/product/option_types_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/product/product_properties_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/product/variants_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/product_by_slug_query.rb +11 -0
- data/lib/solidus_graphql_api/queries/product_property/property_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/products_query.rb +29 -0
- data/lib/solidus_graphql_api/queries/shipment/shipping_rates_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/taxon/children_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/taxon/parent_taxon_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/taxonomies_query.rb +11 -0
- data/lib/solidus_graphql_api/queries/taxonomy/root_taxon_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/taxonomy/taxons_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/variant/default_price_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/variant/images_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/variant/option_values_query.rb +19 -0
- data/lib/solidus_graphql_api/queries/variant/prices_query.rb +19 -0
- data/lib/solidus_graphql_api/schema.rb +40 -0
- data/lib/solidus_graphql_api/types/.keep +0 -0
- data/lib/solidus_graphql_api/types/address.rb +32 -0
- data/lib/solidus_graphql_api/types/base/argument.rb +10 -0
- data/lib/solidus_graphql_api/types/base/enum.rb +10 -0
- data/lib/solidus_graphql_api/types/base/field.rb +13 -0
- data/lib/solidus_graphql_api/types/base/input_object.rb +10 -0
- data/lib/solidus_graphql_api/types/base/interface.rb +11 -0
- data/lib/solidus_graphql_api/types/base/object.rb +25 -0
- data/lib/solidus_graphql_api/types/base/relay_node.rb +13 -0
- data/lib/solidus_graphql_api/types/base/scalar.rb +10 -0
- data/lib/solidus_graphql_api/types/base/union.rb +10 -0
- data/lib/solidus_graphql_api/types/country.rb +23 -0
- data/lib/solidus_graphql_api/types/credit_card.rb +18 -0
- data/lib/solidus_graphql_api/types/currency.rb +14 -0
- data/lib/solidus_graphql_api/types/image.rb +27 -0
- data/lib/solidus_graphql_api/types/input_objects/address_input.rb +24 -0
- data/lib/solidus_graphql_api/types/input_objects/products_query_input.rb +15 -0
- data/lib/solidus_graphql_api/types/interfaces/adjustment.rb +32 -0
- data/lib/solidus_graphql_api/types/interfaces/payment_source.rb +19 -0
- data/lib/solidus_graphql_api/types/json.rb +63 -0
- data/lib/solidus_graphql_api/types/line_item.rb +26 -0
- data/lib/solidus_graphql_api/types/manifest_item.rb +12 -0
- data/lib/solidus_graphql_api/types/mutation.rb +24 -0
- data/lib/solidus_graphql_api/types/option_type.rb +22 -0
- data/lib/solidus_graphql_api/types/option_value.rb +15 -0
- data/lib/solidus_graphql_api/types/order.rb +63 -0
- data/lib/solidus_graphql_api/types/payment.rb +15 -0
- data/lib/solidus_graphql_api/types/payment_method.rb +15 -0
- data/lib/solidus_graphql_api/types/price.rb +21 -0
- data/lib/solidus_graphql_api/types/product.rb +38 -0
- data/lib/solidus_graphql_api/types/product_property.rb +19 -0
- data/lib/solidus_graphql_api/types/promotion_adjustment.rb +17 -0
- data/lib/solidus_graphql_api/types/property.rb +14 -0
- data/lib/solidus_graphql_api/types/query.rb +84 -0
- data/lib/solidus_graphql_api/types/shipment.rb +23 -0
- data/lib/solidus_graphql_api/types/shipping_rate.rb +15 -0
- data/lib/solidus_graphql_api/types/state.rb +14 -0
- data/lib/solidus_graphql_api/types/store.rb +27 -0
- data/lib/solidus_graphql_api/types/tax_adjustment.rb +11 -0
- data/lib/solidus_graphql_api/types/taxon.rb +33 -0
- data/lib/solidus_graphql_api/types/taxonomy.rb +23 -0
- data/lib/solidus_graphql_api/types/user.rb +23 -0
- data/lib/solidus_graphql_api/types/user_error.rb +12 -0
- data/lib/solidus_graphql_api/types/variant.rb +39 -0
- data/lib/solidus_graphql_api/types/wallet_payment_source.rb +14 -0
- data/lib/solidus_graphql_api/version.rb +5 -0
- data/schema.graphql +2070 -0
- data/solidus_graphql_api.gemspec +43 -0
- data/spec/integration/mutations/add_to_cart_spec.rb +67 -0
- data/spec/integration/mutations/checkout/add_addresses_to_checkout_spec.rb +115 -0
- data/spec/integration/mutations/checkout/add_payment_to_checkout_spec.rb +87 -0
- data/spec/integration/mutations/checkout/advance_checkout_spec.rb +71 -0
- data/spec/integration/mutations/checkout/apply_coupon_code_spec.rb +76 -0
- data/spec/integration/mutations/checkout/complete_checkout_spec.rb +56 -0
- data/spec/integration/mutations/checkout/next_checkout_state_spec.rb +69 -0
- data/spec/integration/mutations/checkout/select_shipping_rate_spec.rb +89 -0
- data/spec/integration/mutations/create_order_spec.rb +55 -0
- data/spec/integration/mutations/empty_cart_spec.rb +58 -0
- data/spec/integration/mutations/mark_default_address_spec.rb +33 -0
- data/spec/integration/mutations/remove_from_address_book_spec.rb +48 -0
- data/spec/integration/mutations/remove_from_cart_spec.rb +65 -0
- data/spec/integration/mutations/save_in_address_book_spec.rb +90 -0
- data/spec/integration/mutations/set_order_email_spec.rb +61 -0
- data/spec/integration/mutations/update_cart_quantity_spec.rb +68 -0
- data/spec/integration/queries/completed_orders_spec.rb +158 -0
- data/spec/integration/queries/countries_spec.rb +18 -0
- data/spec/integration/queries/current_order_spec.rb +15 -0
- data/spec/integration/queries/current_store_spec.rb +15 -0
- data/spec/integration/queries/current_user_spec.rb +43 -0
- data/spec/integration/queries/product_by_slug_spec.rb +42 -0
- data/spec/integration/queries/products_spec.rb +40 -0
- data/spec/integration/queries/taxonomies_spec.rb +22 -0
- data/spec/lib/solidus_graphql_api/batch_loader/belongs_to_spec.rb +67 -0
- data/spec/lib/solidus_graphql_api/batch_loader/has_many_spec.rb +38 -0
- data/spec/lib/solidus_graphql_api/batch_loader/has_many_through_spec.rb +47 -0
- data/spec/lib/solidus_graphql_api/batch_loader/has_one_spec.rb +38 -0
- data/spec/lib/solidus_graphql_api/context_spec.rb +236 -0
- data/spec/lib/solidus_graphql_api/queries/address/country_query_spec.rb +13 -0
- data/spec/lib/solidus_graphql_api/queries/address/state_query_spec.rb +13 -0
- data/spec/lib/solidus_graphql_api/queries/completed_orders_query_spec.rb +12 -0
- data/spec/lib/solidus_graphql_api/queries/countries_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/country/states_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/line_item/variant_query_spec.rb +9 -0
- data/spec/lib/solidus_graphql_api/queries/option_type/option_values_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/order/adjustments_query_spec.rb +10 -0
- data/spec/lib/solidus_graphql_api/queries/order/billing_address_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/order/line_items_query_spec.rb +9 -0
- data/spec/lib/solidus_graphql_api/queries/order/payments_query_spec.rb +9 -0
- data/spec/lib/solidus_graphql_api/queries/order/shipments_query_spec.rb +18 -0
- data/spec/lib/solidus_graphql_api/queries/order/shipping_address_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/product/master_variant_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/product/option_types_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/product/product_properties_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/product/variants_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/product_by_slug_query_spec.rb +13 -0
- data/spec/lib/solidus_graphql_api/queries/product_property/property_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/products_query_spec.rb +49 -0
- data/spec/lib/solidus_graphql_api/queries/shipment/shipping_rates_query_spec.rb +18 -0
- data/spec/lib/solidus_graphql_api/queries/taxon/children_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/taxon/parent_taxon_query_spec.rb +10 -0
- data/spec/lib/solidus_graphql_api/queries/taxonomies_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/taxonomy/root_taxon_query_spec.rb +10 -0
- data/spec/lib/solidus_graphql_api/queries/taxonomy/taxons_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/variant/default_price_query_spec.rb +9 -0
- data/spec/lib/solidus_graphql_api/queries/variant/images_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/variant/option_values_query_spec.rb +11 -0
- data/spec/lib/solidus_graphql_api/queries/variant/prices_query_spec.rb +13 -0
- data/spec/lib/solidus_graphql_api/schema_spec.rb +80 -0
- data/spec/lib/solidus_graphql_api/types/base/object_spec.rb +29 -0
- data/spec/lib/solidus_graphql_api/types/json_spec.rb +115 -0
- data/spec/lib/solidus_graphql_api/types/option_type_spec.rb +7 -0
- data/spec/lib/solidus_graphql_api/types/product_property_spec.rb +22 -0
- data/spec/lib/solidus_graphql_api/types/product_spec.rb +56 -0
- data/spec/lib/solidus_graphql_api/types/query_spec.rb +33 -0
- data/spec/lib/solidus_graphql_api/types/variant_spec.rb +58 -0
- data/spec/requests/spree/graphql_controller_spec.rb +17 -0
- data/spec/spec_helper.rb +62 -0
- data/spec/support/expected_schema.graphql +2070 -0
- data/spec/support/graphql/mutations/add_addresses_to_checkout.gql +19 -0
- data/spec/support/graphql/mutations/add_payment_to_checkout.gql +13 -0
- data/spec/support/graphql/mutations/add_to_cart.gql +21 -0
- data/spec/support/graphql/mutations/advance_checkout.gql +13 -0
- data/spec/support/graphql/mutations/apply_coupon_code.gql +13 -0
- data/spec/support/graphql/mutations/complete_checkout.gql +13 -0
- data/spec/support/graphql/mutations/create_order.gql +11 -0
- data/spec/support/graphql/mutations/empty_cart.gql +17 -0
- data/spec/support/graphql/mutations/mark_default_address.gql +9 -0
- data/spec/support/graphql/mutations/next_checkout_state.gql +13 -0
- data/spec/support/graphql/mutations/remove_from_address_book.gql +14 -0
- data/spec/support/graphql/mutations/remove_from_cart.gql +17 -0
- data/spec/support/graphql/mutations/save_in_address_book.gql +57 -0
- data/spec/support/graphql/mutations/select_shipping_rate.gql +23 -0
- data/spec/support/graphql/mutations/set_order_email.gql +13 -0
- data/spec/support/graphql/mutations/update_cart_quantity.gql +18 -0
- data/spec/support/graphql/queries/completed_orders.gql +29 -0
- data/spec/support/graphql/queries/completed_orders/adjustments.gql +24 -0
- data/spec/support/graphql/queries/completed_orders/available_payment_methods.gql +15 -0
- data/spec/support/graphql/queries/completed_orders/billing_address.gql +40 -0
- data/spec/support/graphql/queries/completed_orders/line_items.gql +23 -0
- data/spec/support/graphql/queries/completed_orders/payments.gql +23 -0
- data/spec/support/graphql/queries/completed_orders/shipping_address.gql +40 -0
- data/spec/support/graphql/queries/countries.gql +24 -0
- data/spec/support/graphql/queries/current_order.gql +32 -0
- data/spec/support/graphql/queries/current_store.gql +24 -0
- data/spec/support/graphql/queries/current_user.gql +197 -0
- data/spec/support/graphql/queries/product_by_slug.gql +106 -0
- data/spec/support/graphql/queries/products.gql +7 -0
- data/spec/support/graphql/queries/taxonomies.gql +81 -0
- data/spec/support/graphql/responses/completed_orders.json.erb +58 -0
- data/spec/support/graphql/responses/completed_orders/adjustments.json.erb +34 -0
- data/spec/support/graphql/responses/completed_orders/available_payment_methods.json.erb +29 -0
- data/spec/support/graphql/responses/completed_orders/billing_address.json.erb +78 -0
- data/spec/support/graphql/responses/completed_orders/line_items.json.erb +43 -0
- data/spec/support/graphql/responses/completed_orders/payments.json.erb +27 -0
- data/spec/support/graphql/responses/completed_orders/shipping_address.json.erb +78 -0
- data/spec/support/graphql/responses/countries.json.erb +51 -0
- data/spec/support/graphql/responses/current_order.json.erb +36 -0
- data/spec/support/graphql/responses/current_store.json.erb +34 -0
- data/spec/support/graphql/responses/current_user.json.erb +232 -0
- data/spec/support/graphql/responses/product_by_slug.json.erb +123 -0
- data/spec/support/graphql/responses/taxonomies.json.erb +145 -0
- data/spec/support/helpers/graphql.rb +43 -0
- data/spec/support/matchers/graphql.rb +35 -0
- data/spec/support/shared_contexts/graphql_query_subject.rb +21 -0
- metadata +572 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
query {
|
2
|
+
taxonomies {
|
3
|
+
nodes {
|
4
|
+
createdAt
|
5
|
+
id
|
6
|
+
name
|
7
|
+
updatedAt
|
8
|
+
rootTaxon {
|
9
|
+
children {
|
10
|
+
nodes {
|
11
|
+
children {
|
12
|
+
nodes {
|
13
|
+
id
|
14
|
+
}
|
15
|
+
}
|
16
|
+
createdAt
|
17
|
+
description
|
18
|
+
iconUrl
|
19
|
+
id
|
20
|
+
metaDescription
|
21
|
+
metaKeywords
|
22
|
+
metaTitle
|
23
|
+
name
|
24
|
+
parentTaxon {
|
25
|
+
id
|
26
|
+
}
|
27
|
+
permalink
|
28
|
+
updatedAt
|
29
|
+
}
|
30
|
+
}
|
31
|
+
createdAt
|
32
|
+
description
|
33
|
+
iconUrl
|
34
|
+
id
|
35
|
+
metaDescription
|
36
|
+
metaKeywords
|
37
|
+
metaTitle
|
38
|
+
name
|
39
|
+
parentTaxon {
|
40
|
+
id
|
41
|
+
}
|
42
|
+
permalink
|
43
|
+
updatedAt
|
44
|
+
}
|
45
|
+
taxons {
|
46
|
+
nodes {
|
47
|
+
children {
|
48
|
+
nodes {
|
49
|
+
createdAt
|
50
|
+
description
|
51
|
+
iconUrl
|
52
|
+
id
|
53
|
+
metaDescription
|
54
|
+
metaKeywords
|
55
|
+
metaTitle
|
56
|
+
name
|
57
|
+
parentTaxon {
|
58
|
+
id
|
59
|
+
}
|
60
|
+
permalink
|
61
|
+
updatedAt
|
62
|
+
}
|
63
|
+
}
|
64
|
+
createdAt
|
65
|
+
description
|
66
|
+
iconUrl
|
67
|
+
id
|
68
|
+
metaDescription
|
69
|
+
metaKeywords
|
70
|
+
metaTitle
|
71
|
+
name
|
72
|
+
parentTaxon {
|
73
|
+
id
|
74
|
+
}
|
75
|
+
permalink
|
76
|
+
updatedAt
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"additionalTaxTotal": "0.0",
|
8
|
+
"adjustmentTotal": "0.0",
|
9
|
+
"approvedAt": null,
|
10
|
+
"canceledAt": null,
|
11
|
+
"completedAt": "2012-12-21T12:00:00Z",
|
12
|
+
"confirmationDelivered": false,
|
13
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
14
|
+
"currency": "USD",
|
15
|
+
"email": "email1@example.com",
|
16
|
+
"guestToken": "fake guest token 1",
|
17
|
+
"includedTaxTotal": "0.0",
|
18
|
+
"itemTotal": "10.0",
|
19
|
+
"number": "fake order number 1",
|
20
|
+
"paymentState": "balance_due",
|
21
|
+
"paymentTotal": "0.0",
|
22
|
+
"promoTotal": "0.0",
|
23
|
+
"shipmentState": "pending",
|
24
|
+
"shipmentTotal": "100.0",
|
25
|
+
"specialInstructions": null,
|
26
|
+
"state": "complete",
|
27
|
+
"total": "110.0",
|
28
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"id": 2,
|
32
|
+
"additionalTaxTotal": "0.0",
|
33
|
+
"adjustmentTotal": "0.0",
|
34
|
+
"approvedAt": null,
|
35
|
+
"canceledAt": null,
|
36
|
+
"completedAt": "2012-12-21T12:00:00Z",
|
37
|
+
"confirmationDelivered": false,
|
38
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
39
|
+
"currency": "USD",
|
40
|
+
"email": "email1@example.com",
|
41
|
+
"guestToken": "fake guest token 2",
|
42
|
+
"includedTaxTotal": "0.0",
|
43
|
+
"itemTotal": "10.0",
|
44
|
+
"number": "fake order number 2",
|
45
|
+
"paymentState": "balance_due",
|
46
|
+
"paymentTotal": "0.0",
|
47
|
+
"promoTotal": "0.0",
|
48
|
+
"shipmentState": "pending",
|
49
|
+
"shipmentTotal": "100.0",
|
50
|
+
"specialInstructions": null,
|
51
|
+
"state": "complete",
|
52
|
+
"total": "110.0",
|
53
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"adjustments": {
|
8
|
+
"nodes": [
|
9
|
+
{
|
10
|
+
"__typename": "TaxAdjustment",
|
11
|
+
"amount": "100.0",
|
12
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
13
|
+
"eligible": true,
|
14
|
+
"label": "Shipping",
|
15
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
16
|
+
"id": <%= adjustments[0].id %>
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"__typename": "PromotionAdjustment",
|
20
|
+
"amount": "-10.0",
|
21
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
22
|
+
"eligible": true,
|
23
|
+
"label": "Promotion (Promo)",
|
24
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
25
|
+
"id": <%= adjustments[1].id %>,
|
26
|
+
"promotionCode": "solidus"
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
30
|
+
}
|
31
|
+
]
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"availablePaymentMethods": [
|
8
|
+
{
|
9
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
10
|
+
"description": null,
|
11
|
+
"id": <%= available_payment_methods[0].id %>,
|
12
|
+
"name": "Credit Card",
|
13
|
+
"position": "1",
|
14
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
18
|
+
"description": null,
|
19
|
+
"id": <%= available_payment_methods[1].id %>,
|
20
|
+
"name": "Credit Card",
|
21
|
+
"position": "2",
|
22
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
]
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"billingAddress": {
|
8
|
+
"id": 2,
|
9
|
+
"address1": "PO Box 1337",
|
10
|
+
"address2": "Northwest",
|
11
|
+
"alternativePhone": "555-555-0199",
|
12
|
+
"city": "Herndon",
|
13
|
+
"company": "Company",
|
14
|
+
"country": {
|
15
|
+
"id": 2,
|
16
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
17
|
+
"iso": "US",
|
18
|
+
"iso3": "USA",
|
19
|
+
"isoName": "UNITED STATES",
|
20
|
+
"name": "United States",
|
21
|
+
"numcode": 840,
|
22
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
23
|
+
},
|
24
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
25
|
+
"firstname": "John",
|
26
|
+
"lastname": null,
|
27
|
+
"phone": "555-555-0199",
|
28
|
+
"state": {
|
29
|
+
"id": 2,
|
30
|
+
"abbr": "AL",
|
31
|
+
"name": "Alabama",
|
32
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
33
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
34
|
+
},
|
35
|
+
"stateName": null,
|
36
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
37
|
+
"zipcode": "10002"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 2,
|
42
|
+
"billingAddress": {
|
43
|
+
"id": 4,
|
44
|
+
"address1": "PO Box 1337",
|
45
|
+
"address2": "Northwest",
|
46
|
+
"alternativePhone": "555-555-0199",
|
47
|
+
"city": "Herndon",
|
48
|
+
"company": "Company",
|
49
|
+
"country": {
|
50
|
+
"id": 4,
|
51
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
52
|
+
"iso": "US",
|
53
|
+
"iso3": "USA",
|
54
|
+
"isoName": "UNITED STATES",
|
55
|
+
"name": "United States",
|
56
|
+
"numcode": 840,
|
57
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
58
|
+
},
|
59
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
60
|
+
"firstname": "John",
|
61
|
+
"lastname": null,
|
62
|
+
"phone": "555-555-0199",
|
63
|
+
"state": {
|
64
|
+
"id": 4,
|
65
|
+
"abbr": "AL",
|
66
|
+
"name": "Alabama",
|
67
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
68
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
69
|
+
},
|
70
|
+
"stateName": null,
|
71
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
72
|
+
"zipcode": "10004"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
]
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"lineItems": {
|
8
|
+
"nodes": [
|
9
|
+
{
|
10
|
+
"id": <%= line_items[0].id %>,
|
11
|
+
"additionalTaxTotal": 0.0,
|
12
|
+
"adjustmentTotal": 0.0,
|
13
|
+
"amount": 10.0,
|
14
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
15
|
+
"currency": "USD",
|
16
|
+
"hasSufficientStock": true,
|
17
|
+
"includedTaxTotal": 0.0,
|
18
|
+
"price": 10.0,
|
19
|
+
"promoTotal": 0.0,
|
20
|
+
"quantity": 1,
|
21
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"id": <%= line_items[1].id %>,
|
25
|
+
"additionalTaxTotal": 0.0,
|
26
|
+
"adjustmentTotal": 0.0,
|
27
|
+
"amount": 10.0,
|
28
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
29
|
+
"currency": "USD",
|
30
|
+
"hasSufficientStock": true,
|
31
|
+
"includedTaxTotal": 0.0,
|
32
|
+
"price": 10.0,
|
33
|
+
"promoTotal": 0.0,
|
34
|
+
"quantity": 1,
|
35
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
36
|
+
}
|
37
|
+
]
|
38
|
+
}
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"payments": [
|
8
|
+
{
|
9
|
+
"amount": "110.0",
|
10
|
+
"state": "pending",
|
11
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
12
|
+
"id": <%= payments[0].id %>,
|
13
|
+
"paymentSource": {
|
14
|
+
"ccType": null,
|
15
|
+
"lastDigits": "1111",
|
16
|
+
"month": "12",
|
17
|
+
"name": "Spree Commerce",
|
18
|
+
"year": "2013"
|
19
|
+
},
|
20
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"completedOrders": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"id": 1,
|
7
|
+
"shippingAddress": {
|
8
|
+
"id": 1,
|
9
|
+
"address1": "A Different Road",
|
10
|
+
"address2": "Northwest",
|
11
|
+
"alternativePhone": "555-555-0199",
|
12
|
+
"city": "Herndon",
|
13
|
+
"company": "Company",
|
14
|
+
"country": {
|
15
|
+
"id": 1,
|
16
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
17
|
+
"iso": "US",
|
18
|
+
"iso3": "USA",
|
19
|
+
"isoName": "UNITED STATES",
|
20
|
+
"name": "United States",
|
21
|
+
"numcode": 840,
|
22
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
23
|
+
},
|
24
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
25
|
+
"firstname": "John",
|
26
|
+
"lastname": null,
|
27
|
+
"phone": "555-555-0199",
|
28
|
+
"state": {
|
29
|
+
"id": 1,
|
30
|
+
"abbr": "AL",
|
31
|
+
"name": "Alabama",
|
32
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
33
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
34
|
+
},
|
35
|
+
"stateName": null,
|
36
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
37
|
+
"zipcode": "10001"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 2,
|
42
|
+
"shippingAddress": {
|
43
|
+
"id": 3,
|
44
|
+
"address1": "A Different Road",
|
45
|
+
"address2": "Northwest",
|
46
|
+
"alternativePhone": "555-555-0199",
|
47
|
+
"city": "Herndon",
|
48
|
+
"company": "Company",
|
49
|
+
"country": {
|
50
|
+
"id": 3,
|
51
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
52
|
+
"iso": "US",
|
53
|
+
"iso3": "USA",
|
54
|
+
"isoName": "UNITED STATES",
|
55
|
+
"name": "United States",
|
56
|
+
"numcode": 840,
|
57
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
58
|
+
},
|
59
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
60
|
+
"firstname": "John",
|
61
|
+
"lastname": null,
|
62
|
+
"phone": "555-555-0199",
|
63
|
+
"state": {
|
64
|
+
"id": 3,
|
65
|
+
"abbr": "AL",
|
66
|
+
"name": "Alabama",
|
67
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
68
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
69
|
+
},
|
70
|
+
"stateName": null,
|
71
|
+
"updatedAt": "2012-12-21T12:00:00Z",
|
72
|
+
"zipcode": "10003"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
]
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"data": {
|
3
|
+
"countries": {
|
4
|
+
"nodes": [
|
5
|
+
{
|
6
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
7
|
+
"id": 1,
|
8
|
+
"iso": "US",
|
9
|
+
"iso3": "USA",
|
10
|
+
"isoName": "UNITED STATES",
|
11
|
+
"name": "United States",
|
12
|
+
"numcode": 840,
|
13
|
+
"states": {
|
14
|
+
"nodes": [
|
15
|
+
{
|
16
|
+
"abbr": "AL",
|
17
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
18
|
+
"id": 1,
|
19
|
+
"name": "Alabama",
|
20
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"abbr": "CA",
|
24
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
25
|
+
"id": 2,
|
26
|
+
"name": "California",
|
27
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
28
|
+
}
|
29
|
+
]
|
30
|
+
},
|
31
|
+
"statesRequired": false,
|
32
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"createdAt": "2012-12-21T12:00:00Z",
|
36
|
+
"id": 2,
|
37
|
+
"iso": "IT",
|
38
|
+
"iso3": "ITA",
|
39
|
+
"isoName": "ITALY",
|
40
|
+
"name": "Italy",
|
41
|
+
"numcode": 380,
|
42
|
+
"states": {
|
43
|
+
"nodes": []
|
44
|
+
},
|
45
|
+
"statesRequired": false,
|
46
|
+
"updatedAt": "2012-12-21T12:00:00Z"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|