Skip to content

Commit 1d3ed27

Browse files
author
ask-pyth
committed
Release 1.14.0. For changelog, check CHANGELOG.rst
1 parent a434ac0 commit 1d3ed27

23 files changed

+1507
-7
lines changed

ask-sdk-model/CHANGELOG.rst

+10
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,13 @@ This release contains the following changes :
197197
This release contains the following changes :
198198

199199
- Models for `Skill Connections <https://developer.amazon.com/docs/custom-skills/skill-connections.html>`__. With the Skill Connections feature, you can enable an Alexa skill to fulfill a customer request that it can't otherwise handle by forwarding the request to another skill for fulfillment.
200+
201+
202+
1.14.0
203+
~~~~~~~
204+
205+
This release contains the following changes :
206+
207+
- Models for [Custom interfaces](https://developer.amazon.com/docs/alexa-gadgets-toolkit-preview/custom-interface.html). The custom interfaces feature enables Alexa Skill Developers to implement interactions between skills and gadgets using developer-defined directives and events.
208+
209+
- Added BillingAgreementType and SubscriptionAmount in BillingAgreementAttributes. This change is mandatory for skills in EU, and optional for NA and JP. With this upgrade, skill developers in EU can enjoy full benefits of the Amazon Pay solution that supports PSD2.

ask-sdk-model/ask_sdk_model/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
__pip_package_name__ = 'ask-sdk-model'
1515
__description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.'
1616
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
17-
__version__ = '1.13.0'
17+
__version__ = '1.14.0'
1818
__author__ = 'Alexa Skills Kit'
1919
__author_email__ = '[email protected]'
2020
__license__ = 'Apache 2.0'

ask-sdk-model/ask_sdk_model/directive.py

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Directive(object):
3939
4040
| AudioPlayer.Stop: :py:class:`ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective`,
4141
|
42+
| CustomInterfaceController.StopEventHandler: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective`,
43+
|
4244
| Dialog.ConfirmSlot: :py:class:`ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective`,
4345
|
4446
| AudioPlayer.Play: :py:class:`ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective`,
@@ -49,6 +51,8 @@ class Directive(object):
4951
|
5052
| Dialog.UpdateDynamicEntities: :py:class:`ask_sdk_model.dialog.dynamic_entities_directive.DynamicEntitiesDirective`,
5153
|
54+
| CustomInterfaceController.StartEventHandler: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective`,
55+
|
5256
| Display.RenderTemplate: :py:class:`ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective`,
5357
|
5458
| GadgetController.SetLight: :py:class:`ask_sdk_model.interfaces.gadget_controller.set_light_directive.SetLightDirective`,
@@ -63,6 +67,8 @@ class Directive(object):
6367
|
6468
| GameEngine.StartInputHandler: :py:class:`ask_sdk_model.interfaces.game_engine.start_input_handler_directive.StartInputHandlerDirective`,
6569
|
70+
| CustomInterfaceController.SendDirective: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective`,
71+
|
6672
| VideoApp.Launch: :py:class:`ask_sdk_model.interfaces.videoapp.launch_directive.LaunchDirective`,
6773
|
6874
| GameEngine.StopInputHandler: :py:class:`ask_sdk_model.interfaces.game_engine.stop_input_handler_directive.StopInputHandlerDirective`,
@@ -88,18 +94,21 @@ class Directive(object):
8894

8995
discriminator_value_class_map = {
9096
'AudioPlayer.Stop': 'ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective',
97+
'CustomInterfaceController.StopEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective',
9198
'Dialog.ConfirmSlot': 'ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective',
9299
'AudioPlayer.Play': 'ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective',
93100
'Alexa.Presentation.APL.ExecuteCommands': 'ask_sdk_model.interfaces.alexa.presentation.apl.execute_commands_directive.ExecuteCommandsDirective',
94101
'Connections.SendRequest': 'ask_sdk_model.interfaces.connections.send_request_directive.SendRequestDirective',
95102
'Dialog.UpdateDynamicEntities': 'ask_sdk_model.dialog.dynamic_entities_directive.DynamicEntitiesDirective',
103+
'CustomInterfaceController.StartEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective',
96104
'Display.RenderTemplate': 'ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective',
97105
'GadgetController.SetLight': 'ask_sdk_model.interfaces.gadget_controller.set_light_directive.SetLightDirective',
98106
'Dialog.Delegate': 'ask_sdk_model.dialog.delegate_directive.DelegateDirective',
99107
'Hint': 'ask_sdk_model.interfaces.display.hint_directive.HintDirective',
100108
'Dialog.ConfirmIntent': 'ask_sdk_model.dialog.confirm_intent_directive.ConfirmIntentDirective',
101109
'Connections.StartConnection': 'ask_sdk_model.interfaces.connections.v1.start_connection_directive.StartConnectionDirective',
102110
'GameEngine.StartInputHandler': 'ask_sdk_model.interfaces.game_engine.start_input_handler_directive.StartInputHandlerDirective',
111+
'CustomInterfaceController.SendDirective': 'ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective',
103112
'VideoApp.Launch': 'ask_sdk_model.interfaces.videoapp.launch_directive.LaunchDirective',
104113
'GameEngine.StopInputHandler': 'ask_sdk_model.interfaces.game_engine.stop_input_handler_directive.StopInputHandlerDirective',
105114
'Tasks.CompleteTask': 'ask_sdk_model.interfaces.tasks.complete_task_directive.CompleteTaskDirective',

ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
from .billing_agreement_attributes import BillingAgreementAttributes
2424
from .provider_credit import ProviderCredit
2525
from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes
26+
from .billing_agreement_type import BillingAgreementType

ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_attributes.py

+18-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
from typing import Dict, List, Optional, Union
2626
from datetime import datetime
2727
from ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes import SellerBillingAgreementAttributes
28+
from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type import BillingAgreementType
29+
from ask_sdk_model.interfaces.amazonpay.model.request.price import Price
2830

2931

3032
class BillingAgreementAttributes(BaseAmazonPayEntity):
@@ -38,6 +40,10 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
3840
:type seller_note: (optional) str
3941
:param seller_billing_agreement_attributes:
4042
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
43+
:param billing_agreement_type:
44+
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType
45+
:param subscription_amount:
46+
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.request.price.Price
4147
:param version: Version of the Amazon Pay Entity. Can be 1 or greater.
4248
:type version: (optional) str
4349
@@ -46,6 +52,8 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
4652
'platform_id': 'str',
4753
'seller_note': 'str',
4854
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes',
55+
'billing_agreement_type': 'ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType',
56+
'subscription_amount': 'ask_sdk_model.interfaces.amazonpay.model.request.price.Price',
4957
'object_type': 'str',
5058
'version': 'str'
5159
} # type: Dict
@@ -54,12 +62,14 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
5462
'platform_id': 'platformId',
5563
'seller_note': 'sellerNote',
5664
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes',
65+
'billing_agreement_type': 'billingAgreementType',
66+
'subscription_amount': 'subscriptionAmount',
5767
'object_type': '@type',
5868
'version': '@version'
5969
} # type: Dict
6070

61-
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, version=None):
62-
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[str]) -> None
71+
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None, version=None):
72+
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[BillingAgreementType], Optional[Price], Optional[str]) -> None
6373
"""The merchant can choose to set the attributes specified in the BillingAgreementAttributes.
6474
6575
:param platform_id: Represents the SellerId of the Solution Provider that developed the eCommerce platform. This value is only used by Solution Providers, for whom it is required. It should not be provided by merchants creating their own custom integration. Do not specify the SellerId of the merchant for this request parameter. If you are a merchant, do not enter a PlatformId.
@@ -68,6 +78,10 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
6878
:type seller_note: (optional) str
6979
:param seller_billing_agreement_attributes:
7080
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
81+
:param billing_agreement_type:
82+
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType
83+
:param subscription_amount:
84+
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.request.price.Price
7185
:param version: Version of the Amazon Pay Entity. Can be 1 or greater.
7286
:type version: (optional) str
7387
"""
@@ -78,6 +92,8 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
7892
self.platform_id = platform_id
7993
self.seller_note = seller_note
8094
self.seller_billing_agreement_attributes = seller_billing_agreement_attributes
95+
self.billing_agreement_type = billing_agreement_type
96+
self.subscription_amount = subscription_amount
8197

8298
def to_dict(self):
8399
# type: () -> Dict[str, object]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional, Union
25+
from datetime import datetime
26+
27+
28+
class BillingAgreementType(Enum):
29+
"""
30+
* This is used to specify applicable billing agreement type. * CustomerInitiatedTransaction – customer is present at the time of processing payment for the order. * MerchantInitiatedTransaction – customer is not present at the time of processing payment for the order.
31+
32+
33+
34+
Allowed enum values: [CustomerInitiatedTransaction, MerchantInitiatedTransaction]
35+
"""
36+
CustomerInitiatedTransaction = "CustomerInitiatedTransaction"
37+
MerchantInitiatedTransaction = "MerchantInitiatedTransaction"
38+
39+
def to_dict(self):
40+
# type: () -> Dict[str, object]
41+
"""Returns the model properties as a dict"""
42+
result = {self.name: self.value}
43+
return result
44+
45+
def to_str(self):
46+
# type: () -> str
47+
"""Returns the string representation of the model"""
48+
return pprint.pformat(self.value)
49+
50+
def __repr__(self):
51+
# type: () -> str
52+
"""For `print` and `pprint`"""
53+
return self.to_str()
54+
55+
def __eq__(self, other):
56+
# type: (object) -> bool
57+
"""Returns true if both objects are equal"""
58+
if not isinstance(other, BillingAgreementType):
59+
return False
60+
61+
return self.__dict__ == other.__dict__
62+
63+
def __ne__(self, other):
64+
# type: (object) -> bool
65+
"""Returns true if both objects are not equal"""
66+
return not self == other

ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@
2929
from .billing_agreement_attributes import BillingAgreementAttributes
3030
from .provider_credit import ProviderCredit
3131
from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes
32+
from .billing_agreement_type import BillingAgreementType

ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_attributes.py

+20-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from typing import Dict, List, Optional, Union
2525
from datetime import datetime
2626
from ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes import SellerBillingAgreementAttributes
27+
from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price
28+
from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type import BillingAgreementType
2729

2830

2931
class BillingAgreementAttributes(object):
@@ -37,22 +39,30 @@ class BillingAgreementAttributes(object):
3739
:type seller_note: (optional) str
3840
:param seller_billing_agreement_attributes:
3941
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
42+
:param billing_agreement_type:
43+
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType
44+
:param subscription_amount:
45+
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.price.Price
4046
4147
"""
4248
deserialized_types = {
4349
'platform_id': 'str',
4450
'seller_note': 'str',
45-
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes'
51+
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes',
52+
'billing_agreement_type': 'ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType',
53+
'subscription_amount': 'ask_sdk_model.interfaces.amazonpay.model.v1.price.Price'
4654
} # type: Dict
4755

4856
attribute_map = {
4957
'platform_id': 'platformId',
5058
'seller_note': 'sellerNote',
51-
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes'
59+
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes',
60+
'billing_agreement_type': 'billingAgreementType',
61+
'subscription_amount': 'subscriptionAmount'
5262
} # type: Dict
5363

54-
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None):
55-
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes]) -> None
64+
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None):
65+
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[BillingAgreementType], Optional[Price]) -> None
5666
"""The merchant can choose to set the attributes specified in the BillingAgreementAttributes.
5767
5868
:param platform_id: Represents the SellerId of the Solution Provider that developed the eCommerce platform. This value is only used by Solution Providers, for whom it is required. It should not be provided by merchants creating their own custom integration. Do not specify the SellerId of the merchant for this request parameter. If you are a merchant, do not enter a PlatformId.
@@ -61,12 +71,18 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
6171
:type seller_note: (optional) str
6272
:param seller_billing_agreement_attributes:
6373
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
74+
:param billing_agreement_type:
75+
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType
76+
:param subscription_amount:
77+
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.price.Price
6478
"""
6579
self.__discriminator_value = None # type: str
6680

6781
self.platform_id = platform_id
6882
self.seller_note = seller_note
6983
self.seller_billing_agreement_attributes = seller_billing_agreement_attributes
84+
self.billing_agreement_type = billing_agreement_type
85+
self.subscription_amount = subscription_amount
7086

7187
def to_dict(self):
7288
# type: () -> Dict[str, object]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional, Union
25+
from datetime import datetime
26+
27+
28+
class BillingAgreementType(Enum):
29+
"""
30+
* This is used to specify applicable billing agreement type. * CustomerInitiatedTransaction – customer is present at the time of processing payment for the order. * MerchantInitiatedTransaction – customer is not present at the time of processing payment for the order.
31+
32+
33+
34+
Allowed enum values: [CustomerInitiatedTransaction, MerchantInitiatedTransaction]
35+
"""
36+
CustomerInitiatedTransaction = "CustomerInitiatedTransaction"
37+
MerchantInitiatedTransaction = "MerchantInitiatedTransaction"
38+
39+
def to_dict(self):
40+
# type: () -> Dict[str, object]
41+
"""Returns the model properties as a dict"""
42+
result = {self.name: self.value}
43+
return result
44+
45+
def to_str(self):
46+
# type: () -> str
47+
"""Returns the string representation of the model"""
48+
return pprint.pformat(self.value)
49+
50+
def __repr__(self):
51+
# type: () -> str
52+
"""For `print` and `pprint`"""
53+
return self.to_str()
54+
55+
def __eq__(self, other):
56+
# type: (object) -> bool
57+
"""Returns true if both objects are equal"""
58+
if not isinstance(other, BillingAgreementType):
59+
return False
60+
61+
return self.__dict__ == other.__dict__
62+
63+
def __ne__(self, other):
64+
# type: (object) -> bool
65+
"""Returns true if both objects are not equal"""
66+
return not self == other

0 commit comments

Comments
 (0)