Skip to content

Commit

Permalink
Update Catalog fields (#8)
Browse files Browse the repository at this point in the history
* Remove catalog slug
* Add catalog type
  • Loading branch information
iavorJ authored Jun 3, 2020
1 parent 466c681 commit 90d7f4d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @copyright 2013-present Meplato GmbH.
* @author Meplato API Team <[email protected]>
* @version 2.1.8
* @version 2.1.9
* @license Copyright (c) 2015-2020 Meplato GmbH. All rights reserved.
* @link https://developer.meplato.com/store2/#terms Terms of Service
* @link https://developer.meplato.com/store2/ External documentation
Expand All @@ -26,7 +26,7 @@ class Service
/** @@var string API title */
const TITLE = "Meplato Store API";
/** @@var string API version */
const VERSION = "2.1.8";
const VERSION = "2.1.9";
/** @@var string Base URL of the service, including the path */
const BASE_URL = "https://store.meplato.com/api/v2";
/** @@var string User Agent string that will be sent to the server */
Expand Down
10 changes: 4 additions & 6 deletions src/catalogs/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @copyright 2013-present Meplato GmbH.
* @author Meplato API Team <[email protected]>
* @version 2.1.8
* @version 2.1.9
* @license Copyright (c) 2015-2020 Meplato GmbH. All rights reserved.
* @link https://developer.meplato.com/store2/#terms Terms of Service
* @link https://developer.meplato.com/store2/ External documentation
Expand All @@ -28,7 +28,7 @@ class Service
/** @@var string API title */
const TITLE = "Meplato Store API";
/** @@var string API version */
const VERSION = "2.1.8";
const VERSION = "2.1.9";
/** @@var string Base URL of the service, including the path */
const BASE_URL = "https://store.meplato.com/api/v2";
/** @@var string User Agent string that will be sent to the server */
Expand Down Expand Up @@ -187,7 +187,6 @@ function catalog($catalog)
* - sageContract (string): SageContract represents the internal identifier at Meplato for the contract of this catalog.
* - sageNumber (string): SageNumber represents the internal identifier at Meplato for the merchant of this catalog.
* - selfLink (string): URL to this page.
* - slug (string): Slug of the catalog.
* - state (string): State describes the current state of the catalog, e.g. idle.
* - supportsOciBackgroundsearch (boolean): SupportsOciBackgroundsearch indicates whether a catalog supports the OCI BACKGROUNDSEARCH transaction.
* - supportsOciDetail (boolean): SupportsOciDetail indicates whether a catalog supports the OCI DETAIL transaction.
Expand All @@ -197,7 +196,7 @@ function catalog($catalog)
* - supportsOciSourcing (boolean): SupportsOciSourcing indicates whether a catalog supports the OCI SOURCING transaction.
* - supportsOciValidate (boolean): SupportsOciValidate indicates whether a catalog supports the OCI VALIDATE transaction.
* - target (string): Target represents the target system which can be either an empty string, "catscout" or "mall".
* - type (string): Type of catalog, e.g. corporate or basic.
* - type (string): Type represents a catalog type which can be either "CC" 1:1 Corporate or "MB" Meplato Business 1 Creditor.
* - updated (array): Updated is the last modification date and time of the catalog.
* - validFrom (array): ValidFrom is the date the catalog becomes effective (YYYY-MM-DD).
* - validUntil (array): ValidUntil is the date the catalog expires (YYYY-MM-DD).
Expand Down Expand Up @@ -311,7 +310,6 @@ function pin($pin)
* - sageContract (string): SageContract represents the internal identifier at Meplato for the contract of this catalog.
* - sageNumber (string): SageNumber represents the internal identifier at Meplato for the merchant of this catalog.
* - selfLink (string): URL to this page.
* - slug (string): Slug of the catalog.
* - state (string): State describes the current state of the catalog, e.g. idle.
* - supportsOciBackgroundsearch (boolean): SupportsOciBackgroundsearch indicates whether a catalog supports the OCI BACKGROUNDSEARCH transaction.
* - supportsOciDetail (boolean): SupportsOciDetail indicates whether a catalog supports the OCI DETAIL transaction.
Expand All @@ -321,7 +319,7 @@ function pin($pin)
* - supportsOciSourcing (boolean): SupportsOciSourcing indicates whether a catalog supports the OCI SOURCING transaction.
* - supportsOciValidate (boolean): SupportsOciValidate indicates whether a catalog supports the OCI VALIDATE transaction.
* - target (string): Target represents the target system which can be either an empty string, "catscout" or "mall".
* - type (string): Type of catalog, e.g. corporate or basic.
* - type (string): Type represents a catalog type which can be either "CC" 1:1 Corporate or "MB" Meplato Business 1 Creditor.
* - updated (array): Updated is the last modification date and time of the catalog.
* - validFrom (array): ValidFrom is the date the catalog becomes effective (YYYY-MM-DD).
* - validUntil (array): ValidUntil is the date the catalog expires (YYYY-MM-DD).
Expand Down
4 changes: 2 additions & 2 deletions src/jobs/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @copyright 2013-present Meplato GmbH.
* @author Meplato API Team <[email protected]>
* @version 2.1.8
* @version 2.1.9
* @license Copyright (c) 2015-2020 Meplato GmbH. All rights reserved.
* @link https://developer.meplato.com/store2/#terms Terms of Service
* @link https://developer.meplato.com/store2/ External documentation
Expand All @@ -28,7 +28,7 @@ class Service
/** @@var string API title */
const TITLE = "Meplato Store API";
/** @@var string API version */
const VERSION = "2.1.8";
const VERSION = "2.1.9";
/** @@var string Base URL of the service, including the path */
const BASE_URL = "https://store.meplato.com/api/v2";
/** @@var string User Agent string that will be sent to the server */
Expand Down
4 changes: 2 additions & 2 deletions src/products/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @copyright 2013-present Meplato GmbH.
* @author Meplato API Team <[email protected]>
* @version 2.1.8
* @version 2.1.9
* @license Copyright (c) 2015-2020 Meplato GmbH. All rights reserved.
* @link https://developer.meplato.com/store2/#terms Terms of Service
* @link https://developer.meplato.com/store2/ External documentation
Expand All @@ -28,7 +28,7 @@ class Service
/** @@var string API title */
const TITLE = "Meplato Store API";
/** @@var string API version */
const VERSION = "2.1.8";
const VERSION = "2.1.9";
/** @@var string Base URL of the service, including the path */
const BASE_URL = "https://store.meplato.com/api/v2";
/** @@var string User Agent string that will be sent to the server */
Expand Down
2 changes: 2 additions & 0 deletions tests/catalogs/CreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function testSuccess()
'currency' => 'EUR',
'language' => 'de',
'target' => 'mall',
'type' => 'CC',
'sageNumber' => '',
'sageContract' => ''
];
Expand All @@ -49,6 +50,7 @@ public function testSuccess()
$this->assertArrayHasKey('kind', $response);
$this->assertEquals('store#catalog', $response['kind']);
$this->assertEquals('48F31F33AD', $response['pin']);
$this->assertEquals('CC', $response['type']);
$this->assertEquals(81, $response['id']);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/mock/responses/catalogs.create.success
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block
Date: Wed, 01 Apr 2015 13:53:54 GMT

