Skip to content

Commit f70ec13

Browse files
committed
Updated Auto Generated Code
1 parent be522fc commit f70ec13

File tree

7 files changed

+66
-78
lines changed

7 files changed

+66
-78
lines changed

src/Endpoints/ProductsProductFidEndpoint.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ public function __construct($productFid)
1818
/**
1919
* @summary Retrieve Product Prices
2020
*
21+
* @param $currency
22+
*
2123
* @return ProductPricesRequest
2224
*/
23-
public function prices()
25+
public function prices($currency = null)
2426
{
2527
$request = new ProductPricesRequest();
2628
$request->setConnection($this->_getConnection());
@@ -35,6 +37,7 @@ public function prices()
3537
'products/{productFid}/prices'
3638
)
3739
));
40+
$detail->setBody(json_encode($currency));
3841
$detail->setMethod('GET');
3942
$request->setRequestDetail($detail);
4043
return $request;

src/Payloads/CreateAdvertiserCampaignPayload.php

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
class CreateAdvertiserCampaignPayload
66
implements \JsonSerializable
77
{
8-
/**
9-
* FID of an Advertiser
10-
* @required
11-
*/
12-
protected $_advertiserFid;
138
/**
149
* FID of a valid Brand
1510
* @required
@@ -24,10 +19,6 @@ class CreateAdvertiserCampaignPayload
2419
public function hydrate($data)
2520
{
2621
$data = (array)$data;
27-
if(isset($data["advertiserFid"]))
28-
{
29-
$this->_advertiserFid = $data["advertiserFid"];
30-
}
3122
if(isset($data["brandFid"]))
3223
{
3324
$this->_brandFid = $data["brandFid"];
@@ -42,37 +33,11 @@ public function hydrate($data)
4233
public function jsonSerialize()
4334
{
4435
return [
45-
"advertiserFid" => $this->_advertiserFid,
46-
"brandFid" => $this->_brandFid,
47-
"displayName" => $this->_displayName,
36+
"brandFid" => $this->_brandFid,
37+
"displayName" => $this->_displayName,
4838
];
4939
}
5040

51-
/**
52-
* @param string $value
53-
*
54-
* @return $this
55-
*/
56-
public function setAdvertiserFid($value)
57-
{
58-
$this->_advertiserFid = $value;
59-
return $this;
60-
}
61-
62-
/**
63-
* FID of an Advertiser
64-
*
65-
* @param mixed $default
66-
* @param bool $trim Trim Value
67-
*
68-
* @return string
69-
*/
70-
public function getAdvertiserFid($default = null, $trim = true)
71-
{
72-
$value = $this->_advertiserFid ?: $default;
73-
return $trim ? Strings::ntrim($value) : $value;
74-
}
75-
7641
/**
7742
* @param string $value
7843
*

src/Payloads/InvoiceCreditNotePayload.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ class InvoiceCreditNotePayload
77
{
88
protected $_displayName;
99
protected $_description;
10+
/**
11+
* Charge Request FID
12+
*/
1013
protected $_chargeRequestFid;
1114
/**
1215
* Credit amount type
@@ -120,24 +123,28 @@ public function getDescription($default = null, $trim = true)
120123
}
121124

122125
/**
123-
* @param FidResponse $value
126+
* @param string $value
124127
*
125128
* @return $this
126129
*/
127-
public function setChargeRequestFid(FidResponse $value)
130+
public function setChargeRequestFid($value)
128131
{
129132
$this->_chargeRequestFid = $value;
130133
return $this;
131134
}
132135

133136
/**
137+
* Charge Request FID
138+
*
134139
* @param mixed $default
140+
* @param bool $trim Trim Value
135141
*
136-
* @return FidResponse
142+
* @return string
137143
*/
138-
public function getChargeRequestFid($default = null)
144+
public function getChargeRequestFid($default = null, $trim = true)
139145
{
140-
return $this->_chargeRequestFid ?: $default;
146+
$value = $this->_chargeRequestFid ?: $default;
147+
return $trim ? Strings::ntrim($value) : $value;
141148
}
142149

143150
/**

src/Payloads/PostActionPayload.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
namespace Fortifi\Api\V1\Payloads;
3-
4-
use Fortifi\Api\V1\Requests\KeyValueRequest;
53
use Packaged\Helpers\Strings;
64

75
class PostActionPayload
@@ -165,7 +163,13 @@ public function hydrate($data)
165163
}
166164
if(isset($data["metaData"]))
167165
{
168-
$this->_metaData = $data["metaData"];
166+
$this->_metaData = [];
167+
foreach($data["metaData"] as $dItem)
168+
{
169+
$dObj = new KeyValuePayload();
170+
$dObj->hydrate($dItem);
171+
$this->_metaData[] = $dObj;
172+
}
169173
}
170174
if(isset($data["time"]))
171175
{
@@ -647,7 +651,7 @@ public function getSid3($default = null, $trim = true)
647651
}
648652

649653
/**
650-
* @param array $value
654+
* @param KeyValuePayload[] $value
651655
*
652656
* @return $this
653657
*/
@@ -658,11 +662,11 @@ public function setMetaData(array $value)
658662
}
659663

