Credentials

Contracts

CredentialsRepositoryContract

The contract for the fitment repository.

Namespace

Plenty\Modules\Market\Credentials\Contracts

Methods

public get(int $id):Credentials

Get credentials

Parameters
int $id The ID of the credentials.
public create(array $data):Credentials

Create credentials

Parameters
array $data The credentials data. The properties that are required to update credentials can be found in the credentials model.
public update(int $id, array $data):Credentials

Update credentials

Parameters
int $id The ID of the credentials.
array $data The credentials data. The properties that are required to update credentials can be found in the credentials model.
public delete(int $id):DeleteResponse

Delete credentials

Parameters
int $id The ID of the credentials.
public all(array $filters = []):array

List all credentials

Parameters
array $filters Credentials can be filtered by ID, market, status, environment.
public search(array $filters = [], int $page, int $itemsPerPage = \Plenty\Modules\Market\Credentials\Models\Credentials::MAX_ITEMS_PER_PAGE):PaginatedResult

List credentials

Parameters
array $filters Credentials can be filtered by ID, market, status, environment.
int $page Current page of the response.
int $itemsPerPage The requested amount of credentials per result page.
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

Models

Credentials

The credentials model

Namespace

Plenty\Modules\Market\Credentials\Models

Properties

Type Name Description
int id The ID of the credentials.
string environment The environment for the credentials. Possible values: sandbox, production
string status The status of the credentials. Possible values: active, inactive, pending
array data The data of the credentials.
string market The market for the current credentials.
createdAt The date that the credentials was created.
updatedAt The date that the credentials was updated last.

Methods

public toArray()

Returns this model as an array.

AccountPolicy

Contracts

FulfillmentPolicyRepositoryContract

The contract for the eBay fulfillment policy repository.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Contracts

Methods

public get(string $id, array $filters = []):FulfillmentPolicy

Get a stored fulfillment policy based on ID.

Parameters
string $id The ID of the policy that we want to get
array $filters A list of filters that are needed to get the corresponding policy. Available: `marketplaceId´, `credentialsId´.

PaymentPolicyRepositoryContract

The contract for the eBay payment policy repository.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Contracts

Methods

public get(string $id, array $filters = []):PaymentPolicy

Get a stored payment policy based on ID.

Parameters
string $id The ID of the payment policy.
array $filters A list of filters that are needed to get the corresponding policy. Available: `marketplaceId´, `credentialsId´.

ReturnPolicyRepositoryContract

The contract for the eBay return policy repository.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Contracts

Methods

public get(string $id, array $filters = []):ReturnPolicy

Get a stored return policy based on ID.

Parameters
string $id The ID of the policy that we want to get
array $filters A list of filters that are needed to get the corresponding policy. Available: `marketplaceId´, `credentialsId´.

Events

FulfillmentPolicyCreated

An event class fired after a new fulfillment policy is created.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(FulfillmentPolicy
 $fulfillmentPolicy):void
Parameters
FulfillmentPolicy $fulfillmentPolicy
public getFulfillmentPolicy():FulfillmentPolicy

Get the FulfillmentPolicy instance.

FulfillmentPolicyDeleted

An event class fired after a new fulfillment policy is deleted.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(FulfillmentPolicy
 $fulfillmentPolicy):void
Parameters
FulfillmentPolicy $fulfillmentPolicy
public getFulfillmentPolicy():FulfillmentPolicy

Get the FulfillmentPolicy instance.

FulfillmentPolicyEvent

A base event class for all fulfillment policy events. Each fulfillment policy events expects an FulfillmentPolicy model.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(FulfillmentPolicy
 $fulfillmentPolicy):void
Parameters
FulfillmentPolicy $fulfillmentPolicy
public getFulfillmentPolicy():FulfillmentPolicy

Get the FulfillmentPolicy instance.

FulfillmentPolicyUpdated

An event class fired after a new fulfillment policy is updated.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(FulfillmentPolicy
 $fulfillmentPolicy):void
Parameters
FulfillmentPolicy $fulfillmentPolicy
public getFulfillmentPolicy():FulfillmentPolicy

Get the FulfillmentPolicy instance.

PaymentPolicyCreated

An event class fired after a new payment policy is created.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(PaymentPolicy
 $paymentPolicy):void
Parameters
PaymentPolicy $paymentPolicy
public getPaymentPolicy():PaymentPolicy

Get the PaymentPolicy instance.

PaymentPolicyDeleted

An event class fired after a new payment policy is deleted.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(PaymentPolicy
 $paymentPolicy):void
Parameters
PaymentPolicy $paymentPolicy
public getPaymentPolicy():PaymentPolicy

Get the PaymentPolicy instance.

PaymentPolicyEvent

A base event class for all payment policy events. Each payment policy events expects an PaymentPolicy model.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(PaymentPolicy
 $paymentPolicy):void
