Skip to content

Commit a68f94b

Browse files
author
ask-pyth
committed
Release 1.13.0. For changelog, check CHANGELOG.rst
1 parent c257534 commit a68f94b

16 files changed

+1028
-29
lines changed

ask-smapi-model/CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,11 @@ This release contains the following changes :
199199
This release contains the following changes :
200200

201201
- Updating model definitions to support Node.js 12.x on Alexa Hosted Skills.
202+
203+
204+
1.13.0
205+
~~~~~~
206+
207+
This release contains the following changes :
208+
209+
- Added models to support `Paid skills <https://developer.amazon.com/en-US/docs/alexa/paid-skills/overview.html>`__.

ask-smapi-model/ask_smapi_model/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
__pip_package_name__ = 'ask-smapi-model'
1515
__description__ = 'The SMAPI SDK Model package provides model definitions for making Skill Management API calls.'
1616
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
17-
__version__ = '1.12.0'
17+
__version__ = '1.13.0'
1818
__author__ = 'Alexa Skills Kit'
1919
__author_email__ = '[email protected]'
2020
__license__ = 'Apache 2.0'

ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py

Lines changed: 20 additions & 20 deletions
Large diffs are not rendered by default.

ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525
from .extension_request import ExtensionRequest
2626
from .voice_profile_feature import VoiceProfileFeature
2727
from .ssl_certificate_type import SSLCertificateType
28+
from .currency import Currency
2829
from .viewport_mode import ViewportMode
2930
from .skill_manifest_events import SkillManifestEvents
3031
from .alexa_for_business_interface_request import AlexaForBusinessInterfaceRequest
3132
from .flash_briefing_content_type import FlashBriefingContentType
33+
from .tax_information import TaxInformation
3234
from .skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance
3335
from .authorized_client_lwa import AuthorizedClientLwa
36+
from .free_trial_information import FreeTrialInformation
3437
from .interface_type import InterfaceType
3538
from .music_apis import MusicApis
3639
from .distribution_mode import DistributionMode
@@ -55,6 +58,8 @@
5558
from .music_alias import MusicAlias
5659
from .video_feature import VideoFeature
5760
from .music_content_type import MusicContentType
61+
from .subscription_information import SubscriptionInformation
62+
from .subscription_payment_frequency import SubscriptionPaymentFrequency
5863
from .friendly_name import FriendlyName
5964
from .manifest_gadget_support import ManifestGadgetSupport
6065
from .source_language_for_locales import SourceLanguageForLocales
@@ -64,6 +69,7 @@
6469
from .distribution_countries import DistributionCountries
6570
from .skill_manifest_publishing_information import SkillManifestPublishingInformation
6671
from .gadget_support_requirement import GadgetSupportRequirement
72+
from .tax_information_category import TaxInformationCategory
6773
from .video_app_interface import VideoAppInterface
6874
from .custom_apis import CustomApis
6975
from .flash_briefing_genre import FlashBriefingGenre
@@ -88,13 +94,15 @@
8894
from .manifest_version import ManifestVersion
8995
from .flash_briefing_apis import FlashBriefingApis
9096
from .amazon_conversations_dialog_manager import AMAZONConversationsDialogManager
97+
from .marketplace_pricing import MarketplacePricing
9198
from .permission_items import PermissionItems
9299
from .automatic_distribution import AutomaticDistribution
93100
from .authorized_client import AuthorizedClient
94101
from .event_name_type import EventNameType
95102
from .audio_interface import AudioInterface
96103
from .smart_home_apis import SmartHomeApis
97104
from .alexa_for_business_interface_request_name import AlexaForBusinessInterfaceRequestName
105+
from .custom_product_prompts import CustomProductPrompts
98106
from .app_link_v2_interface import AppLinkV2Interface
99107
from .alexa_for_business_apis import AlexaForBusinessApis
100108
from .video_region import VideoRegion
@@ -104,7 +112,9 @@
104112
from .display_interface import DisplayInterface
105113
from .catalog_type import CatalogType
106114
from .music_content_name import MusicContentName
115+
from .offer_type import OfferType
107116
from .localized_name import LocalizedName
117+
from .paid_skill_information import PaidSkillInformation
108118
from .authorized_client_lwa_application_android import AuthorizedClientLwaApplicationAndroid
109119
from .custom_localized_information_dialog_management import CustomLocalizedInformationDialogManagement
110120
from .display_interface_template_version import DisplayInterfaceTemplateVersion
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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, Any
25+
from datetime import datetime
26+
27+
28+
class Currency(Enum):
29+
"""
30+
Currency to use for paid skill product.
31+
32+
33+
34+
Allowed enum values: [USD]
35+
"""
36+
USD = "USD"
37+
38+
def to_dict(self):
39+
# type: () -> Dict[str, Any]
40+
"""Returns the model properties as a dict"""
41+
result = {self.name: self.value}
42+
return result
43+
44+
def to_str(self):
45+
# type: () -> str
46+
"""Returns the string representation of the model"""
47+
return pprint.pformat(self.value)
48+
49+
def __repr__(self):
50+
# type: () -> str
51+
"""For `print` and `pprint`"""
52+
return self.to_str()
53+
54+
def __eq__(self, other):
55+
# type: (Any) -> bool
56+
"""Returns true if both objects are equal"""
57+
if not isinstance(other, Currency):
58+
return False
59+
60+
return self.__dict__ == other.__dict__
61+
62+
def __ne__(self, other):
63+
# type: (Any) -> bool
64+
"""Returns true if both objects are not equal"""
65+
return not self == other
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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, Any
25+
from datetime import datetime
26+
27+
28+
class CustomProductPrompts(object):
29+
"""
30+
Custom prompts used for paid skill product purchasing options. Supports Speech Synthesis Markup Language (SSML), which can be used to control pronunciation, intonation, timing, and emotion.
31+
32+
33+
:param purchase_prompt_description: Description of the paid skill product heard before customer is prompted for purchase.
34+
:type purchase_prompt_description: (optional) str
35+
:param purchase_confirmation_description: Description of the paid skill product that displays when the paid skill is purchased.
36+
:type purchase_confirmation_description: (optional) str
37+
38+
"""
39+
deserialized_types = {
40+
'purchase_prompt_description': 'str',
41+
'purchase_confirmation_description': 'str'
42+
} # type: Dict
43+
44+
attribute_map = {
45+
'purchase_prompt_description': 'purchasePromptDescription',
46+
'purchase_confirmation_description': 'purchaseConfirmationDescription'
47+
} # type: Dict
48+
supports_multiple_types = False
49+
50+
def __init__(self, purchase_prompt_description=None, purchase_confirmation_description=None):
51+
# type: (Optional[str], Optional[str]) -> None
52+
"""Custom prompts used for paid skill product purchasing options. Supports Speech Synthesis Markup Language (SSML), which can be used to control pronunciation, intonation, timing, and emotion.
53+
54+
:param purchase_prompt_description: Description of the paid skill product heard before customer is prompted for purchase.
55+
:type purchase_prompt_description: (optional) str
56+
:param purchase_confirmation_description: Description of the paid skill product that displays when the paid skill is purchased.
57+
:type purchase_confirmation_description: (optional) str
58+
"""
59+
self.__discriminator_value = None # type: str
60+
61+
self.purchase_prompt_description = purchase_prompt_description
62+
self.purchase_confirmation_description = purchase_confirmation_description
63+
64+
def to_dict(self):
65+
# type: () -> Dict[str, object]
66+
"""Returns the model properties as a dict"""
67+
result = {} # type: Dict
68+
69+
for attr, _ in six.iteritems(self.deserialized_types):
70+
value = getattr(self, attr)
71+
if isinstance(value, list):
72+
result[attr] = list(map(
73+
lambda x: x.to_dict() if hasattr(x, "to_dict") else
74+
x.value if isinstance(x, Enum) else x,
75+
value
76+
))
77+
elif isinstance(value, Enum):
78+
result[attr] = value.value
79+
elif hasattr(value, "to_dict"):
80+
result[attr] = value.to_dict()
81+
elif isinstance(value, dict):
82+
result[attr] = dict(map(
83+
lambda item: (item[0], item[1].to_dict())
84+
if hasattr(item[1], "to_dict") else
85+
(item[0], item[1].value)
86+
if isinstance(item[1], Enum) else item,
87+
value.items()
88+
))
89+
else:
90+
result[attr] = value
91+
92+
return result
93+
94+
def to_str(self):
95+
# type: () -> str
96+
"""Returns the string representation of the model"""
97+
return pprint.pformat(self.to_dict())
98+
99+
def __repr__(self):
100+
# type: () -> str
101+
"""For `print` and `pprint`"""
102+
return self.to_str()
103+
104+
def __eq__(self, other):
105+
# type: (object) -> bool
106+
"""Returns true if both objects are equal"""
107+
if not isinstance(other, CustomProductPrompts):
108+
return False
109+
110+
return self.__dict__ == other.__dict__
111+
112+
def __ne__(self, other):
113+
# type: (object) -> bool
114+
"""Returns true if both objects are not equal"""
115+
return not self == other
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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, Any
25+
from datetime import datetime
26+
27+
28+
class FreeTrialInformation(object):
29+
"""
30+
Defines the structure for paid skill product free trial information.
31+
32+
33+
:param free_trial_duration: Defines the free trial period for the paid skill product, in ISO_8601#Durations format.
34+
:type free_trial_duration: (optional) str
35+
36+
"""
37+
deserialized_types = {
38+
'free_trial_duration': 'str'
39+
} # type: Dict
40+
41+
attribute_map = {
42+
'free_trial_duration': 'freeTrialDuration'
43+
} # type: Dict
44+
supports_multiple_types = False
45+
46+
def __init__(self, free_trial_duration=None):
47+
# type: (Optional[str]) -> None
48+
"""Defines the structure for paid skill product free trial information.
49+
50+
:param free_trial_duration: Defines the free trial period for the paid skill product, in ISO_8601#Durations format.
51+
:type free_trial_duration: (optional) str
52+
"""
53+
self.__discriminator_value = None # type: str
54+
55+
self.free_trial_duration = free_trial_duration
56+
57+
def to_dict(self):
58+
# type: () -> Dict[str, object]
59+
"""Returns the model properties as a dict"""
60+
result = {} # type: Dict
61+
62+
for attr, _ in six.iteritems(self.deserialized_types):
63+
value = getattr(self, attr)
64+
if isinstance(value, list):
65+
result[attr] = list(map(
66+
lambda x: x.to_dict() if hasattr(x, "to_dict") else
67+
x.value if isinstance(x, Enum) else x,
68+
value
69+
))
70+
elif isinstance(value, Enum):
71+
result[attr] = value.value
72+
elif hasattr(value, "to_dict"):
73+
result[attr] = value.to_dict()
74+
elif isinstance(value, dict):
75+
result[attr] = dict(map(
76+
lambda item: (item[0], item[1].to_dict())
77+
if hasattr(item[1], "to_dict") else
78+
(item[0], item[1].value)
79+
if isinstance(item[1], Enum) else item,
80+
value.items()
81+
))
82+
else:
83+
result[attr] = value
84+
85+
return result
86+
87+
def to_str(self):
88+
# type: () -> str
89+
"""Returns the string representation of the model"""
90+
return pprint.pformat(self.to_dict())
91+
92+
def __repr__(self):
93+
# type: () -> str
94+
"""For `print` and `pprint`"""
95+
return self.to_str()
96+
97+
def __eq__(self, other):
98+
# type: (object) -> bool
99+
"""Returns true if both objects are equal"""
100+
if not isinstance(other, FreeTrialInformation):
101+
return False
102+
103+
return self.__dict__ == other.__dict__
104+
105+
def __ne__(self, other):
106+
# type: (object) -> bool
107+
"""Returns true if both objects are not equal"""
108+
return not self == other

0 commit comments

Comments
 (0)