├── .gitignore ├── tests ├── fixtures │ ├── BrandCreateRequest.json │ ├── BrandUpdateRequest.json │ ├── CompanyCreateRequest.json │ ├── CompanyUpdateRequest.json │ ├── ProductCreateBulkRequestResponse.json │ ├── BrandGetCustomDataForKeyResponse.json │ ├── ProductImageUpdatePositionRequest.json │ ├── ShopGetCustomDataForKeyResponse.json │ ├── AttributeGroupCreateAttributeRequest.json │ ├── AttributeGroupCreateAttributeResponse.json │ ├── AttributeGroupUpdateAttributeRequest.json │ ├── AttributeGroupUpdateAttributeResponse.json │ ├── CampaignGetCustomDataForKeyResponse.json │ ├── MerchantGetCustomDataForKeyResponse.json │ ├── ProductGetCustomDataForKeyResponse.json │ ├── WarehouseCreateRequest.json │ ├── BrandCreateOrUpdateCustomDataForKeyRequest.json │ ├── CompanyGetResponse.json │ ├── ProductVariantGetCustomDataForKeyResponse.json │ ├── ProductVariantPriceCreateBulkRequestResponse.json │ ├── ProductVariantStockCreateBulkRequestResponse.json │ ├── ShopCategoryGetCustomDataForKeyResponse.json │ ├── ShopCountryGetCustomDataForKeyResponse.json │ ├── ShopCreateOrUpdateCustomDataForKeyRequest.json │ ├── CampaignCreateOrUpdateCustomDataForKeyRequest.json │ ├── CompanyCreateResponse.json │ ├── CompanyUpdateResponse.json │ ├── MerchantCreateOrUpdateCustomDataForKeyRequest.json │ ├── ProductCreateCompositeProductBulkRequestResponse.json │ ├── ProductCreateOrUpdateCustomDataForKeyRequest.json │ ├── ShopCategoryGetCustomDataKeyForCountryResponse.json │ ├── BulkRequestCancelResponse.json │ ├── EmailKeyUpdateRequest.json │ ├── ProductVariantCreateOrUpdateCustomDataForKeyRequest.json │ ├── ShopCategoryCreateOrUpdateCustomDataForKeyRequest.json │ ├── ShopCountryCreateOrUpdateCustomDataForKeyRequest.json │ ├── ShopUpdateRequest.json │ ├── CustomerAddGroupsRequest.json │ ├── ShopCategoryCreateOrUpdateCustomDataKeyForCountryRequest.json │ ├── ShopCategoryGetPropertyResponse.json │ ├── AssetCreateResponse.json │ ├── CustomerGetStatusResponse.json │ ├── CustomerUpdateStatusRequest.json │ ├── CustomerUpdateStatusResponse.json │ ├── ShopCategoryPropertyKeyCreateRequest.json │ ├── ShopCategoryPropertyKeyUpdateRequest.json │ ├── ShopCategoryUpdateOrCreatePropertyRequest.json │ ├── ShopCategoryUpdateOrCreatePropertyResponse.json │ ├── ShopCategoryUpdateOrCreateCountryRequest.json │ ├── ShopCountryWarehouseCreateRequest.json │ ├── ShopCountryWarehouseUpdateRequest.json │ ├── CustomerSetPasswordRequest.json │ ├── PromotionCodesCreateRequest.json │ ├── ShopCategoryPropertyKeyGetResponse.json │ ├── ShopCreateRequest.json │ ├── MasterUpdateOrCreateAttributeRequest.json │ ├── ProductUpdateOrCreateAttributeRequest.json │ ├── PromotionCodesCreateResponse.json │ ├── ShopCategoryPropertyKeyCreateResponse.json │ ├── ShopCategoryPropertyKeyUpdateResponse.json │ ├── ProductImageUpdateOrCreateAttributeRequest.json │ ├── ProductVariantUpdateOrCreateAttributeRequest.json │ ├── AttributeTranslationUpdateOrCreateRequest.json │ ├── AttributeGroupUpdateFrontendNameRequest.json │ ├── AttributeTranslationPartialUpdateOrCreateRequest.json │ ├── AttributeTranslationUpdateOrCreateAdvancedRequest.json │ ├── CustomerCreateMembershipRequest.json │ ├── CustomerUpdateMembershipRequest.json │ ├── EmailKeyCreateRequest.json │ ├── MasterGetAttributeResponse.json │ ├── ProductGetAttributeResponse.json │ ├── ProductImageGetAttributeResponse.json │ ├── ShopCountryPriceRoundingCreateRequest.json │ ├── VoucherCreateCriterionRequest.json │ ├── VoucherUpdateCriterionRequest.json │ ├── MasterUpdateOrCreateAttributeResponse.json │ ├── ProductUpdateOrCreateAttributeResponse.json │ ├── ProductVariantGetAttributeResponse.json │ ├── AssetCreateRequest.json │ ├── ProductImageUpdateOrCreateAttributeResponse.json │ ├── CustomerSetPasswordHashRequest.json │ ├── ProductUpdateStateRequest.json │ ├── ProductVariantUpdateOrCreateAttributeResponse.json │ ├── ShopCategoryUpdateRequest.json │ ├── VoucherCreateCriterionResponse.json │ ├── VoucherGetCriterionResponse.json │ ├── VoucherUpdateCriterionResponse.json │ ├── ShopCategoryProductSetUnlinkInstructionUnlinkRequest.json │ ├── ShopCountryPriceRoundingCreateResponse.json │ ├── ChannelUpdateChannelRequest.json │ ├── CustomerCreateOrUpdateLegacyCustomDataRequest.json │ ├── CustomerUpdateReferenceKeyRequest.json │ ├── OrderUpdateReferenceKeyRequest.json │ ├── RedirectDeleteBulkRequest.json │ ├── ShopCategoryAllPropertiesResponse.json │ ├── CarrierCreateRequest.json │ ├── CarrierUpdateRequest.json │ ├── CustomerUpdateAddressReferenceKeyRequest.json │ ├── PackageGroupAllResponse.json │ ├── PackageGroupAssignPackageGroupToWarehousesRequest.json │ ├── ProductUpdateMasterCategoriesRequest.json │ ├── PackageGroupReplacePackageGroupForWarehousesRequest.json │ ├── ShopCountryWarehouseCreateResponse.json │ ├── ShopCountryWarehouseUpdateResponse.json │ ├── CarrierGetResponse.json │ ├── MasterUpdateProductMasterMasterCategoriesRequest.json │ ├── RedirectUpdateRequest.json │ ├── SellableWithoutStockSetSellableWithoutStockRequest.json │ ├── AttributeTranslationAllResponse.json │ ├── CarrierCreateResponse.json │ ├── CarrierUpdateResponse.json │ ├── SellableWithoutStockSetSellableWithoutStockResponse.json │ ├── ShopCategoryPropertyKeyAllResponse.json │ ├── OrderItemCreateOrUpdateLegacyCustomDataRequest.json │ ├── CancellationSendRequest.json │ ├── ProductImageUpdatePositionResponse.json │ ├── ProductUpdateMasterCategoriesResponse.json │ ├── CompanyAllResponse.json │ ├── AudienceUpdateAudienceRequest.json │ ├── BulkRequestStatusGetResponse.json │ ├── MasterUpdateProductMasterMasterCategoriesResponse.json │ ├── PromotionCodesAllResponse.json │ ├── CampaignUpdateOrCreateProductReductionsRequest.json │ ├── CampaignUpdateOrCreateVariantReductionsRequest.json │ ├── EmailKeyGetResponse.json │ ├── CustomerCreateMembershipResponse.json │ ├── CustomerUpdateMembershipResponse.json │ ├── EmailKeyCreateResponse.json │ ├── EmailKeyUpdateResponse.json │ ├── EmailSendRequest.json │ ├── MerchantCreateReturnAddressRequest.json │ ├── MerchantUpdateReturnAddressRequest.json │ ├── RedirectCreateRequest.json │ ├── ShopCountryPriceRoundingAllResponse.json │ ├── PromotionItemSetCreateRequest.json │ ├── MerchantCreateContactRequest.json │ ├── MerchantUpdateContactRequest.json │ ├── VoucherGetCriteriaResponse.json │ ├── AttributeGroupCreateRequest.json │ ├── AttributeGroupUpdateRequest.json │ ├── MerchantCreateRequest.json │ ├── MerchantGetReturnAddressResponse.json │ ├── MerchantUpdateRequest.json │ ├── AudienceCreateAudienceRequest.json │ ├── MerchantCreateReturnAddressResponse.json │ ├── MerchantUpdateReturnAddressResponse.json │ ├── MasterCategoryCreateRequest.json │ ├── MasterCategoryUpdateRequest.json │ ├── MasterUnlockAttributeGroupRequest.json │ ├── MerchantCreateResponse.json │ ├── MerchantUpdateResponse.json │ ├── ProductUnlockAttributeGroupRequest.json │ ├── BrandGetCustomDataResponse.json │ ├── CustomerUpdateRequest.json │ ├── ProductGetCustomDataResponse.json │ ├── ProductImageUnlockAttributeGroupRequest.json │ ├── ProductVariantStockCreateRequest.json │ ├── ProductVariantUnlockAttributeGroupRequest.json │ ├── RedirectUpdateResponse.json │ ├── ShopGetCustomDataResponse.json │ ├── CampaignGetCustomDataResponse.json │ ├── MerchantGetContactResponse.json │ ├── MerchantGetCustomDataResponse.json │ ├── ProductVariantStockCreateResponse.json │ ├── ShopCategoryGetCustomDataResponse.json │ ├── ShopCountryGetCustomDataResponse.json │ ├── BrandCreateOrUpdateCustomDataRequest.json │ ├── BrandCreateOrUpdateCustomDataResponse.json │ ├── MerchantCreateContactResponse.json │ ├── MerchantUpdateContactResponse.json │ ├── ProductCreateOrUpdateCustomDataRequest.json │ ├── ProductVariantGetCustomDataResponse.json │ ├── PromotionItemSetCreateResponse.json │ ├── PromotionItemSetGetResponse.json │ ├── ShopCreateOrUpdateCustomDataRequest.json │ ├── ShopCreateOrUpdateCustomDataResponse.json │ ├── BrandCreateOrUpdateCustomDataForKeyResponse.json │ ├── CampaignCreateOrUpdateCustomDataRequest.json │ ├── CampaignCreateOrUpdateCustomDataResponse.json │ ├── MerchantCreateOrUpdateCustomDataRequest.json │ ├── MerchantCreateOrUpdateCustomDataResponse.json │ ├── OrderCreateOrUpdateLegacyCustomDataRequest.json │ ├── ProductCreateOrUpdateCustomDataResponse.json │ ├── ShopCategoryCreateOrUpdateCustomDataRequest.json │ ├── ShopCategoryGetCustomDataForCountryResponse.json │ ├── ShopCountryCreateOrUpdateCustomDataRequest.json │ ├── ShopCountryCreateOrUpdateCustomDataResponse.json │ ├── ShopCreateOrUpdateCustomDataForKeyResponse.json │ ├── CampaignCreateOrUpdateCustomDataForKeyResponse.json │ ├── MerchantCreateOrUpdateCustomDataForKeyResponse.json │ ├── ProductCreateOrUpdateCustomDataForKeyResponse.json │ ├── ProductVariantCreateOrUpdateCustomDataRequest.json │ ├── ProductVariantCreateOrUpdateCustomDataResponse.json │ ├── ShopCategoryCreateOrUpdateCustomDataResponse.json │ ├── CampaignAllReductionsResponse.json │ ├── OrderBillingStatusUpdateOrderBillingStatusRequest.json │ ├── ProductVariantCreateOrUpdateCustomDataForKeyResponse.json │ ├── ShopCategoryCreateOrUpdateCustomDataForCountryRequest.json │ ├── ShopCategoryCreateOrUpdateCustomDataForKeyResponse.json │ ├── ShopCountryCreateOrUpdateCustomDataForKeyResponse.json │ ├── ProductImageCreateRequest.json │ ├── ShopCategoryCreateOrUpdateCustomDataForCountryResponse.json │ ├── ShopCategoryCreateOrUpdateCustomDataKeyForCountryResponse.json │ ├── MasterCategoryCreateResponse.json │ ├── MasterCategoryGetResponse.json │ ├── MasterCategoryUpdateResponse.json │ ├── ShopCountryCreateRequest.json │ ├── ShopCountryUpdateRequest.json │ ├── ProductUpdateStateResponse.json │ ├── CustomDataConfigCreateRequest.json │ ├── CustomDataConfigCreateResponse.json │ ├── CustomDataConfigGetResponse.json │ ├── CustomDataConfigUpdateRequest.json │ ├── CustomDataConfigUpdateResponse.json │ ├── ShopCategoryCreateRequest.json │ ├── AttributeGroupGetAttributesResponse.json │ ├── CarrierAllResponse.json │ ├── ProductPatchSimilarProductsRequest.json │ ├── BulkRequestStatusAllResponse.json │ ├── RedirectCreateResponse.json │ ├── ReturnItemSendRequest.json │ ├── ProductSortingDeleteRequest.json │ ├── WebhookEventAllResponse.json │ ├── ProductSortingUpdateOrCreateRequest.json │ ├── WebhookSubscriptionUpdateRequest.json │ ├── EmailKeyAllResponse.json │ ├── WebhookSubscriptionCreateRequest.json │ ├── AttributeGroupGetResponse.json │ ├── AudienceCreateAudienceResponse.json │ ├── AudienceGetAudienceResponse.json │ ├── AudienceUpdateAudienceResponse.json │ ├── CustomerGetMembershipsResponse.json │ ├── AttributeGroupCreateResponse.json │ ├── AttributeGroupUpdateResponse.json │ ├── ShipmentCreateRequest.json │ ├── WebhookSubscriptionGetResponse.json │ ├── WebhookSubscriptionCreateResponse.json │ ├── OrderGetOrderInvoicesResponse.json │ ├── ProductsFirstLiveAtUpdateProductsFirstLiveAtRequest.json │ ├── MerchantAllReturnAddressesResponse.json │ ├── RedirectCreateOrUpdateBulkResponse.json │ ├── WebhookSubscriptionUpdateResponse.json │ ├── MerchantAllContactsResponse.json │ ├── ReservationCreateResponse.json │ ├── PromotionItemSetAllResponse.json │ ├── CampaignCreateRequest.json │ ├── CampaignUpdateRequest.json │ ├── ChannelCreateChannelRequest.json │ ├── OrderGetStatusResponse.json │ ├── CampaignCreateResponse.json │ ├── CampaignGetResponse.json │ ├── CampaignUpdateResponse.json │ ├── WarehouseCreateResponse.json │ ├── RedirectCreateOrUpdateBulkRequest.json │ ├── ProductVariantPriceCreateRequest.json │ ├── ProductVariantPriceCreateResponse.json │ ├── BulkOperationStatusGetResponse.json │ ├── WebhookSubscriptionAllResponse.json │ ├── AudienceGetAudiencesResponse.json │ ├── ShopCreateResponse.json │ ├── ShopUpdateResponse.json │ ├── ShopCountryUpdateAssortmentRequest.json │ ├── ProductSellableTimeframeBatchProcessRequest.json │ ├── CampaignAllResponse.json │ ├── CustomerUpdateAddressRequest.json │ ├── VoucherUpdateRequest.json │ ├── ProductVariantStockAllResponse.json │ ├── ReservationCreateRequest.json │ ├── CustomerCreateAddressRequest.json │ ├── ProductVariantPriceAllResponse.json │ ├── ShopCategoryGetCountryResponse.json │ ├── ShopCategoryUpdateOrCreateCountryResponse.json │ ├── WarehouseAllResponse.json │ ├── MerchantAllWarehousesResponse.json │ ├── ShopCountryUpdateAssortmentResponse.json │ ├── MasterCategoryAllResponse.json │ ├── ShopCountryPartiallyUpdateAssortmentResponse.json │ ├── ProductVariantStockCreateBulkRequestRequest.json │ ├── CustomerCreateRequest.json │ ├── VoucherCreateRequest.json │ ├── VoucherCreateResponse.json │ ├── VoucherGetResponse.json │ ├── VoucherUpdateResponse.json │ ├── ChannelGetChannelResponse.json │ ├── ChannelCreateChannelResponse.json │ ├── ChannelUpdateChannelResponse.json │ ├── CustomerGetAddressResponse.json │ ├── CustomerCreateAddressResponse.json │ ├── CustomerUpdateAddressResponse.json │ ├── CustomerUpdateAddressReferenceKeyResponse.json │ └── ProductImageAllAttributesResponse.json ├── ReturnItemTest.php ├── EmailTest.php ├── ShipmentTest.php ├── CancellationTest.php ├── BulkRequestTest.php ├── ProductSellableTimeframeTest.php └── ProductsFirstLiveAtTest.php ├── phpstan.neon.dist ├── lib ├── Exceptions │ └── InvalidArgumentException.php ├── Models │ ├── ArrayCollection.php │ ├── ApiCollection.php │ ├── ShopCollection.php │ ├── BrandCollection.php │ ├── OrderCollection.php │ ├── CarrierCollection.php │ ├── ChannelCollection.php │ ├── CompanyCollection.php │ ├── ProductCollection.php │ ├── VoucherCollection.php │ ├── AudienceCollection.php │ ├── CampaignCollection.php │ ├── CustomerCollection.php │ ├── EmailKeyCollection.php │ ├── MerchantCollection.php │ ├── RedirectCollection.php │ ├── AttributeCollection.php │ ├── PromotionCollection.php │ ├── WarehouseCollection.php │ ├── ReservationCollection.php │ ├── ShopCountryCollection.php │ ├── OrderInvoiceCollection.php │ ├── PackageGroupCollection.php │ ├── ProductImageCollection.php │ ├── ShopCategoryCollection.php │ ├── WebhookEventCollection.php │ ├── PromotionCodeCollection.php │ ├── AttributeGroupCollection.php │ ├── MasterCategoryCollection.php │ ├── ProductVariantCollection.php │ ├── CustomerAddressCollection.php │ ├── MerchantContactCollection.php │ ├── PromotionItemSetCollection.php │ ├── VoucherCriterionCollection.php │ ├── BulkRequestStatusCollection.php │ ├── CustomerMembershipCollection.php │ ├── ProductVariantPriceCollection.php │ ├── ProductVariantStockCollection.php │ ├── WebhookSubscriptionCollection.php │ ├── Identifier.php │ ├── ShopCategoryPropertyCollection.php │ ├── MerchantReturnAddressCollection.php │ ├── ShopCategoryPropertyKeyCollection.php │ ├── ShopCountryPriceRoundingCollection.php │ ├── ProductVariantCampaignReductionCollection.php │ ├── ErrorResponse.php │ ├── OrderDeliverable.php │ ├── CancellationItem.php │ ├── BulkRequest.php │ ├── OrderItemProductImage.php │ ├── OrderItemVariantStock.php │ ├── OrderSubsequentDelivery.php │ ├── OrderVat.php │ ├── OrderTaxWithMandatoryVat.php │ ├── PackageGroup.php │ ├── SubscriptionOrderVoucher.php │ ├── OrderContact.php │ ├── OrderTax.php │ ├── AssetUrl.php │ ├── AttributeGroupAttribute.php │ ├── PromotionCode.php │ ├── OrderVoucherItem.php │ ├── PromotionCodes.php │ ├── CustomerGroup.php │ ├── OrderPackageTracking.php │ ├── ReservationError.php │ ├── VoucherConstraintsOrder.php │ ├── OrderPaymentInstallment.php │ ├── ShipmentOrderItem.php │ └── Transaction.php ├── Helpers │ └── ArrayHelper.php └── Services │ └── AbstractServiceFactory.php ├── phpunit.xml.dist ├── composer.json ├── .php-cs-fixer.dist.php └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea -------------------------------------------------------------------------------- /tests/fixtures/BrandCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Edited" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Edited" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My Company" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My Company" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateBulkRequestResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123 3 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageUpdatePositionRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 3 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupCreateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "value": "M" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupCreateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "value": "M" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupUpdateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "value": "M" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupUpdateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "value": "M" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/WarehouseCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "my-warehouse" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Company" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantPriceCreateBulkRequestResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantStockCreateBulkRequestResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryGetCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Company" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Company" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateCompositeProductBulkRequestResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetCustomDataKeyForCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/BulkRequestCancelResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123, 3 | "status": "cancelled" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Subscription Order created email" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryCreateOrUpdateCustomDataForKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "ms", 3 | "name": "My Shop Updated" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerAddGroupsRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | "employee" 4 | ] 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataKeyForCountryRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true 3 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetPropertyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "sale", 3 | "value": "NoSale" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/AssetCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "assetUrl": "images\/084dace7d7ff691e97982fa554113c29" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerGetStatusResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "isGuestCustomer": false 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateStatusRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "isGuestCustomer": false 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateStatusResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "isGuestCustomer": false 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "myKey", 3 | "isInheritable": true 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "myKey", 3 | "isInheritable": true 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryUpdateOrCreatePropertyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "sale", 3 | "value": "NoSale" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryUpdateOrCreatePropertyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "sale", 3 | "value": "NoSale" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryUpdateOrCreateCountryRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "isVisible": true 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryWarehouseCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "my-warehouse", 3 | "priority": 100 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryWarehouseUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "my-warehouse", 3 | "priority": 100 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerSetPasswordRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "hashingType": "internal", 3 | "password": "password-to-be-set" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionCodesCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "promotionCodes": [ 3 | "BF24", 4 | "XMAS24" 5 | ] 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "myKey", 4 | "isInheritable": true 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "ms", 3 | "name": "My Shop", 4 | "priceGroupKey": "myPriceGroup" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterUpdateOrCreateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateOrCreateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionCodesCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "promotionCodes": [ 3 | "BF24", 4 | "XMAS24" 5 | ] 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "myKey", 4 | "isInheritable": true 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "myKey", 4 | "isInheritable": true 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageUpdateOrCreateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantUpdateOrCreateAttributeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeTranslationUpdateOrCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "de_DE": "deutsche Zeichenkette", 3 | "en_GB": "english string" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupUpdateFrontendNameRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "de_DE": "Materialzusammensetzung", 3 | "en_GB": "Material Composition" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeTranslationPartialUpdateOrCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "de_DE": "deutsche Zeichenkette", 3 | "en_GB": "english string" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeTranslationUpdateOrCreateAdvancedRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "de_DE": "deutsche Zeichenkette", 3 | "en_GB": "english string" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateMembershipRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "accountNumber": "1234567890", 4 | "typeKey": "payback" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateMembershipRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isActive": true, 3 | "accountNumber": "1234567890", 4 | "typeKey": "payback" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "subscription-order-created-email", 3 | "name": "Subscription Order created email" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterGetAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductGetAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageGetAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryPriceRoundingCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencyCode": "EUR", 3 | "precision": "0.99", 4 | "roundingType": "nearest" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherCreateCriterionRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "customerId", 3 | "type": "include", 4 | "value": [ 5 | 1 6 | ] 7 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherUpdateCriterionRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "customerId", 3 | "type": "include", 4 | "value": [ 5 | 1 6 | ] 7 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterUpdateOrCreateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateOrCreateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantGetAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/AssetCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": { 3 | "url": "https:\/\/cdn.aboutstatic.com\/file\/3f5a809d399b58ddf5c50025f984de18" 4 | } 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageUpdateOrCreateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerSetPasswordHashRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "$2y$12$r\/rLM3HSgMVc8YTRncu4nOkDi46DIkyhr1K\/yBNZKhDbIfZJpTd0a", 3 | "hashingType": "internal" 4 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateStateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "state": "live", 3 | "merchantReferenceKeys": [ 4 | "merchant-1", 5 | "merchant-2" 6 | ] 7 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantUpdateOrCreateAttributeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "size", 3 | "type": "simple", 4 | "value": "M", 5 | "isLocked": false 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": { 3 | "de_DE": "Meine Shop-Kategorie", 4 | "en_GB": "My Updated Shop Category" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherCreateCriterionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "customerId", 4 | "type": "include", 5 | "value": [ 6 | 1 7 | ] 8 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherGetCriterionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "customerId", 4 | "type": "include", 5 | "value": [ 6 | 1 7 | ] 8 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherUpdateCriterionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "customerId", 4 | "type": "include", 5 | "value": [ 6 | 1 7 | ] 8 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryProductSetUnlinkInstructionUnlinkRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "productSetIds": [ 3 | 2, 4 | 3 5 | ], 6 | "copyConditions": true 7 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryPriceRoundingCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "currencyCode": "EUR", 4 | "precision": "0.99", 5 | "roundingType": "nearest" 6 | } -------------------------------------------------------------------------------- /tests/fixtures/ChannelUpdateChannelRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "online-store-de", 3 | "type": "marketplace", 4 | "name": "Online Store (Germany)", 5 | "shopCountryId": 5 6 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateOrUpdateLegacyCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "score": { 3 | "generatedOn": "2018-05-20T19:45:15+00:00", 4 | "result": "green" 5 | } 6 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateReferenceKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderUpdateReferenceKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectDeleteBulkRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1 4 | }, 5 | { 6 | "id": 2 7 | }, 8 | { 9 | "id": 3 10 | } 11 | ] -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryAllPropertiesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "key": "sale", 5 | "value": "NoSale" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "DHL_STD_NATIONAL", 3 | "name": "DHL", 4 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "DHL_STD_NATIONAL", 3 | "name": "DHL", 4 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateAddressReferenceKeyRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0" 3 | } -------------------------------------------------------------------------------- /tests/fixtures/PackageGroupAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 3 5 | }, 6 | { 7 | "id": 7 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /tests/fixtures/PackageGroupAssignPackageGroupToWarehousesRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "warehouseReferenceKey": "my-warehouse" 4 | }, 5 | { 6 | "warehouseId": 2 7 | } 8 | ] -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateMasterCategoriesRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": [ 3 | [ 4 | "Fashion", 5 | "Men", 6 | "Shirts" 7 | ] 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/fixtures/PackageGroupReplacePackageGroupForWarehousesRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "warehouseReferenceKey": "my-warehouse" 4 | }, 5 | { 6 | "warehouseId": 2 7 | } 8 | ] -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryWarehouseCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-warehouse", 4 | "priority": 100, 5 | "packageGroup": { 6 | "id": 3 7 | } 8 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryWarehouseUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-warehouse", 4 | "priority": 100, 5 | "packageGroup": { 6 | "id": 3 7 | } 8 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "DHL_STD_NATIONAL", 4 | "name": "DHL", 5 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 6 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterUpdateProductMasterMasterCategoriesRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": [ 3 | [ 4 | "Fashion", 5 | "Men", 6 | "Shirts" 7 | ] 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "https:\/\/google.com", 3 | "target": "https:\/\/google2.com", 4 | "isRegex": false, 5 | "statusCode": 302, 6 | "priority": 1 7 | } -------------------------------------------------------------------------------- /tests/fixtures/SellableWithoutStockSetSellableWithoutStockRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "warehouseReferenceKey": "myWarehouse", 3 | "sellableWithoutStock": true, 4 | "merchantReferenceKey": "merchant-1" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeTranslationAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "de_DE": "deutsche Zeichenkette", 5 | "en_GB": "english string" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "DHL_STD_NATIONAL", 4 | "name": "DHL", 5 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 6 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "DHL_STD_NATIONAL", 4 | "name": "DHL", 5 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 6 | } -------------------------------------------------------------------------------- /tests/fixtures/SellableWithoutStockSetSellableWithoutStockResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "warehouseReferenceKey": "myWarehouse", 3 | "sellableWithoutStock": true, 4 | "merchantReferenceKey": "merchant-1" 5 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryPropertyKeyAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "key": "myKey", 6 | "isInheritable": true 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderItemCreateOrUpdateLegacyCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "propA": 1, 3 | "propB": true, 4 | "propC": "test23", 5 | "propD": { 6 | "propD1": "45" 7 | }, 8 | "propE": null 9 | } -------------------------------------------------------------------------------- /tests/fixtures/CancellationSendRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopKey": "ms", 3 | "countryCode": "de", 4 | "items": [ 5 | { 6 | "orderItemId": 67 7 | } 8 | ], 9 | "orderId": 123 10 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageUpdatePositionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 13, 3 | "name": "some_name", 4 | "assetUrl": "images\/084dace7d7ff691e97982fa554113c29", 5 | "mimeType": "image\/jpeg", 6 | "position": 3 7 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateMasterCategoriesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isLocked": false, 3 | "paths": [ 4 | [ 5 | "Fashion", 6 | "Men", 7 | "Shirts" 8 | ] 9 | ] 10 | } -------------------------------------------------------------------------------- /tests/fixtures/CompanyAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "name": "My Company" 6 | } 7 | ], 8 | "cursor": { 9 | "next": null 10 | } 11 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceUpdateAudienceRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VIP customers", 3 | "description": "German VIP Customers from Hamburg only", 4 | "customerIds": [ 5 | 345, 6 | 456, 7 | 567 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/fixtures/BulkRequestStatusGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 123, 3 | "status": "cancelled", 4 | "progress": { 5 | "totalOperations": 0, 6 | "processedOperations": 0, 7 | "failedOperations": 0 8 | } 9 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterUpdateProductMasterMasterCategoriesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isLocked": false, 3 | "paths": [ 4 | [ 5 | "Fashion", 6 | "Men", 7 | "Shirts" 8 | ] 9 | ] 10 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionCodesAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "code": "XMAS24", 5 | "enabled": true 6 | } 7 | ], 8 | "cursor": { 9 | "next": "Mgo=" 10 | } 11 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignUpdateOrCreateProductReductionsRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productId": 123, 4 | "reduction": 10 5 | }, 6 | { 7 | "productReferenceKey": "myKey", 8 | "reduction": 10 9 | } 10 | ] -------------------------------------------------------------------------------- /tests/fixtures/CampaignUpdateOrCreateVariantReductionsRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productVariantId": 123, 4 | "reduction": 10 5 | }, 6 | { 7 | "productVariantReferenceKey": "myKey", 8 | "reduction": 10 9 | } 10 | ] -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 123, 3 | "key": "subscription-order-created-email", 4 | "name": "Subscription Order created email", 5 | "createdAt": "2024-01-01T09:30:15+00:00", 6 | "updatedAt": "2024-01-01T09:30:15+00:00" 7 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateMembershipResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 5, 3 | "isActive": true, 4 | "accountNumber": "1234567890", 5 | "typeKey": "payback", 6 | "createdAt": "2023-01-22T11:30:15+00:00", 7 | "updatedAt": "2023-01-22T11:30:15+00:00" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateMembershipResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 5, 3 | "isActive": true, 4 | "accountNumber": "1234567890", 5 | "typeKey": "payback", 6 | "createdAt": "2023-01-22T11:30:15+00:00", 7 | "updatedAt": "2023-01-22T11:30:15+00:00" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 123, 3 | "key": "subscription-order-created-email", 4 | "name": "Subscription Order created email", 5 | "createdAt": "2024-01-01T09:30:15+00:00", 6 | "updatedAt": "2024-01-01T09:30:15+00:00" 7 | } -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 123, 3 | "key": "subscription-order-created-email", 4 | "name": "Subscription Order created email", 5 | "createdAt": "2024-01-01T09:30:15+00:00", 6 | "updatedAt": "2024-01-01T09:30:15+00:00" 7 | } -------------------------------------------------------------------------------- /tests/fixtures/EmailSendRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "subscription-order-created-email", 3 | "payload": { 4 | "property1": "value1", 5 | "property2": "value2" 6 | }, 7 | "recipient": "your.email.address@scayle.com", 8 | "orderId": 123 9 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateReturnAddressRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Return Point", 3 | "street": "Domstrasse", 4 | "streetNo": "10", 5 | "zipCode": "22303", 6 | "city": "Hamburg", 7 | "countryCode": "DE", 8 | "dhlCode": "JVGL0849489024" 9 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateReturnAddressRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Return Point", 3 | "street": "Domstrasse", 4 | "streetNo": "10", 5 | "zipCode": "22303", 6 | "city": "Hamburg", 7 | "countryCode": "DE", 8 | "dhlCode": "JVGL0849489024" 9 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "https:\/\/google.com", 3 | "target": "https:\/\/google2.com", 4 | "statusCode": 302, 5 | "parent": { 6 | "id": 2 7 | }, 8 | "isRegex": false, 9 | "priority": 1 10 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryPriceRoundingAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "currencyCode": "EUR", 6 | "precision": "0.99", 7 | "roundingType": "nearest" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionItemSetCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "T-Shirts", 3 | "variantIds": [ 4 | 1, 5 | 2, 6 | 3 7 | ], 8 | "condition": "payload.items.exists(i, 11003 in i.variant.id)", 9 | "eligibleItemsQuantity": 1 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateContactRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "email": "foo@bar.org", 3 | "phone": "123456789", 4 | "cellPhone": "123456789", 5 | "name": "John Doe", 6 | "type": "general", 7 | "position": "Partner Service", 8 | "description": "Additional information" 9 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateContactRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "email": "foo@bar.org", 3 | "phone": "123456789", 4 | "cellPhone": "123456789", 5 | "name": "John Doe", 6 | "type": "general", 7 | "position": "Partner Service", 8 | "description": "Additional information" 9 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherGetCriteriaResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "key": "customerId", 6 | "type": "include", 7 | "value": [ 8 | 1 9 | ] 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color", 3 | "frontendName": { 4 | "de_DE": "Farbe", 5 | "en_GB": "Color" 6 | }, 7 | "type": "simple", 8 | "isShared": true, 9 | "level": "product", 10 | "group": "someName" 11 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color", 3 | "frontendName": { 4 | "de_DE": "Farbe", 5 | "en_GB": "Color" 6 | }, 7 | "type": "simple", 8 | "isShared": true, 9 | "level": "product", 10 | "group": "someName" 11 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "acme", 3 | "name": "ACME", 4 | "priority": 1, 5 | "orderDelegationUrl": "https:\/\/merchant.com\/order-service\/delegate-order", 6 | "cancellationUrl": "https:\/\/merchant.com\/order-service\/cancel-order" 7 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantGetReturnAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "Return Point", 4 | "street": "Domstrasse", 5 | "streetNo": "10", 6 | "zipCode": "22303", 7 | "city": "Hamburg", 8 | "countryCode": "DE", 9 | "dhlCode": "JVGL0849489024" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "acme", 3 | "name": "ACME", 4 | "priority": 1, 5 | "orderDelegationUrl": "https:\/\/merchant.com\/order-service\/delegate-order", 6 | "cancellationUrl": "https:\/\/merchant.com\/order-service\/cancel-order" 7 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceCreateAudienceRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VIP customers", 3 | "description": "German VIP Customers from Hamburg only", 4 | "companyIds": [ 5 | 100 6 | ], 7 | "customerIds": [ 8 | 345, 9 | 456, 10 | 567 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateReturnAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "Return Point", 4 | "street": "Domstrasse", 5 | "streetNo": "10", 6 | "zipCode": "22303", 7 | "city": "Hamburg", 8 | "countryCode": "DE", 9 | "dhlCode": "JVGL0849489024" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateReturnAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "Return Point", 4 | "street": "Domstrasse", 5 | "streetNo": "10", 6 | "zipCode": "22303", 7 | "city": "Hamburg", 8 | "countryCode": "DE", 9 | "dhlCode": "JVGL0849489024" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "path": [ 3 | "Fashion", 4 | "Men" 5 | ], 6 | "attributes": [ 7 | { 8 | "name": "season", 9 | "type": "simple", 10 | "isMandatory": false 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "path": [ 3 | "Fashion", 4 | "Men" 5 | ], 6 | "attributes": [ 7 | { 8 | "name": "season", 9 | "type": "simple", 10 | "isMandatory": false 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterUnlockAttributeGroupRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopCountries": [ 3 | { 4 | "shopKey": "ay", 5 | "countryCode": "DE" 6 | }, 7 | { 8 | "shopKey": "ay", 9 | "countryCode": "AT" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "acme", 4 | "name": "ACME", 5 | "priority": 1, 6 | "orderDelegationUrl": "https:\/\/acme.com\/order-service\/delegate-order", 7 | "cancellationUrl": "https:\/\/acme.com\/order-service\/cancel-order" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "acme", 4 | "name": "ACME", 5 | "priority": 1, 6 | "orderDelegationUrl": "https:\/\/acme.com\/order-service\/delegate-order", 7 | "cancellationUrl": "https:\/\/acme.com\/order-service\/cancel-order" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUnlockAttributeGroupRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopCountries": [ 3 | { 4 | "shopKey": "ay", 5 | "countryCode": "DE" 6 | }, 7 | { 8 | "shopKey": "ay", 9 | "countryCode": "AT" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "firstName": "John", 3 | "lastName": "Doe", 4 | "gender": "m", 5 | "birthDate": "1980-01-01", 6 | "email": "john.doe@example.com", 7 | "phone": "0049\/1234567890", 8 | "publicKey": "customer-1234", 9 | "title": "Prof." 10 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageUnlockAttributeGroupRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopCountries": [ 3 | { 4 | "shopKey": "ay", 5 | "countryCode": "DE" 6 | }, 7 | { 8 | "shopKey": "ay", 9 | "countryCode": "AT" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantStockCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "quantity": 17, 3 | "warehouseReferenceKey": "myWarehouse", 4 | "changedAt": "2020-07-23T11:30:58+00:00", 5 | "sellableWithoutStock": false, 6 | "merchantReferenceKey": "merchant-1", 7 | "expectedAvailabilityAt": "2020-07-24" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantUnlockAttributeGroupRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopCountries": [ 3 | { 4 | "shopKey": "ay", 5 | "countryCode": "DE" 6 | }, 7 | { 8 | "shopKey": "ay", 9 | "countryCode": "AT" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "https:\/\/google.com", 3 | "target": "https:\/\/google2.com", 4 | "statusCode": 302, 5 | "isRegex": false, 6 | "priority": 1, 7 | "createdAt": "2024-06-20T13:20:21+00:00", 8 | "updatedAt": "2024-06-20T13:20:21+00:00" 9 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantGetContactResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "email": "foo@bar.org", 4 | "phone": "123456789", 5 | "cellPhone": "123456789", 6 | "name": "John Doe", 7 | "type": "general", 8 | "position": "Partner Service", 9 | "description": "Additional information" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantStockCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "quantity": 17, 3 | "warehouseReferenceKey": "myWarehouse", 4 | "changedAt": "2020-07-23T11:30:58+00:00", 5 | "sellableWithoutStock": false, 6 | "merchantReferenceKey": "merchant-1", 7 | "expectedAvailabilityAt": "2020-07-24" 8 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateContactResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "email": "foo@bar.org", 4 | "phone": "123456789", 5 | "cellPhone": "123456789", 6 | "name": "John Doe", 7 | "type": "general", 8 | "position": "Partner Service", 9 | "description": "Additional information" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantUpdateContactResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "email": "foo@bar.org", 4 | "phone": "123456789", 5 | "cellPhone": "123456789", 6 | "name": "John Doe", 7 | "type": "general", 8 | "position": "Partner Service", 9 | "description": "Additional information" 10 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantGetCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionItemSetCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "64cbc70225ae598c0d0d0334", 3 | "name": "T-Shirts", 4 | "variantIds": [ 5 | 1, 6 | 2, 7 | 3 8 | ], 9 | "condition": "payload.items.exists(i, 11003 in i.variant.id)", 10 | "eligibleItemsQuantity": 1 11 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionItemSetGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "64cbc70225ae598c0d0d0334", 3 | "name": "T-Shirts", 4 | "variantIds": [ 5 | 1, 6 | 2, 7 | 3 8 | ], 9 | "condition": "payload.items.exists(i, 11003 in i.variant.id)", 10 | "eligibleItemsQuantity": 1 11 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/BrandCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderCreateOrUpdateLegacyCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetCustomDataForCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantCreateOrUpdateCustomDataRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignAllReductionsResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "productVariantId": 123, 6 | "productVariantReferenceKey": "myKey", 7 | "reduction": 10 8 | } 9 | ], 10 | "cursor": { 11 | "next": null 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderBillingStatusUpdateOrderBillingStatusRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": "billing_partially_refunded", 3 | "items": [ 4 | { 5 | "id": 1, 6 | "code": "billing_refunded" 7 | } 8 | ], 9 | "reason": "Manual override to reflect external refund for item 98765." 10 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataForCountryRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryCreateOrUpdateCustomDataForKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductImageCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "myReferenceKey", 3 | "name": "some_name", 4 | "assetUrl": "images\/my_image.jpg", 5 | "attributes": [ 6 | { 7 | "name": "view", 8 | "type": "simple", 9 | "value": "front" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataForCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateOrUpdateCustomDataKeyForCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "isValid": true, 3 | "name": "ayou", 4 | "score": 100, 5 | "some-json": { 6 | "de_DE": { 7 | "color": "weiss" 8 | }, 9 | "en_GB": { 10 | "color": "white" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 3, 3 | "parentId": 1, 4 | "path": [ 5 | "Fashion", 6 | "Men" 7 | ], 8 | "attributes": [ 9 | { 10 | "name": "season", 11 | "type": "simple", 12 | "isMandatory": false 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 3, 3 | "parentId": 1, 4 | "path": [ 5 | "Fashion", 6 | "Men" 7 | ], 8 | "attributes": [ 9 | { 10 | "name": "season", 11 | "type": "simple", 12 | "isMandatory": false 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 3, 3 | "parentId": 1, 4 | "path": [ 5 | "Fashion", 6 | "Men" 7 | ], 8 | "attributes": [ 9 | { 10 | "name": "season", 11 | "type": "simple", 12 | "isMandatory": false 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryCode": "DE", 3 | "currencyCode": "EUR", 4 | "defaultLanguageCode": "de_DE", 5 | "supportedLanguageCodes": [ 6 | "de_DE", 7 | "en_GB" 8 | ], 9 | "url": "https:\/\/www.shop.de", 10 | "smartSortingKey": "scayle:v1:inventory-optimization" 11 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryCode": "DE", 3 | "currencyCode": "EUR", 4 | "defaultLanguageCode": "de_DE", 5 | "supportedLanguageCodes": [ 6 | "de_DE", 7 | "en_GB" 8 | ], 9 | "url": "https:\/\/www.shop.de", 10 | "smartSortingKey": "scayle:v1:inventory-optimization" 11 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductUpdateStateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "state": "live", 3 | "merchantProductStates": [ 4 | { 5 | "merchantReferenceKey": "foo", 6 | "state": "live" 7 | }, 8 | { 9 | "merchantReferenceKey": "bar", 10 | "state": "blocked" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomDataConfigCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "test", 5 | "type": "string", 6 | "defaultValue": "default value", 7 | "inherit": false, 8 | "rules": { 9 | "required": true 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomDataConfigCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "test", 5 | "type": "string", 6 | "defaultValue": "default value", 7 | "inherit": false, 8 | "rules": { 9 | "required": true 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomDataConfigGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "test", 5 | "type": "string", 6 | "defaultValue": "default value", 7 | "inherit": false, 8 | "rules": { 9 | "required": true 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomDataConfigUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "test", 5 | "type": "string", 6 | "defaultValue": "default value", 7 | "inherit": false, 8 | "rules": { 9 | "required": true 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomDataConfigUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "test", 5 | "type": "string", 6 | "defaultValue": "default value", 7 | "inherit": false, 8 | "rules": { 9 | "required": true 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": { 3 | "de_DE": "Meine Shop Kategorie", 4 | "en_GB": "My Shop Category" 5 | }, 6 | "properties": [ 7 | { 8 | "key": "myKey", 9 | "value": "myValue" 10 | } 11 | ], 12 | "isActive": true, 13 | "isVisible": true 14 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupGetAttributesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | "Baumwolle", 4 | "Polyester", 5 | "Holz", 6 | "Wolle", 7 | "Leder", 8 | "Synthetic", 9 | "Baumwolle test locked", 10 | "BaumwolleOne" 11 | ], 12 | "cursor": { 13 | "next": null 14 | } 15 | } -------------------------------------------------------------------------------- /tests/fixtures/CarrierAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "key": "DHL_STD_NATIONAL", 6 | "name": "DHL", 7 | "trackingUrl": "http:\/\/nolp.dhl.de\/nextt-online-public\/set_identcodes.do" 8 | } 9 | ], 10 | "cursor": { 11 | "next": null 12 | } 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductPatchSimilarProductsRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "shopKey": "ay", 4 | "productIds": [ 5 | 1, 6 | 2 7 | ] 8 | }, 9 | { 10 | "shopKey": "ay", 11 | "countryCode": "DE", 12 | "productIds": [ 13 | 1, 14 | 2 15 | ] 16 | } 17 | ] -------------------------------------------------------------------------------- /tests/fixtures/BulkRequestStatusAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "key": 123, 5 | "status": "cancelled", 6 | "progress": { 7 | "totalOperations": 0, 8 | "processedOperations": 0, 9 | "failedOperations": 0 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "https:\/\/google.com", 3 | "target": "https:\/\/google2.com", 4 | "statusCode": 302, 5 | "parent": { 6 | "id": 2 7 | }, 8 | "isRegex": false, 9 | "priority": 1, 10 | "createdAt": "2024-06-20T13:20:21+00:00", 11 | "updatedAt": "2024-06-20T13:20:21+00:00" 12 | } -------------------------------------------------------------------------------- /tests/fixtures/ReturnItemSendRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "received": "2021-11-09 07:30:27", 4 | "returnKey": "ayou-139-13376599_48_1", 5 | "returnReason": "cci-manual-return" 6 | }, 7 | { 8 | "received": "2021-11-09 07:30:27", 9 | "returnKey": "ayou-139-13376599_48_1", 10 | "returnReason": "cci-manual-return" 11 | } 12 | ] -------------------------------------------------------------------------------- /tests/fixtures/ProductSortingDeleteRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productId": 1, 4 | "shopKey": "ms", 5 | "sortKey": "default", 6 | "sortValue": 1 7 | }, 8 | { 9 | "productReferenceKey": "my-product", 10 | "shopKey": "ms", 11 | "countryCode": "DE", 12 | "sortKey": "default", 13 | "sortValue": 2 14 | } 15 | ] -------------------------------------------------------------------------------- /tests/fixtures/WebhookEventAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "event": "customer-created", 5 | "version": 1, 6 | "description": "Called when a customer is created.", 7 | "isDeprecated": false, 8 | "supportedFilters": { 9 | "merchants": false 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductSortingUpdateOrCreateRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productId": 1, 4 | "shopKey": "ms", 5 | "sortKey": "default", 6 | "sortValue": 1 7 | }, 8 | { 9 | "productReferenceKey": "my-product", 10 | "shopKey": "ms", 11 | "countryCode": "DE", 12 | "sortKey": "default", 13 | "sortValue": 2 14 | } 15 | ] -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "https:\/\/foo:bar@foobar.tld\/notify\/v2", 3 | "filters": [ 4 | { 5 | "merchantReferenceKeys": { 6 | "include": { 7 | "add": [ 8 | "merchant-3" 9 | ] 10 | } 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 6 3 | paths: 4 | - lib 5 | - tests 6 | 7 | ignoreErrors: 8 | - # needs to be fixed 9 | identifier: missingType.iterableValue 10 | path: lib/Models/ErrorResponse.php 11 | - # needs to be fixed 12 | identifier: missingType.iterableValue 13 | path: lib/Models/CustomDataConfigProperty.php 14 | -------------------------------------------------------------------------------- /tests/fixtures/EmailKeyAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 123, 5 | "key": "subscription-order-created-email", 6 | "name": "Subscription Order created email", 7 | "createdAt": "2024-01-01T09:30:15+00:00", 8 | "updatedAt": "2024-01-01T09:30:15+00:00" 9 | } 10 | ], 11 | "cursor": { 12 | "next": "Mgo=" 13 | } 14 | } -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "event": "customer-created", 3 | "version": 1, 4 | "url": "https:\/\/foo:bar@foobar.tld\/notifiy", 5 | "filters": [ 6 | { 7 | "merchantReferenceKeys": { 8 | "include": [ 9 | "merchant-1", 10 | "merchant-2" 11 | ] 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "color", 4 | "frontendName": { 5 | "de_DE": "Farbe", 6 | "en_GB": "Color" 7 | }, 8 | "type": "simple", 9 | "structure": null, 10 | "isShared": true, 11 | "level": "product", 12 | "group": "someName", 13 | "shopCountries": null, 14 | "isOverridablePerShop": false, 15 | "isDifferentiating": false 16 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceCreateAudienceResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "645e0c241a93369ff53f26e0", 3 | "name": "VIP customers", 4 | "description": "German VIP Customers from Hamburg only", 5 | "companyIds": [ 6 | 100 7 | ], 8 | "customerIds": [ 9 | 345, 10 | 456, 11 | 567 12 | ], 13 | "createdAt": "2023-05-10T10:00:00+00:00", 14 | "updatedAt": "2023-05-10T10:00:00+00:00" 15 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceGetAudienceResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "645e0c241a93369ff53f26e0", 3 | "name": "VIP customers", 4 | "description": "German VIP Customers from Hamburg only", 5 | "companyIds": [ 6 | 100 7 | ], 8 | "customerIds": [ 9 | 345, 10 | 456, 11 | 567 12 | ], 13 | "createdAt": "2023-05-10T10:00:00+00:00", 14 | "updatedAt": "2023-05-10T10:00:00+00:00" 15 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceUpdateAudienceResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "645e0c241a93369ff53f26e0", 3 | "name": "VIP customers", 4 | "description": "German VIP Customers from Hamburg only", 5 | "companyIds": [ 6 | 100 7 | ], 8 | "customerIds": [ 9 | 345, 10 | 456, 11 | 567 12 | ], 13 | "createdAt": "2023-05-10T10:00:00+00:00", 14 | "updatedAt": "2023-05-10T10:00:00+00:00" 15 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerGetMembershipsResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 5, 5 | "isActive": true, 6 | "accountNumber": "1234567890", 7 | "typeKey": "payback", 8 | "createdAt": "2023-01-22T11:30:15+00:00", 9 | "updatedAt": "2023-01-22T11:30:15+00:00" 10 | } 11 | ], 12 | "cursor": { 13 | "next": "1" 14 | } 15 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "color", 4 | "frontendName": { 5 | "de_DE": "Farbe", 6 | "en_GB": "Color" 7 | }, 8 | "type": "simple", 9 | "structure": null, 10 | "isShared": true, 11 | "level": "product", 12 | "group": "someName", 13 | "shopCountries": null, 14 | "isOverridablePerShop": false, 15 | "isDifferentiating": false 16 | } -------------------------------------------------------------------------------- /tests/fixtures/AttributeGroupUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "color", 4 | "frontendName": { 5 | "de_DE": "Farbe", 6 | "en_GB": "Color" 7 | }, 8 | "type": "simple", 9 | "structure": null, 10 | "isShared": true, 11 | "level": "product", 12 | "group": "someName", 13 | "shopCountries": null, 14 | "isOverridablePerShop": false, 15 | "isDifferentiating": false 16 | } -------------------------------------------------------------------------------- /tests/fixtures/ShipmentCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopKey": "ms", 3 | "countryCode": "de", 4 | "carrier": "HERMES_KLV", 5 | "deliveryDate": "2021-09-23T11:30:58+00:00", 6 | "items": [ 7 | { 8 | "orderItemId": 67219436, 9 | "returnKey": "550357807160" 10 | } 11 | ], 12 | "orderId": 123, 13 | "returnIdentCode": "123456789012", 14 | "shipmentKey": "582301b967d97" 15 | } -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 42, 3 | "event": "customer-created", 4 | "version": 1, 5 | "url": "https:\/\/***:***@foobar.tld\/notifiy", 6 | "filters": [ 7 | { 8 | "merchantReferenceKeys": { 9 | "include": [ 10 | "merchant-1", 11 | "merchant-2" 12 | ] 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 42, 3 | "event": "customer-created", 4 | "version": 1, 5 | "url": "https:\/\/***:***@foobar.tld\/notifiy", 6 | "filters": [ 7 | { 8 | "merchantReferenceKeys": { 9 | "include": [ 10 | "merchant-1", 11 | "merchant-2" 12 | ] 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderGetOrderInvoicesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "createdAt": "2025-01-29T16:39:53+00:00", 6 | "type": "partial_invoice", 7 | "invoice": { 8 | "number": 5, 9 | "fullNumber": "ayou-24-5" 10 | }, 11 | "available": true 12 | } 13 | ], 14 | "cursor": { 15 | "next": "Mgo=" 16 | } 17 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductsFirstLiveAtUpdateProductsFirstLiveAtRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "shopKey": "ms", 3 | "countryCodes": [ 4 | "DE", 5 | "AT", 6 | "CH" 7 | ], 8 | "products": [ 9 | { 10 | "productId": 1, 11 | "firstLiveAt": "2023-07-20T11:30:58+00:00" 12 | }, 13 | { 14 | "productId": 2, 15 | "firstLiveAt": "2020-07-19T12:20:11+00:00" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantAllReturnAddressesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "name": "Return Point", 6 | "street": "Domstrasse", 7 | "streetNo": "10", 8 | "zipCode": "22303", 9 | "city": "Hamburg", 10 | "countryCode": "DE", 11 | "dhlCode": "JVGL0849489024" 12 | } 13 | ], 14 | "cursor": { 15 | "next": null 16 | } 17 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectCreateOrUpdateBulkResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "source": "https:\/\/example2.com", 5 | "target": "https:\/\/example2.com", 6 | "statusCode": 302, 7 | "isRegex": false, 8 | "priority": 1, 9 | "error": { 10 | "errorKey": "validation_error", 11 | "message": "Some validation error" 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 42, 3 | "event": "customer-created", 4 | "version": 1, 5 | "url": "https:\/\/foo:bar@foobar.tld\/notify\/v2", 6 | "filters": [ 7 | { 8 | "merchantReferenceKeys": { 9 | "include": [ 10 | "merchant-1", 11 | "merchant-2", 12 | "merchant-3" 13 | ] 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /tests/fixtures/MerchantAllContactsResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "email": "foo@bar.org", 6 | "phone": "123456789", 7 | "cellPhone": "123456789", 8 | "name": "John Doe", 9 | "type": "general", 10 | "position": "Partner Service", 11 | "description": "Additional information" 12 | } 13 | ], 14 | "cursor": { 15 | "next": null 16 | } 17 | } -------------------------------------------------------------------------------- /tests/fixtures/ReservationCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "referenceKey": "order4711-item3", 5 | "id": 123 6 | }, 7 | { 8 | "referenceKey": "order4711-item4", 9 | "error": { 10 | "errorKey": "VARIANT_NOT_FOUND", 11 | "message": "The combination of warehouseReferenceKey, variant id\/key and merchantReferenceKey was not found." 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/fixtures/PromotionItemSetAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": "64cbc70225ae598c0d0d0334", 5 | "name": "T-Shirts", 6 | "variantIds": [ 7 | 1, 8 | 2, 9 | 3 10 | ], 11 | "condition": "payload.items.exists(i, 11003 in i.variant.id)", 12 | "eligibleItemsQuantity": 1 13 | } 14 | ], 15 | "cursor": { 16 | "next": "Mgo=" 17 | } 18 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My Campaign", 3 | "description": "My first campaign", 4 | "countryCodes": [ 5 | "DE", 6 | "AT" 7 | ], 8 | "reduction": 14.75, 9 | "startAt": "2021-01-23T11:30:58+00:00", 10 | "endAt": "2021-09-23T11:30:58+00:00", 11 | "campaignKey": "05f962c8-857b-462a-bea2-54e2bfecf729", 12 | "customData": { 13 | "devicesAllowed": [ 14 | "app", 15 | "web" 16 | ] 17 | } 18 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My Campaign", 3 | "description": "My first campaign", 4 | "countryCodes": [ 5 | "DE", 6 | "AT" 7 | ], 8 | "reduction": 14.75, 9 | "startAt": "2021-01-23T11:30:58+00:00", 10 | "endAt": "2021-09-23T11:30:58+00:00", 11 | "campaignKey": "05f962c8-857b-462a-bea2-54e2bfecf729", 12 | "customData": { 13 | "devicesAllowed": [ 14 | "app", 15 | "web" 16 | ] 17 | } 18 | } -------------------------------------------------------------------------------- /lib/Exceptions/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Exceptions; 15 | 16 | class InvalidArgumentException extends \InvalidArgumentException {} 17 | -------------------------------------------------------------------------------- /tests/fixtures/ChannelCreateChannelRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "online-store-de", 3 | "type": "marketplace", 4 | "name": "Online Store (Germany)", 5 | "description": "Primary sales channel for all German marketplace orders.", 6 | "shopCountryId": 5, 7 | "active": true, 8 | "defaultPaymentMethod": { 9 | "id": 22 10 | }, 11 | "configs": { 12 | "emailsEnabled": true, 13 | "invoicesEnabled": true, 14 | "externalPriceOverrideEnabled": false 15 | } 16 | } -------------------------------------------------------------------------------- /tests/fixtures/OrderGetStatusResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "invoice_completed", 3 | "detailedStatus": { 4 | "billing": { 5 | "code": "billing_payment_pending", 6 | "name": "Zahlung reserviert" 7 | }, 8 | "order": { 9 | "code": "order_invoiced", 10 | "name": "Invoiced" 11 | }, 12 | "shipping": { 13 | "code": "shipping_partially_returned", 14 | "name": "Teilweise Retoure" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tests 6 | 7 | 8 | 9 | 10 | 11 | lib 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/fixtures/CampaignCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Campaign", 4 | "description": "My first campaign", 5 | "countryCodes": [ 6 | "DE", 7 | "AT" 8 | ], 9 | "reduction": 14.75, 10 | "startAt": "2021-01-23T11:30:58+00:00", 11 | "endAt": "2021-09-23T11:30:58+00:00", 12 | "campaignKey": "e7e9b3cb-49dd-4d31-93b9-53e4ebd8b016", 13 | "customData": { 14 | "devicesAllowed": [ 15 | "app", 16 | "web" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Campaign", 4 | "description": "My first campaign", 5 | "countryCodes": [ 6 | "DE", 7 | "AT" 8 | ], 9 | "reduction": 14.75, 10 | "startAt": "2021-01-23T11:30:58+00:00", 11 | "endAt": "2021-09-23T11:30:58+00:00", 12 | "campaignKey": "e7e9b3cb-49dd-4d31-93b9-53e4ebd8b016", 13 | "customData": { 14 | "devicesAllowed": [ 15 | "app", 16 | "web" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /tests/fixtures/CampaignUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "name": "My Campaign", 4 | "description": "My first campaign", 5 | "countryCodes": [ 6 | "DE", 7 | "AT" 8 | ], 9 | "reduction": 14.75, 10 | "startAt": "2021-01-23T11:30:58+00:00", 11 | "endAt": "2021-09-23T11:30:58+00:00", 12 | "campaignKey": "e7e9b3cb-49dd-4d31-93b9-53e4ebd8b016", 13 | "customData": { 14 | "devicesAllowed": [ 15 | "app", 16 | "web" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /tests/fixtures/WarehouseCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-warehouse", 4 | "merchants": [ 5 | { 6 | "id": 1, 7 | "referenceKey": "acme", 8 | "name": "ACME", 9 | "priority": 1 10 | } 11 | ], 12 | "shopCountries": [ 13 | { 14 | "shopKey": "ms", 15 | "countryCode": "de", 16 | "priority": 100, 17 | "packageGroup": { 18 | "id": 3 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /tests/fixtures/RedirectCreateOrUpdateBulkRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "source": "https:\/\/example.com", 4 | "target": "https:\/\/example2.com", 5 | "statusCode": 301, 6 | "parent": { 7 | "id": 2 8 | }, 9 | "isRegex": false, 10 | "priority": 1 11 | }, 12 | { 13 | "id": 1, 14 | "source": "https:\/\/example2.com", 15 | "target": "https:\/\/example3.com", 16 | "statusCode": 302, 17 | "isRegex": false, 18 | "priority": 1 19 | } 20 | ] -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantPriceCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "price": 80, 3 | "oldPrice": 100, 4 | "recommendedRetailPrice": 90, 5 | "buyingPrice": 70, 6 | "tax": 19, 7 | "countryCode": "DE", 8 | "currencyCode": "EUR", 9 | "groupKey": "myGroupKey", 10 | "promotionKey": "myPromotionKey", 11 | "unitPrice": { 12 | "unit": "ml", 13 | "amount": 100, 14 | "price": 399 15 | }, 16 | "validFrom": "2021-09-23T11:30:58+00:00", 17 | "validTo": null, 18 | "merchantReferenceKey": "merchant-1" 19 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantPriceCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "1-100", 3 | "price": 80, 4 | "oldPrice": 100, 5 | "recommendedRetailPrice": 90, 6 | "buyingPrice": 70, 7 | "tax": 19, 8 | "countryCode": "DE", 9 | "currencyCode": "EUR", 10 | "groupKey": "myGroupKey", 11 | "promotionKey": "myPromotionKey", 12 | "unitPrice": { 13 | "unit": "ml", 14 | "amount": 100, 15 | "price": 399 16 | }, 17 | "validFrom": "2021-09-23T11:30:58+00:00", 18 | "validTo": null, 19 | "merchantReferenceKey": "merchant-1" 20 | } -------------------------------------------------------------------------------- /tests/fixtures/BulkOperationStatusGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "eligendi67672eae50723", 3 | "status": "processed", 4 | "response": { 5 | "body": { 6 | "key": "test_color", 7 | "level": "product", 8 | "isAdvanced": true 9 | }, 10 | "statusCode": 201 11 | }, 12 | "bulkRequest": { 13 | "key": 123, 14 | "status": "processing", 15 | "progress": { 16 | "totalOperations": 0, 17 | "processedOperations": 0, 18 | "failedOperations": 0 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /tests/fixtures/WebhookSubscriptionAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 42, 5 | "event": "customer-created", 6 | "version": 1, 7 | "url": "https:\/\/***:***@foobar.tld\/notifiy", 8 | "filters": [ 9 | { 10 | "merchantReferenceKeys": { 11 | "include": [ 12 | "merchant-1", 13 | "merchant-2" 14 | ] 15 | } 16 | } 17 | ] 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /tests/fixtures/AudienceGetAudiencesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": "645e0c241a93369ff53f26e0", 5 | "name": "VIP customers", 6 | "description": "German VIP Customers from Hamburg only", 7 | "companyIds": [ 8 | 100 9 | ], 10 | "customerIds": [ 11 | 345, 12 | 456, 13 | 567 14 | ], 15 | "createdAt": "2023-05-10T10:00:00+00:00", 16 | "updatedAt": "2023-05-10T10:00:00+00:00" 17 | } 18 | ], 19 | "cursor": { 20 | "next": null 21 | } 22 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "ay", 4 | "name": "My Shop", 5 | "logoUrl": "images\/3123adasd23asd.png", 6 | "priceGroupKey": "myPriceGroup", 7 | "active": true, 8 | "deleted": false, 9 | "shopCategoryTreeId": 1, 10 | "companyId": 1, 11 | "countries": [ 12 | { 13 | "countryCode": "DE", 14 | "currencyCode": "EUR", 15 | "defaultLanguageCode": "de_DE", 16 | "supportedLanguageCodes": [ 17 | "de_DE", 18 | "en_GB" 19 | ], 20 | "url": "https:\/\/www.shop.de" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "key": "ay", 4 | "name": "My Shop", 5 | "logoUrl": "images\/3123adasd23asd.png", 6 | "priceGroupKey": "myPriceGroup", 7 | "active": true, 8 | "deleted": false, 9 | "shopCategoryTreeId": 1, 10 | "companyId": 1, 11 | "countries": [ 12 | { 13 | "countryCode": "DE", 14 | "currencyCode": "EUR", 15 | "defaultLanguageCode": "de_DE", 16 | "supportedLanguageCodes": [ 17 | "de_DE", 18 | "en_GB" 19 | ], 20 | "url": "https:\/\/www.shop.de" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryUpdateAssortmentRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "masterCategories": { 3 | "include": [ 4 | [ 5 | "root", 6 | "leaf" 7 | ] 8 | ] 9 | }, 10 | "products": { 11 | "include": [ 12 | 1, 13 | 2, 14 | 3 15 | ] 16 | }, 17 | "attributes": [ 18 | { 19 | "name": "color", 20 | "include": [ 21 | "red" 22 | ] 23 | } 24 | ], 25 | "merchantReferenceKeys": { 26 | "include": [ 27 | "merchant-1", 28 | "merchant-2" 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductSellableTimeframeBatchProcessRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productId": 1, 4 | "shopKey": "ay", 5 | "countryCode": "DE", 6 | "sellableFrom": "2022-01-20T00:00:00+00:00", 7 | "sellableTo": "2022-02-20T00:00:00+00:00" 8 | }, 9 | { 10 | "productId": 1, 11 | "shopKey": "ay", 12 | "countryCode": "AT", 13 | "sellableFrom": "2022-01-20T00:00:00+00:00", 14 | "sellableTo": "2022-02-20T00:00:00+00:00" 15 | }, 16 | { 17 | "productId": 1, 18 | "shopKey": "ay", 19 | "countryCode": "CH", 20 | "sellableFrom": null, 21 | "sellableTo": null 22 | } 23 | ] -------------------------------------------------------------------------------- /lib/Models/ArrayCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property array $entities 18 | */ 19 | class ArrayCollection extends ApiCollection 20 | { 21 | /** 22 | * @return array 23 | */ 24 | public function getEntities(): array 25 | { 26 | return $this->entities; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/fixtures/CampaignAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "name": "My Campaign", 6 | "description": "My first campaign", 7 | "countryCodes": [ 8 | "DE", 9 | "AT" 10 | ], 11 | "reduction": 14.75, 12 | "startAt": "2021-01-23T11:30:58+00:00", 13 | "endAt": "2021-09-23T11:30:58+00:00", 14 | "customData": { 15 | "devicesAllowed": [ 16 | "app", 17 | "web" 18 | ] 19 | } 20 | } 21 | ], 22 | "cursor": { 23 | "next": null 24 | } 25 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateAddressRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "street": "Domstraße", 3 | "houseNumber": "1", 4 | "additional": "erste Stock", 5 | "zipCode": "123456", 6 | "city": "Hamburg", 7 | "countryCode": "DEU", 8 | "state": "Hamburg", 9 | "collectionPoint": { 10 | "customerKey": "bced-234-234", 11 | "description": "Kiosk", 12 | "key": "12345-a", 13 | "type": "hermes_parcelshop" 14 | }, 15 | "isDefault": { 16 | "billing": false, 17 | "shipping": true 18 | }, 19 | "recipient": { 20 | "firstName": "John", 21 | "gender": "m", 22 | "lastName": "Doe", 23 | "title": "Prof." 24 | } 25 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherUpdateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": "testcode", 3 | "constraints": { 4 | "date": { 5 | "max": "2021-12-23T11:30:58+00:00", 6 | "min": "2021-01-23T11:30:58+00:00" 7 | }, 8 | "isValidOnCampaigns": true, 9 | "maxApplications": { 10 | "count": 1, 11 | "restriction": "customer" 12 | }, 13 | "orderValue": { 14 | "max": 200000, 15 | "min": 7500 16 | } 17 | }, 18 | "isApplicableToPromotions": true, 19 | "name": "Testvoucher", 20 | "status": "active", 21 | "summary": "Voucher utilised for automated for testing", 22 | "type": "relative", 23 | "value": 0.1 24 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantStockAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "quantity": 3, 5 | "warehouseReferenceKey": "myFirstWarehouse", 6 | "changedAt": "2020-07-23T11:30:58+00:00", 7 | "sellableWithoutStock": false, 8 | "merchantReferenceKey": "merchant-1", 9 | "expectedAvailabilityAt": null 10 | }, 11 | { 12 | "quantity": 3, 13 | "warehouseReferenceKey": "mySecondWarehouse", 14 | "changedAt": "2020-07-23T11:30:58+00:00", 15 | "sellableWithoutStock": true, 16 | "merchantReferenceKey": "merchant-1", 17 | "expectedAvailabilityAt": "2020-07-24" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /tests/fixtures/ReservationCreateRequest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "referenceKey": "order4711-item3", 4 | "warehouseReferenceKey": "myWarehouse", 5 | "variant": { 6 | "id": 123, 7 | "merchantReferenceKey": "merchant-1" 8 | } 9 | }, 10 | { 11 | "referenceKey": "order4711-item4", 12 | "warehouseReferenceKey": "myWarehouse", 13 | "variant": { 14 | "referenceKey": "foo-456789", 15 | "merchantReferenceKey": "merchant-1" 16 | } 17 | }, 18 | { 19 | "referenceKey": "order4711-item5", 20 | "warehouseReferenceKey": "myWarehouse", 21 | "variant": { 22 | "referenceKey": "foo-456789" 23 | } 24 | } 25 | ] -------------------------------------------------------------------------------- /lib/Models/ApiCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Cursor $cursor 18 | */ 19 | class ApiCollection extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $classMap = [ 23 | 'cursor' => Cursor::class, 24 | ]; 25 | 26 | public function getCursor(): ?Cursor 27 | { 28 | return $this->cursor; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateAddressRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "my-key", 3 | "street": "Domstraße", 4 | "houseNumber": "1", 5 | "additional": "erste Stock", 6 | "zipCode": "123456", 7 | "city": "Hamburg", 8 | "countryCode": "DEU", 9 | "state": "Hamburg", 10 | "phone": "+49123456789", 11 | "collectionPoint": { 12 | "customerKey": "bced-234-234", 13 | "description": "Kiosk", 14 | "key": "12345-a", 15 | "type": "hermes_parcelshop" 16 | }, 17 | "isDefault": { 18 | "billing": false, 19 | "shipping": true 20 | }, 21 | "recipient": { 22 | "firstName": "John", 23 | "gender": "m", 24 | "lastName": "Doe", 25 | "title": "Prof." 26 | } 27 | } -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantPriceAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "key": "1-100", 5 | "price": 80, 6 | "oldPrice": 100, 7 | "recommendedRetailPrice": 90, 8 | "buyingPrice": 70, 9 | "tax": 19, 10 | "countryCode": "DE", 11 | "currencyCode": "EUR", 12 | "groupKey": "myGroupKey", 13 | "promotionKey": "myPromotionKey", 14 | "unitPrice": { 15 | "unit": "ml", 16 | "amount": 100, 17 | "price": 399 18 | }, 19 | "validFrom": "2021-09-23T11:30:58+00:00", 20 | "validTo": null, 21 | "merchantReferenceKey": "merchant-1" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryGetCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryCode": "DE", 3 | "shopCountryId": 1, 4 | "path": "\/my-category", 5 | "isActive": true, 6 | "isVisible": true, 7 | "isExcludedFromSearch": null, 8 | "smartSortingKey": "scayle:v1:inventory-optimization", 9 | "customSortingKey": "most:sale", 10 | "properties": [ 11 | { 12 | "key": "myKey", 13 | "value": "myValue" 14 | } 15 | ], 16 | "customData": { 17 | "isValid": true, 18 | "name": "ayou", 19 | "score": 100, 20 | "some-json": { 21 | "de_DE": { 22 | "color": "weiss" 23 | }, 24 | "en_GB": { 25 | "color": "white" 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCategoryUpdateOrCreateCountryResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryCode": "DE", 3 | "shopCountryId": 1, 4 | "path": "\/my-category", 5 | "isActive": true, 6 | "isVisible": true, 7 | "isExcludedFromSearch": null, 8 | "smartSortingKey": "scayle:v1:inventory-optimization", 9 | "customSortingKey": "most:sale", 10 | "properties": [ 11 | { 12 | "key": "myKey", 13 | "value": "myValue" 14 | } 15 | ], 16 | "customData": { 17 | "isValid": true, 18 | "name": "ayou", 19 | "score": 100, 20 | "some-json": { 21 | "de_DE": { 22 | "color": "weiss" 23 | }, 24 | "en_GB": { 25 | "color": "white" 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /tests/fixtures/WarehouseAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "referenceKey": "my-warehouse", 6 | "merchants": [ 7 | { 8 | "id": 1, 9 | "referenceKey": "acme", 10 | "name": "ACME", 11 | "priority": 1 12 | } 13 | ], 14 | "shopCountries": [ 15 | { 16 | "shopKey": "ms", 17 | "countryCode": "de", 18 | "priority": 100, 19 | "packageGroup": { 20 | "id": 3 21 | } 22 | } 23 | ] 24 | } 25 | ], 26 | "cursor": { 27 | "next": null 28 | } 29 | } -------------------------------------------------------------------------------- /lib/Models/ShopCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Shop[] $entities 18 | */ 19 | class ShopCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Shop::class, 24 | ]; 25 | 26 | /** 27 | * @return Shop[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/fixtures/MerchantAllWarehousesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "referenceKey": "my-warehouse", 6 | "merchants": [ 7 | { 8 | "id": 1, 9 | "referenceKey": "acme", 10 | "name": "ACME", 11 | "priority": 1 12 | } 13 | ], 14 | "shopCountries": [ 15 | { 16 | "shopKey": "ms", 17 | "countryCode": "de", 18 | "priority": 100, 19 | "packageGroup": { 20 | "id": 3 21 | } 22 | } 23 | ] 24 | } 25 | ], 26 | "cursor": { 27 | "next": null 28 | } 29 | } -------------------------------------------------------------------------------- /lib/Models/BrandCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Brand[] $entities 18 | */ 19 | class BrandCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Brand::class, 24 | ]; 25 | 26 | /** 27 | * @return Brand[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/OrderCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Order[] $entities 18 | */ 19 | class OrderCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Order::class, 24 | ]; 25 | 26 | /** 27 | * @return Order[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CarrierCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Carrier[] $entities 18 | */ 19 | class CarrierCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Carrier::class, 24 | ]; 25 | 26 | /** 27 | * @return Carrier[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ChannelCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Channel[] $entities 18 | */ 19 | class ChannelCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Channel::class, 24 | ]; 25 | 26 | /** 27 | * @return Channel[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CompanyCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Company[] $entities 18 | */ 19 | class CompanyCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Company::class, 24 | ]; 25 | 26 | /** 27 | * @return Company[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ProductCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Product[] $entities 18 | */ 19 | class ProductCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Product::class, 24 | ]; 25 | 26 | /** 27 | * @return Product[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/VoucherCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Voucher[] $entities 18 | */ 19 | class VoucherCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Voucher::class, 24 | ]; 25 | 26 | /** 27 | * @return Voucher[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/AudienceCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Audience[] $entities 18 | */ 19 | class AudienceCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Audience::class, 24 | ]; 25 | 26 | /** 27 | * @return Audience[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CampaignCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Campaign[] $entities 18 | */ 19 | class CampaignCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Campaign::class, 24 | ]; 25 | 26 | /** 27 | * @return Campaign[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CustomerCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Customer[] $entities 18 | */ 19 | class CustomerCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Customer::class, 24 | ]; 25 | 26 | /** 27 | * @return Customer[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/EmailKeyCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property EmailKey[] $entities 18 | */ 19 | class EmailKeyCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => EmailKey::class, 24 | ]; 25 | 26 | /** 27 | * @return EmailKey[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/MerchantCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Merchant[] $entities 18 | */ 19 | class MerchantCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Merchant::class, 24 | ]; 25 | 26 | /** 27 | * @return Merchant[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/RedirectCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Redirect[] $entities 18 | */ 19 | class RedirectCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Redirect::class, 24 | ]; 25 | 26 | /** 27 | * @return Redirect[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/AttributeCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Attribute[] $entities 18 | */ 19 | class AttributeCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Attribute::class, 24 | ]; 25 | 26 | /** 27 | * @return Attribute[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/PromotionCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Promotion[] $entities 18 | */ 19 | class PromotionCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Promotion::class, 24 | ]; 25 | 26 | /** 27 | * @return Promotion[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/WarehouseCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Warehouse[] $entities 18 | */ 19 | class WarehouseCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Warehouse::class, 24 | ]; 25 | 26 | /** 27 | * @return Warehouse[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ReservationCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property Reservation[] $entities 18 | */ 19 | class ReservationCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => Reservation::class, 24 | ]; 25 | 26 | /** 27 | * @return Reservation[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ShopCountryCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ShopCountry[] $entities 18 | */ 19 | class ShopCountryCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ShopCountry::class, 24 | ]; 25 | 26 | /** 27 | * @return ShopCountry[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryUpdateAssortmentResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "masterCategories": { 3 | "include": [ 4 | [ 5 | "root", 6 | "leaf" 7 | ] 8 | ], 9 | "exclude": [] 10 | }, 11 | "products": { 12 | "include": [ 13 | 1, 14 | 2, 15 | 3 16 | ], 17 | "exclude": [ 18 | 4, 19 | 5, 20 | 6 21 | ] 22 | }, 23 | "attributes": [ 24 | { 25 | "name": "color", 26 | "include": [ 27 | "red" 28 | ], 29 | "exclude": [] 30 | } 31 | ], 32 | "merchantReferenceKeys": { 33 | "include": [ 34 | "merchant-1", 35 | "merchant-2" 36 | ], 37 | "exclude": [] 38 | } 39 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scayle/admin-api", 3 | "description": "SCAYLE Admin API SDK", 4 | "type": "library", 5 | "require": { 6 | "php": "^8.1", 7 | "ext-json": "*", 8 | "psr/http-client": "^1.0", 9 | "guzzlehttp/guzzle": "^7.0" 10 | }, 11 | "require-dev": { 12 | "phpunit/phpunit": "^10.0 || ^11.0", 13 | "friendsofphp/php-cs-fixer": "^3.0", 14 | "phpstan/phpstan": "^2.0" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Scayle\\Cloud\\AdminApi\\": "lib/" 19 | } 20 | }, 21 | "autoload-dev": { 22 | "psr-4": { 23 | "Scayle\\Cloud\\AdminApi\\": [ 24 | "tests/" 25 | ] 26 | } 27 | }, 28 | "config": { 29 | "platform": { 30 | "php": "8.1" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/OrderInvoiceCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property OrderInvoice[] $entities 18 | */ 19 | class OrderInvoiceCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => OrderInvoice::class, 24 | ]; 25 | 26 | /** 27 | * @return OrderInvoice[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/PackageGroupCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property PackageGroup[] $entities 18 | */ 19 | class PackageGroupCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => PackageGroup::class, 24 | ]; 25 | 26 | /** 27 | * @return PackageGroup[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ProductImageCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ProductImage[] $entities 18 | */ 19 | class ProductImageCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ProductImage::class, 24 | ]; 25 | 26 | /** 27 | * @return ProductImage[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ShopCategoryCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ShopCategory[] $entities 18 | */ 19 | class ShopCategoryCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ShopCategory::class, 24 | ]; 25 | 26 | /** 27 | * @return ShopCategory[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/WebhookEventCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property WebhookEvent[] $entities 18 | */ 19 | class WebhookEventCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => WebhookEvent::class, 24 | ]; 25 | 26 | /** 27 | * @return WebhookEvent[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/PromotionCodeCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property PromotionCode[] $entities 18 | */ 19 | class PromotionCodeCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => PromotionCode::class, 24 | ]; 25 | 26 | /** 27 | * @return PromotionCode[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/fixtures/MasterCategoryAllResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "id": 1, 5 | "path": [ 6 | "Fashion" 7 | ] 8 | }, 9 | { 10 | "id": 2, 11 | "parentId": 1, 12 | "path": [ 13 | "Fashion", 14 | "Women" 15 | ] 16 | }, 17 | { 18 | "id": 3, 19 | "parentId": 1, 20 | "path": [ 21 | "Fashion", 22 | "Men" 23 | ], 24 | "attributes": [ 25 | { 26 | "name": "seasoon", 27 | "type": "simple", 28 | "isMandatory": false 29 | } 30 | ] 31 | } 32 | ], 33 | "cursor": { 34 | "next": null 35 | } 36 | } -------------------------------------------------------------------------------- /tests/fixtures/ShopCountryPartiallyUpdateAssortmentResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "masterCategories": { 3 | "include": [ 4 | [ 5 | "root", 6 | "leaf" 7 | ] 8 | ], 9 | "exclude": [] 10 | }, 11 | "products": { 12 | "include": [ 13 | 1, 14 | 2, 15 | 3 16 | ], 17 | "exclude": [ 18 | 4, 19 | 5, 20 | 6 21 | ] 22 | }, 23 | "attributes": [ 24 | { 25 | "name": "color", 26 | "include": [ 27 | "red" 28 | ], 29 | "exclude": [] 30 | } 31 | ], 32 | "merchantReferenceKeys": { 33 | "include": [ 34 | "merchant-1", 35 | "merchant-2" 36 | ], 37 | "exclude": [] 38 | } 39 | } -------------------------------------------------------------------------------- /lib/Models/AttributeGroupCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property AttributeGroup[] $entities 18 | */ 19 | class AttributeGroupCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => AttributeGroup::class, 24 | ]; 25 | 26 | /** 27 | * @return AttributeGroup[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/MasterCategoryCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property MasterCategory[] $entities 18 | */ 19 | class MasterCategoryCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => MasterCategory::class, 24 | ]; 25 | 26 | /** 27 | * @return MasterCategory[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ProductVariantCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ProductVariant[] $entities 18 | */ 19 | class ProductVariantCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ProductVariant::class, 24 | ]; 25 | 26 | /** 27 | * @return ProductVariant[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CustomerAddressCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property CustomerAddress[] $entities 18 | */ 19 | class CustomerAddressCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => CustomerAddress::class, 24 | ]; 25 | 26 | /** 27 | * @return CustomerAddress[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/MerchantContactCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property MerchantContact[] $entities 18 | */ 19 | class MerchantContactCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => MerchantContact::class, 24 | ]; 25 | 26 | /** 27 | * @return MerchantContact[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/PromotionItemSetCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property PromotionItemSet[] $entities 18 | */ 19 | class PromotionItemSetCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => PromotionItemSet::class, 24 | ]; 25 | 26 | /** 27 | * @return PromotionItemSet[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/VoucherCriterionCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property VoucherCriterion[] $entities 18 | */ 19 | class VoucherCriterionCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => VoucherCriterion::class, 24 | ]; 25 | 26 | /** 27 | * @return VoucherCriterion[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/fixtures/ProductVariantStockCreateBulkRequestRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "callbacks": { 3 | "requestUrl": "https:\/\/example.com\/api\/internal\/callback\/request", 4 | "operationUrl": "https:\/\/client.aboutyou.cloud\/api\/internal\/callback\/operation", 5 | "requestStatus": "complete" 6 | }, 7 | "operations": [ 8 | { 9 | "key": "create-product-variant-stock", 10 | "url": "\/variants\/123\/stocks", 11 | "method": "POST", 12 | "headers": { 13 | "X-Merchant-Key": "M0001-black" 14 | }, 15 | "body": { 16 | "warehouseReferenceKey": "warehouse-1", 17 | "quantity": 100, 18 | "changedAt": "2024-07-23T11:30:58+00:00", 19 | "merchantReferenceKey": "merchant-stock-1" 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /lib/Models/BulkRequestStatusCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property BulkRequestStatus[] $entities 18 | */ 19 | class BulkRequestStatusCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => BulkRequestStatus::class, 24 | ]; 25 | 26 | /** 27 | * @return BulkRequestStatus[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/CustomerMembershipCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property CustomerMembership[] $entities 18 | */ 19 | class CustomerMembershipCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => CustomerMembership::class, 24 | ]; 25 | 26 | /** 27 | * @return CustomerMembership[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ProductVariantPriceCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ProductVariantPrice[] $entities 18 | */ 19 | class ProductVariantPriceCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ProductVariantPrice::class, 24 | ]; 25 | 26 | /** 27 | * @return ProductVariantPrice[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ProductVariantStockCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ProductVariantStock[] $entities 18 | */ 19 | class ProductVariantStockCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ProductVariantStock::class, 24 | ]; 25 | 26 | /** 27 | * @return ProductVariantStock[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/WebhookSubscriptionCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property WebhookSubscription[] $entities 18 | */ 19 | class WebhookSubscriptionCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => WebhookSubscription::class, 24 | ]; 25 | 26 | /** 27 | * @return WebhookSubscription[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in(__DIR__ . '/lib') 8 | ->in(__DIR__ . '/tests') 9 | ->name('*.php'); 10 | 11 | return (new Config()) 12 | ->setRiskyAllowed(true) 13 | ->setFinder($finder) 14 | ->setRules([ 15 | '@PSR2' => true, 16 | '@PhpCsFixer' => true, 17 | '@PhpCsFixer:risky' => true, 18 | '@PHP56Migration:risky' => true, 19 | '@PHPUnit57Migration:risky' => true, 20 | 'fopen_flags' => true, 21 | 'linebreak_after_opening_tag' => true, 22 | 'native_function_invocation' => true, 23 | 'concat_space' => ['spacing' => 'one'], 24 | 'ordered_class_elements' => false, 25 | 'phpdoc_align' => false, 26 | 'self_accessor' => false, 27 | 'php_unit_test_class_requires_covers' => false 28 | ]); 29 | -------------------------------------------------------------------------------- /lib/Models/Identifier.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | class Identifier 17 | { 18 | private function __construct(private string $identifier) {} 19 | 20 | public static function fromId(int $id): self 21 | { 22 | return new self((string) $id); 23 | } 24 | 25 | public static function fromKey(string $referenceKey): self 26 | { 27 | return new self(urlencode('key=' . $referenceKey)); 28 | } 29 | 30 | public function __toString(): string 31 | { 32 | return $this->identifier; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/Models/ShopCategoryPropertyCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ShopCategoryProperty[] $entities 18 | */ 19 | class ShopCategoryPropertyCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ShopCategoryProperty::class, 24 | ]; 25 | 26 | /** 27 | * @return ShopCategoryProperty[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/MerchantReturnAddressCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property MerchantReturnAddress[] $entities 18 | */ 19 | class MerchantReturnAddressCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => MerchantReturnAddress::class, 24 | ]; 25 | 26 | /** 27 | * @return MerchantReturnAddress[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ShopCategoryPropertyKeyCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ShopCategoryPropertyKey[] $entities 18 | */ 19 | class ShopCategoryPropertyKeyCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ShopCategoryPropertyKey::class, 24 | ]; 25 | 26 | /** 27 | * @return ShopCategoryPropertyKey[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Models/ShopCountryPriceRoundingCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ShopCountryPriceRounding[] $entities 18 | */ 19 | class ShopCountryPriceRoundingCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ShopCountryPriceRounding::class, 24 | ]; 25 | 26 | /** 27 | * @return ShopCountryPriceRounding[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0", 3 | "firstName": "John", 4 | "lastName": "Doe", 5 | "gender": "m", 6 | "birthDate": "1980-01-01", 7 | "email": "john.doe@example.com", 8 | "phone": "0049\/1234567890", 9 | "publicKey": "customer-1234", 10 | "title": "Prof.", 11 | "groups": [ 12 | "employee" 13 | ], 14 | "identities": [ 15 | { 16 | "identityProviderCode": "keycloak", 17 | "externalUserId": "qwerty" 18 | }, 19 | { 20 | "identityProviderCode": "apple", 21 | "externalUserId": null 22 | } 23 | ], 24 | "legacyCustomData": { 25 | "score": { 26 | "generatedOn": "2018-05-20T19:45:15+00:00", 27 | "result": "green" 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherCreateRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": "testcode", 3 | "constraints": { 4 | "date": { 5 | "max": "2021-12-23T11:30:58+00:00", 6 | "min": "2021-01-23T11:30:58+00:00" 7 | }, 8 | "isValidOnCampaigns": true, 9 | "maxApplications": { 10 | "count": 1, 11 | "restriction": "customer" 12 | }, 13 | "orderValue": { 14 | "max": 200000, 15 | "min": 7500 16 | } 17 | }, 18 | "isApplicableToPromotions": true, 19 | "name": "Testvoucher", 20 | "status": "active", 21 | "summary": "Voucher utilised for automated for testing", 22 | "type": "relative", 23 | "value": 0.1, 24 | "criteria": [ 25 | { 26 | "id": 1, 27 | "key": "customerId", 28 | "type": "include", 29 | "value": [ 30 | 1 31 | ] 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /lib/Models/ProductVariantCampaignReductionCollection.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property ProductVariantCampaignReduction[] $entities 18 | */ 19 | class ProductVariantCampaignReductionCollection extends ApiCollection 20 | { 21 | /** @var array */ 22 | protected array $collectionClassMap = [ 23 | 'entities' => ProductVariantCampaignReduction::class, 24 | ]; 25 | 26 | /** 27 | * @return ProductVariantCampaignReduction[] 28 | */ 29 | public function getEntities(): array 30 | { 31 | return $this->entities; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/Helpers/ArrayHelper.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Helpers; 15 | 16 | class ArrayHelper 17 | { 18 | /** 19 | * @param array $array 20 | * @param string[] $keys 21 | * 22 | * @return array 23 | */ 24 | public static function except(array $array, array $keys): array 25 | { 26 | return array_diff_key($array, array_flip($keys)); 27 | } 28 | 29 | /** 30 | * @param array $array 31 | * 32 | * @return null|mixed 33 | */ 34 | public static function get(array $array, string $key) 35 | { 36 | return $array[$key] ?? null; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/fixtures/VoucherCreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1234567980, 3 | "code": "testcode", 4 | "constraints": { 5 | "date": { 6 | "max": "2021-12-23T11:30:58+00:00", 7 | "min": "2021-01-23T11:30:58+00:00" 8 | }, 9 | "isValidOnCampaigns": true, 10 | "maxApplications": { 11 | "count": 1, 12 | "restriction": "customer" 13 | }, 14 | "orderValue": { 15 | "max": 200000, 16 | "min": 7500 17 | } 18 | }, 19 | "criteria": [ 20 | { 21 | "id": 1, 22 | "key": "customerId", 23 | "type": "include", 24 | "value": [ 25 | 1 26 | ] 27 | } 28 | ], 29 | "name": "Testvoucher", 30 | "status": "active", 31 | "summary": "Voucher utilised for automated for testing", 32 | "type": "relative", 33 | "value": 0.1, 34 | "isApplicableToPromotions": true 35 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherGetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1234567980, 3 | "code": "testcode", 4 | "constraints": { 5 | "date": { 6 | "max": "2021-12-23T11:30:58+00:00", 7 | "min": "2021-01-23T11:30:58+00:00" 8 | }, 9 | "isValidOnCampaigns": true, 10 | "maxApplications": { 11 | "count": 1, 12 | "restriction": "customer" 13 | }, 14 | "orderValue": { 15 | "max": 200000, 16 | "min": 7500 17 | } 18 | }, 19 | "criteria": [ 20 | { 21 | "id": 1, 22 | "key": "customerId", 23 | "type": "include", 24 | "value": [ 25 | 1 26 | ] 27 | } 28 | ], 29 | "name": "Testvoucher", 30 | "status": "active", 31 | "summary": "Voucher utilised for automated for testing", 32 | "type": "relative", 33 | "value": 0.1, 34 | "isApplicableToPromotions": true 35 | } -------------------------------------------------------------------------------- /tests/fixtures/VoucherUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1234567980, 3 | "code": "testcode", 4 | "constraints": { 5 | "date": { 6 | "max": "2021-12-23T11:30:58+00:00", 7 | "min": "2021-01-23T11:30:58+00:00" 8 | }, 9 | "isValidOnCampaigns": true, 10 | "maxApplications": { 11 | "count": 1, 12 | "restriction": "customer" 13 | }, 14 | "orderValue": { 15 | "max": 200000, 16 | "min": 7500 17 | } 18 | }, 19 | "criteria": [ 20 | { 21 | "id": 1, 22 | "key": "customerId", 23 | "type": "include", 24 | "value": [ 25 | 1 26 | ] 27 | } 28 | ], 29 | "name": "Testvoucher", 30 | "status": "active", 31 | "summary": "Voucher utilised for automated for testing", 32 | "type": "relative", 33 | "value": 0.1, 34 | "isApplicableToPromotions": true 35 | } -------------------------------------------------------------------------------- /tests/fixtures/ChannelGetChannelResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 101, 3 | "key": "online-store-de", 4 | "type": "marketplace", 5 | "name": "Online Store (Germany)", 6 | "description": "Primary sales channel for all German marketplace orders.", 7 | "shopCountry": { 8 | "id": 5502, 9 | "shopKey": "msde", 10 | "countryCode": "DE", 11 | "defaultLanguageCode": "en_GB", 12 | "supportedLanguageCodes": [], 13 | "priceGroupKey": null, 14 | "url": "www.example.com", 15 | "active": true, 16 | "currencyCode": null, 17 | "deleted": false 18 | }, 19 | "active": true, 20 | "isUsedInOrders": false, 21 | "defaultPaymentMethod": { 22 | "id": 22, 23 | "key": "credit-card" 24 | }, 25 | "configs": { 26 | "emailsEnabled": true, 27 | "invoicesEnabled": true, 28 | "externalPriceOverrideEnabled": false 29 | }, 30 | "createdAt": "2023-05-10T10:00:00+00:00", 31 | "updatedAt": "2023-05-10T10:00:00+00:00" 32 | } -------------------------------------------------------------------------------- /tests/fixtures/ChannelCreateChannelResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 101, 3 | "key": "online-store-de", 4 | "type": "marketplace", 5 | "name": "Online Store (Germany)", 6 | "description": "Primary sales channel for all German marketplace orders.", 7 | "shopCountry": { 8 | "id": 5502, 9 | "shopKey": "msde", 10 | "countryCode": "DE", 11 | "defaultLanguageCode": "en_GB", 12 | "supportedLanguageCodes": [], 13 | "priceGroupKey": null, 14 | "url": "www.example.com", 15 | "active": true, 16 | "currencyCode": null, 17 | "deleted": false 18 | }, 19 | "active": true, 20 | "isUsedInOrders": false, 21 | "defaultPaymentMethod": { 22 | "id": 22, 23 | "key": "credit-card" 24 | }, 25 | "configs": { 26 | "emailsEnabled": true, 27 | "invoicesEnabled": true, 28 | "externalPriceOverrideEnabled": false 29 | }, 30 | "createdAt": "2023-05-10T10:00:00+00:00", 31 | "updatedAt": "2023-05-10T10:00:00+00:00" 32 | } -------------------------------------------------------------------------------- /tests/fixtures/ChannelUpdateChannelResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 101, 3 | "key": "online-store-de", 4 | "type": "marketplace", 5 | "name": "Updated Online Store (Germany)", 6 | "description": "Updated description for the German marketplace orders.", 7 | "shopCountry": { 8 | "id": 5502, 9 | "shopKey": "msde", 10 | "countryCode": "DE", 11 | "defaultLanguageCode": "en_GB", 12 | "supportedLanguageCodes": [], 13 | "priceGroupKey": null, 14 | "url": "www.example.com", 15 | "active": true, 16 | "currencyCode": null, 17 | "deleted": false 18 | }, 19 | "active": true, 20 | "isUsedInOrders": false, 21 | "defaultPaymentMethod": { 22 | "id": 22, 23 | "key": "credit-card" 24 | }, 25 | "configs": { 26 | "emailsEnabled": true, 27 | "invoicesEnabled": true, 28 | "externalPriceOverrideEnabled": false 29 | }, 30 | "createdAt": "2023-05-10T10:00:00+00:00", 31 | "updatedAt": "2023-05-10T10:00:00+00:00" 32 | } -------------------------------------------------------------------------------- /tests/ReturnItemTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\ReturnItem; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class ReturnItemTest extends BaseApiTestCase 22 | { 23 | public function testSend(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('ReturnItemSendRequest.json'); 26 | 27 | $requestEntity = []; 28 | foreach ($expectedRequestJson as $entity) { 29 | $requestEntity[] = new ReturnItem($entity); 30 | } 31 | 32 | $this->api->returnItems->send($requestEntity, []); 33 | 34 | // @phpstan-ignore staticMethod.alreadyNarrowedType 35 | self::assertTrue(true, 'Reached end of test'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/EmailTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\Email; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class EmailTest extends BaseApiTestCase 22 | { 23 | public function testSend(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('EmailSendRequest.json'); 26 | 27 | $requestEntity = new Email($expectedRequestJson); 28 | self::assertJsonStringEqualsJsonString(json_encode($expectedRequestJson), $requestEntity->toJson()); 29 | 30 | $this->api->emails->send('acme', 'acme', $requestEntity, []); 31 | 32 | // @phpstan-ignore staticMethod.alreadyNarrowedType 33 | self::assertTrue(true, 'Reached end of test'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/ShipmentTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\Shipment; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class ShipmentTest extends BaseApiTestCase 22 | { 23 | public function testCreate(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('ShipmentCreateRequest.json'); 26 | 27 | $requestEntity = new Shipment($expectedRequestJson); 28 | self::assertJsonStringEqualsJsonString(json_encode($expectedRequestJson), $requestEntity->toJson()); 29 | 30 | $this->api->shipments->create($requestEntity, []); 31 | 32 | // @phpstan-ignore staticMethod.alreadyNarrowedType 33 | self::assertTrue(true, 'Reached end of test'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/CancellationTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\Cancellation; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class CancellationTest extends BaseApiTestCase 22 | { 23 | public function testSend(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('CancellationSendRequest.json'); 26 | 27 | $requestEntity = new Cancellation($expectedRequestJson); 28 | self::assertJsonStringEqualsJsonString(json_encode($expectedRequestJson), $requestEntity->toJson()); 29 | 30 | $this->api->cancellations->send($requestEntity, []); 31 | 32 | // @phpstan-ignore staticMethod.alreadyNarrowedType 33 | self::assertTrue(true, 'Reached end of test'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/Services/AbstractServiceFactory.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Services; 15 | 16 | use Scayle\Cloud\AdminApi\AbstractApi; 17 | 18 | abstract class AbstractServiceFactory 19 | { 20 | /** @var array */ 21 | protected array $classMap = []; 22 | 23 | /** 24 | * @param array $services 25 | */ 26 | public function __construct(private AbstractApi $client, private array $services = []) {} 27 | 28 | /** 29 | * @phpstan-ignore missingType.return 30 | */ 31 | public function get(string $name) 32 | { 33 | if (!\array_key_exists($name, $this->services)) { 34 | $this->services[$name] = new $this->classMap[$name]($this->client); 35 | } 36 | 37 | return $this->services[$name]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 SCAYLE GmbH / Public 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tests/fixtures/CustomerGetAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-key", 4 | "street": "Street", 5 | "houseNumber": "1", 6 | "additional": "erste Stock", 7 | "zipCode": "123456", 8 | "city": "Hamburg", 9 | "countryCode": "DEU", 10 | "phone": "+49123456789", 11 | "collectionPoint": { 12 | "customerKey": "bced-234-234", 13 | "description": "Kiosk", 14 | "key": "12345-a", 15 | "type": "hermes_parcelshop" 16 | }, 17 | "isDefault": { 18 | "billing": false, 19 | "shipping": true 20 | }, 21 | "recipient": { 22 | "firstName": "John", 23 | "gender": "m", 24 | "lastName": "Doe", 25 | "title": "Prof." 26 | }, 27 | "type": "shipping", 28 | "shopCountry": { 29 | "id": 998, 30 | "shopKey": "msde", 31 | "countryCode": "DE", 32 | "defaultLanguageCode": "en_GB", 33 | "supportedLanguageCodes": [], 34 | "priceGroupKey": null, 35 | "url": "www.example.com", 36 | "active": true, 37 | "currencyCode": null, 38 | "deleted": false 39 | } 40 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerCreateAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-key", 4 | "street": "Street", 5 | "houseNumber": "1", 6 | "additional": "erste Stock", 7 | "zipCode": "123456", 8 | "city": "Hamburg", 9 | "countryCode": "DEU", 10 | "phone": "+49123456789", 11 | "collectionPoint": { 12 | "customerKey": "bced-234-234", 13 | "description": "Kiosk", 14 | "key": "12345-a", 15 | "type": "hermes_parcelshop" 16 | }, 17 | "isDefault": { 18 | "billing": false, 19 | "shipping": true 20 | }, 21 | "recipient": { 22 | "firstName": "John", 23 | "gender": "m", 24 | "lastName": "Doe", 25 | "title": "Prof." 26 | }, 27 | "type": "shipping", 28 | "shopCountry": { 29 | "id": 998, 30 | "shopKey": "msde", 31 | "countryCode": "DE", 32 | "defaultLanguageCode": "en_GB", 33 | "supportedLanguageCodes": [], 34 | "priceGroupKey": null, 35 | "url": "www.example.com", 36 | "active": true, 37 | "currencyCode": null, 38 | "deleted": false 39 | } 40 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateAddressResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-key", 4 | "street": "Street", 5 | "houseNumber": "1", 6 | "additional": "erste Stock", 7 | "zipCode": "123456", 8 | "city": "Hamburg", 9 | "countryCode": "DEU", 10 | "phone": "+49123456789", 11 | "collectionPoint": { 12 | "customerKey": "bced-234-234", 13 | "description": "Kiosk", 14 | "key": "12345-a", 15 | "type": "hermes_parcelshop" 16 | }, 17 | "isDefault": { 18 | "billing": false, 19 | "shipping": true 20 | }, 21 | "recipient": { 22 | "firstName": "John", 23 | "gender": "m", 24 | "lastName": "Doe", 25 | "title": "Prof." 26 | }, 27 | "type": "shipping", 28 | "shopCountry": { 29 | "id": 998, 30 | "shopKey": "msde", 31 | "countryCode": "DE", 32 | "defaultLanguageCode": "en_GB", 33 | "supportedLanguageCodes": [], 34 | "priceGroupKey": null, 35 | "url": "www.example.com", 36 | "active": true, 37 | "currencyCode": null, 38 | "deleted": false 39 | } 40 | } -------------------------------------------------------------------------------- /tests/fixtures/CustomerUpdateAddressReferenceKeyResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "referenceKey": "my-key", 4 | "street": "Street", 5 | "houseNumber": "1", 6 | "additional": "erste Stock", 7 | "zipCode": "123456", 8 | "city": "Hamburg", 9 | "countryCode": "DEU", 10 | "phone": "+49123456789", 11 | "collectionPoint": { 12 | "customerKey": "bced-234-234", 13 | "description": "Kiosk", 14 | "key": "12345-a", 15 | "type": "hermes_parcelshop" 16 | }, 17 | "isDefault": { 18 | "billing": false, 19 | "shipping": true 20 | }, 21 | "recipient": { 22 | "firstName": "John", 23 | "gender": "m", 24 | "lastName": "Doe", 25 | "title": "Prof." 26 | }, 27 | "type": "shipping", 28 | "shopCountry": { 29 | "id": 998, 30 | "shopKey": "msde", 31 | "countryCode": "DE", 32 | "defaultLanguageCode": "en_GB", 33 | "supportedLanguageCodes": [], 34 | "priceGroupKey": null, 35 | "url": "www.example.com", 36 | "active": true, 37 | "currencyCode": null, 38 | "deleted": false 39 | } 40 | } -------------------------------------------------------------------------------- /tests/BulkRequestTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\BulkRequestProgress; 17 | use Scayle\Cloud\AdminApi\Models\BulkRequestStatus; 18 | 19 | /** 20 | * @internal 21 | */ 22 | final class BulkRequestTest extends BaseApiTestCase 23 | { 24 | public function testCancel(): void 25 | { 26 | $responseEntity = $this->api->bulkRequests->cancel(1, []); 27 | 28 | $expectedResponseJson = $this->loadFixture('BulkRequestCancelResponse.json'); 29 | self::assertInstanceOf(BulkRequestStatus::class, $responseEntity); 30 | self::assertJsonStringEqualsJsonString(json_encode($expectedResponseJson), $responseEntity->toJson()); 31 | 32 | $this->assertPropertyHasTheCorrectType($responseEntity, 'progress', BulkRequestProgress::class); 33 | 34 | 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/ProductSellableTimeframeTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\ProductSellableTimeframe; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class ProductSellableTimeframeTest extends BaseApiTestCase 22 | { 23 | public function testBatchProcess(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('ProductSellableTimeframeBatchProcessRequest.json'); 26 | 27 | $requestEntity = []; 28 | foreach ($expectedRequestJson as $entity) { 29 | $requestEntity[] = new ProductSellableTimeframe($entity); 30 | } 31 | 32 | $this->api->productSellableTimeframes->batchProcess($requestEntity, []); 33 | 34 | // @phpstan-ignore staticMethod.alreadyNarrowedType 35 | self::assertTrue(true, 'Reached end of test'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/Models/ErrorResponse.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property array[] $errors 18 | */ 19 | class ErrorResponse extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderDeliverable.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $key 18 | */ 19 | class OrderDeliverable extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/CancellationItem.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $orderItemId 18 | */ 19 | class CancellationItem extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/BulkRequest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $key Bulk request identifier 18 | */ 19 | class BulkRequest extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderItemProductImage.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $hash 18 | */ 19 | class OrderItemProductImage extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderItemVariantStock.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $supplierId 18 | */ 19 | class OrderItemVariantStock extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderSubsequentDelivery.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $key 18 | */ 19 | class OrderSubsequentDelivery extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderVat.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property float $amount 18 | * @property float $rate 19 | */ 20 | class OrderVat extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /tests/ProductsFirstLiveAtTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi; 15 | 16 | use Scayle\Cloud\AdminApi\Models\ProductsFirstLiveAt; 17 | 18 | /** 19 | * @internal 20 | */ 21 | final class ProductsFirstLiveAtTest extends BaseApiTestCase 22 | { 23 | public function testUpdateProductsFirstLiveAt(): void 24 | { 25 | $expectedRequestJson = $this->loadFixture('ProductsFirstLiveAtUpdateProductsFirstLiveAtRequest.json'); 26 | 27 | $requestEntity = new ProductsFirstLiveAt($expectedRequestJson); 28 | self::assertJsonStringEqualsJsonString(json_encode($expectedRequestJson), $requestEntity->toJson()); 29 | 30 | $this->api->productsFirstLiveAts->updateProductsFirstLiveAt($requestEntity, []); 31 | 32 | // @phpstan-ignore staticMethod.alreadyNarrowedType 33 | self::assertTrue(true, 'Reached end of test'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/Models/OrderTaxWithMandatoryVat.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property OrderVat $vat 18 | */ 19 | class OrderTaxWithMandatoryVat extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/PackageGroup.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $id The ID of the package group. 18 | */ 19 | class PackageGroup extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/SubscriptionOrderVoucher.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $code 18 | */ 19 | class SubscriptionOrderVoucher extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderContact.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $type 18 | * @property string $value 19 | */ 20 | class OrderContact extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/OrderTax.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property OrderVat $vat 18 | */ 19 | class OrderTax extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | 'vat' => OrderVat::class, 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /tests/fixtures/ProductImageAllAttributesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [ 3 | { 4 | "name": "size", 5 | "type": "simple", 6 | "value": "M", 7 | "isLocked": false 8 | }, 9 | { 10 | "name": "season", 11 | "type": "simpleList", 12 | "value": [ 13 | "autumn", 14 | "winter" 15 | ], 16 | "isLocked": false 17 | }, 18 | { 19 | "name": "collection", 20 | "type": "localizedString", 21 | "value": { 22 | "de_DE": "einzigartig", 23 | "en_GB": "unique" 24 | }, 25 | "isLocked": false 26 | }, 27 | { 28 | "name": "color", 29 | "type": "localizedStringList", 30 | "value": [ 31 | { 32 | "de_DE": "weiß", 33 | "en_GB": "white" 34 | }, 35 | { 36 | "de_DE": "schwarz", 37 | "en_GB": "black" 38 | } 39 | ], 40 | "isLocked": false 41 | } 42 | ] 43 | } -------------------------------------------------------------------------------- /lib/Models/AssetUrl.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $assetUrl URL of the image, generated by SCAYLE. 18 | */ 19 | class AssetUrl extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/AttributeGroupAttribute.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property array|string $value 18 | */ 19 | class AttributeGroupAttribute extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/PromotionCode.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $code 18 | * @property bool $enabled 19 | */ 20 | class PromotionCode extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/OrderVoucherItem.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property bool $isApplied 18 | * @property string $key 19 | */ 20 | class OrderVoucherItem extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/PromotionCodes.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string[] $promotionCodes List of promotion codes 18 | */ 19 | class PromotionCodes extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/CustomerGroup.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string[] $groups Group to which the customer belongs to 18 | */ 19 | class CustomerGroup extends ApiObject 20 | { 21 | /** @var array */ 22 | protected array $defaultValues = [ 23 | ]; 24 | 25 | /** @var array */ 26 | protected array $classMap = [ 27 | ]; 28 | 29 | /** @var array */ 30 | protected array $collectionClassMap = [ 31 | ]; 32 | 33 | /** 34 | * @var array}> 35 | */ 36 | protected array $polymorphic = [ 37 | ]; 38 | 39 | /** 40 | * @var array}> 41 | */ 42 | protected array $polymorphicCollections = [ 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/Models/OrderPackageTracking.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $id 18 | * @property string $url 19 | */ 20 | class OrderPackageTracking extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/ReservationError.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $errorKey 18 | * @property string $message 19 | */ 20 | class ReservationError extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/VoucherConstraintsOrder.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $max 18 | * @property int $min 19 | */ 20 | class VoucherConstraintsOrder extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/OrderPaymentInstallment.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $amount 18 | * @property string $type 19 | */ 20 | class OrderPaymentInstallment extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/ShipmentOrderItem.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property int $orderItemId 18 | * @property string $returnKey 19 | */ 20 | class ShipmentOrderItem extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/Models/Transaction.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Scayle\Cloud\AdminApi\Models; 15 | 16 | /** 17 | * @property string $transactionId 18 | * @property string $operationStatus 19 | */ 20 | class Transaction extends ApiObject 21 | { 22 | /** @var array */ 23 | protected array $defaultValues = [ 24 | ]; 25 | 26 | /** @var array */ 27 | protected array $classMap = [ 28 | ]; 29 | 30 | /** @var array */ 31 | protected array $collectionClassMap = [ 32 | ]; 33 | 34 | /** 35 | * @var array}> 36 | */ 37 | protected array $polymorphic = [ 38 | ]; 39 | 40 | /** 41 | * @var array}> 42 | */ 43 | protected array $polymorphicCollections = [ 44 | ]; 45 | } 46 | --------------------------------------------------------------------------------