Parameters
PaymentPolicy $paymentPolicy
public getPaymentPolicy():PaymentPolicy

Get the PaymentPolicy instance.

PaymentPolicyUpdated

An event class fired after a new payment policy is updated.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(PaymentPolicy
 $paymentPolicy):void
Parameters
PaymentPolicy $paymentPolicy
public getPaymentPolicy():PaymentPolicy

Get the PaymentPolicy instance.

ReturnPolicyCreated

An event class fired after a new return policy is created.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(ReturnPolicy
 $returnPolicy):void
Parameters
ReturnPolicy $returnPolicy
public getReturnPolicy():ReturnPolicy

Get the ReturnPolicy instance.

ReturnPolicyDeleted

An event class fired after a new return policy is deleted.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(ReturnPolicy
 $returnPolicy):void
Parameters
ReturnPolicy $returnPolicy
public getReturnPolicy():ReturnPolicy

Get the ReturnPolicy instance.

ReturnPolicyEvent

A base event class for all return policy events. Each return policy events expects an ReturnPolicy model.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(ReturnPolicy
 $returnPolicy):void
Parameters
ReturnPolicy $returnPolicy
public getReturnPolicy():ReturnPolicy

Get the ReturnPolicy instance.

ReturnPolicyUpdated

An event class fired after a new return policy is updated.

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Events

Methods

public __construct(ReturnPolicy
 $returnPolicy):void
Parameters
ReturnPolicy $returnPolicy
public getReturnPolicy():ReturnPolicy

Get the ReturnPolicy instance.

Models

AmountType

The eBay amount type model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string currency The base currency applied to the value field to establish a monetary amount. The currency is represented as a 3-letter ISO4217 currency code. For example, the code for the Canadian Dollar is CAD.
float value The value of the monetary amount in the specified currency.

Methods

public toArray()

Returns this model as an array.

CategoryType

The eBay category type model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
bool default If this value is set to true, it indicates that this policy is the default policy for the associated categoryTypes.name and marketplaceId pair
string name The category type to which the policy applies (motor vehicles or non-motor vehicles). Available values: `MOTORS_VEHICLES`, `ALL_EXCLUDING_MOTORS_VEHICLES`

Methods

public toArray()

Returns this model as an array.

Deposit

The eBay deposit model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
AmountType amount Deposits are used only with Motors listings and the amount value indicates the initial deposit that a buyer must make to purchase a motor vehicle. Deposits on motor vehicles can only be paid using PayPal, so if you specify a deposit amount, then you must also set the paymetMethodType value to 'PayPal'.
TimeDuration dueIn Indicates the number of hours the buyer has (after they commit to buy) to make an initial deposit to the seller as a down payment on a motor vehicle.
PaymentMethod paymentMethods A list of accepted payment methods. For deposits (which are applicable to only motor listings), the paymentMethodType must be set to 'PayPal'

Methods

public toArray()

Returns this model as an array.

FulfillmentPolicy

The eBay fulfillment policy model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string fulfillmentPolicyId The ID of the fulfillment policy.
array categoryTypes The CategoryTypeEnum value to which this policy applies. Used to discern accounts that sell motor vehicles from those that don't. (Currently, each policy can be set to only one categoryTypes value at a time.)
string description An optional seller-defined description of the fulfillment policy.
bool freightShipping Set this value to true to indicate the seller offers freight shipping.
bool globalShipping If this value is set to true, it indicates the seller has opted-in to the eBay Global Shipping Program and that they use that service for thier internation shipments.
TimeDuration handlingTime Specifies the maximum number of business days the seller commits to for preparing and shipping an order after receiving a cleared payment for the order.
bool localPickup If this value is set to true, it indicates the seller offers local pickup of their items.
string marketplaceId The ID of the eBay marketplace to which this fulfillment policy applies. If this value is not specified, value defaults to the seller's eBay registration site.
string name A user-defined name for this fulfillment policy. Names must be unique for policies assigned to the same marketplace.
bool pickupDropOff If this value is set to true, it indicates the seller offers the "Click and Collect" feature.
array shippingOptions A list that defines the seller's shipping configurations for DOMESTIC and INTERNATIONAL order shipments.
RegionSet shipToLocations This object contains the regionIncluded and regionExcluded fields, which indicate the areas to where the seller does and dosen't ship.

Methods

public toArray()

Returns this model as an array.

PaymentMethod

The eBay payment method model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
array brands A list of credit card brands accepted by the seller. This field is required if the paymentMethodType is set to CREDIT_CARD.
string paymentMethodType The payment method, selected from the supported payment method types..
RecipientAccountReference recipientAccountReference Information that is used to identify the recipient's account to which electronic funds are sent. This field is required if the payment method is set to PAYPAL, and the field must contain the email address associated with the PayPal account selected by the seller.