660664
/**
661-
* @param KeyValueRequest $item
665+
* @param KeyValuePayload $item
662666
*
663667
* @return $this
664668
*/
665-
public function addMetaData(KeyValueRequest $item)
669+
public function addMetaData(KeyValuePayload $item)
666670
{
667671
$this->_metaData[] = $item;
668672
return $this;
@@ -671,7 +675,7 @@ public function addMetaData(KeyValueRequest $item)
671675
/**
672676
* @param mixed $default
673677
*
674-
* @return KeyValueRequest[]
678+
* @return KeyValuePayload[]
675679
*/
676680
public function getMetaData($default = [])
677681
{

src/Payloads/ReverseActionPayload.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
namespace Fortifi\Api\V1\Payloads;
3-
4-
use Fortifi\Api\V1\Requests\KeyValueRequest;
53
use Packaged\Helpers\Strings;
64

75
class ReverseActionPayload
@@ -82,7 +80,13 @@ public function hydrate($data)
8280
}
8381
if(isset($data["metaData"]))
8482
{
85-
$this->_metaData = $data["metaData"];
83+
$this->_metaData = [];
84+
foreach($data["metaData"] as $dItem)
85+
{
86+
$dObj = new KeyValuePayload();
87+
$dObj->hydrate($dItem);
88+
$this->_metaData[] = $dObj;
89+
}
8690
}
8791
if(isset($data["sourceTransactionId"]))
8892
{
@@ -276,7 +280,7 @@ public function getTime($default = null, $trim = true)
276280
}
277281

278282
/**
279-
* @param array $value
283+
* @param KeyValuePayload[] $value
280284
*
281285
* @return $this
282286
*/
@@ -287,11 +291,11 @@ public function setMetaData(array $value)
287291
}
288292

