Skip to content

Commit b1ba682

Browse files
author
sasha
committed
add afiliate_name for subscriptions
1 parent ea16ae8 commit b1ba682

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/API2Client/Entities/Subscription.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,29 @@ class Subscription
128128
*/
129129
private $customer_local_time;
130130

131+
/**
132+
* @var string
133+
*/
134+
private $affiliate_name;
135+
136+
/**
137+
* @return string
138+
*/
139+
public function getAffiliateName()
140+
{
141+
return $this->affiliate_name;
142+
}
143+
144+
/**
145+
* @param string $affiliate_name
146+
* @return $this
147+
*/
148+
public function setAffiliateName($affiliate_name)
149+
{
150+
$this->affiliate_name = $affiliate_name;
151+
return $this;
152+
}
153+
131154
/**
132155
* @return array
133156
*/
@@ -583,6 +606,7 @@ public function toArray ()
583606
'customer_user_agent' => $this->getCustomerUserAgent(),
584607
'customer_ip_address' => $this->getCustomerIpAddress(),
585608
'customer_local_time' => $this->getCustomerLocalTime(),
609+
'affiliate_name' => $this->getAffiliateName(),
586610
);
587611
}
588612
}

src/API2Client/Setters/SubscriptionResult.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ private function createSubscriptionObject ($dataSubscription)
8282
->setCustomerZip ($this->getValue ('customer_zip', $dataSubscription, ''))
8383
->setCustomerUserAgent($this->getValue ('customer_user_agent', $dataSubscription, ''))
8484
->setCustomerIpAddress($this->getValue ('customer_ip_address', $dataSubscription, ''))
85-
->setCustomerLocalTime ($this->getValue ('customer_local_time', $dataSubscription, ''));
85+
->setCustomerLocalTime ($this->getValue ('customer_local_time', $dataSubscription, ''))
86+
->setAffiliateName($this->getValue ('affiliate_name', $dataSubscription, ''));
8687
}
8788
}

0 commit comments

Comments
 (0)