Skip to content

Commit 3f631c1

Browse files
1 parent a68a6b0 commit 3f631c1

14 files changed

Lines changed: 582 additions & 2 deletions

src/AndroidPublisher.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,21 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
26242624
'required' => true,
26252625
],
26262626
],
2627+
],'defer' => [
2628+
'path' => 'androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:defer',
2629+
'httpMethod' => 'POST',
2630+
'parameters' => [
2631+
'packageName' => [
2632+
'location' => 'path',
2633+
'type' => 'string',
2634+
'required' => true,
2635+
],
2636+
'token' => [
2637+
'location' => 'path',
2638+
'type' => 'string',
2639+
'required' => true,
2640+
],
2641+
],
26272642
],'get' => [
26282643
'path' => 'androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}',
26292644
'httpMethod' => 'GET',
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class BasePriceOfferPhase extends \Google\Model
21+
{
22+
}
23+
24+
// Adding a class alias for backwards compatibility with the previous class name.
25+
class_alias(BasePriceOfferPhase::class, 'Google_Service_AndroidPublisher_BasePriceOfferPhase');
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class DeferSubscriptionPurchaseRequest extends \Google\Model
21+
{
22+
protected $deferralContextType = DeferralContext::class;
23+
protected $deferralContextDataType = '';
24+
25+
/**
26+
* Required. Details about the subscription deferral.
27+
*
28+
* @param DeferralContext $deferralContext
29+
*/
30+
public function setDeferralContext(DeferralContext $deferralContext)
31+
{
32+
$this->deferralContext = $deferralContext;
33+
}
34+
/**
35+
* @return DeferralContext
36+
*/
37+
public function getDeferralContext()
38+
{
39+
return $this->deferralContext;
40+
}
41+
}
42+
43+
// Adding a class alias for backwards compatibility with the previous class name.
44+
class_alias(DeferSubscriptionPurchaseRequest::class, 'Google_Service_AndroidPublisher_DeferSubscriptionPurchaseRequest');
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class DeferSubscriptionPurchaseResponse extends \Google\Collection
21+
{
22+
protected $collection_key = 'itemExpiryTimeDetails';
23+
protected $itemExpiryTimeDetailsType = ItemExpiryTimeDetails::class;
24+
protected $itemExpiryTimeDetailsDataType = 'array';
25+
26+
/**
27+
* The new expiry time for each subscription items.
28+
*
29+
* @param ItemExpiryTimeDetails[] $itemExpiryTimeDetails
30+
*/
31+
public function setItemExpiryTimeDetails($itemExpiryTimeDetails)
32+
{
33+
$this->itemExpiryTimeDetails = $itemExpiryTimeDetails;
34+
}
35+
/**
36+
* @return ItemExpiryTimeDetails[]
37+
*/
38+
public function getItemExpiryTimeDetails()
39+
{
40+
return $this->itemExpiryTimeDetails;
41+
}
42+
}
43+
44+
// Adding a class alias for backwards compatibility with the previous class name.
45+
class_alias(DeferSubscriptionPurchaseResponse::class, 'Google_Service_AndroidPublisher_DeferSubscriptionPurchaseResponse');
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class DeferralContext extends \Google\Model
21+
{
22+
/**
23+
* Required. The duration by which all subscription items should be deferred.
24+
*
25+
* @var string
26+
*/
27+
public $deferDuration;
28+
/**
29+
* Required. The API will fail if the etag does not match the latest etag for
30+
* this subscription. The etag is retrieved from
31+
* purchases.subscriptionsv2.get: https://developers.google.com/android-
32+
* publisher/api-ref/rest/v3/purchases.subscriptionsv2/get
33+
*
34+
* @var string
35+
*/
36+
public $etag;
37+
/**
38+
* If set to "true", the request is a dry run to validate the effect of Defer,
39+
* the subscription would not be impacted.
40+
*
41+
* @var bool
42+
*/
43+
public $validateOnly;
44+
45+
/**
46+
* Required. The duration by which all subscription items should be deferred.
47+
*
48+
* @param string $deferDuration
49+
*/
50+
public function setDeferDuration($deferDuration)
51+
{
52+
$this->deferDuration = $deferDuration;
53+
}
54+
/**
55+
* @return string
56+
*/
57+
public function getDeferDuration()
58+
{
59+
return $this->deferDuration;
60+
}
61+
/**
62+
* Required. The API will fail if the etag does not match the latest etag for
63+
* this subscription. The etag is retrieved from
64+
* purchases.subscriptionsv2.get: https://developers.google.com/android-
65+
* publisher/api-ref/rest/v3/purchases.subscriptionsv2/get
66+
*
67+
* @param string $etag
68+
*/
69+
public function setEtag($etag)
70+
{
71+
$this->etag = $etag;
72+
}
73+
/**
74+
* @return string
75+
*/
76+
public function getEtag()
77+
{
78+
return $this->etag;
79+
}
80+
/**
81+
* If set to "true", the request is a dry run to validate the effect of Defer,
82+
* the subscription would not be impacted.
83+
*
84+
* @param bool $validateOnly
85+
*/
86+
public function setValidateOnly($validateOnly)
87+
{
88+
$this->validateOnly = $validateOnly;
89+
}
90+
/**
91+
* @return bool
92+
*/
93+
public function getValidateOnly()
94+
{
95+
return $this->validateOnly;
96+
}
97+
}
98+
99+
// Adding a class alias for backwards compatibility with the previous class name.
100+
class_alias(DeferralContext::class, 'Google_Service_AndroidPublisher_DeferralContext');
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class FreeTrialOfferPhase extends \Google\Model
21+
{
22+
}
23+
24+
// Adding a class alias for backwards compatibility with the previous class name.
25+
class_alias(FreeTrialOfferPhase::class, 'Google_Service_AndroidPublisher_FreeTrialOfferPhase');
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class IntroductoryPriceOfferPhase extends \Google\Model
21+
{
22+
}
23+
24+
// Adding a class alias for backwards compatibility with the previous class name.
25+
class_alias(IntroductoryPriceOfferPhase::class, 'Google_Service_AndroidPublisher_IntroductoryPriceOfferPhase');
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AndroidPublisher;
19+
20+
class ItemExpiryTimeDetails extends \Google\Model
21+
{
22+
/**
23+
* The new expiry time for this subscription item.
24+
*
25+
* @var string
26+
*/
27+
public $expiryTime;
28+
/**
29+
* The product ID of the subscription item (for example, 'premium_plan').
30+
*
31+
* @var string
32+
*/
33+
public $productId;
34+
35+
/**
36+
* The new expiry time for this subscription item.
37+
*
38+
* @param string $expiryTime
39+
*/
40+
public function setExpiryTime($expiryTime)
41+
{
42+
$this->expiryTime = $expiryTime;
43+
}
44+
/**
45+
* @return string
46+
*/
47+
public function getExpiryTime()
48+
{
49+
return $this->expiryTime;
50+
}
51+
/**
52+
* The product ID of the subscription item (for example, 'premium_plan').
53+
*
54+
* @param string $productId
55+
*/
56+
public function setProductId($productId)
57+
{
58+
$this->productId = $productId;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getProductId()
64+
{
65+
return $this->productId;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(ItemExpiryTimeDetails::class, 'Google_Service_AndroidPublisher_ItemExpiryTimeDetails');

0 commit comments

Comments
 (0)