Completed
Push — master ( 7a819f...689625 )
by Mārtiņš
01:54
created

ArtworkCreationParams::getProducts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
4
namespace Inktale\Api\Params;
5
6
7
class ArtworkCreationParams
8
{
9
    /**
10
     * Download URL to the original image
11
     *
12
     * @var string
13
     */
14
    public $imageUrl;
15
16
    /**
17
     * Public name
18
     *
19
     * @var string
20
     */
21
    public $name;
22
23
    /**
24
     * Should artwork be published
25
     *
26
     * @var bool
27
     */
28
    public $publish = false;
29
30
    /**
31
     * Optional description
32
     *
33
     * @var string
34
     */
35
    public $description;
36
37
    /**
38
     * Optional List of keywords (up to 10 values)
39
     *
40
     * @var string[]
41
     */
42
    public $keywords = [];
43
44
    /**
45
     * List of products that should
46
     *
47
     * @var array [productType => profit, ..]
48
     */
49
    private $products = [];
50
51
    /**
52
     * Add a product to be created
53
     *
54
     * @param string $productType
55
     * @param float $profit
56
     */
57
    public function addProduct($productType, $profit)
58
    {
59
        $this->products[$productType] = $profit;
60
    }
61
62
    /**
63
     * Get list of products added
64
     *
65
     * @return array  [productType => profit, ..]
66
     */
67
    public function getProducts()
68
    {
69
        return $this->products;
70
    }
71
}