289293
/**
290-
* @param KeyValueRequest $item
294+
* @param KeyValuePayload $item
291295
*
292296
* @return $this
293297
*/
294-
public function addMetaData(KeyValueRequest $item)
298+
public function addMetaData(KeyValuePayload $item)
295299
{
296300
$this->_metaData[] = $item;
297301
return $this;
@@ -300,7 +304,7 @@ public function addMetaData(KeyValueRequest $item)
300304
/**
301305
* @param mixed $default
302306
*
303-
* @return KeyValueRequest[]
307+
* @return KeyValuePayload[]
304308
*/
305309
public function getMetaData($default = [])
306310
{

src/Payloads/TriggerActionPayload.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
namespace Fortifi\Api\V1\Payloads;
3-
4-
use Fortifi\Api\V1\Requests\KeyValueRequest;
53
use Packaged\Helpers\Strings;
64

75
class TriggerActionPayload
@@ -26,7 +24,13 @@ public function hydrate($data)
2624
$data = (array)$data;
2725
if(isset($data["metaData"]))
2826
{
29-
$this->_metaData = $data["metaData"];
27+
$this->_metaData = [];
28+
foreach($data["metaData"] as $dItem)
29+
{
30+
$dObj = new KeyValuePayload();
31+
$dObj->hydrate($dItem);
32+
$this->_metaData[] = $dObj;
33+
}
3034
}
3135
if(isset($data["time"]))
3236
{
@@ -54,7 +58,7 @@ public function jsonSerialize()
5458
}
5559

5660
/**
57-
* @param array $value
61+
* @param KeyValuePayload[] $value
5862
*
5963
* @return $this
6064
*/
@@ -65,11 +69,11 @@ public function setMetaData(array $value)
6569
}
6670

6771
/**
68-
* @param KeyValueRequest $item
72+
* @param KeyValuePayload $item
6973
*
7074
* @return $this
7175
*/
72-
public function addMetaData(KeyValueRequest $item)
76+
public function addMetaData(KeyValuePayload $item)
7377
{
7478
$this->_metaData[] = $item;
7579
return $this;
@@ -78,7 +82,7 @@ public function addMetaData(KeyValueRequest $item)
7882
/**
7983
* @param mixed $default
8084
*
81-
* @return KeyValueRequest[]
85+
* @return KeyValuePayload[]
8286
*/
8387
public function getMetaData($default = [])
8488
{

swagger.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,6 +1680,16 @@ paths:
16801680
- product.readonly
16811681
parameters:
16821682
- $ref: '#/parameters/productFid'
1683+
- name: currency
1684+
in: body
1685+
required: false
1686+
schema:
1687+
properties:
1688+
offerFids:
1689+
type: array
1690+
description: Offer FIDs to apply to the order
1691+
items:
1692+
type: string
16831693
responses:
16841694
200:
16851695
description: List of product prices
@@ -3144,7 +3154,7 @@ definitions:
31443154
description:
31453155
type: string
31463156
chargeRequestFid:
3147-
$ref: '#/definitions/Fid'
3157+
$ref: '#/definitions/chargeRequestFid'
31483158
creditAmountType:
31493159
$ref: '#/definitions/creditAmountType'
31503160
amount:
@@ -3229,14 +3239,11 @@ definitions:
32293239
CreateAdvertiserCampaignPayload:
32303240
description: Payload for creating an advertiser campaign
32313241
properties:
3232-
advertiserFid:
3233-
$ref: '#/definitions/advertiserFid'
32343242
brandFid:
32353243
$ref: '#/definitions/brandFid'
32363244
displayName:
32373245
$ref: '#/definitions/displayName'
32383246
required:
3239-
- advertiserFid
32403247
- brandFid
32413248
- displayName
32423249

@@ -3675,12 +3682,12 @@ definitions:
36753682
priceFid:
36763683
description: Price FID to modify subscription with
36773684
type: string
3678-
productFid:
3679-
description: Product FID
3680-
type: string
36813685
reasonFid:
36823686
description: Reason FID
36833687
type: string
3688+
chargeRequestFid:
3689+
description: Charge Request FID
3690+
type: string
36843691
creditAmountType:
36853692
description: Credit amount type
36863693
type: string
@@ -3737,7 +3744,7 @@ definitions:
37373744
type: array
37383745
description: Additional information to store
37393746
items:
3740-
$ref: '#/definitions/keyValue'
3747+
$ref: '#/definitions/keyValuePayload'
37413748
sourceTransactionId:
37423749
description: Your unique transaction ID for the event to be reversed
37433750
type: string
@@ -3791,12 +3798,6 @@ definitions:
37913798
accountManagerFid:
37923799
description: FID of an Account Manager
37933800
type: string
3794-
advertiserFid:
3795-
description: FID of an Advertiser
3796-
type: string
3797-
advertiserCampaignFid:
3798-
description: FID of an Advertiser Campaign
3799-
type: string
38003801
advertiserType:
38013802
description: Advertiser Type
38023803
type: string

0 commit comments

Comments
 (0)