Skip to content

Commit

Permalink
Release 1.14.0. For changelog, check CHANGELOG.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ask-pyth committed Aug 15, 2019
1 parent a434ac0 commit 1d3ed27
Show file tree
Hide file tree
Showing 23 changed files with 1,507 additions and 7 deletions.
10 changes: 10 additions & 0 deletions ask-sdk-model/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,13 @@ This release contains the following changes :
This release contains the following changes :

- 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.


1.14.0
~~~~~~~

This release contains the following changes :

- 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.

- 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.
2 changes: 1 addition & 1 deletion ask-sdk-model/ask_sdk_model/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__pip_package_name__ = 'ask-sdk-model'
__description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.'
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
__version__ = '1.13.0'
__version__ = '1.14.0'
__author__ = 'Alexa Skills Kit'
__author_email__ = 'ask-sdk-dynamic@amazon.com'
__license__ = 'Apache 2.0'
Expand Down
9 changes: 9 additions & 0 deletions ask-sdk-model/ask_sdk_model/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Directive(object):
| AudioPlayer.Stop: :py:class:`ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective`,
|
| CustomInterfaceController.StopEventHandler: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective`,
|
| Dialog.ConfirmSlot: :py:class:`ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective`,
|
| AudioPlayer.Play: :py:class:`ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective`,
Expand All @@ -49,6 +51,8 @@ class Directive(object):
|
| Dialog.UpdateDynamicEntities: :py:class:`ask_sdk_model.dialog.dynamic_entities_directive.DynamicEntitiesDirective`,
|
| CustomInterfaceController.StartEventHandler: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective`,
|
| Display.RenderTemplate: :py:class:`ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective`,
|
| GadgetController.SetLight: :py:class:`ask_sdk_model.interfaces.gadget_controller.set_light_directive.SetLightDirective`,
Expand All @@ -63,6 +67,8 @@ class Directive(object):
|
| GameEngine.StartInputHandler: :py:class:`ask_sdk_model.interfaces.game_engine.start_input_handler_directive.StartInputHandlerDirective`,
|
| CustomInterfaceController.SendDirective: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective`,
|
| VideoApp.Launch: :py:class:`ask_sdk_model.interfaces.videoapp.launch_directive.LaunchDirective`,
|
| GameEngine.StopInputHandler: :py:class:`ask_sdk_model.interfaces.game_engine.stop_input_handler_directive.StopInputHandlerDirective`,
Expand All @@ -88,18 +94,21 @@ class Directive(object):

discriminator_value_class_map = {
'AudioPlayer.Stop': 'ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective',
'CustomInterfaceController.StopEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective',
'Dialog.ConfirmSlot': 'ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective',
'AudioPlayer.Play': 'ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective',
'Alexa.Presentation.APL.ExecuteCommands': 'ask_sdk_model.interfaces.alexa.presentation.apl.execute_commands_directive.ExecuteCommandsDirective',
'Connections.SendRequest': 'ask_sdk_model.interfaces.connections.send_request_directive.SendRequestDirective',
'Dialog.UpdateDynamicEntities': 'ask_sdk_model.dialog.dynamic_entities_directive.DynamicEntitiesDirective',
'CustomInterfaceController.StartEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective',
'Display.RenderTemplate': 'ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective',
'GadgetController.SetLight': 'ask_sdk_model.interfaces.gadget_controller.set_light_directive.SetLightDirective',
'Dialog.Delegate': 'ask_sdk_model.dialog.delegate_directive.DelegateDirective',
'Hint': 'ask_sdk_model.interfaces.display.hint_directive.HintDirective',
'Dialog.ConfirmIntent': 'ask_sdk_model.dialog.confirm_intent_directive.ConfirmIntentDirective',
'Connections.StartConnection': 'ask_sdk_model.interfaces.connections.v1.start_connection_directive.StartConnectionDirective',
'GameEngine.StartInputHandler': 'ask_sdk_model.interfaces.game_engine.start_input_handler_directive.StartInputHandlerDirective',
'CustomInterfaceController.SendDirective': 'ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective',
'VideoApp.Launch': 'ask_sdk_model.interfaces.videoapp.launch_directive.LaunchDirective',
'GameEngine.StopInputHandler': 'ask_sdk_model.interfaces.game_engine.stop_input_handler_directive.StopInputHandlerDirective',
'Tasks.CompleteTask': 'ask_sdk_model.interfaces.tasks.complete_task_directive.CompleteTaskDirective',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
from .billing_agreement_attributes import BillingAgreementAttributes
from .provider_credit import ProviderCredit
from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes
from .billing_agreement_type import BillingAgreementType
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
from typing import Dict, List, Optional, Union
from datetime import datetime
from ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes import SellerBillingAgreementAttributes
from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type import BillingAgreementType
from ask_sdk_model.interfaces.amazonpay.model.request.price import Price


class BillingAgreementAttributes(BaseAmazonPayEntity):
Expand All @@ -38,6 +40,10 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
:type seller_note: (optional) str
:param seller_billing_agreement_attributes:
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
:param billing_agreement_type:
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType
:param subscription_amount:
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.request.price.Price
:param version: Version of the Amazon Pay Entity. Can be 1 or greater.
:type version: (optional) str
Expand All @@ -46,6 +52,8 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
'platform_id': 'str',
'seller_note': 'str',
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes',
'billing_agreement_type': 'ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType',
'subscription_amount': 'ask_sdk_model.interfaces.amazonpay.model.request.price.Price',
'object_type': 'str',
'version': 'str'
} # type: Dict
Expand All @@ -54,12 +62,14 @@ class BillingAgreementAttributes(BaseAmazonPayEntity):
'platform_id': 'platformId',
'seller_note': 'sellerNote',
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes',
'billing_agreement_type': 'billingAgreementType',
'subscription_amount': 'subscriptionAmount',
'object_type': '@type',
'version': '@version'
} # type: Dict

def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, version=None):
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[str]) -> None
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None, version=None):
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[BillingAgreementType], Optional[Price], Optional[str]) -> None
"""The merchant can choose to set the attributes specified in the BillingAgreementAttributes.
: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.
Expand All @@ -68,6 +78,10 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
:type seller_note: (optional) str
:param seller_billing_agreement_attributes:
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
:param billing_agreement_type:
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type.BillingAgreementType
:param subscription_amount:
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.request.price.Price
:param version: Version of the Amazon Pay Entity. Can be 1 or greater.
:type version: (optional) str
"""
Expand All @@ -78,6 +92,8 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
self.platform_id = platform_id
self.seller_note = seller_note
self.seller_billing_agreement_attributes = seller_billing_agreement_attributes
self.billing_agreement_type = billing_agreement_type
self.subscription_amount = subscription_amount

def to_dict(self):
# type: () -> Dict[str, object]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# coding: utf-8

#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
# the specific language governing permissions and limitations under the License.
#

import pprint
import re # noqa: F401
import six
import typing
from enum import Enum


if typing.TYPE_CHECKING:
from typing import Dict, List, Optional, Union
from datetime import datetime


class BillingAgreementType(Enum):
"""
* 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.
Allowed enum values: [CustomerInitiatedTransaction, MerchantInitiatedTransaction]
"""
CustomerInitiatedTransaction = "CustomerInitiatedTransaction"
MerchantInitiatedTransaction = "MerchantInitiatedTransaction"

def to_dict(self):
# type: () -> Dict[str, object]
"""Returns the model properties as a dict"""
result = {self.name: self.value}
return result

def to_str(self):
# type: () -> str
"""Returns the string representation of the model"""
return pprint.pformat(self.value)

def __repr__(self):
# type: () -> str
"""For `print` and `pprint`"""
return self.to_str()

def __eq__(self, other):
# type: (object) -> bool
"""Returns true if both objects are equal"""
if not isinstance(other, BillingAgreementType):
return False

return self.__dict__ == other.__dict__

def __ne__(self, other):
# type: (object) -> bool
"""Returns true if both objects are not equal"""
return not self == other
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
from .billing_agreement_attributes import BillingAgreementAttributes
from .provider_credit import ProviderCredit
from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes
from .billing_agreement_type import BillingAgreementType
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from typing import Dict, List, Optional, Union
from datetime import datetime
from ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes import SellerBillingAgreementAttributes
from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price
from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type import BillingAgreementType


class BillingAgreementAttributes(object):
Expand All @@ -37,22 +39,30 @@ class BillingAgreementAttributes(object):
:type seller_note: (optional) str
:param seller_billing_agreement_attributes:
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
:param billing_agreement_type:
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType
:param subscription_amount:
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.price.Price
"""
deserialized_types = {
'platform_id': 'str',
'seller_note': 'str',
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes'
'seller_billing_agreement_attributes': 'ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes',
'billing_agreement_type': 'ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType',
'subscription_amount': 'ask_sdk_model.interfaces.amazonpay.model.v1.price.Price'
} # type: Dict

attribute_map = {
'platform_id': 'platformId',
'seller_note': 'sellerNote',
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes'
'seller_billing_agreement_attributes': 'sellerBillingAgreementAttributes',
'billing_agreement_type': 'billingAgreementType',
'subscription_amount': 'subscriptionAmount'
} # type: Dict

def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None):
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes]) -> None
def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None):
# type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[BillingAgreementType], Optional[Price]) -> None
"""The merchant can choose to set the attributes specified in the BillingAgreementAttributes.
: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.
Expand All @@ -61,12 +71,18 @@ def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_
:type seller_note: (optional) str
:param seller_billing_agreement_attributes:
:type seller_billing_agreement_attributes: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes.SellerBillingAgreementAttributes
:param billing_agreement_type:
:type billing_agreement_type: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type.BillingAgreementType
:param subscription_amount:
:type subscription_amount: (optional) ask_sdk_model.interfaces.amazonpay.model.v1.price.Price
"""
self.__discriminator_value = None # type: str

self.platform_id = platform_id
self.seller_note = seller_note
self.seller_billing_agreement_attributes = seller_billing_agreement_attributes
self.billing_agreement_type = billing_agreement_type
self.subscription_amount = subscription_amount

def to_dict(self):
# type: () -> Dict[str, object]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# coding: utf-8

#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
# the specific language governing permissions and limitations under the License.
#

import pprint
import re # noqa: F401
import six
import typing
from enum import Enum


if typing.TYPE_CHECKING:
from typing import Dict, List, Optional, Union
from datetime import datetime


class BillingAgreementType(Enum):
"""
* 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.
Allowed enum values: [CustomerInitiatedTransaction, MerchantInitiatedTransaction]
"""
CustomerInitiatedTransaction = "CustomerInitiatedTransaction"
MerchantInitiatedTransaction = "MerchantInitiatedTransaction"

def to_dict(self):
# type: () -> Dict[str, object]
"""Returns the model properties as a dict"""
result = {self.name: self.value}
return result

def to_str(self):
# type: () -> str
"""Returns the string representation of the model"""
return pprint.pformat(self.value)

def __repr__(self):
# type: () -> str
"""For `print` and `pprint`"""
return self.to_str()

def __eq__(self, other):
# type: (object) -> bool
"""Returns true if both objects are equal"""
if not isinstance(other, BillingAgreementType):
return False

return self.__dict__ == other.__dict__

def __ne__(self, other):
# type: (object) -> bool
"""Returns true if both objects are not equal"""
return not self == other
Loading

0 comments on commit 1d3ed27

Please sign in to comment.