{"kind":"store#catalog","selfLink":"https://store3.go/api/v2/catalogs/48F31F33AD","id":81,"type":"corporate","merchantId":1,"merchantMpcc":"meplato","merchantMpsc":"meplato-sc","merchantName":"Meplato GmbH","projectId":1,"projectMpcc":"meplato","projectMpbc":"meplato","projectName":"Meplato","project":{"id":1,"type":"corporate","mpcc":"meplato","mpbc":"meplato","name":"Meplato","profile":{"nameExists":{"policy":1},"categoriesExists":{"policy":1},"eclassesValid":{"policy":0,"version":"5.1"},"orderUnitValues":{"policy":0},"contentUnitValues":{"policy":0}},"customization":{"hooks":[{"kind":"publish_initial","via":"smtp","target":"[email protected]"}]},"script":"","visible":true,"country":"DE","language":"de","locale":"de_DE","timeZone":"Europe/Berlin","currency":"EUR","ou":"PCE","catalogPriceInitial":0,"catalogPriceRecurring":0,"catalogPriceCurrency":"EUR","catalogPriceInterval":"yearly","target":"mall","companyGroup":"","created":"2017-10-09T14:29:35Z","updated":"2020-01-02T08:47:32Z"},"slug":"test2","name":"test2","pin":"48F31F33AD","validFrom":"2020-03-13","validUntil":"2099-12-31","currency":"EUR","country":"DE","language":"de","state":"idle","created":"2020-03-13T15:39:52.004116159Z","updated":"2020-03-13T15:39:52.004116159Z","lockedForDownload":false,"supportsOciDetail":false,"supportsOciDetailadd":false,"supportsOciValidate":false,"supportsOciSourcing":false,"supportsOciBackgroundsearch":false,"supportsOciQuantitycheck":false,"supportsOciDownloadjson":false,"keepOriginalBlobs":false,"target":"","showImportFailure":false}
{"kind":"store#catalog","selfLink":"https://store3.go/api/v2/catalogs/48F31F33AD","id":81,"type":"CC","merchantId":1,"merchantMpcc":"meplato","merchantMpsc":"meplato-sc","merchantName":"Meplato GmbH","projectId":1,"projectMpcc":"meplato","projectMpbc":"meplato","projectName":"Meplato","project":{"id":1,"mpcc":"meplato","mpbc":"meplato","name":"Meplato","profile":{"nameExists":{"policy":1},"categoriesExists":{"policy":1},"eclassesValid":{"policy":0,"version":"5.1"},"orderUnitValues":{"policy":0},"contentUnitValues":{"policy":0}},"customization":{"hooks":[{"kind":"publish_initial","via":"smtp","target":"[email protected]"}]},"script":"","visible":true,"country":"DE","language":"de","locale":"de_DE","timeZone":"Europe/Berlin","currency":"EUR","ou":"PCE","catalogPriceInitial":0,"catalogPriceRecurring":0,"catalogPriceCurrency":"EUR","catalogPriceInterval":"yearly","target":"mall","companyGroup":"","created":"2017-10-09T14:29:35Z","updated":"2020-01-02T08:47:32Z"},"name":"test2","pin":"48F31F33AD","validFrom":"2020-03-13","validUntil":"2099-12-31","currency":"EUR","country":"DE","language":"de","state":"idle","created":"2020-03-13T15:39:52.004116159Z","updated":"2020-03-13T15:39:52.004116159Z","lockedForDownload":false,"supportsOciDetail":false,"supportsOciDetailadd":false,"supportsOciValidate":false,"supportsOciSourcing":false,"supportsOciBackgroundsearch":false,"supportsOciQuantitycheck":false,"supportsOciDownloadjson":false,"keepOriginalBlobs":false,"target":"","showImportFailure":false}
1 change: 0 additions & 1 deletion tests/mock/responses/catalogs.get.success
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Date: Tue, 31 Mar 2015 14:18:15 GMT
"merchantName": "ABC Elektronik",
"projectId": 2,
"projectName": "BigBuy",
"slug": "ersatzteile",
"name": "Ersatzteile",
"pin": "5094310527",
"validFrom": "2015-03-26",
Expand Down
2 changes: 0 additions & 2 deletions tests/mock/responses/catalogs.search.success
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Date: Tue, 31 Mar 2015 14:30:43 GMT
"merchantName": "ABC Elektronik",
"projectId": 1,
"projectName": "Testprojekt",
"slug": "demo-katalog",
"name": "Demo-Katalog",
"description": "Ein mittelgroßer Demokatalog.",
"pin": "AD8CCDD5F9",
Expand All @@ -44,7 +43,6 @@ Date: Tue, 31 Mar 2015 14:30:43 GMT
"merchantName": "ABC Elektronik",
"projectId": 2,
"projectName": "BigBuy",
"slug": "ersatzteile",
"name": "Ersatzteile",
"pin": "5094310527",
"validFrom": "2015-03-26",
Expand Down

0 comments on commit 90d7f4d

Please sign in to comment.