davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
350 stars 343 forks source link

Value in NameValueListType Object is an Array but Name isnt? #40

Closed stiivo closed 8 years ago

stiivo commented 8 years ago
DTS\eBaySDK\Trading\Types\NameValueListType Object
(
[values:DTS\eBaySDK\Types\BaseType:private] => Array
    (
        [Name] => Im the Name of VariationSpecific[0]
        [Value] => DTS\eBaySDK\Types\RepeatableType Object
            (
                [data:DTS\eBaySDK\Types\RepeatableType:private] => Array
                    (
                        [0] => Im the value to the name of VariationSpecific[0] i might stay alone, forever
                    )

                [position:DTS\eBaySDK\Types\RepeatableType:private] => 0
                [class:DTS\eBaySDK\Types\RepeatableType:private] => DTS\eBaySDK\Trading\Types\NameValueListType
                [property:DTS\eBaySDK\Types\RepeatableType:private] => Value
                [expectedType:DTS\eBaySDK\Types\RepeatableType:private] => string
            )

    )

[attachment:DTS\eBaySDK\Types\BaseType:private] => Array
    (
        [data] => 
        [mimeType] => 
    )
)

Im wondering if this behaviour is intended (and i just dont get why) or is it a mistake? Why should Value be an array and Name a string? The seperation of multiple Variationspecifics is happening before this right?

Version: 5.0

Thank you David for the surely huge amount of time you put in this project.

EDIT: Please close this issue, im an idiot.

Related: http://devbay.net/sdk/guides/guide/request-and-response-objects.html#repeatable-fields-as-arrays

davidtsadler commented 8 years ago

eBay naming fields as singular but allowing multiple values still trips me up :)