├── .editorconfig ├── .github └── workflows │ └── test.yml ├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── FixturesGenerator.php ├── LICENSE ├── README.md ├── composer.json ├── config └── serializer │ ├── Access.AccessScope.yml │ ├── Access.StorefrontAccessToken.yml │ ├── Analytics.Report.yml │ ├── Billing.ApplicationCharge.yml │ ├── Billing.ApplicationCredit.yml │ ├── Billing.RecurringApplicationCharge.yml │ ├── Billing.UsageCharge.yml │ ├── Common.Price.yml │ ├── Common.PriceSet.yml │ ├── Customers.Address.yml │ ├── Customers.Customer.yml │ ├── Customers.CustomerInvite.yml │ ├── Customers.CustomerSavedSearch.yml │ ├── Discounts.DiscountCode.yml │ ├── Discounts.PriceRule.yml │ ├── Events.Event.yml │ ├── Events.Webhook.yml │ ├── Inventory.Common.CountryHarmonizedSystemCode.yml │ ├── Inventory.InventoryItem.yml │ ├── Inventory.InventoryLevel.yml │ ├── Inventory.Location.yml │ ├── MarketingEvent.Common.MarketedResource.yml │ ├── MarketingEvent.MarketingEvent.yml │ ├── Metafield.Metafield.yml │ ├── OnlineStore.Article.yml │ ├── OnlineStore.Asset.yml │ ├── OnlineStore.Blog.yml │ ├── OnlineStore.Comment.yml │ ├── OnlineStore.Page.yml │ ├── OnlineStore.Redirect.yml │ ├── OnlineStore.ScriptTag.yml │ ├── OnlineStore.Theme.yml │ ├── Orders.Checkout.yml │ ├── Orders.Common.AppliedDiscount.yml │ ├── Orders.Common.CheckoutShippingLine.yml │ ├── Orders.Common.ClientDetails.yml │ ├── Orders.Common.CurrencyExchangeAdjustment.yml │ ├── Orders.Common.DiscountAllocation.yml │ ├── Orders.Common.DiscountApplication.yml │ ├── Orders.Common.DiscountCode.yml │ ├── Orders.Common.DraftOrderShippingLine.yml │ ├── Orders.Common.Duty.yml │ ├── Orders.Common.LineItem.yml │ ├── Orders.Common.LineItemDuty.yml │ ├── Orders.Common.LineItemLocation.yml │ ├── Orders.Common.LineItemProperty.yml │ ├── Orders.Common.NoteAttribute.yml │ ├── Orders.Common.OrderAddress.yml │ ├── Orders.Common.OrderAdjustment.yml │ ├── Orders.Common.PaymentDetails.yml │ ├── Orders.Common.RefundDuty.yml │ ├── Orders.Common.RefundLineItem.yml │ ├── Orders.Common.ShippingLine.yml │ ├── Orders.Common.TaxLine.yml │ ├── Orders.DraftOrder.yml │ ├── Orders.Order.yml │ ├── Orders.Refund.yml │ ├── Orders.Risk.yml │ ├── Orders.Transaction.yml │ ├── Products.Collect.yml │ ├── Products.CollectionImage.yml │ ├── Products.Common.Rule.yml │ ├── Products.CustomCollection.yml │ ├── Products.Image.yml │ ├── Products.Option.yml │ ├── Products.Product.yml │ ├── Products.SmartCollection.yml │ ├── Products.Variant.yml │ ├── Shipping.AssignedFulfillmentOrder.yml │ ├── Shipping.CarrierService.yml │ ├── Shipping.Common.Destination.yml │ ├── Shipping.Common.LineItem.yml │ ├── Shipping.Common.MerchantRequest.yml │ ├── Shipping.Fulfillment.yml │ ├── Shipping.FulfillmentEvent.yml │ ├── Shipping.FulfillmentOrder.yml │ ├── Shipping.FulfillmentService.yml │ ├── Store.Common.CarrierShippingRateProvider.yml │ ├── Store.Common.PriceBasedShippingRate.yml │ ├── Store.Common.WeightBasedShippingRate.yml │ ├── Store.Country.yml │ ├── Store.Currency.yml │ ├── Store.Policy.yml │ ├── Store.Province.yml │ ├── Store.ShippingZone.yml │ ├── Store.Shop.yml │ └── builtin │ ├── Billing.RecurringApplicationCharge.yml │ ├── Billing.UsageCharge.yml │ ├── Discounts.PriceRule.yml │ ├── Orders.Transaction.yml │ ├── Shipping.Fulfillment.yml │ └── Store.Common.CarrierShippingRateProvider.yml ├── examples ├── 0-authorization.php ├── 1-manager.php └── 2-curd.php ├── phpunit.xml.dist ├── src ├── AccessToken.php ├── Client.php ├── CredentialInterface.php ├── Exception │ ├── BadRequestException.php │ ├── ClientException.php │ ├── ForbiddenException.php │ ├── InvalidArgumentException.php │ ├── NotAcceptableException.php │ ├── NotFoundException.php │ ├── PaymentRequiredException.php │ ├── RuntimeException.php │ ├── TooManyRequestsException.php │ ├── UnauthorizedException.php │ └── UnprocessableEntityException.php ├── Hydrator │ ├── Hydrator.php │ └── HydratorInterface.php ├── Inflector.php ├── Middleware │ ├── CallableMiddleware.php │ ├── DelayMiddleware.php │ ├── MiddlewareChain.php │ └── MiddlewareInterface.php ├── Model │ ├── Access │ │ ├── AccessScope.php │ │ └── StorefrontAccessToken.php │ ├── Analytics │ │ └── Report.php │ ├── Billing │ │ ├── ApplicationCharge.php │ │ ├── ApplicationCredit.php │ │ ├── RecurringApplicationCharge.php │ │ └── UsageCharge.php │ ├── Common │ │ ├── Price.php │ │ └── PriceSet.php │ ├── Customers │ │ ├── Address.php │ │ ├── Customer.php │ │ ├── CustomerInvite.php │ │ └── CustomerSavedSearch.php │ ├── Discounts │ │ ├── DiscountCode.php │ │ └── PriceRule.php │ ├── Events │ │ ├── Event.php │ │ └── Webhook.php │ ├── Inventory │ │ ├── Common │ │ │ └── CountryHarmonizedSystemCode.php │ │ ├── InventoryItem.php │ │ ├── InventoryLevel.php │ │ └── Location.php │ ├── MarketingEvent │ │ ├── Common │ │ │ └── MarketedResource.php │ │ └── MarketingEvent.php │ ├── Metafield │ │ └── Metafield.php │ ├── OnlineStore │ │ ├── Article.php │ │ ├── Asset.php │ │ ├── Blog.php │ │ ├── Comment.php │ │ ├── Page.php │ │ ├── Redirect.php │ │ ├── ScriptTag.php │ │ └── Theme.php │ ├── Orders │ │ ├── Checkout.php │ │ ├── Common │ │ │ ├── AppliedDiscount.php │ │ │ ├── CheckoutShippingLine.php │ │ │ ├── ClientDetails.php │ │ │ ├── CurrencyExchangeAdjustment.php │ │ │ ├── DiscountAllocation.php │ │ │ ├── DiscountApplication.php │ │ │ ├── DiscountCode.php │ │ │ ├── DraftOrderShippingLine.php │ │ │ ├── Duty.php │ │ │ ├── LineItem.php │ │ │ ├── LineItemDuty.php │ │ │ ├── LineItemLocation.php │ │ │ ├── LineItemProperty.php │ │ │ ├── NoteAttribute.php │ │ │ ├── OrderAddress.php │ │ │ ├── OrderAdjustment.php │ │ │ ├── PaymentDetails.php │ │ │ ├── RefundDuty.php │ │ │ ├── RefundLineItem.php │ │ │ ├── ShippingLine.php │ │ │ └── TaxLine.php │ │ ├── DraftOrder.php │ │ ├── Order.php │ │ ├── Refund.php │ │ ├── Risk.php │ │ └── Transaction.php │ ├── Products │ │ ├── Collect.php │ │ ├── CollectionImage.php │ │ ├── Common │ │ │ └── Rule.php │ │ ├── CustomCollection.php │ │ ├── Image.php │ │ ├── Option.php │ │ ├── Product.php │ │ ├── SmartCollection.php │ │ └── Variant.php │ ├── Shipping │ │ ├── AssignedFulfillmentOrder.php │ │ ├── CarrierService.php │ │ ├── Common │ │ │ ├── Destination.php │ │ │ ├── LineItem.php │ │ │ └── MerchantRequest.php │ │ ├── Fulfillment.php │ │ ├── FulfillmentEvent.php │ │ ├── FulfillmentOrder.php │ │ └── FulfillmentService.php │ └── Store │ │ ├── Common │ │ ├── CarrierShippingRateProvider.php │ │ ├── PriceBasedShippingRate.php │ │ └── WeightBasedShippingRate.php │ │ ├── Country.php │ │ ├── Currency.php │ │ ├── Policy.php │ │ ├── Province.php │ │ ├── ShippingZone.php │ │ └── Shop.php ├── PrivateAppCredential.php ├── PublicAppCredential.php └── Service │ ├── Access │ ├── AccessScopeManager.php │ ├── AccessScopeManagerInterface.php │ ├── StorefrontAccessTokenManager.php │ └── StorefrontAccessTokenManagerInterface.php │ ├── Analytics │ ├── ReportManager.php │ └── ReportManagerInterface.php │ ├── Billing │ ├── ApplicationChargeManager.php │ ├── ApplicationChargeManagerInterface.php │ ├── ApplicationCreditManager.php │ ├── ApplicationCreditManagerInterface.php │ ├── RecurringApplicationChargeManager.php │ ├── RecurringApplicationChargeManagerInterface.php │ ├── UsageChargeManager.php │ └── UsageChargeManagerInterface.php │ ├── Common │ ├── AbstractManager.php │ ├── CursorBasedPagination.php │ ├── GeneralCurdManager.php │ ├── ManagerInterface.php │ └── NestCrudManager.php │ ├── Customers │ ├── AddressManager.php │ ├── AddressManagerInterface.php │ ├── CustomerManager.php │ ├── CustomerManagerInterface.php │ ├── CustomerSavedSearchManager.php │ └── CustomerSavedSearchManagerInterface.php │ ├── Discounts │ ├── DiscountCodeManager.php │ ├── DiscountCodeManagerInterface.php │ ├── PriceRuleManager.php │ └── PriceRuleManagerInterface.php │ ├── Events │ ├── EventManager.php │ ├── EventManagerInterface.php │ ├── WebhookManager.php │ └── WebhookManagerInterface.php │ ├── Inventory │ ├── InventoryItemManager.php │ ├── InventoryItemManagerInterface.php │ ├── InventoryLevelManager.php │ ├── InventoryLevelManagerInterface.php │ ├── LocationManager.php │ └── LocationManagerInterface.php │ ├── MarketingEvent │ ├── MarketingEventManager.php │ └── MarketingEventManagerInterface.php │ ├── OnlineStore │ ├── ArticleManager.php │ ├── ArticleManagerInterface.php │ ├── AssetManager.php │ ├── AssetManagerInterface.php │ ├── BlogManager.php │ ├── BlogManagerInterface.php │ ├── CommentManager.php │ ├── CommentManagerInterface.php │ ├── PageManager.php │ ├── PageManagerInterface.php │ ├── RedirectManager.php │ ├── RedirectManagerInterface.php │ ├── ScriptTagManager.php │ ├── ScriptTagManagerInterface.php │ ├── ThemeManager.php │ └── ThemeManagerInterface.php │ ├── Orders │ ├── DraftOrderManager.php │ ├── DraftOrderManagerInterface.php │ ├── OrderManager.php │ ├── OrderManagerInterface.php │ ├── RefundManager.php │ ├── RefundManagerInterface.php │ ├── RiskManager.php │ ├── RiskManagerInterface.php │ ├── TransactionManager.php │ └── TransactionManagerInterface.php │ ├── Products │ ├── CollectManager.php │ ├── CollectManagerInterface.php │ ├── CustomCollectionManager.php │ ├── CustomCollectionManagerInterface.php │ ├── ImageManager.php │ ├── ImageManagerInterface.php │ ├── ProductManager.php │ ├── ProductManagerInterface.php │ ├── SmartCollectionManager.php │ ├── SmartCollectionManagerInterface.php │ ├── VariantManager.php │ └── VariantManagerInterface.php │ ├── Shipping │ ├── AssignedFulfillmentOrderManager.php │ ├── AssignedFulfillmentOrderManagerInterface.php │ ├── CarrierServiceManager.php │ ├── CarrierServiceManagerInterface.php │ ├── FulfillmentManager.php │ ├── FulfillmentManagerInterface.php │ ├── FulfillmentOrderManager.php │ ├── FulfillmentOrderManagerInterface.php │ ├── FulfillmentServiceManager.php │ └── FulfillmentServiceManagerInterface.php │ └── Store │ ├── CountryManager.php │ ├── CountryManagerInterface.php │ ├── CurrencyManager.php │ ├── CurrencyManagerInterface.php │ ├── PolicyManager.php │ ├── PolicyManagerInterface.php │ ├── ProvinceManager.php │ ├── ProvinceManagerInterface.php │ ├── ShippingZoneManager.php │ ├── ShippingZoneManagerInterface.php │ ├── ShopManager.php │ └── ShopManagerInterface.php └── tests ├── AccessTokenTest.php ├── ClientTest.php ├── Hydrator ├── HydratorTest.php ├── serializer │ ├── Category.yml │ ├── Comment.yml │ └── Post.yml └── test_classes.php ├── InflectorTest.php ├── Model ├── Access │ ├── AccessScopeTest.php │ └── StorefrontAccessTokenTest.php ├── Analytics │ └── ReportTest.php ├── Billing │ ├── ApplicationChargeTest.php │ ├── ApplicationCreditTest.php │ ├── RecurringApplicationChargeTest.php │ └── UsageChargeTest.php ├── Common │ ├── PriceSetTest.php │ └── PriceTest.php ├── Customers │ ├── AddressTest.php │ ├── CustomerInviteTest.php │ ├── CustomerSavedSearchTest.php │ └── CustomerTest.php ├── Discounts │ ├── DiscountCodeTest.php │ └── PriceRuleTest.php ├── Events │ ├── EventTest.php │ └── WebhookTest.php ├── Inventory │ ├── InventoryItemTest.php │ ├── InventoryLevelTest.php │ └── LocationTest.php ├── MarketingEvent │ └── MarketingEventTest.php ├── Metafield │ └── MetafieldTest.php ├── ModelTestCase.php ├── OnlineStore │ ├── ArticleTest.php │ ├── AssetTest.php │ ├── BlogTest.php │ ├── CommentTest.php │ ├── PageTest.php │ ├── RedirectTest.php │ ├── ScriptTagTest.php │ └── ThemeTest.php ├── Orders │ ├── CheckoutTest.php │ ├── Common │ │ ├── AppliedDiscountTest.php │ │ ├── CheckoutShippingLineTest.php │ │ ├── ClientDetailsTest.php │ │ ├── CurrencyExchangeAdjustmentTest.php │ │ ├── DiscountAllocationTest.php │ │ ├── DiscountApplicationTest.php │ │ ├── DiscountCodeTest.php │ │ ├── DraftOrderShippingLineTest.php │ │ ├── DutyTest.php │ │ ├── LineItemDutyTest.php │ │ ├── LineItemLocationTest.php │ │ ├── LineItemPropertyTest.php │ │ ├── LineItemTest.php │ │ ├── NoteAttributeTest.php │ │ ├── OrderAddressTest.php │ │ ├── OrderAdjustmentTest.php │ │ ├── PaymentDetailsTest.php │ │ ├── RefundDutyTest.php │ │ ├── RefundLineItemTest.php │ │ ├── ShippingLineTest.php │ │ └── TaxLineTest.php │ ├── DraftOrderTest.php │ ├── OrderTest.php │ ├── RefundTest.php │ ├── RiskTest.php │ └── TransactionTest.php ├── Products │ ├── CollectTest.php │ ├── CollectionImageTest.php │ ├── CustomCollectionTest.php │ ├── ImageTest.php │ ├── OptionTest.php │ ├── ProductTest.php │ ├── SmartCollectionTest.php │ └── VariantTest.php ├── Shipping │ ├── AssignedFulfillmentOrderTest.php │ ├── CarrierServiceTest.php │ ├── Common │ │ ├── DestinationTest.php │ │ ├── LineItemTest.php │ │ └── MerchantRequestTest.php │ ├── FulfillmentEventTest.php │ ├── FulfillmentOrderTest.php │ ├── FulfillmentServiceTest.php │ └── FulfillmentTest.php └── Store │ ├── CountryTest.php │ ├── CurrencyTest.php │ ├── PolicyTest.php │ ├── ProvinceTest.php │ ├── ShippingZoneTest.php │ └── ShopTest.php ├── PrivatAppCredentialTest.php ├── PublicAppCredentialTest.php ├── Resources ├── Access │ ├── AccessScope │ │ └── all.json │ └── StorefrontAccessToken │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json ├── Analytics │ └── Report │ │ ├── all.json │ │ └── view.json ├── Billing │ ├── ApplicationCharge │ │ ├── all.json │ │ └── view.json │ ├── ApplicationCredit │ │ ├── all.json │ │ └── view.json │ ├── RecurringApplicationCharge │ │ ├── activate.json │ │ ├── all.json │ │ ├── customize.json │ │ ├── delete.json │ │ └── view.json │ └── UsageCharge │ │ ├── all.json │ │ └── view.json ├── Customers │ ├── Address │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ ├── Customer │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ ├── search.json │ │ └── view.json │ └── CustomerSavedSearch │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json ├── Discounts │ ├── DiscountCode │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ └── PriceRule │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json ├── Events │ ├── Event │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ └── Webhook │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json ├── Inventory │ ├── InventoryItem │ │ ├── all.json │ │ └── view.json │ ├── InventoryLevel │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ └── Location │ │ ├── all.json │ │ ├── count.json │ │ ├── inventory_levels.json │ │ └── view.json ├── MarketingEvent │ └── MarketingEvent │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json ├── OnlineStore │ ├── Article │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Asset │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ ├── Blog │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Comment │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Page │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Redirect │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── ScriptTag │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ └── Theme │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json ├── Orders │ ├── DraftOrder │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ ├── send_invoice.json │ │ └── view.json │ ├── Order │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Refund │ │ ├── all.json │ │ └── view.json │ ├── Risk │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ └── Transaction │ │ ├── all.json │ │ ├── count.json │ │ └── view.json ├── Products │ ├── Collect │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── CustomCollection │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Image │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── Product │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ ├── SmartCollection │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json │ └── Variant │ │ ├── all.json │ │ ├── count.json │ │ ├── delete.json │ │ └── view.json ├── Shipping │ ├── AssignedFulfillmentOrder │ │ └── all.json │ ├── CarrierService │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json │ ├── Fulfillment │ │ ├── all.json │ │ ├── count.json │ │ └── view.json │ ├── FulfillmentOrder │ │ ├── all.json │ │ └── view.json │ └── FulfillmentService │ │ ├── all.json │ │ ├── delete.json │ │ └── view.json └── Store │ ├── Country │ ├── all.json │ ├── count.json │ ├── delete.json │ └── view.json │ ├── Currency │ └── all.json │ ├── Policy │ └── all.json │ ├── Province │ ├── all.json │ ├── count.json │ └── view.json │ ├── ShippingZone │ ├── all.json │ └── view.json │ └── Shop │ └── view.json ├── Service ├── Access │ ├── AccessScopeManagerTest.php │ └── StorefrontAccessTokenManagerTest.php ├── Analytics │ └── ReportManagerTest.php ├── Billing │ ├── ApplicationChargeManagerTest.php │ ├── ApplicationCreditManagerTest.php │ ├── RecurringApplicationChargeManagerTest.php │ └── UsageChargeManagerTest.php ├── Common │ ├── AbstractManagerTestCase.php │ ├── GeneralCurdManagerTestCase.php │ └── NestCurdManagerTestCase.php ├── Customers │ ├── AddressManagerTest.php │ ├── CustomerManagerTest.php │ └── CustomerSavedSearchManagerTest.php ├── Discounts │ ├── DiscountCodeManagerTest.php │ └── PriceRuleManagerTest.php ├── Events │ ├── EventManagerTest.php │ └── WebhookManagerTest.php ├── Inventory │ ├── InventoryItemManagerTest.php │ ├── InventoryLevelManagerTest.php │ └── LocationManagerTest.php ├── MarketingEvent │ └── MarketingEventManagerTest.php ├── OnlineStore │ ├── ArticleManagerTest.php │ ├── AssetManagerTest.php │ ├── BlogManagerTest.php │ ├── CommentManagerTest.php │ ├── PageManagerTest.php │ ├── RedirectManagerTest.php │ ├── ScriptTagManagerTest.php │ └── ThemeManagerTest.php ├── Orders │ ├── DraftOrderManagerTest.php │ ├── OrderManagerTest.php │ ├── RefundManagerTest.php │ ├── RiskManagerTest.php │ └── TransactionManagerTest.php ├── Products │ ├── CollectManagerTest.php │ ├── CustomCollectionManagerTest.php │ ├── ImageManagerTest.php │ ├── ProductManagerTest.php │ ├── SmartCollectionManagerTest.php │ └── VariantManagerTest.php ├── Shipping │ ├── AssignedFulfillmentOrderManagerTest.php │ ├── CarrierServiceManagerTest.php │ ├── FulfillmentManagerTest.php │ ├── FulfillmentOrderManagerTest.php │ └── FulfillmentServiceManagerTest.php └── Store │ ├── CountryManagerTest.php │ ├── CurrencyManagerTest.php │ ├── PolicyManagerTest.php │ ├── ProvinceManagerTest.php │ ├── ShippingZoneManagerTest.php │ └── ShopManagerTest.php └── TestCase.php /.editorconfig: -------------------------------------------------------------------------------- 1 | ; top-most EditorConfig file 2 | root = true 3 | 4 | ; Unix-style newlines 5 | [*] 6 | end_of_line = LF 7 | 8 | [*.php] 9 | indent_style = space 10 | indent_size = 4 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | .idea/ 3 | composer.lock 4 | demo.php 5 | /logs/ 6 | /tests/tmp/* 7 | *tmp* 8 | .DS_Store 9 | .phpunit.result.cache -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # see http://about.travis-ci.org/docs/user/languages/php/ for more hints 2 | language: php 3 | 4 | php: 5 | - 7.2 6 | - 7.3 7 | - 7.4 8 | - 8.0 9 | 10 | before_script: 11 | - composer install 12 | 13 | script: ./vendor/bin/phpunit --coverage-clover=coverage.xml 14 | 15 | after_success: 16 | - bash <(curl -s https://codecov.io/bash) 17 | 18 | notifications: 19 | email: false 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2017 Slince 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /config/serializer/Access.AccessScope.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Access\AccessScope: 2 | properties: 3 | handle: 4 | type: string -------------------------------------------------------------------------------- /config/serializer/Access.StorefrontAccessToken.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Access\StorefrontAccessToken: 2 | properties: 3 | id: 4 | type: int 5 | title: 6 | type: string 7 | accessToken: 8 | type: string 9 | accessScope: 10 | type: string 11 | adminGraphqlApiId: 12 | type: string 13 | createdAt: 14 | type: DateTime<'Y-m-d\TH:i:sO'> -------------------------------------------------------------------------------- /config/serializer/Analytics.Report.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Analytics\Report: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | shopifyQl: 8 | type: string 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | category: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Billing.ApplicationCharge.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Billing\ApplicationCharge: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | apiClientId: 8 | type: int 9 | price: 10 | type: string 11 | status: 12 | type: string 13 | returnUrl: 14 | type: string 15 | test: 16 | type: bool 17 | createdAt: 18 | type: DateTime<'Y-m-d\TH:i:sO'> 19 | updatedAt: 20 | type: DateTime<'Y-m-d\TH:i:sO'> 21 | chargeType: 22 | type: string 23 | decoratedReturnUrl: 24 | type: string 25 | confirmationUrl: 26 | type: string -------------------------------------------------------------------------------- /config/serializer/Billing.ApplicationCredit.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Billing\ApplicationCredit: 2 | properties: 3 | id: 4 | type: int 5 | amount: 6 | type: string 7 | description: 8 | type: string 9 | test: 10 | type: bool -------------------------------------------------------------------------------- /config/serializer/Billing.UsageCharge.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Billing\UsageCharge: 2 | properties: 3 | id: 4 | type: int 5 | description: 6 | type: string 7 | price: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | billingOn: 12 | type: DateTime<'Y-m-d'> 13 | balanceUsed: 14 | type: float 15 | balanceRemaining: 16 | type: float 17 | riskLevel: 18 | type: int -------------------------------------------------------------------------------- /config/serializer/Common.Price.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Common\Price: 2 | properties: 3 | amount: 4 | type: string 5 | currencyCode: 6 | type: string -------------------------------------------------------------------------------- /config/serializer/Common.PriceSet.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Common\PriceSet: 2 | properties: 3 | shopMoney: 4 | type: Slince\Shopify\Model\Common\Price 5 | presentmentMoney: 6 | type: Slince\Shopify\Model\Common\Price -------------------------------------------------------------------------------- /config/serializer/Customers.Address.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Customers\Address: 2 | properties: 3 | id: 4 | type: int 5 | customerId: 6 | type: int 7 | firstName: 8 | type: string 9 | lastName: 10 | type: string 11 | company: 12 | type: string 13 | address1: 14 | type: string 15 | address2: 16 | type: string 17 | city: 18 | type: string 19 | province: 20 | type: string 21 | country: 22 | type: string 23 | zip: 24 | type: string 25 | phone: 26 | type: string 27 | name: 28 | type: string 29 | provinceCode: 30 | type: string 31 | countryCode: 32 | type: string 33 | countryName: 34 | type: string 35 | default: 36 | type: bool -------------------------------------------------------------------------------- /config/serializer/Customers.CustomerInvite.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Customers\CustomerInvite: 2 | properties: 3 | id: 4 | type: int 5 | to: 6 | type: string 7 | from: 8 | type: string 9 | subject: 10 | type: string 11 | bcc: 12 | type: array 13 | customMessage: 14 | type: string -------------------------------------------------------------------------------- /config/serializer/Customers.CustomerSavedSearch.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Customers\CustomerSavedSearch: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | query: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Discounts.DiscountCode.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Discounts\DiscountCode: 2 | properties: 3 | id: 4 | type: int 5 | priceRuleId: 6 | type: int 7 | code: 8 | type: string 9 | usageCount: 10 | type: int 11 | createdAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | updatedAt: 14 | type: DateTime<'Y-m-d\TH:i:sO'> -------------------------------------------------------------------------------- /config/serializer/Events.Event.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Events\Event: 2 | properties: 3 | id: 4 | type: int 5 | subjectId: 6 | type: int 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | subjectType: 10 | type: string 11 | verb: 12 | type: string 13 | arguments: 14 | type: array 15 | body: 16 | type: string 17 | message: 18 | type: string 19 | author: 20 | type: string 21 | description: 22 | type: string 23 | path: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/Events.Webhook.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Events\Webhook: 2 | properties: 3 | id: 4 | type: int 5 | address: 6 | type: string 7 | topic: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | updatedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | format: 14 | type: string 15 | fields: 16 | type: array 17 | metafieldNamespaces: 18 | type: array 19 | apiVersion: 20 | type: string 21 | privateMetafieldNamespaces: 22 | type: array -------------------------------------------------------------------------------- /config/serializer/Inventory.Common.CountryHarmonizedSystemCode.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Inventory\Common\CountryHarmonizedSystemCode: 2 | properties: 3 | harmonizedSystemCode: 4 | type: string 5 | countryCode: 6 | type: string -------------------------------------------------------------------------------- /config/serializer/Inventory.InventoryItem.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Inventory\InventoryItem: 2 | properties: 3 | id: 4 | type: int 5 | sku: 6 | type: string 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | requiresShipping: 12 | type: bool 13 | cost: 14 | type: string 15 | countryCodeOfOrigin: 16 | type: string 17 | provinceCodeOfOrigin: 18 | type: string 19 | harmonizedSystemCode: 20 | type: int 21 | tracked: 22 | type: bool 23 | countryHarmonizedSystemCodes: 24 | type: array 25 | adminGraphqlApiId: 26 | type: string -------------------------------------------------------------------------------- /config/serializer/Inventory.InventoryLevel.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Inventory\InventoryLevel: 2 | properties: 3 | inventoryItemId: 4 | type: int 5 | locationId: 6 | type: int 7 | available: 8 | type: int 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | adminGraphqlApiId: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Inventory.Location.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Inventory\Location: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | address1: 8 | type: string 9 | address2: 10 | type: string 11 | city: 12 | type: string 13 | zip: 14 | type: string 15 | province: 16 | type: string 17 | country: 18 | type: string 19 | phone: 20 | type: int 21 | createdAt: 22 | type: DateTime<'Y-m-d\TH:i:sO'> 23 | updatedAt: 24 | type: DateTime<'Y-m-d\TH:i:sO'> 25 | countryCode: 26 | type: string 27 | countryName: 28 | type: string 29 | provinceCode: 30 | type: string 31 | legacy: 32 | type: bool 33 | active: 34 | type: bool 35 | adminGraphqlApiId: 36 | type: string 37 | localizedCountryName: 38 | type: string 39 | localizedProvinceName: 40 | type: string -------------------------------------------------------------------------------- /config/serializer/MarketingEvent.Common.MarketedResource.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\MarketingEvent\Common\MarketedResource: 2 | properties: 3 | type: 4 | type: string 5 | id: 6 | type: int -------------------------------------------------------------------------------- /config/serializer/Metafield.Metafield.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Metafield\Metafield: 2 | properties: 3 | id: 4 | type: int 5 | namespace: 6 | type: string 7 | key: 8 | type: string 9 | value: 10 | type: string 11 | valueType: 12 | type: string 13 | description: 14 | type: string 15 | ownerId: 16 | type: int 17 | createdAt: 18 | type: DateTime<'Y-m-d\TH:i:sO'> 19 | updatedAt: 20 | type: DateTime<'Y-m-d\TH:i:sO'> 21 | ownerResource: 22 | type: string 23 | adminGraphqlApiId: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Article.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Article: 2 | properties: 3 | id: 4 | type: int 5 | title: 6 | type: string 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | bodyHtml: 10 | type: string 11 | blogId: 12 | type: int 13 | author: 14 | type: string 15 | userId: 16 | type: int 17 | publishedAt: 18 | type: DateTime<'Y-m-d\TH:i:sO'> 19 | updatedAt: 20 | type: DateTime<'Y-m-d\TH:i:sO'> 21 | summaryHtml: 22 | type: string 23 | templateSuffix: 24 | type: string 25 | handle: 26 | type: string 27 | tags: 28 | type: string 29 | adminGraphqlApiId: 30 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Asset.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Asset: 2 | properties: 3 | key: 4 | type: string 5 | publicUrl: 6 | type: string 7 | value: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | updatedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | contentType: 14 | type: string 15 | size: 16 | type: int 17 | checkSum: 18 | type: string 19 | themeId: 20 | type: int -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Blog.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Blog: 2 | properties: 3 | id: 4 | type: int 5 | handle: 6 | type: string 7 | title: 8 | type: string 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | commentable: 12 | type: string 13 | feedburner: 14 | type: string 15 | feedburnerLocation: 16 | type: string 17 | createdAt: 18 | type: DateTime<'Y-m-d\TH:i:sO'> 19 | templateSuffix: 20 | type: string 21 | tags: 22 | type: string 23 | adminGraphqlApiId: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Comment.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Comment: 2 | properties: 3 | id: 4 | type: int 5 | body: 6 | type: string 7 | bodyHtml: 8 | type: string 9 | author: 10 | type: string 11 | email: 12 | type: string 13 | status: 14 | type: string 15 | articleId: 16 | type: int 17 | blogId: 18 | type: int 19 | createdAt: 20 | type: DateTime<'Y-m-d\TH:i:sO'> 21 | updatedAt: 22 | type: DateTime<'Y-m-d\TH:i:sO'> 23 | ip: 24 | type: string 25 | userAgent: 26 | type: string 27 | publishedAt: 28 | type: DateTime<'Y-m-d\TH:i:sO'> -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Page.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Page: 2 | properties: 3 | id: 4 | type: int 5 | title: 6 | type: string 7 | shopId: 8 | type: int 9 | handle: 10 | type: string 11 | bodyHtml: 12 | type: string 13 | author: 14 | type: string 15 | createdAt: 16 | type: DateTime<'Y-m-d\TH:i:sO'> 17 | updatedAt: 18 | type: DateTime<'Y-m-d\TH:i:sO'> 19 | publishedAt: 20 | type: DateTime<'Y-m-d\TH:i:sO'> 21 | templateSuffix: 22 | type: string 23 | adminGraphqlApiId: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Redirect.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Redirect: 2 | properties: 3 | id: 4 | type: int 5 | path: 6 | type: string 7 | target: 8 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.ScriptTag.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\ScriptTag: 2 | properties: 3 | id: 4 | type: int 5 | src: 6 | type: string 7 | event: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | updatedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | displayScope: 14 | type: string -------------------------------------------------------------------------------- /config/serializer/OnlineStore.Theme.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\OnlineStore\Theme: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | role: 12 | type: string 13 | themeStoreId: 14 | type: int 15 | previewable: 16 | type: bool 17 | processing: 18 | type: bool 19 | adminGraphqlApiId: 20 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.AppliedDiscount.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\AppliedDiscount: 2 | properties: 3 | title: 4 | type: string 5 | description: 6 | type: string 7 | value: 8 | type: string 9 | valueType: 10 | type: string 11 | amount: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.CheckoutShippingLine.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\CheckoutShippingLine: 2 | properties: 3 | code: 4 | type: string 5 | price: 6 | type: string 7 | source: 8 | type: string 9 | title: 10 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.ClientDetails.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\ClientDetails: 2 | properties: 3 | browserIp: 4 | type: string 5 | acceptLanguage: 6 | type: string 7 | userAgent: 8 | type: string 9 | sessionHash: 10 | type: string 11 | browserWidth: 12 | type: int 13 | browserHeight: 14 | type: int -------------------------------------------------------------------------------- /config/serializer/Orders.Common.CurrencyExchangeAdjustment.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\CurrencyExchangeAdjustment: 2 | properties: 3 | id: 4 | type: int 5 | adjustment: 6 | type: string 7 | originalAmount: 8 | type: string 9 | finalAmount: 10 | type: string 11 | currency: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.DiscountAllocation.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\DiscountAllocation: 2 | properties: 3 | amount: 4 | type: string 5 | discountApplicationIndex: 6 | type: int 7 | amountSet: 8 | type: Slince\Shopify\Model\Common\PriceSet -------------------------------------------------------------------------------- /config/serializer/Orders.Common.DiscountApplication.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\DiscountApplication: 2 | properties: 3 | type: 4 | type: string 5 | value: 6 | type: string 7 | valueType: 8 | type: string 9 | allocationMethod: 10 | type: string 11 | targetSelection: 12 | type: string 13 | targetType: 14 | type: string 15 | code: 16 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.DiscountCode.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\DiscountCode: 2 | properties: 3 | code: 4 | type: string 5 | amount: 6 | type: string 7 | type: 8 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.DraftOrderShippingLine.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\DraftOrderShippingLine: 2 | properties: 3 | custom: 4 | type: bool 5 | handle: 6 | type: string 7 | title: 8 | type: string 9 | price: 10 | type: float -------------------------------------------------------------------------------- /config/serializer/Orders.Common.Duty.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\Duty: 2 | properties: 3 | dutyId: 4 | type: int 5 | amountSet: 6 | type: Slince\Shopify\Model\Common\PriceSet -------------------------------------------------------------------------------- /config/serializer/Orders.Common.LineItemDuty.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\LineItemDuty: 2 | properties: 3 | shopMoney: 4 | type: Slince\Shopify\Model\Common\Price 5 | presentmentMoney: 6 | type: Slince\Shopify\Model\Common\Price 7 | id: 8 | type: int 9 | harmonizedSystemCode: 10 | type: string 11 | taxLines: 12 | type: array 13 | adminGraphqlApiId: 14 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.LineItemLocation.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\LineItemLocation: 2 | properties: 3 | id: 4 | type: int 5 | countryCode: 6 | type: string 7 | provinceCode: 8 | type: string 9 | name: 10 | type: string 11 | address1: 12 | type: string 13 | address2: 14 | type: string 15 | city: 16 | type: string 17 | zip: 18 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.LineItemProperty.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\LineItemProperty: 2 | properties: 3 | name: 4 | type: string 5 | value: 6 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.NoteAttribute.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\NoteAttribute: 2 | properties: 3 | name: 4 | type: string 5 | value: 6 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.OrderAddress.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\OrderAddress: 2 | properties: 3 | firstName: 4 | type: string 5 | address1: 6 | type: string 7 | phone: 8 | type: string 9 | city: 10 | type: string 11 | zip: 12 | type: string 13 | province: 14 | type: string 15 | country: 16 | type: string 17 | lastName: 18 | type: string 19 | address2: 20 | type: string 21 | company: 22 | type: string 23 | latitude: 24 | type: float 25 | longitude: 26 | type: float 27 | name: 28 | type: string 29 | countryCode: 30 | type: string 31 | provinceCode: 32 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.OrderAdjustment.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\OrderAdjustment: 2 | properties: 3 | id: 4 | type: int 5 | orderId: 6 | type: int 7 | refundId: 8 | type: int 9 | amount: 10 | type: string 11 | taxAmount: 12 | type: string 13 | kind: 14 | type: string 15 | reason: 16 | type: string 17 | amountSet: 18 | type: Slince\Shopify\Model\Common\PriceSet 19 | taxAmountSet: 20 | type: Slince\Shopify\Model\Common\PriceSet -------------------------------------------------------------------------------- /config/serializer/Orders.Common.PaymentDetails.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\PaymentDetails: 2 | properties: 3 | avsResultCode: 4 | type: string 5 | creditCardBin: 6 | type: string 7 | cvvResultCode: 8 | type: string 9 | creditCardNumber: 10 | type: string 11 | creditCardCompany: 12 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.RefundDuty.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\RefundDuty: 2 | properties: 3 | dutyId: 4 | type: int 5 | refundType: 6 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.RefundLineItem.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\RefundLineItem: 2 | properties: 3 | id: 4 | type: int 5 | quantity: 6 | type: int 7 | lineItemId: 8 | type: int 9 | locationId: 10 | type: int 11 | restockType: 12 | type: string 13 | subtotal: 14 | type: float 15 | totalTax: 16 | type: float 17 | subtotalSet: 18 | type: Slince\Shopify\Model\Common\PriceSet 19 | totalTaxSet: 20 | type: Slince\Shopify\Model\Common\PriceSet 21 | lineItem: 22 | type: Slince\Shopify\Model\Orders\Common\LineItem -------------------------------------------------------------------------------- /config/serializer/Orders.Common.ShippingLine.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\ShippingLine: 2 | properties: 3 | code: 4 | type: string 5 | price: 6 | type: string 7 | priceSet: 8 | type: Slince\Shopify\Model\Common\PriceSet 9 | discountedPrice: 10 | type: string 11 | discountedPriceSet: 12 | type: Slince\Shopify\Model\Common\PriceSet 13 | source: 14 | type: string 15 | title: 16 | type: string 17 | taxLines: 18 | type: array 19 | carrierIdentifier: 20 | type: string 21 | requestedFulfillmentServiceId: 22 | type: string -------------------------------------------------------------------------------- /config/serializer/Orders.Common.TaxLine.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Common\TaxLine: 2 | properties: 3 | title: 4 | type: string 5 | price: 6 | type: string 7 | rate: 8 | type: float 9 | priceSet: 10 | type: Slince\Shopify\Model\Common\PriceSet -------------------------------------------------------------------------------- /config/serializer/Orders.Refund.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Refund: 2 | properties: 3 | id: 4 | type: int 5 | orderId: 6 | type: int 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | note: 10 | type: string 11 | userId: 12 | type: int 13 | processedAt: 14 | type: string 15 | restock: 16 | type: bool 17 | duties: 18 | type: array 19 | totalDutiesSet: 20 | type: Slince\Shopify\Model\Common\PriceSet 21 | adminGraphqlApiId: 22 | type: string 23 | refundDuties: 24 | type: array 25 | refundLineItems: 26 | type: array 27 | transactions: 28 | type: array 29 | orderAdjustments: 30 | type: array -------------------------------------------------------------------------------- /config/serializer/Orders.Risk.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Risk: 2 | properties: 3 | id: 4 | type: int 5 | orderId: 6 | type: int 7 | checkoutId: 8 | type: int 9 | source: 10 | type: string 11 | score: 12 | type: string 13 | recommendation: 14 | type: string 15 | display: 16 | type: bool 17 | causeCancel: 18 | type: bool 19 | message: 20 | type: string 21 | merchantMessage: 22 | type: string -------------------------------------------------------------------------------- /config/serializer/Products.Collect.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\Collect: 2 | properties: 3 | id: 4 | type: int 5 | collectionId: 6 | type: int 7 | createdAt: 8 | type: DateTime<'Y-m-d\TH:i:sO'> 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | featured: 12 | type: bool 13 | position: 14 | type: int 15 | productId: 16 | type: int 17 | sortValue: 18 | type: int -------------------------------------------------------------------------------- /config/serializer/Products.CollectionImage.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\CollectionImage: 2 | properties: 3 | src: 4 | type: string 5 | width: 6 | type: int 7 | height: 8 | type: int 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> -------------------------------------------------------------------------------- /config/serializer/Products.Common.Rule.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\Common\Rule: 2 | properties: 3 | column: 4 | type: string 5 | relation: 6 | type: string 7 | condition: 8 | type: string -------------------------------------------------------------------------------- /config/serializer/Products.CustomCollection.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\CustomCollection: 2 | properties: 3 | id: 4 | type: int 5 | handle: 6 | type: string 7 | title: 8 | type: string 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | bodyHtml: 12 | type: string 13 | publishedAt: 14 | type: DateTime<'Y-m-d\TH:i:sO'> 15 | sortOrder: 16 | type: string 17 | templateSuffix: 18 | type: string 19 | publishedScope: 20 | type: string 21 | image: 22 | type: Slince\Shopify\Model\Products\CollectionImage 23 | adminGraphqlApiId: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/Products.Image.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\Image: 2 | properties: 3 | id: 4 | type: int 5 | productId: 6 | type: int 7 | position: 8 | type: int 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | updatedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | width: 14 | type: int 15 | height: 16 | type: int 17 | src: 18 | type: string 19 | variantIds: 20 | type: array 21 | alt: 22 | type: string 23 | adminGraphqlApiId: 24 | type: string -------------------------------------------------------------------------------- /config/serializer/Products.Option.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\Option: 2 | properties: 3 | id: 4 | type: int 5 | productId: 6 | type: int 7 | name: 8 | type: string 9 | position: 10 | type: int 11 | values: 12 | type: array -------------------------------------------------------------------------------- /config/serializer/Products.SmartCollection.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Products\SmartCollection: 2 | properties: 3 | id: 4 | type: int 5 | handle: 6 | type: string 7 | title: 8 | type: string 9 | updatedAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | bodyHtml: 12 | type: string 13 | publishedAt: 14 | type: DateTime<'Y-m-d\TH:i:sO'> 15 | sortOrder: 16 | type: string 17 | templateSuffix: 18 | type: string 19 | disjunctive: 20 | type: bool 21 | rules: 22 | type: array 23 | publishedScope: 24 | type: string 25 | image: 26 | type: Slince\Shopify\Model\Products\CollectionImage 27 | adminGraphqlApiId: 28 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.AssignedFulfillmentOrder.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\AssignedFulfillmentOrder: 2 | properties: 3 | id: 4 | type: int 5 | shopId: 6 | type: int 7 | orderId: 8 | type: int 9 | assignedLocationId: 10 | type: int 11 | fulfillmentServiceHandle: 12 | type: string 13 | requestStatus: 14 | type: string 15 | status: 16 | type: string 17 | supportedActions: 18 | type: array 19 | destination: 20 | type: Slince\Shopify\Model\Shipping\Common\Destination 21 | lineItems: 22 | type: array 23 | assignedLocation: 24 | type: Slince\Shopify\Model\Inventory\Location -------------------------------------------------------------------------------- /config/serializer/Shipping.CarrierService.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\CarrierService: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | active: 8 | type: bool 9 | serviceDiscovery: 10 | type: bool 11 | carrierServiceType: 12 | type: string 13 | format: 14 | type: string 15 | callbackUrl: 16 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.Common.Destination.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\Common\Destination: 2 | properties: 3 | id: 4 | type: int 5 | address1: 6 | type: string 7 | address2: 8 | type: string 9 | city: 10 | type: string 11 | company: 12 | type: string 13 | country: 14 | type: string 15 | email: 16 | type: string 17 | firstName: 18 | type: string 19 | lastName: 20 | type: string 21 | phone: 22 | type: string 23 | province: 24 | type: string 25 | zip: 26 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.Common.LineItem.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\Common\LineItem: 2 | properties: 3 | id: 4 | type: int 5 | shopId: 6 | type: int 7 | fulfillmentOrderId: 8 | type: int 9 | quantity: 10 | type: int 11 | lineItemId: 12 | type: int 13 | fulfillableQuantity: 14 | type: int 15 | variantId: 16 | type: int -------------------------------------------------------------------------------- /config/serializer/Shipping.Common.MerchantRequest.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\Common\MerchantRequest: 2 | properties: 3 | message: 4 | type: string 5 | requestOptions: 6 | type: array 7 | kind: 8 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.Fulfillment.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\Fulfillment: 2 | properties: 3 | id: 4 | type: int 5 | orderId: 6 | type: int 7 | status: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | service: 12 | type: string 13 | updatedAt: 14 | type: DateTime<'Y-m-d\TH:i:sO'> 15 | trackingCompany: 16 | type: string 17 | shipmentStatus: 18 | type: string 19 | locationId: 20 | type: int 21 | lineItems: 22 | type: array 23 | trackingNumber: 24 | type: string 25 | trackingNumbers: 26 | type: array 27 | trackingUrl: 28 | type: string 29 | trackingUrls: 30 | type: array 31 | receipt: 32 | type: array 33 | name: 34 | type: string 35 | adminGraphqlApiId: 36 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.FulfillmentEvent.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\FulfillmentEvent: 2 | properties: 3 | id: 4 | type: int 5 | fulfillmentId: 6 | type: int 7 | status: 8 | type: string 9 | message: 10 | type: string 11 | happenedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | city: 14 | type: string 15 | province: 16 | type: string 17 | country: 18 | type: string 19 | zip: 20 | type: string 21 | address1: 22 | type: string 23 | latitude: 24 | type: float 25 | longitude: 26 | type: float 27 | shopId: 28 | type: int 29 | createdAt: 30 | type: DateTime<'Y-m-d\TH:i:sO'> 31 | updatedAt: 32 | type: DateTime<'Y-m-d\TH:i:sO'> 33 | estimatedDeliveryAt: 34 | type: DateTime<'Y-m-d\TH:i:sO'> 35 | orderId: 36 | type: int 37 | adminGraphqlApiId: 38 | type: string -------------------------------------------------------------------------------- /config/serializer/Shipping.FulfillmentOrder.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\FulfillmentOrder: 2 | properties: 3 | id: 4 | type: int 5 | shopId: 6 | type: int 7 | orderId: 8 | type: int 9 | assignedLocationId: 10 | type: int 11 | fulfillmentServiceHandle: 12 | type: string 13 | requestStatus: 14 | type: string 15 | status: 16 | type: string 17 | supportedActions: 18 | type: array 19 | destination: 20 | type: Slince\Shopify\Model\Shipping\Common\Destination 21 | lineItems: 22 | type: array 23 | assignedLocation: 24 | type: Slince\Shopify\Model\Inventory\Location 25 | merchantRequests: 26 | type: array -------------------------------------------------------------------------------- /config/serializer/Shipping.FulfillmentService.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\FulfillmentService: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | email: 8 | type: string 9 | serviceName: 10 | type: string 11 | handle: 12 | type: string 13 | fulfillmentOrdersOptIn: 14 | type: bool 15 | includePendingStock: 16 | type: bool 17 | providerId: 18 | type: int 19 | locationId: 20 | type: int 21 | callbackUrl: 22 | type: string 23 | trackingSupport: 24 | type: bool 25 | inventoryManagement: 26 | type: bool -------------------------------------------------------------------------------- /config/serializer/Store.Common.CarrierShippingRateProvider.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Common\CarrierShippingRateProvider: 2 | properties: 3 | id: 4 | type: int 5 | carrierServiceId: 6 | type: int 7 | flatModifier: 8 | type: string 9 | percentModifier: 10 | type: string 11 | serviceFilter: 12 | type: array 13 | shippingZoneId: 14 | type: int -------------------------------------------------------------------------------- /config/serializer/Store.Common.PriceBasedShippingRate.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Common\PriceBasedShippingRate: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | price: 8 | type: string 9 | shippingZoneId: 10 | type: int 11 | minOrderSubtotal: 12 | type: string 13 | maxOrderSubtotal: 14 | type: string -------------------------------------------------------------------------------- /config/serializer/Store.Common.WeightBasedShippingRate.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Common\WeightBasedShippingRate: 2 | properties: 3 | id: 4 | type: int 5 | name: 6 | type: string 7 | price: 8 | type: string 9 | shippingZoneId: 10 | type: int 11 | weightLow: 12 | type: float 13 | weightHigh: 14 | type: float -------------------------------------------------------------------------------- /config/serializer/Store.Country.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Country: 2 | properties: 3 | name: 4 | type: string 5 | tax: 6 | type: float 7 | code: 8 | type: string 9 | taxName: 10 | type: string 11 | provinces: 12 | type: array -------------------------------------------------------------------------------- /config/serializer/Store.Currency.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Currency: 2 | properties: 3 | currency: 4 | type: string 5 | rateUpdatedAt: 6 | type: DateTime<'Y-m-d\TH:i:sO'> 7 | enabled: 8 | type: bool -------------------------------------------------------------------------------- /config/serializer/Store.Policy.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Policy: 2 | properties: 3 | title: 4 | type: string 5 | body: 6 | type: string 7 | handle: 8 | type: string 9 | createdAt: 10 | type: DateTime<'Y-m-d\TH:i:sO'> 11 | updatedAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> 13 | url: 14 | type: string -------------------------------------------------------------------------------- /config/serializer/Store.Province.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Province: 2 | properties: 3 | countryId: 4 | type: int 5 | name: 6 | type: string 7 | code: 8 | type: string 9 | tax: 10 | type: float 11 | taxName: 12 | type: string 13 | taxType: 14 | type: string 15 | shippingZoneId: 16 | type: int 17 | taxPercentage: 18 | type: float -------------------------------------------------------------------------------- /config/serializer/Store.ShippingZone.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\ShippingZone: 2 | properties: 3 | name: 4 | type: string 5 | countries: 6 | type: array 7 | provinces: 8 | type: array 9 | carrierShippingRateProviders: 10 | type: array 11 | priceBasedShippingRates: 12 | type: Slince\Shopify\Model\Store\Common\PriceBasedShippingRate 13 | weightBasedShippingRates: 14 | type: Slince\Shopify\Model\Store\Common\WeightBasedShippingRate -------------------------------------------------------------------------------- /config/serializer/builtin/Billing.RecurringApplicationCharge.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Billing\RecurringApplicationCharge: 2 | properties: 3 | activatedOn: 4 | type: DateTime<'Y-m-d'> 5 | billingOn: 6 | type: DateTime<'Y-m-d'> 7 | cancelledOn: 8 | type: DateTime<'Y-m-d'> 9 | trialEndsOn: 10 | type: DateTime<'Y-m-d'> -------------------------------------------------------------------------------- /config/serializer/builtin/Billing.UsageCharge.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Billing\UsageCharge: 2 | properties: 3 | billingOn: 4 | type: DateTime<'Y-m-d'> -------------------------------------------------------------------------------- /config/serializer/builtin/Discounts.PriceRule.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Discounts\PriceRule: 2 | properties: 3 | prerequisiteQuantityRange: 4 | type: array 5 | prerequisiteShippingPriceRange: 6 | type: array 7 | prerequisiteSubtotalRange: 8 | type: array 9 | prerequisiteToEntitlementQuantityRatio: 10 | type: array 11 | prerequisiteToEntitlementPurchase: 12 | type: array -------------------------------------------------------------------------------- /config/serializer/builtin/Orders.Transaction.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Orders\Transaction: 2 | properties: 3 | receipt: 4 | type: array -------------------------------------------------------------------------------- /config/serializer/builtin/Shipping.Fulfillment.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Shipping\Fulfillment: 2 | properties: 3 | receipt: 4 | type: array -------------------------------------------------------------------------------- /config/serializer/builtin/Store.Common.CarrierShippingRateProvider.yml: -------------------------------------------------------------------------------- 1 | Slince\Shopify\Model\Store\Common\CarrierShippingRateProvider: 2 | properties: 3 | serviceFilter: 4 | type: array -------------------------------------------------------------------------------- /examples/0-authorization.php: -------------------------------------------------------------------------------- 1 | './tmp', //Metadata cache dir, required 25 | 'http_client' => new \GuzzleHttp\Client([ 26 | 'proxy' => '127.0.0.1:1080' 27 | ]) 28 | ]); 29 | 30 | return $client; -------------------------------------------------------------------------------- /examples/2-curd.php: -------------------------------------------------------------------------------- 1 | get('products', [ 9 | // filter your products 10 | ]); 11 | 12 | $product = $client->get('products/12800'); 13 | 14 | $product = $client->post('products', [ 15 | "title" => "Burton Custom Freestyle 151", 16 | "body_html" => "Good snowboard!<\/strong>", 17 | "vendor"=> "Burton", 18 | "product_type" => "Snowboard", 19 | "images" => [ 20 | [ 21 | "attachment" => "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\n" 22 | ] 23 | ] 24 | ]); 25 | 26 | $product = $client->put('products/12800', [ 27 | "title" => "Burton Custom Freestyle 151", 28 | "body_html" => "Good snowboard!<\/strong>", 29 | "vendor"=> "Burton", 30 | "product_type" => "Snowboard", 31 | "images" => [ 32 | [ 33 | "attachment" => "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\n" 34 | ] 35 | ] 36 | ]); 37 | 38 | $client->delete('products/12800'); -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/ 15 | 16 | 17 | 18 | 19 | 20 | src 21 | 22 | src/ 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/AccessToken.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify; 15 | 16 | use Slince\Shopify\Exception\InvalidArgumentException; 17 | 18 | final class AccessToken 19 | { 20 | /** 21 | * @var string 22 | */ 23 | protected string $token; 24 | 25 | public function __construct(string $token) 26 | { 27 | if (0 === preg_match('/^([a-zA-Z0-9_]{10,100})$/', $token)) { 28 | throw new InvalidArgumentException('Access token should be between 10 and 100 letters and numbers'); 29 | } 30 | $this->token = $token; 31 | } 32 | 33 | /** 34 | * Transform the token to string. 35 | * 36 | * @return string 37 | */ 38 | public function __toString(): string 39 | { 40 | return $this->token; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/CredentialInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify; 15 | 16 | use Psr\Http\Message\RequestInterface; 17 | 18 | interface CredentialInterface 19 | { 20 | /** 21 | * Apply the credential to the request. 22 | * 23 | * @param RequestInterface $request 24 | * @return RequestInterface 25 | */ 26 | public function applyToRequest(RequestInterface $request): RequestInterface; 27 | } 28 | -------------------------------------------------------------------------------- /src/Exception/BadRequestException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class BadRequestException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/ForbiddenException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class ForbiddenException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class InvalidArgumentException extends \InvalidArgumentException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/NotAcceptableException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class NotAcceptableException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/NotFoundException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class NotFoundException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/PaymentRequiredException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class PaymentRequiredException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class RuntimeException extends \RuntimeException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/TooManyRequestsException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class TooManyRequestsException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/UnauthorizedException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class UnauthorizedException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Exception/UnprocessableEntityException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Exception; 15 | 16 | class UnprocessableEntityException extends ClientException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Hydrator/HydratorInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Hydrator; 15 | 16 | interface HydratorInterface 17 | { 18 | /** 19 | * Hydrate object from array. 20 | * 21 | * @param array $data 22 | * @param string $type 23 | * @return object 24 | */ 25 | public function hydrate(array $data, string $type): object; 26 | 27 | /** 28 | * Hydrate many object from array. 29 | * 30 | * @param array $data 31 | * @param string $type 32 | * @return object[] 33 | */ 34 | public function hydrateMany(array $data, string $type): array; 35 | 36 | /** 37 | * Extracts data from an object. 38 | * 39 | * @param object $object 40 | * 41 | * @return array 42 | */ 43 | public function extract($object): array; 44 | } 45 | -------------------------------------------------------------------------------- /src/Middleware/CallableMiddleware.php: -------------------------------------------------------------------------------- 1 | callable = $callable; 22 | } 23 | 24 | /** 25 | * {@inheritDoc} 26 | */ 27 | public function handle(RequestInterface $request, callable $next): ResponseInterface 28 | { 29 | return call_user_func($this->callable, $request, $next); 30 | } 31 | } -------------------------------------------------------------------------------- /src/Middleware/MiddlewareInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Middleware; 15 | 16 | use Psr\Http\Message\RequestInterface; 17 | use Psr\Http\Message\ResponseInterface; 18 | 19 | interface MiddlewareInterface 20 | { 21 | /** 22 | * Handle the request and return a response. 23 | * 24 | * @param RequestInterface $request 25 | * @param callable $next 26 | * @return ResponseInterface 27 | */ 28 | public function handle(RequestInterface $request, callable $next): ResponseInterface; 29 | } -------------------------------------------------------------------------------- /src/Model/Access/AccessScope.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Model\Access; 15 | 16 | class AccessScope 17 | { 18 | /** 19 | * @var string 20 | */ 21 | protected $handle; 22 | 23 | /** 24 | * @return string 25 | */ 26 | public function getHandle(): ?string 27 | { 28 | return $this->handle; 29 | } 30 | 31 | /** 32 | * @param string $handle 33 | */ 34 | public function setHandle(?string $handle) 35 | { 36 | $this->handle = $handle; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Service/Access/AccessScopeManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Access; 15 | 16 | use Slince\Shopify\Model\Access\AccessScope; 17 | 18 | interface AccessScopeManagerInterface 19 | { 20 | /** 21 | * Finds access scopes. 22 | * 23 | * @param array $query 24 | * 25 | * @return AccessScope[] 26 | */ 27 | public function findAll(array $query = []); 28 | } 29 | -------------------------------------------------------------------------------- /src/Service/Access/StorefrontAccessTokenManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Access; 15 | 16 | use Slince\Shopify\Model\Access\StorefrontAccessToken; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class StorefrontAccessTokenManager extends GeneralCurdManager implements StorefrontAccessTokenManagerInterface 20 | { 21 | /** 22 | * @inheritDoc 23 | */ 24 | public function getModelClass() 25 | { 26 | return StorefrontAccessToken::class; 27 | } 28 | 29 | /** 30 | * @inheritDoc 31 | */ 32 | protected function getResourceName() 33 | { 34 | return 'storefront_access_token'; 35 | } 36 | 37 | /** 38 | * @inheritDoc 39 | */ 40 | public static function getServiceName() 41 | { 42 | return 'storefront_access_tokens'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Access/StorefrontAccessTokenManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Access; 15 | 16 | use Slince\Shopify\Model\Access\StorefrontAccessToken; 17 | 18 | interface StorefrontAccessTokenManagerInterface 19 | { 20 | /** 21 | * Finds access scopes. 22 | * 23 | * @param array $query 24 | * 25 | * @return StorefrontAccessToken[] 26 | */ 27 | public function findAll(array $query = []); 28 | 29 | /** 30 | * Creates a access token. 31 | * 32 | * @param array $data 33 | * 34 | * @return StorefrontAccessToken 35 | */ 36 | public function create(array $data); 37 | 38 | /** 39 | * Removes the access token.. 40 | * 41 | * @param int $id 42 | * 43 | * @return bool 44 | */ 45 | public function remove($id); 46 | } 47 | -------------------------------------------------------------------------------- /src/Service/Analytics/ReportManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Analytics; 15 | 16 | use Slince\Shopify\Model\Analytics\Report; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class ReportManager extends GeneralCurdManager implements ReportManagerInterface 20 | { 21 | /** 22 | * @inheritDoc 23 | */ 24 | public function getModelClass() 25 | { 26 | return Report::class; 27 | } 28 | 29 | /** 30 | * @inheritDoc 31 | */ 32 | protected function getResourceName() 33 | { 34 | return 'report'; 35 | } 36 | 37 | /** 38 | * @inheritDoc 39 | */ 40 | public static function getServiceName() 41 | { 42 | return 'reports'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Billing/ApplicationChargeManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Billing; 15 | 16 | use Slince\Shopify\Model\Billing\ApplicationCharge; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class ApplicationChargeManager extends GeneralCurdManager implements ApplicationChargeManagerInterface 20 | { 21 | /** 22 | * @inheritDoc 23 | */ 24 | public function getModelClass() 25 | { 26 | return ApplicationCharge::class; 27 | } 28 | 29 | /** 30 | * @inheritDoc 31 | */ 32 | protected function getResourceName() 33 | { 34 | return 'application_charge'; 35 | } 36 | 37 | /** 38 | * @inheritDoc 39 | */ 40 | public static function getServiceName() 41 | { 42 | return 'application_charges'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Billing/ApplicationCreditManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Billing; 15 | 16 | use Slince\Shopify\Model\Billing\ApplicationCharge; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class ApplicationCreditManager extends GeneralCurdManager implements ApplicationCreditManagerInterface 20 | { 21 | /** 22 | * @inheritDoc 23 | */ 24 | public function getModelClass() 25 | { 26 | return ApplicationCharge::class; 27 | } 28 | 29 | /** 30 | * @inheritDoc 31 | */ 32 | protected function getResourceName() 33 | { 34 | return 'application_credit'; 35 | } 36 | 37 | /** 38 | * @inheritDoc 39 | */ 40 | public static function getServiceName() 41 | { 42 | return 'application_credits'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Billing/ApplicationCreditManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Billing; 15 | 16 | use Slince\Shopify\Model\Billing\ApplicationCredit; 17 | 18 | interface ApplicationCreditManagerInterface 19 | { 20 | /** 21 | * Gets all application credits. 22 | * 23 | * @param array $query 24 | * 25 | * @return ApplicationCredit[] 26 | */ 27 | public function findAll(array $query = []); 28 | 29 | /** 30 | * Gets the application credit by its id. 31 | * 32 | * @param int $id 33 | * 34 | * @return ApplicationCredit 35 | */ 36 | public function find($id); 37 | 38 | /** 39 | * Creates a application credit. 40 | * 41 | * @param array $data 42 | * 43 | * @return ApplicationCredit 44 | */ 45 | public function create(array $data); 46 | } 47 | -------------------------------------------------------------------------------- /src/Service/Events/EventManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Events; 15 | 16 | use Slince\Shopify\Model\Events\Event; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class EventManager extends GeneralCurdManager implements EventManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'events'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getModelClass() 33 | { 34 | return Event::class; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getResourceName() 41 | { 42 | return 'event'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/MarketingEvent/MarketingEventManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\MarketingEvent; 15 | 16 | use Slince\Shopify\Model\MarketingEvent\MarketingEvent; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class MarketingEventManager extends GeneralCurdManager implements MarketingEventManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'marketing_events'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'marketing_event'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return MarketingEvent::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/OnlineStore/BlogManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\OnlineStore; 15 | 16 | use Slince\Shopify\Model\OnlineStore\Blog; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class BlogManager extends GeneralCurdManager implements BlogManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'blogs'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'blog'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return Blog::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/OnlineStore/PageManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\OnlineStore; 15 | 16 | use Slince\Shopify\Model\OnlineStore\Page; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class PageManager extends GeneralCurdManager implements PageManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'pages'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'page'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return Page::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/OnlineStore/RedirectManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\OnlineStore; 15 | 16 | use Slince\Shopify\Model\OnlineStore\Redirect; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class RedirectManager extends GeneralCurdManager implements RedirectManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'redirects'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'redirect'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return Redirect::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/OnlineStore/ScriptTagManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\OnlineStore; 15 | 16 | use Slince\Shopify\Model\OnlineStore\ScriptTag; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class ScriptTagManager extends GeneralCurdManager implements ScriptTagManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'script_tags'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getModelClass() 33 | { 34 | return ScriptTag::class; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getResourceName() 41 | { 42 | return 'script_tag'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Products/CustomCollectionManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Products; 15 | 16 | use Slince\Shopify\Model\Products\CustomCollection; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class CustomCollectionManager extends GeneralCurdManager implements CustomCollectionManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'custom_collections'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'custom_collection'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return CustomCollection::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Products/ProductManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Products; 15 | 16 | use Slince\Shopify\Model\Products\Product; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class ProductManager extends GeneralCurdManager implements ProductManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'products'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'product'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return Product::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Products/SmartCollectionManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Products; 15 | 16 | use Slince\Shopify\Model\Products\SmartCollection; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class SmartCollectionManager extends GeneralCurdManager implements SmartCollectionManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'smart_collections'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'smart_collection'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return SmartCollection::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Shipping/AssignedFulfillmentOrderManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Shipping; 15 | 16 | use Slince\Shopify\Model\Shipping\AssignedFulfillmentOrder; 17 | 18 | interface AssignedFulfillmentOrderManagerInterface 19 | { 20 | /** 21 | * Gets all carrier services. 22 | * 23 | * @param array $query 24 | * 25 | * @return AssignedFulfillmentOrder[] 26 | */ 27 | public function findAll(array $query = []); 28 | } 29 | -------------------------------------------------------------------------------- /src/Service/Store/CountryManager.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Store; 15 | 16 | use Slince\Shopify\Model\Store\Country; 17 | use Slince\Shopify\Service\Common\GeneralCurdManager; 18 | 19 | class CountryManager extends GeneralCurdManager implements CountryManagerInterface 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public static function getServiceName() 25 | { 26 | return 'countries'; 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function getResourceName() 33 | { 34 | return 'country'; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getModelClass() 41 | { 42 | return Country::class; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Service/Store/CurrencyManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Store; 15 | 16 | use Slince\Shopify\Model\Store\Currency; 17 | 18 | interface CurrencyManagerInterface 19 | { 20 | /** 21 | * Gets all currencies. 22 | * 23 | * @param array $query 24 | * 25 | * @return Currency[] 26 | */ 27 | public function findAll(array $query = []); 28 | } 29 | -------------------------------------------------------------------------------- /src/Service/Store/PolicyManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Store; 15 | 16 | use Slince\Shopify\Model\Store\Policy; 17 | 18 | interface PolicyManagerInterface 19 | { 20 | /** 21 | * Gets all policies. 22 | * 23 | * @param array $query 24 | * 25 | * @return Policy[] 26 | */ 27 | public function findAll(array $query = []); 28 | } 29 | -------------------------------------------------------------------------------- /src/Service/Store/ShippingZoneManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Store; 15 | 16 | use Slince\Shopify\Model\Store\ShippingZone; 17 | 18 | interface ShippingZoneManagerInterface 19 | { 20 | /** 21 | * Gets all policies. 22 | * 23 | * @param array $query 24 | * 25 | * @return ShippingZone[] 26 | */ 27 | public function findAll(array $query = []); 28 | } 29 | -------------------------------------------------------------------------------- /src/Service/Store/ShopManagerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * This source file is subject to the MIT license that is bundled 11 | * with this source code in the file LICENSE. 12 | */ 13 | 14 | namespace Slince\Shopify\Service\Store; 15 | 16 | use Slince\Shopify\Model\Store\Shop; 17 | 18 | interface ShopManagerInterface 19 | { 20 | /** 21 | * Gets the shop. 22 | * 23 | * @return Shop 24 | */ 25 | public function get(); 26 | } 27 | -------------------------------------------------------------------------------- /tests/AccessTokenTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('foobarbazfoobarbaz', $accessToken); 15 | } 16 | 17 | public function testValidate() 18 | { 19 | try { 20 | new AccessToken('foo'); 21 | $this->fail(); 22 | } catch (\Exception $exception) { 23 | $this->assertInstanceOf(InvalidArgumentException::class, $exception); 24 | } 25 | try { 26 | new AccessToken(str_repeat('foo', 100)); 27 | $this->fail(); 28 | } catch (\Exception $exception) { 29 | $this->assertInstanceOf(InvalidArgumentException::class, $exception); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /tests/Hydrator/serializer/Category.yml: -------------------------------------------------------------------------------- 1 | Category: 2 | properties: 3 | name: 4 | type: string -------------------------------------------------------------------------------- /tests/Hydrator/serializer/Comment.yml: -------------------------------------------------------------------------------- 1 | Comment: 2 | properties: 3 | body: 4 | type: string -------------------------------------------------------------------------------- /tests/Hydrator/serializer/Post.yml: -------------------------------------------------------------------------------- 1 | Post: 2 | properties: 3 | title: 4 | type: string 5 | body: 6 | type: string 7 | comments: 8 | type: array 9 | category: 10 | type: Category 11 | createdAt: 12 | type: DateTime<'Y-m-d\TH:i:sO'> -------------------------------------------------------------------------------- /tests/InflectorTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('countries', Inflector::pluralize('country')); 12 | } 13 | 14 | public function testSingularize() 15 | { 16 | $this->assertEquals('country', Inflector::singularize('countries')); 17 | } 18 | 19 | public function testTableize() 20 | { 21 | $this->assertEquals('hello_world', Inflector::tableize('helloWorld')); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Model/Access/AccessScopeTest.php: -------------------------------------------------------------------------------- 1 | 10 total_spent:>100.00" 9 | }, 10 | { 11 | "id": 789629109, 12 | "name": "Accepts Marketing", 13 | "created_at": "2016-12-29T15:36:16-05:00", 14 | "updated_at": "2016-12-29T15:36:16-05:00", 15 | "query": "accepts_marketing:1" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /tests/Resources/Customers/CustomerSavedSearch/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 3 3 | } -------------------------------------------------------------------------------- /tests/Resources/Customers/CustomerSavedSearch/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Customers/CustomerSavedSearch/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "customer_saved_search": { 3 | "id": 789629109, 4 | "name": "Accepts Marketing", 5 | "created_at": "2016-12-29T15:36:16-05:00", 6 | "updated_at": "2016-12-29T15:36:16-05:00", 7 | "query": "accepts_marketing:1" 8 | } 9 | } -------------------------------------------------------------------------------- /tests/Resources/Discounts/DiscountCode/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "discount_codes": [ 3 | { 4 | "id": 507328175, 5 | "price_rule_id": 507328175, 6 | "code": "SUMMERSALE10OFF", 7 | "usage_count": 0, 8 | "created_at": "2018-07-05T12:41:00-04:00", 9 | "updated_at": "2018-07-05T12:41:00-04:00" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/Resources/Discounts/DiscountCode/delete.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slince/shopify-api-php/4f7480aa09e7b85d82e706d5cc3ce23d926deffa/tests/Resources/Discounts/DiscountCode/delete.json -------------------------------------------------------------------------------- /tests/Resources/Discounts/DiscountCode/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "discount_code": { 3 | "id": 507328175, 4 | "price_rule_id": 507328175, 5 | "code": "SUMMERSALE10OFF", 6 | "usage_count": 0, 7 | "created_at": "2018-07-05T12:41:00-04:00", 8 | "updated_at": "2018-07-05T12:41:00-04:00" 9 | } 10 | } -------------------------------------------------------------------------------- /tests/Resources/Discounts/PriceRule/delete.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slince/shopify-api-php/4f7480aa09e7b85d82e706d5cc3ce23d926deffa/tests/Resources/Discounts/PriceRule/delete.json -------------------------------------------------------------------------------- /tests/Resources/Events/Event/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "events": [ 3 | { 4 | "id": 677313116, 5 | "subject_id": 921728736, 6 | "created_at": "2008-01-10T08:00:00-05:00", 7 | "subject_type": "Product", 8 | "verb": "create", 9 | "arguments": [ 10 | "IPod Touch 8GB" 11 | ], 12 | "body": null, 13 | "message": "Product was created: IPod Touch 8GB.", 14 | "author": "Shopify", 15 | "description": "Product was created: IPod Touch 8GB.", 16 | "path": "/admin/products/921728736" 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /tests/Resources/Events/Event/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/Events/Event/delete.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slince/shopify-api-php/4f7480aa09e7b85d82e706d5cc3ce23d926deffa/tests/Resources/Events/Event/delete.json -------------------------------------------------------------------------------- /tests/Resources/Events/Event/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "event": 3 | { 4 | "id": 677313116, 5 | "subject_id": 921728736, 6 | "created_at": "2008-01-10T08:00:00-05:00", 7 | "subject_type": "Product", 8 | "verb": "create", 9 | "arguments": [ 10 | "IPod Touch 8GB" 11 | ], 12 | "body": null, 13 | "message": "Product was created: IPod Touch 8GB.", 14 | "author": "Shopify", 15 | "description": "Product was created: IPod Touch 8GB.", 16 | "path": "/admin/products/921728736" 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Resources/Events/Webhook/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "webhooks": [ 3 | { 4 | "id": 4759306, 5 | "address": "http:\/\/apple.com", 6 | "topic": "orders\/create", 7 | "created_at": "2017-03-20T16:02:17-04:00", 8 | "updated_at": "2017-03-20T16:02:17-04:00", 9 | "format": "json", 10 | "fields": [ 11 | ], 12 | "metafield_namespaces": [ 13 | ] 14 | }, 15 | { 16 | "id": 901431826, 17 | "address": "http:\/\/apple.com\/uninstall", 18 | "topic": "app\/uninstalled", 19 | "created_at": "2017-03-20T16:02:17-04:00", 20 | "updated_at": "2017-03-20T16:02:17-04:00", 21 | "format": "json", 22 | "fields": [ 23 | ], 24 | "metafield_namespaces": [ 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /tests/Resources/Events/Webhook/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Events/Webhook/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Events/Webhook/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "webhook": { 3 | "id": 4759306, 4 | "address": "http:\/\/apple.com", 5 | "topic": "orders\/create", 6 | "created_at": "2017-03-20T16:02:17-04:00", 7 | "updated_at": "2017-03-20T16:02:17-04:00", 8 | "format": "json", 9 | "fields": [ 10 | ], 11 | "metafield_namespaces": [ 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/InventoryItem/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "inventory_items": [ 3 | { 4 | "id": 39072856, 5 | "sku": "IPOD2008GREEN", 6 | "created_at": "2018-10-29T06:05:58-04:00", 7 | "updated_at": "2018-10-29T06:05:58-04:00", 8 | "cost": "25.00", 9 | "tracked": true, 10 | "admin_graphql_api_id": "gid://shopify/InventoryItem/39072856" 11 | }, 12 | { 13 | "id": 457924702, 14 | "sku": "IPOD2008BLACK", 15 | "created_at": "2018-10-29T06:05:58-04:00", 16 | "updated_at": "2018-10-29T06:05:58-04:00", 17 | "cost": "25.00", 18 | "tracked": true, 19 | "admin_graphql_api_id": "gid://shopify/InventoryItem/457924702" 20 | }, 21 | { 22 | "id": 808950810, 23 | "sku": "IPOD2008PINK", 24 | "created_at": "2018-10-29T06:05:58-04:00", 25 | "updated_at": "2018-10-29T06:05:58-04:00", 26 | "cost": "25.00", 27 | "tracked": true, 28 | "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810" 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/InventoryItem/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "inventory_item": { 3 | "id": 808950810, 4 | "sku": "IPOD2008PINK", 5 | "created_at": "2018-10-29T06:05:58-04:00", 6 | "updated_at": "2018-10-29T06:05:58-04:00", 7 | "cost": "25.00", 8 | "tracked": true, 9 | "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810" 10 | } 11 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/InventoryLevel/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "inventory_levels": [ 3 | { 4 | "inventory_item_id": 808950810, 5 | "location_id": 487838322, 6 | "available": 9, 7 | "updated_at": "2018-10-03T18:17:37-04:00", 8 | "admin_graphql_api_id": "gid://shopify/InventoryLevel/690933842?inventory_item_id=808950810" 9 | }, 10 | { 11 | "inventory_item_id": 808950810, 12 | "location_id": 905684977, 13 | "available": 1, 14 | "updated_at": "2018-10-03T18:17:37-04:00", 15 | "admin_graphql_api_id": "gid://shopify/InventoryLevel/905684977?inventory_item_id=808950810" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/InventoryLevel/delete.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slince/shopify-api-php/4f7480aa09e7b85d82e706d5cc3ce23d926deffa/tests/Resources/Inventory/InventoryLevel/delete.json -------------------------------------------------------------------------------- /tests/Resources/Inventory/InventoryLevel/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "inventory_level": { 3 | "inventory_item_id": 808950810, 4 | "location_id": 905684977, 5 | "available": 6, 6 | "updated_at": "2018-10-03T18:18:33-04:00", 7 | "admin_graphql_api_id": "gid://shopify/InventoryLevel/905684977?inventory_item_id=808950810" 8 | } 9 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/Location/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "locations": [ 3 | { 4 | "id": 487838322, 5 | "name": "Fifth Avenue AppleStore", 6 | "deleted_at": null, 7 | "address1": null, 8 | "address2": null, 9 | "city": null, 10 | "zip": null, 11 | "province": null, 12 | "country": "US", 13 | "phone": null, 14 | "created_at": "2017-01-05T15:36:16-05:00", 15 | "updated_at": "2017-01-05T15:36:16-05:00", 16 | "country_code": "US", 17 | "country_name": "United States", 18 | "province_code": null 19 | }, 20 | { 21 | "id": 1034478814, 22 | "name": "Berlin Store", 23 | "deleted_at": null, 24 | "address1": null, 25 | "address2": null, 26 | "city": null, 27 | "zip": null, 28 | "province": null, 29 | "country": "DE", 30 | "phone": null, 31 | "created_at": "2017-01-05T15:36:16-05:00", 32 | "updated_at": "2017-01-05T15:36:16-05:00", 33 | "country_code": "DE", 34 | "country_name": "Germany", 35 | "province_code": null 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/Location/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/Inventory/Location/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": { 3 | "id": 487838322, 4 | "name": "Fifth Avenue AppleStore", 5 | "deleted_at": null, 6 | "address1": null, 7 | "address2": null, 8 | "city": null, 9 | "zip": null, 10 | "province": null, 11 | "country": "US", 12 | "phone": null, 13 | "created_at": "2017-01-05T15:36:16-05:00", 14 | "updated_at": "2017-01-05T15:36:16-05:00", 15 | "country_code": "US", 16 | "country_name": "United States", 17 | "province_code": null 18 | } 19 | } -------------------------------------------------------------------------------- /tests/Resources/MarketingEvent/MarketingEvent/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "marketing_events": [ 3 | { 4 | "id": 998730532, 5 | "event_type": "post", 6 | "remote_id": "12345678", 7 | "started_at": "2020-01-15T10:56:18-05:00", 8 | "ended_at": null, 9 | "scheduled_to_end_at": null, 10 | "budget": "10.11", 11 | "currency": "GBP", 12 | "manage_url": null, 13 | "preview_url": null, 14 | "utm_campaign": "1234567890", 15 | "utm_source": "facebook", 16 | "utm_medium": "facebook-post", 17 | "budget_type": "daily", 18 | "description": null, 19 | "marketing_channel": "social", 20 | "paid": false, 21 | "referring_domain": "facebook.com", 22 | "breadcrumb_id": null, 23 | "marketing_activity_id": null, 24 | "admin_graphql_api_id": "gid://shopify/MarketingEvent/998730532", 25 | "marketed_resources": [] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /tests/Resources/MarketingEvent/MarketingEvent/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 1 3 | } -------------------------------------------------------------------------------- /tests/Resources/MarketingEvent/MarketingEvent/delete.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slince/shopify-api-php/4f7480aa09e7b85d82e706d5cc3ce23d926deffa/tests/Resources/MarketingEvent/MarketingEvent/delete.json -------------------------------------------------------------------------------- /tests/Resources/MarketingEvent/MarketingEvent/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "marketing_event": { 3 | "id": 998730532, 4 | "event_type": "post", 5 | "remote_id": "12345678", 6 | "started_at": "2020-01-15T10:56:18-05:00", 7 | "ended_at": null, 8 | "scheduled_to_end_at": null, 9 | "budget": "10.11", 10 | "currency": "GBP", 11 | "manage_url": null, 12 | "preview_url": null, 13 | "utm_campaign": "1234567890", 14 | "utm_source": "facebook", 15 | "utm_medium": "facebook-post", 16 | "budget_type": "daily", 17 | "description": null, 18 | "marketing_channel": "social", 19 | "paid": false, 20 | "referring_domain": "facebook.com", 21 | "breadcrumb_id": null, 22 | "marketing_activity_id": null, 23 | "admin_graphql_api_id": "gid://shopify/MarketingEvent/998730532", 24 | "marketed_resources": [] 25 | } 26 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Article/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Article/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Article/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "article": { 3 | "id": 134645308, 4 | "title": "get on the train now", 5 | "created_at": "2008-07-31T20:00:00-04:00", 6 | "body_html": "

Do you<\/em> have an IPod<\/strong> yet?<\/p>", 7 | "blog_id": 241253187, 8 | "author": "Dennis", 9 | "user_id": 799407056, 10 | "published_at": "2008-07-31T20:00:00-04:00", 11 | "updated_at": "2008-07-31T20:00:00-04:00", 12 | "summary_html": null, 13 | "template_suffix": null, 14 | "handle": "get-on-the-train-now", 15 | "tags": "Announcing", 16 | "image": { 17 | "created_at": "2017-01-18T13:17:46-05:00", 18 | "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/articles\/imac.jpg?v=1484763466" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Asset/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Blog/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "blogs": [ 3 | { 4 | "id": 382285388, 5 | "handle": "banana-blog", 6 | "title": "A Gnu Blog", 7 | "updated_at": "2006-02-02T19:00:00-05:00", 8 | "commentable": "no", 9 | "feedburner": null, 10 | "feedburner_location": null, 11 | "created_at": "2017-01-05T15:36:16-05:00", 12 | "template_suffix": null, 13 | "tags": "" 14 | }, 15 | { 16 | "id": 241253187, 17 | "handle": "apple-blog", 18 | "title": "Mah Blog", 19 | "updated_at": "2006-02-01T19:00:00-05:00", 20 | "commentable": "no", 21 | "feedburner": null, 22 | "feedburner_location": null, 23 | "created_at": "2017-01-05T15:36:16-05:00", 24 | "template_suffix": null, 25 | "tags": "Announcing, Mystery" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Blog/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Blog/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Blog/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "blog": { 3 | "id": 241253187, 4 | "handle": "apple-blog", 5 | "title": "Mah Blog", 6 | "updated_at": "2006-02-01T19:00:00-05:00", 7 | "commentable": "no", 8 | "feedburner": null, 9 | "feedburner_location": null, 10 | "created_at": "2017-01-05T15:36:16-05:00", 11 | "template_suffix": null, 12 | "tags": "Announcing, Mystery" 13 | } 14 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Comment/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": [ 3 | { 4 | "id": 653537639, 5 | "body": "Hi author, I really _like_ what you're doing there.", 6 | "body_html": "

Hi author, I really like<\/em> what you're doing there.<\/p>", 7 | "author": "Soleone", 8 | "email": "sole@one.de", 9 | "status": "unapproved", 10 | "article_id": 134645308, 11 | "blog_id": 241253187, 12 | "created_at": "2017-01-05T15:36:16-05:00", 13 | "updated_at": "2017-01-05T15:36:16-05:00", 14 | "ip": "127.0.0.1", 15 | "user_agent": "Mozilla\/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit\/525.18 (KHTML, like Gecko) Version\/3.1.2 Safari\/525.20.1", 16 | "published_at": null 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Comment/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Comment/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Comment/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "comment": { 3 | "id": 118373535, 4 | "body": "Hi author, I really _like_ what you're doing there.", 5 | "body_html": "

Hi author, I really like<\/em> what you're doing there.<\/p>", 6 | "author": "Soleone", 7 | "email": "sole@one.de", 8 | "status": "published", 9 | "article_id": 134645308, 10 | "blog_id": 241253187, 11 | "created_at": "2017-01-05T15:36:16-05:00", 12 | "updated_at": "2017-01-05T15:36:16-05:00", 13 | "ip": "127.0.0.1", 14 | "user_agent": "Mozilla\/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit\/525.18 (KHTML, like Gecko) Version\/3.1.2 Safari\/525.20.1", 15 | "published_at": null 16 | } 17 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Page/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Page/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Page/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "page": { 3 | "id": 131092082, 4 | "title": "Terms of Services", 5 | "shop_id": 690933842, 6 | "handle": "tos", 7 | "body_html": "

We make perfect<\/strong> stuff, we don't need a warranty.<\/p>", 8 | "author": "Dennis", 9 | "created_at": "2008-07-15T20:00:00-04:00", 10 | "updated_at": "2008-07-16T20:00:00-04:00", 11 | "published_at": "2008-07-15T20:00:00-04:00", 12 | "template_suffix": null 13 | } 14 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Redirect/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirects": [ 3 | { 4 | "id": 304339089, 5 | "path": "\/products.php", 6 | "target": "\/products" 7 | }, 8 | { 9 | "id": 668809255, 10 | "path": "\/leopard", 11 | "target": "\/pages\/macosx" 12 | }, 13 | { 14 | "id": 950115854, 15 | "path": "\/ibook", 16 | "target": "\/products\/macbook" 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Redirect/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Redirect/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Redirect/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirect": { 3 | "id": 668809255, 4 | "path": "\/leopard", 5 | "target": "\/pages\/macosx" 6 | } 7 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/ScriptTag/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "script_tags": [ 3 | { 4 | "id": 421379493, 5 | "src": "https://js-aplenty.com/bar.js", 6 | "event": "onload", 7 | "created_at": "2018-05-07T15:33:38-04:00", 8 | "updated_at": "2018-05-07T15:33:38-04:00", 9 | "display_scope": "all" 10 | }, 11 | { 12 | "id": 596726825, 13 | "src": "https://js-aplenty.com/foo.js", 14 | "event": "onload", 15 | "created_at": "2018-05-07T15:33:38-04:00", 16 | "updated_at": "2018-05-07T15:33:38-04:00", 17 | "display_scope": "all" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/ScriptTag/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/ScriptTag/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/ScriptTag/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "script_tag": { 3 | "id": 596726825, 4 | "src": "https://js-aplenty.com/foo.js", 5 | "event": "onload", 6 | "created_at": "2018-05-07T15:33:38-04:00", 7 | "updated_at": "2018-05-07T15:33:38-04:00", 8 | "display_scope": "all" 9 | } 10 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Theme/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "themes": [ 3 | { 4 | "id": 828155753, 5 | "name": "Comfort", 6 | "created_at": "2017-01-05T15:36:16-05:00", 7 | "updated_at": "2017-01-05T15:36:16-05:00", 8 | "role": "main", 9 | "theme_store_id": null, 10 | "previewable": true, 11 | "processing": false 12 | }, 13 | { 14 | "id": 976877075, 15 | "name": "Speed", 16 | "created_at": "2017-01-05T15:36:16-05:00", 17 | "updated_at": "2017-01-05T15:36:16-05:00", 18 | "role": "mobile", 19 | "theme_store_id": null, 20 | "previewable": true, 21 | "processing": false 22 | }, 23 | { 24 | "id": 752253240, 25 | "name": "Sandbox", 26 | "created_at": "2017-01-05T15:36:16-05:00", 27 | "updated_at": "2017-01-05T15:36:16-05:00", 28 | "role": "unpublished", 29 | "theme_store_id": null, 30 | "previewable": true, 31 | "processing": false 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Theme/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Theme/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/OnlineStore/Theme/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": { 3 | "id": 828155753, 4 | "name": "Comfort", 5 | "created_at": "2017-01-05T15:36:16-05:00", 6 | "updated_at": "2017-01-05T15:36:16-05:00", 7 | "role": "main", 8 | "theme_store_id": null, 9 | "previewable": true, 10 | "processing": false 11 | } 12 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/DraftOrder/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/DraftOrder/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Orders/DraftOrder/send_invoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "draft_order_invoice": { 3 | "to": "first@example.com", 4 | "from": "steve@apple.com", 5 | "subject": "Apple Computer Invoice", 6 | "custom_message": "Thank you for ordering!", 7 | "bcc": [ 8 | "steve@apple.com" 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/Order/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/Order/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Orders/Risk/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "risks": [ 3 | { 4 | "id": 284138680, 5 | "order_id": 450789469, 6 | "checkout_id": null, 7 | "source": "External", 8 | "score": "1.0", 9 | "recommendation": "cancel", 10 | "display": true, 11 | "cause_cancel": true, 12 | "message": "This order was placed from a proxy IP", 13 | "merchant_message": "This order was placed from a proxy IP" 14 | }, 15 | { 16 | "id": 1066215049, 17 | "order_id": 450789469, 18 | "checkout_id": 901414060, 19 | "source": "External", 20 | "score": "1.0", 21 | "recommendation": "cancel", 22 | "display": true, 23 | "cause_cancel": true, 24 | "message": "This order came from an anonymous proxy", 25 | "merchant_message": "This order came from an anonymous proxy" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/Risk/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Orders/Risk/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "risk": { 3 | "id": 284138680, 4 | "order_id": 450789469, 5 | "checkout_id": null, 6 | "source": "External", 7 | "score": "1.0", 8 | "recommendation": "cancel", 9 | "display": true, 10 | "cause_cancel": true, 11 | "message": "This order was placed from a proxy IP", 12 | "merchant_message": "This order was placed from a proxy IP" 13 | } 14 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/Transaction/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Orders/Transaction/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "transaction": { 3 | "id": 389404469, 4 | "order_id": 450789469, 5 | "amount": "409.94", 6 | "kind": "authorization", 7 | "gateway": "bogus", 8 | "status": "success", 9 | "message": null, 10 | "created_at": "2005-08-01T11:57:11-04:00", 11 | "test": false, 12 | "authorization": "authorization-key", 13 | "currency": "USD", 14 | "location_id": null, 15 | "user_id": null, 16 | "parent_id": null, 17 | "device_id": null, 18 | "receipt": { 19 | "testcase": true, 20 | "authorization": "123456" 21 | }, 22 | "error_code": null, 23 | "source_name": "web", 24 | "payment_details": { 25 | "credit_card_bin": null, 26 | "avs_result_code": null, 27 | "cvv_result_code": null, 28 | "credit_card_number": "•••• •••• •••• 4242", 29 | "credit_card_company": "Visa" 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Collect/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "collects": [ 3 | { 4 | "id": 395646240, 5 | "collection_id": 395646240, 6 | "product_id": 632910392, 7 | "featured": false, 8 | "created_at": null, 9 | "updated_at": null, 10 | "position": 1, 11 | "sort_value": "0000000001" 12 | }, 13 | { 14 | "id": 841564295, 15 | "collection_id": 841564295, 16 | "product_id": 632910392, 17 | "featured": false, 18 | "created_at": null, 19 | "updated_at": null, 20 | "position": 1, 21 | "sort_value": "0000000001" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Collect/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Collect/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/Collect/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "collect": { 3 | "id": 1071559576, 4 | "collection_id": 841564295, 5 | "product_id": 921728736, 6 | "featured": false, 7 | "created_at": "2017-01-05T15:32:06-05:00", 8 | "updated_at": "2017-01-05T15:32:06-05:00", 9 | "position": 2, 10 | "sort_value": "0000000002" 11 | } 12 | } -------------------------------------------------------------------------------- /tests/Resources/Products/CustomCollection/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_collections": [ 3 | { 4 | "id": 1063001316, 5 | "handle": "macbooks", 6 | "title": "Macbooks", 7 | "updated_at": "2017-01-05T15:33:32-05:00", 8 | "body_html": null, 9 | "published_at": "2017-01-05T15:33:32-05:00", 10 | "sort_order": "alpha-asc", 11 | "template_suffix": null, 12 | "published_scope": "global" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/Resources/Products/CustomCollection/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/CustomCollection/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/CustomCollection/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_collection": { 3 | "id": 841564295, 4 | "handle": "ipods", 5 | "title": "IPods", 6 | "updated_at": "2008-02-01T19:00:00-05:00", 7 | "body_html": "

The best selling ipod ever<\/p>", 8 | "published_at": "2008-02-01T19:00:00-05:00", 9 | "sort_order": "manual", 10 | "template_suffix": null, 11 | "products_count": 1, 12 | "published_scope": "global", 13 | "image": { 14 | "created_at": "2017-01-05T15:31:41-05:00", 15 | "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/collections\/ipod_nano_8gb.jpg?v=1483648301" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Image/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "id": 850703190, 5 | "product_id": 632910392, 6 | "position": 1, 7 | "created_at": "2017-01-05T15:31:41-05:00", 8 | "updated_at": "2017-01-05T15:31:41-05:00", 9 | "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/products\/ipod-nano.png?v=1483648301", 10 | "variant_ids": [ 11 | ] 12 | }, 13 | { 14 | "id": 562641783, 15 | "product_id": 632910392, 16 | "position": 2, 17 | "created_at": "2017-01-05T15:31:41-05:00", 18 | "updated_at": "2017-01-05T15:31:41-05:00", 19 | "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/products\/ipod-nano-2.png?v=1483648301", 20 | "variant_ids": [ 21 | 808950810 22 | ] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Image/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Image/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/Image/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": { 3 | "id": 850703190, 4 | "product_id": 632910392, 5 | "position": 1, 6 | "created_at": "2017-01-05T15:31:41-05:00", 7 | "updated_at": "2017-01-05T15:31:41-05:00", 8 | "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/products\/ipod-nano.png?v=1483648301", 9 | "variant_ids": [ 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Product/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Product/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/SmartCollection/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "smart_collections":[ 3 | { 4 | "id":133926027369, 5 | "handle":"new-in", 6 | "title":"New In", 7 | "updated_at":"2019-06-25T00:55:34-04:00", 8 | "body_html":"New In", 9 | "published_at":"2019-06-25T00:54:42-04:00", 10 | "sort_order":"best-selling", 11 | "template_suffix":"", 12 | "disjunctive":false, 13 | "rules":[ 14 | { 15 | "column":"tag", 16 | "relation":"equals", 17 | "condition":"123" 18 | } 19 | ], 20 | "published_scope":"web" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /tests/Resources/Products/SmartCollection/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 4 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/SmartCollection/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/SmartCollection/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "smart_collection":{ 3 | "id":133926027369, 4 | "handle":"new-in", 5 | "title":"New In", 6 | "updated_at":"2019-06-25T00:55:34-04:00", 7 | "body_html":"New In", 8 | "published_at":"2019-06-25T00:54:42-04:00", 9 | "sort_order":"best-selling", 10 | "template_suffix":"", 11 | "products_count":0, 12 | "disjunctive":false, 13 | "rules":[ 14 | { 15 | "column":"tag", 16 | "relation":"equals", 17 | "condition":"123" 18 | } 19 | ], 20 | "published_scope":"web" 21 | } 22 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Variant/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Products/Variant/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Products/Variant/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "variant": { 3 | "id": 457924702, 4 | "product_id": 632910392, 5 | "title": "Black", 6 | "price": "199.00", 7 | "sku": "IPOD2008BLACK", 8 | "position": 4, 9 | "inventory_policy": "continue", 10 | "compare_at_price": null, 11 | "fulfillment_service": "manual", 12 | "inventory_management": "shopify", 13 | "option1": "Black", 14 | "option2": null, 15 | "option3": null, 16 | "created_at": "2018-08-31T13:33:40-04:00", 17 | "updated_at": "2018-08-31T13:33:40-04:00", 18 | "taxable": true, 19 | "barcode": "1234_black", 20 | "grams": 567, 21 | "image_id": null, 22 | "inventory_quantity": 40, 23 | "weight": 1.25, 24 | "weight_unit": "lb", 25 | "inventory_item_id": 457924702, 26 | "old_inventory_quantity": 40, 27 | "requires_shipping": true, 28 | "admin_graphql_api_id": "gid://shopify/ProductVariant/457924702" 29 | } 30 | } -------------------------------------------------------------------------------- /tests/Resources/Shipping/CarrierService/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "carrier_services": [ 3 | { 4 | "id": 1006327367, 5 | "name": "Purolator", 6 | "active": true, 7 | "service_discovery": true, 8 | "carrier_service_type": "api", 9 | "format": "json", 10 | "callback_url": "http:\/\/example.com\/" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/Resources/Shipping/CarrierService/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Shipping/CarrierService/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "carrier_service": { 3 | "id": 1006327368, 4 | "name": "Purolator", 5 | "active": true, 6 | "service_discovery": true, 7 | "carrier_service_type": "api", 8 | "format": "json", 9 | "callback_url": "http:\/\/example.com\/" 10 | } 11 | } -------------------------------------------------------------------------------- /tests/Resources/Shipping/Fulfillment/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Shipping/FulfillmentService/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "fulfillment_services": [ 3 | { 4 | "id": 61629186, 5 | "name": "shipwire", 6 | "handle": "shipwire", 7 | "email": null, 8 | "include_pending_stock": false, 9 | "service_name": "Shipwire", 10 | "inventory_management": true, 11 | "tracking_support": true, 12 | "provider_id": 1 13 | }, 14 | { 15 | "id": 755357713, 16 | "name": "Shipwire App", 17 | "handle": "shipwire-app", 18 | "email": null, 19 | "include_pending_stock": false, 20 | "requires_shipping_method": false, 21 | "service_name": "Shipwire App", 22 | "inventory_management": true, 23 | "tracking_support": true, 24 | "provider_id": null 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /tests/Resources/Shipping/FulfillmentService/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Shipping/FulfillmentService/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "fulfillment_service": { 3 | "id": 755357713, 4 | "name": "Shipwire App", 5 | "handle": "shipwire-app", 6 | "email": null, 7 | "include_pending_stock": false, 8 | "requires_shipping_method": false, 9 | "service_name": "Shipwire App", 10 | "inventory_management": true, 11 | "tracking_support": true, 12 | "provider_id": null 13 | } 14 | } -------------------------------------------------------------------------------- /tests/Resources/Store/Country/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 3 3 | } -------------------------------------------------------------------------------- /tests/Resources/Store/Country/delete.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Resources/Store/Currency/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencies": [ 3 | { 4 | "currency": "CAD", 5 | "rate_updated_at": "2018-01-23T19:01:01-05:00", 6 | "enabled": true 7 | }, 8 | { 9 | "currency": "EUR", 10 | "rate_updated_at": "2018-01-23T19:01:01-05:00", 11 | "enabled": true 12 | }, 13 | { 14 | "currency": "JPY", 15 | "rate_updated_at": "2018-01-23T19:01:01-05:00", 16 | "enabled": true 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /tests/Resources/Store/Policy/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "policies": [ 3 | { 4 | "title": "Refund Policy", 5 | "body": "You have 30 days to get a refund", 6 | "created_at": "2017-01-24T10:57:51-05:00", 7 | "updated_at": "2017-01-24T10:57:51-05:00", 8 | "url": "https:\/\/apple.myshopify.com\/690933842\/policies\/878590288" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /tests/Resources/Store/Province/count.json: -------------------------------------------------------------------------------- 1 | { 2 | "count": 2 3 | } -------------------------------------------------------------------------------- /tests/Resources/Store/Province/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "province": { 3 | "id": 224293623, 4 | "country_id": 879921427, 5 | "name": "Quebec", 6 | "code": "QC", 7 | "tax": 0.09, 8 | "tax_name": "HST", 9 | "tax_type": "compounded", 10 | "shipping_zone_id": null, 11 | "tax_percentage": 9.0 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Access/AccessScopeManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testFind() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testCreate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testCount() 30 | { 31 | $this->markTestSkipped('Yet not support.'); 32 | } 33 | } -------------------------------------------------------------------------------- /tests/Service/Access/StorefrontAccessTokenManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testUpdate() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Analytics/ReportManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 13 | } 14 | 15 | public function testCount() 16 | { 17 | $this->markTestSkipped('Yet not support.'); 18 | } 19 | } -------------------------------------------------------------------------------- /tests/Service/Billing/ApplicationChargeManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testRemove() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Billing/ApplicationCreditManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testRemove() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Billing/RecurringApplicationChargeManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testCount() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testRemove() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Service/Billing/UsageChargeManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testRemove() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Common/AbstractManagerTestCase.php: -------------------------------------------------------------------------------- 1 | getServiceClass(); 17 | return new $class($this->getClientMock($fixture)); 18 | } 19 | 20 | protected function getServiceClass() 21 | { 22 | return str_ireplace(['\Tests', 'Test'], ['', ''], get_called_class()); 23 | } 24 | 25 | protected function getFixturesDir() 26 | { 27 | $fixture = str_ireplace(['Slince\Shopify\Tests\Service', 'ManagerTest'], ['', ''], get_called_class()); 28 | return str_replace('\\', '/', $fixture); 29 | } 30 | } -------------------------------------------------------------------------------- /tests/Service/Customers/AddressManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Customers/CustomerManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Discounts/PriceRuleManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /tests/Service/Events/EventManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Events/WebhookManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testUpdate() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testRemove() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testCount() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /tests/Service/Inventory/InventoryLevelManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testFind() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testCreate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testFindAll() 30 | { 31 | $fixture = $this->getFixturesDir().'/'.'all.json'; 32 | $service = $this->getService($fixture); 33 | $articles = $service->findAll([]); 34 | $this->assertInstanceOf($service->getModelClass(), $articles[0]); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /tests/Service/Inventory/LocationManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testCreate() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testUpdate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testRemove() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | } -------------------------------------------------------------------------------- /tests/Service/MarketingEvent/MarketingEventManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/OnlineStore/PageManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Orders/DraftOrderManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testCount() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testUpdate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Service/Orders/RiskManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Orders/TransactionManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testRemove() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Products/CollectManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Products/CustomCollectionManagerTest.php: -------------------------------------------------------------------------------- 1 | getFixturesDir().'/'.'view.json'; 13 | $service = $this->getService($fixture); 14 | $variant = $service->find(1); 15 | $this->assertInstanceOf($service->getModelClass(), $variant); 16 | } 17 | 18 | public function testUpdate() 19 | { 20 | $fixture = $this->getFixturesDir().'/'.'view.json'; 21 | $service = $this->getService($fixture); 22 | $json = $this->readFixture($fixture); 23 | $entity = $service->update(12, reset($json)); 24 | $this->assertInstanceOf($service->getModelClass(), $entity); 25 | } 26 | } -------------------------------------------------------------------------------- /tests/Service/Shipping/AssignedFulfillmentOrderManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testFind() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testCreate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testCount() 30 | { 31 | $this->markTestSkipped('Yet not support.'); 32 | } 33 | } -------------------------------------------------------------------------------- /tests/Service/Shipping/CarrierServiceManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Shipping/FulfillmentManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Shipping/FulfillmentOrderManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 13 | } 14 | 15 | public function testCreate() 16 | { 17 | $this->markTestSkipped('Yet not support.'); 18 | } 19 | 20 | public function testUpdate() 21 | { 22 | $this->markTestSkipped('Yet not support.'); 23 | } 24 | 25 | public function testCount() 26 | { 27 | $this->markTestSkipped('Yet not support.'); 28 | } 29 | } -------------------------------------------------------------------------------- /tests/Service/Shipping/FulfillmentServiceManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | } -------------------------------------------------------------------------------- /tests/Service/Store/CountryManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testFind() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testCreate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testCount() 30 | { 31 | $this->markTestSkipped('Yet not support.'); 32 | } 33 | } -------------------------------------------------------------------------------- /tests/Service/Store/PolicyManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testFind() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testCreate() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testCount() 30 | { 31 | $this->markTestSkipped('Yet not support.'); 32 | } 33 | } -------------------------------------------------------------------------------- /tests/Service/Store/ProvinceManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testCreate() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | } -------------------------------------------------------------------------------- /tests/Service/Store/ShippingZoneManagerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('Yet not support.'); 12 | } 13 | 14 | public function testCount() 15 | { 16 | $this->markTestSkipped('Yet not support.'); 17 | } 18 | 19 | public function testRemove() 20 | { 21 | $this->markTestSkipped('Yet not support.'); 22 | } 23 | 24 | public function testUpdate() 25 | { 26 | $this->markTestSkipped('Yet not support.'); 27 | } 28 | 29 | public function testCreate() 30 | { 31 | $this->markTestSkipped('Yet not support.'); 32 | } 33 | } -------------------------------------------------------------------------------- /tests/Service/Store/ShopManagerTest.php: -------------------------------------------------------------------------------- 1 | getFixturesDir().'/view.json'; 12 | $service = $this->getService($fixture); 13 | $entity = $service->get(); 14 | $this->assertInstanceOf($service->getModelClass(), $entity); 15 | } 16 | } --------------------------------------------------------------------------------