Methods

public toArray()

Returns this model as an array.

PaymentPolicy

The eBay payment policy model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string paymentPolicyId The ID of the payment policy.
array categoryTypes The CategoryTypeEnum value to which this policy applies. The category type discerns whether the policy covers the sale of motor vehicles (via eBay Motors), or the sale of everything except motor vehicles.
Deposit deposit A container that describes the details of a deposit. Used only with motor listings.
string description An optional seller-defined description of the payment policy. (Max length: 250)
TimeDuration fullPaymentDueIn Indicates the number of days that a buyer has to make their full payment to the seller, and close the remaining balance on a motor vehicle transaction. The period starts when the buyer commits to buy.
bool immediatePay Indicate if the payment is due upon receipt or not. (eBay generates a receipt when the buyer agrees to purchase an item)
string marketplaceId The ID of the eBay marketplace to which this return policy applies. If this value is not specified, value defaults to the seller's eBay registration site.
string name A user-defined name for this payment policy. Names must be unique for policies assigned to the same marketplace. (Max length: 64)
string paymentInstructions Allows the seller to give payment instructions to the buyer. These instructions appear on the eBay View Item and Checkout pages.
PaymentMethod paymentMethods A list of the payment methods accepted by the seller. Each payment policy must specify at least one payment method.

Methods

public toArray()

Returns this model as an array.

RecipientAccountReference

The eBay recipient account reference model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string referenceId The recipient's reference.
string referenceType The reference type of a recipient's account.

Methods

public toArray()

Returns this model as an array.

Region

The eBay region model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string regionName A string that indicates the name of a region, as defined by eBay. A "region" can be either a 'world region' (e.g., the "Middle East" or "Southeast Asia") or a country, as represented with a two-letter country code.
string regionType Available values: `COUNTRY`, `COUNTRY_REGION`, `STATE_OR_PROVINCE`, `WORLD_REGION`, `WORLDWIDE`.

Methods

public toArray()

Returns this model as an array.

RegionSet

The eBay region set model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
array regionExcluded A list of one or more regionsName fields that specify the areas to where a seller does not ship. Populate regionExcluded in only the top-level shipToLocations container.
array regionIncluded A list of one or more regionsName fields that specify the areas to where a seller ships.

Methods

public toArray()

Returns this model as an array.

ReturnPolicy

The eBay return policy model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string returnPolicyId The ID of the return policy.
array categoryTypes For return policies, this field can be set to only `ALL_EXCLUDING_MOTORS_VEHICLES (returns on motor vehicles are not processed through eBay flows.)
string description An optional seller-defined description of the return policy.
bool extendedHolidayReturnsOffered If this value is set to true, it indicates the seller offers an Extended Holiday Returns policy for their listings.
string marketplaceId The ID of the eBay marketplace to which this return policy applies. If this value is not specified, value defaults to the seller's eBay registration site.
string name A user-defined name for this fulfillment policy. Names must be unique for policies assigned to the same marketplace.
string refundMethod Indicates the method the seller uses to compensate the buyer for returned items. The return method specified applies only to remorse returns. Available options: `MERCHANDISE_CREDIT`, `MONEY_BACK`.
string restockingFeePercentage Sellers who accept returns should include this field if they charge buyers a restocking fee when items are returned.
string returnInstruction This optional free-form string field lets the seller provide a detailed explanation of the return policy.
string returnMethod This field indicates the method in which the seller handles non-money back return requests for remorse returns. Sellers can specify they either exchange or replace items. Available options: `EXCHANGE`, `REPLACEMENT`.
TimeDuration returnPeriod This value indicates the length of time the seller accepts returns, the duration of which starts when the buyer receives the item.
bool returnsAccepted Set this value to true to indicate the seller accepts returns.
string returnShippingCostPayer The seller uses this value to specify whether the buyer or the seller is responsible for paying return shipping charges. The field can be set to either `BUYER` or `SELLER`.

Methods

public toArray()

Returns this model as an array.

ShippingOption

The eBay shipping option model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string costType Defines whether the shipping cost is `FLAT_RATE`, `CALCULATED`, or `NOT_SPECIFIED` (for use with freight shipping and local pickup)
AmountType insuranceFee Sellers can offer international shipping insurance only when they ship to AU, FR, or IT. This value indicates the cost the buyer must pay to purchase shipping insurance for the items being shipped.
bool insuranceOffered When set to true, it indicates the seller offers shipping insurance.
string optionType Use this field to set the ShippingOption element to either `DOMESTIC` or `INTERNATIONAL`
AmountType packageHandlingCost A fee a seller can add to cover package and handling costs. This fee is in addition to the amount of the selected shipping service and this fee is included in the final shipping service costs in the output.
string rateTableId A unique eBay-assigned ID associated with a user-created shipping rate table.
array shippingServices Contains a list of shipping services offered for either `DOMESTIC` or `INTERNATIONAL` shipments.

Methods

public toArray()

Returns this model as an array.

ShippingService

The eBay shipping service model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
AmountType additionalShippingCost The cost of shipping each additional item if the same buyer purchases a multiple quantity of the same line item. This field is applicable for policies that cover multiple-quantity, fixed-price listings and is not applicable for policies that apply to single-quantity listings.
bool buyerResponsibleForPickup This field is only applicable to vehicle categories on eBay Motors (US and Canada). If set to true, the buyer is responsible for picking up the vehicle. Otherwise, the seller should specify the vehicle pickup arrangements in the item description.
bool buyerResponsibleForShipping This field is applicable for only items listed in vehicle categories on eBay Motors (US and Canada). If set to true, the buyer is responsible for the shipment of the vehicle. Otherwise, the seller should specify the vehicle shipping arrangements in the item description.
AmountType cashOnDeliveryFee The value indicates the Cash on Delivery (COD) fee that the seller charges if the buyer uses the CASH_ON_DELIVERY payment method.
bool freeShipping The seller can set this flag to true if they want to offer free shipping to the buyer. This field can only be included and set to 'true' for the first domestic shipping service option specified in the shippingServices container
string shippingCarrierCode The shipping carrier, such as 'USPS', 'FedEx', 'UPS', and so on.
AmountType shippingCost For shipping options that use a FLAT_RATE cost type, the amount is the shipping cost for the selected shipping carrier and service. The amount supplied must exclude any additional shipping charges (such as the seller's handling charges or insurance).
string shippingServiceCode The shipping service that the shipping carrier uses to ship an item. For example, an overnight, two-day delivery, or other type of service.
RegionSet shipToLocations This object contains the regionIncluded and regionExcluded fields that define the list of geographical regions that the seller ships to and the list of regions where they do not ship.
int sortOrder This integer value controls the order that this shipping service option appears in the View Item and Checkout pages, as related to the other specified shipping service options.
AmountType surcharge A fee that can be charged to US buyers when they have an item shipped via UPS or FedEx to Alaska, Hawaii or Puerto Rico.

Methods

public toArray()

Returns this model as an array.

TimeDuration

The eBay time duration model

Namespace

Plenty\Modules\Market\Ebay\AccountPolicy\Models

Properties

Type Name Description
string unit A time-measurement unit used to specify a period of time. Available values: `MONTH`, `DAY`, `HOUR`, `CALENDAR_DAY`, `BUSINESS_DAY`, `MINUTE`, `SECOND`, `MILLISECOND`
string value An amount of time, as measured by the time-measurement units specified in the unit field.

Methods

public toArray()

Returns this model as an array.

Api

Exceptions

InvalidEndPointException

InvalidEndPointException.

Namespace

Plenty\Modules\Market\Ebay\Api\Exceptions

Methods

public getMessage():void
public getCode():void
public getFile():void
public getLine():void
public getTrace():void
public getPrevious():void
public getTraceAsString():void

InvalidPropertyTypeException

InvalidPropertyTypeException.

Namespace

Plenty\Modules\Market\Ebay\Api\Exceptions

Methods

public getMessage():void
public getCode():void
public getFile():void
public getLine():void
public getTrace():void
public getPrevious():void
public getTraceAsString():void

UnknownPropertyException

InvalidPropertyTypeException.

Namespace

Plenty\Modules\Market\Ebay\Api\Exceptions

Methods

public getMessage():void
public getCode():void
public getFile():void
public getLine():void
public getTrace():void
public getPrevious():void
public getTraceAsString():void

Services

BaseRestService

The service for making eBay REST calls.

Namespace

Plenty\Modules\Market\Ebay\Api\Services

Methods

public __construct(array $config):void
Parameters
array $config Configuration option values.
public static getConfigDefinitions():array

Returns definitions for each configuration option that is supported.

public getConfig(string $option = null, $default = null):void

Method to get the service's configuration.

Parameters
string $option The name of the option whos value will be returned.
$default
public callOperation(string $name, BaseType
 $request = null):BaseType

Build API request and send.

Parameters
string $name The name of the operation.
BaseType $request Request object containing the request information.
public getEbayHeaders():array

Derived classes must implement this method that will build the needed eBay http headers.

Types

Base64BinaryType

The service for eBay Base64BinaryType.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

BaseType

The service for base type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Can pass an associative array that will set the objects properties.
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values

BooleanType

The service for boolean type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

DecimalType

The service for decimal type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

DoubleType

The service for double type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

IntegerType

The service for integer type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

RepeatableType

The service for repeatable type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Methods

public __construct(string $class, string $property, string $expectedType):void
Parameters
string $class The name of the class that the property is a member of.
string $property The name of the property that acts like an array.
string $expectedType The type that values assigned to the array should be.
public offsetExists(int $offset):bool

Determines if the offset exists in the array.

Parameters
int $offset The array index to check.
public offsetGet(int $offset):void

Returns the value of the given offset.

Parameters
int $offset The array index.
public offsetSet($offset, $value):void

Sets a value for the given offset.

Parameters
$offset The array index or null to add the value to the end of the array.
$value The value to add.
public offsetUnset(int $offset):void

Unsets the value of the given offset.

Parameters
int $offset The array index.
public count():int
public current():void
public key():int
public next():void

Move onto the next array index.

public rewind():void

Reset the array index to the start of the array.

public valid():bool

StringType

The service for string type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

TokenType

The service for token type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

URIType

The service for uri type.

Namespace

Plenty\Modules\Market\Ebay\Api\Types

Properties

Type Name Description
properties
xmlNamespaces
requestXmlRootElementNames

Methods

public __construct(array $values = []):void
Parameters
array $values Optional properties and values to assign to the object.
public static getParentValues(array $properties, array $values):array

Helper function to remove the properties and values that belong to a object's parent.

Parameters
array $properties
array $values
public __get(string $name):void

PHP magic function that is called when getting a property.

Parameters
string $name The property name.
public __set(string $name, $value):void

PHP magic function that is called when setting a property.

Parameters
string $name The property name.
$value Value assigned to the property.
public __isset(string $name):bool

PHP magic function that is called to determine if a property is set.

Parameters
string $name The property name.
public __unset(string $name):void

PHP magic function that is called to unset a property.

Parameters
string $name The property name.
public toRequestXml():string

Converts the object to a XML request string.

public elementMeta(string $elementName):void

Returns the meta data for a property.

Parameters
string $elementName The element name.
public attachment($data = null, string $mimeType = "application/octet-stream"):void

Method to get or set the object's attachment. Overrides any existing attachment is setting.

Parameters
$data If a string it is assumed to be the contents of the attachment. If an array copy its values across.
string $mimeType The MIME type of the attachment that will be used in the request. Defaults to application/octet-stream.
public hasAttachment():bool

Helper method to check if an object has an attachment.

public toArray():array

Helper method that returns an associative array of the object's properties and values.

public search(string $expression):void

Assign multiple values to an object.

Parameters
string $expression A valid JMESPath expression
public setValues(string $class, array $values = []):void

Assign multiple values to an object.

Parameters
string $class The name of the class the properties belong to.
array $values Associative array of property names and their values.

Category

Contracts

CategoryRepositoryContract

The contract for the Ebay category repository.

Namespace

Plenty\Modules\Market\Ebay\Category\Contracts

Methods

public get(int $id, array $filters = [], array $with = []):Category

Get category

Parameters
int $id The ID of the category.
array $filters The filters that could be applied: 'marketplaceId'.
array $with The relations that should be loaded: 'path'
public all(array $filters = [], array $with = []):array

List all categories

Parameters
array $filters Categories can be filtered by ID and marketplace ID. The filters that could be applied: 'marketplaceId', 'categoryId'.
array $with The relations that should be loaded: 'path'

Models

Category

The category model

Namespace

Plenty\Modules\Market\Ebay\Category\Models

Properties

Type Name Description
int id The ID of the category.
int parentId The parent category ID.
string name The name of the category.
bool isLeaf Tells if the category is leaf.
array children Child categories.
array path The category path.

Methods

public toArray()

Returns this model as an array.

ItemSpecific

Contracts

ItemSpecificRepositoryContract

The contract for the Ebay category repository.

Namespace

Plenty\Modules\Market\Ebay\ItemSpecific\Contracts

Methods

public all(array $filters = []):array

List item specifics.

Parameters
array $filters The filters that could be applied: 'categoryId', 'marketplaceId'.

Models

ItemSpecific

The eBay item specific model.

Namespace

Plenty\Modules\Market\Ebay\ItemSpecific\Models

Properties

Type Name Description
string name A recommended Item Specific name.
int minValues Minimum number of values that you can specify for this Item Specific.
int maxValues Maximum number of values that you can specify for this Item Specific.
string selectionMode Controls whether you can specify your own name and value in listing requests, or if you need to use a name and/or value that eBay has defined.
string valueType The data type (e.g., date) that eBay expects the value to adhere to in listing requests. Only returned if the data type is not Text. In some cases, more details about the data type are returned in the `valueFormat` field.
string valueFormat The format of the data type (e.g., date format) that eBay expects the item specific's value to adhere to in listing requests. A data type identified by the `valueType` field may have different representations, and `valueFormat` specifies the precise format that is required.
string helpText Help-text defines the purpose of the Item Specific. The help text will be shown only when it is available for the particular Item Specific.
string helpUrl A page on the eBay Web site with context-specific help tips that provide useful information about this Item Specific. Only returned when an applicable page is available in the system.
string variationPicture Indicates whether the name (e.g., Color) can (or must) be used to classify the variation pictures
string variationSpecifics Indicates whether the recommended name/value pair can be used as variation attributes in a fixed-price listing call. For example, a given category could disable a name like Brand in variation specifics (if Brand is only allowed in the item specifics at the Item level). The same category could enable a name like Size for variation specifics (in addition to recommending it for item specifics). If not returned, then the name/value can be used for both variation specifics and item specifics.
array values The available values.

Methods

public toArray()

Returns this model as an array.

Marketplace

Contracts

MarketplaceRepositoryContract

The contract for the Ebay marketplace repository.

Namespace

Plenty\Modules\Market\Ebay\Marketplace\Contracts

Methods

public all(array $filters = []):array

Get the list of all available eBay marketplaces.

Parameters
array $filters You can pass multiple filters to search only custom marketplaces. Available filters: `referrerId`, `marketplaceId`, `marketId`, `siteId`.

Helpers

MarketplaceHelper

Helper class that allows getting information about an eBay marketplace more easily.

Namespace

Plenty\Modules\Market\Ebay\Marketplace\Helpers

Methods

public get(array $filters):Marketplace

Get marketplace data model based on filters.

Parameters
array $filters
public getMarketplaceId(array $filters):string

Get the marketplace ID based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters
public getMarketplaceIds():array

Get all available marketplace IDs.

public getReferrerId(array $filters):string

Get the referrer ID based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters
public getReferrerIds():array

Get all available referrer IDs.

public getSiteId(array $filters):string

Get the site ID based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters
public getSiteIds():array

Get all available site IDs.

public getMarketId(array $filters):string

Get the market ID based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters
public getMarketIds():array

Get all available market IDs.

public getCurrency(array $filters):string

Get the currency based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters
public getShortcut(array $filters):string

Get the shortcut based on given filters. Possible filters: marketplaceId, referrerId, marketId, siteId.

Parameters
array $filters

Models

Marketplace

The eBay marketplace model.

Namespace

Plenty\Modules\Market\Ebay\Marketplace\Models

Properties

Type Name Description
int siteId The ID of the site exactly as eBay specifies it in the docs. This value is/was used in the old eBay SOAP APIs
string marketplaceId The ID of the marketplace exactly as eBay specifies it in the docs. This value is used in the new eBay REST APIs. Eg. `EBAY_DE` or `EBAY-DE`
int marketId System-Listing wide internal ID for the listing marketplace. This id occurs only in correlation with the listing DB tables.
float referrerId System wide internal ID for the marketplace. Use this instead of `marketId` whenever possible!
string shortcut The marketplace shortcut name.
string currency The currency used for the marketplace

Methods

public toArray()

Returns this model as an array.

PartsFitment

Contracts

FitmentItemPropertyRepositoryContract

The contract for the fitment item property repository.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Contracts

Methods

public find(int $id):FitmentItemProperty

Returns a fitment item property by an ID.

Parameters
int $id The ID of the fitment item property that should be found.
public create(array $data, int $id):FitmentItemProperty

Creates a new fitment item property.

Parameters
array $data The fitment item property data as associative array.
int $id The fitment item ID that the current property should belong to.
public update(array $data, int $id):FitmentItem

Updates an existing fitment item property.

Parameters
array $data The fitment item property data to update as associative array.
int $id The ID of the fitment item property that should be updated.
public delete(int $id):bool

Deletes a fitment item property. Returns true if the deletion was successful, otherwise false.

Parameters
int $id The ID of the fitment item property that should be deleted.

FitmentItemRepositoryContract

The contract for the fitment item repository.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Contracts

Methods

public find(int $id):FitmentItem

Returns a fitment item by an ID.

Parameters
int $id The id of the fitment item that should be found.
public create(array $data, int $id):FitmentItem

Creates a new fitment item.

Parameters
array $data The fitment item data as associative array.
int $id The ID of the fitment that the current fitment item belongs to.
public update(array $data, int $id):FitmentItem

Updates an existing fitment item.

Parameters
array $data The fitment item data to update as associative array.
int $id The ID of the fitment item that should be updated.
public delete(int $id):bool

Deletes a fitment item. Returns true if the deletion was successful, otherwise false.

Parameters
int $id The ID of the fitment item that should be deleted.

FitmentRepositoryContract

The contract for the fitment repository.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Contracts

Methods

public find(int $id, array $with = []):Fitment

Returns a fitment by an ID.

Parameters
int $id The ID of the fitment that should be found.
array $with The relations to load in the Fitment instance. The relations available are 'items', 'items.properties'.
public create(array $data):Fitment

Creates a new fitment.

Parameters
array $data The fitment data as associative array.
public update(array $data, int $id):Fitment

Updates an existing fitment.

Parameters
array $data The fitment data to update as associative array.
int $id The ID of the fitment that should be updated.
public delete(int $id):DeleteResponse

Deletes a fitment. Returns true if the deletion was successful, otherwise false.

Parameters
int $id The ID of the fitment that should be deleted.
public search(int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = []):array

Search fitments

Parameters
int $page The default page that will be returned is page 1.
int $itemsPerPage The number of entries to be displayed per page. The default number of entries per page is 50.
array $with The relations to load in the Fitment instance. The relations available are 'items', 'items.properties'.
array $filters The filters that could be applied: 'id', 'categoryId', 'marketId', 'name', 'property', 'propertyName', 'propertyValue'.
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

Models

Fitment

The fitment model. This can contain multiple FitmentItems models.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Models

Properties

Type Name Description
int id The id of the fitment.
int marketId The id of the market the fitment belongs to.
string name The name of the fitment.
int categoryId The id of the category the fitment belongs to.
array items The list of the items that belong to the fitment.

Methods

public toArray()

Returns this model as an array.

FitmentItem

The fitment item model. This belongs to one fitment model and can contain multiple FitmentItemProperty models.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Models

Properties

Type Name Description
int id The id of the item that belongs to the fitment.
int fitmentId The id of the fitment.
Fitment fitment The fitment this fitment item belongs to.
array properties A collection of this fitment item properties. Available names are 'Make', 'Model', 'Platform', 'Type', 'Production Period', 'Engine', 'FitmentComments', 'KType'.

Methods

public toArray()

Returns this model as an array.

FitmentItemProperty

The fitment item property model. This bleongs to an FitmentItem model.

Namespace

Plenty\Modules\Market\Ebay\PartsFitment\Models

Properties

Type Name Description
int id The ID of the fitment item property.
int fitmentItemId The ID that the fitment item this property belongs to.
string name The name of the property
string value The value of the property.
FitmentItem fitmentItem The fitment item this property belongs to.

Methods

public toArray()

Returns this model as an array.

ShopCategory

Contracts

ShopCategoryRepositoryContract

The contract for the eBay shop categories.

Namespace

Plenty\Modules\Market\Ebay\ShopCategory\Contracts

Methods

public all(int $credentialsId, string $viewType = "list"):array

Returns a fitment by an ID.

Parameters
int $credentialsId The credentials ID for whom we want to load the eBay shop categories.
string $viewType How should the eBay shop categories be returned. Possible values: 'list' or 'tree'. Default is 'list'.

Helper

Contracts

MarketAttributeHelperRepositoryContract

The contract for the market attribute helper repository.

Namespace

Plenty\Modules\Market\Helper\Contracts

Methods

public getAttributeName(int $id, string $lang):string

Returns the attribute name for the given attribute id

Parameters
int $id
string $lang
public getAttributeValueName(int $attributeId, int $valueId, string $lang):string

Returns the attribute value name for the given attribute value id

Parameters
int $attributeId
int $valueId
string $lang
public getAttributeNames(Record
 $record, string $lang = "de", string $delimiter = ","):string

Returns all attribute names for the given language as a string delimited by the given delimiter.

Parameters
Record $record
string $lang
string $delimiter
public getAttributeValueSetShortFrontendName(Record
 $record, string $lang = "de", string $delimiter = ", ", array $attributeNameCombination = []):string

Returns the attribute value set short frontend name. Ex.: blue, XL

Parameters
Record $record
string $lang
string $delimiter
array $attributeNameCombination
public getAttributeNameAndValueCombination(string $attributeNames, string $attributeValues, string $delimiter = ","):string

Returns the combination of attribute names with their attribute values.

Parameters
string $attributeNames
string $attributeValues
string $delimiter
public getVariationNameAndAttributeNameAndValueCombination(Record
 $record, string $lang):string

Returns the name for a variation with all attribute names and attribute values. Ex.: T-Shirt (Size: L, Color: red)

Parameters
Record $record
string $lang

MarketCategoryHelperRepositoryContract

The contract for the market category helper repository.

Namespace

Plenty\Modules\Market\Helper\Contracts

Methods

public getCategoryBranchName(int $branchId, string $lang, int $plentyId, string $separator = ">"):string

Returns the category bread crumbs as string for a given branchId, lang and plentyId

Parameters
int $branchId
string $lang
int $plentyId
string $separator default

MarketItemHelperRepositoryContract

The contract for the item helper repository.

Namespace

Plenty\Modules\Market\Helper\Contracts

Methods

public getExternalManufacturerName(int $manufacturerId):string

Get the external manufacturer name.

Parameters
int $manufacturerId
public generateSku(int $variationId, float $marketId, int $accountId, bool $setLastExportedTimestamp):string

Generates or updates the sku

Parameters
int $variationId
float $marketId
int $accountId
bool $setLastExportedTimestamp
public getAvailability(int $availabilityId, string $lang, bool $returnAvailabilityName):string

Returns the availability name or the availability average days

Parameters
int $availabilityId
string $lang
bool $returnAvailabilityName

MarketPropertyHelperRepositoryContract

The contract for the market property helper repository.

Namespace

Plenty\Modules\Market\Helper\Contracts

Methods

public getMarketProperty(float $referrerId):array

Returns a list of the market properties

Parameters
float $referrerId

Settings

Contracts

SettingsRepositoryContract

Use this interface to store and retrieve market specific settings.

Namespace

Plenty\Modules\Market\Settings\Contracts

Methods

public search(array $filters = [], int $page, int $itemsPerPage = \Plenty\Modules\Market\Settings\Models\Settings::MAX_ITEMS_PER_PAGE):PaginatedResult

List settings.

Parameters
array $filters Settings can be filtered by ID, marketplace ID.
int $page Current page of the response.
int $itemsPerPage The requested amount of settings per result page.
public create(string $marketplaceId, string $type, array $settings):Settings

Create market settings.

Parameters
string $marketplaceId The marketplace ID that the settings belong to
string $type The type of settings. Possible values: shipping, attribute, category, property.
array $settings The settings that will be saved.
public update(array $settingsData, int $id):void

Update one market settings entry.

Parameters
array $settingsData
int $id
public get(int $id):Settings

Return the settings for a given settings ID.

Parameters
int $id The settings id.
public find(string $marketplaceId, string $type = null):array

Find settings for a given marketplace ID and type.

Parameters
string $marketplaceId The marketplace id for which to retrieve the settings
string $type The typo of settings that should be searched for. Possible values: shipping, attribute, category, property.
public delete(int $id):bool

Delete a setting.

Parameters
int $id
public deleteAll(string $marketplaceId, string $type):void

Delete all settings for a given type and marketplace ID.

Parameters
string $marketplaceId
string $type
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

Factories

SettingsCorrelationFactory

Factory that allows to store correlation between market settings and plentymarkets settings.

Namespace

Plenty\Modules\Market\Settings\Factories

Methods

public type(string $type):SettingsCorrelationFactory

Set here the type of relation that should be created.

Parameters
string $type The relation type. Possible values: shipping, attribute, category, property
public createRelation(int $settingsId, int $correlationId):void

Use this method to create a relation of the chosen type.

Parameters
int $settingsId The id of the market settings we want to create the relation for.
int $correlationId The id of the plentymarkets settings we want to create the relation to.
public createRelationWithParent(int $settingsId, int $correlationId, int $parentSettingsId):void

Use this method to create a relation of the chosen type.

Parameters
int $settingsId The id of the market settings we want to create the relation for.
int $correlationId The id of the plentymarkets settings we want to create the relation to.
int $parentSettingsId The id of the parent market settings we want to create the relation to.
public clear($marketplaceId):void

Clear all relations for a given correlation type.

Parameters
$marketplaceId
public all($marketplaceId):array

Get all correlations for a given marketplace ID.

Parameters
$marketplaceId
public getSettingsByCorrelation($marketplaceId, int $correlationId):void

Get a specific settings by marketplace id and correlation id.

Parameters
$marketplaceId
int $correlationId
public getAllSettingsByCorrelation($marketplaceId, int $correlationId):void

Get a specific settings by marketplace id and correlation id.

Parameters
$marketplaceId
int $correlationId
public getSettingsByCorrelationAndParent($marketplaceId, int $correlationId, int $parentSettingsId):void

Get a specific settings by marketplace id and correlation id.

Parameters
$marketplaceId
int $correlationId
int $parentSettingsId
public getSettingsByParent($marketplaceId, int $parentSettingsId):void

List settings by marketplace id and parent settings id.

Parameters
$marketplaceId
int $parentSettingsId
public getAllSettingsByCorrelationAndParent($marketplaceId, int $correlationId, int $parentSettingsId):void

Get a specific settings by marketplace id and correlation id.

Parameters
$marketplaceId
int $correlationId
int $parentSettingsId

Models

Settings

The market settings model.

Namespace

Plenty\Modules\Market\Settings\Models

Properties

Type Name Description
int id The ID of the market settings.
int marketplaceId The ID of the marketplace.
string type The type of the current market settings. Possible values are: attribute, attributeValue, property, category, shipping.
array settings The market settings for the current marketplace.
array category The category that these market settings are related to.
array parcelServicePreset The parcel service preset that these market settings are related to.
array attribute The attribute that these market settings are related to.
array property The property item that these market settings are related to.
array attributeValue The attributeValue that these market settings are related to.

Methods

public toArray()

Returns this model as an array.