ask_sdk_model.services.monetization package¶
Submodules¶
Note
Canonical imports have been added in the __init__.py
of the package.
This helps in importing the class directly from the package, than
through the module.
For eg: if package a
has module b
with
class C
, you can do from a import C
instead of
from a.b import C
.
ask_sdk_model.services.monetization.entitled_state module¶
-
class
ask_sdk_model.services.monetization.entitled_state.
EntitledState
¶ Bases:
enum.Enum
State determining if the user is entitled to the product. Note - Any new values introduced later should be treated as 'NOT_ENTITLED'. * 'ENTITLED' - The user is entitled to the product. * 'NOT_ENTITLED' - The user is not entitled to the product.
Allowed enum values: [ENTITLED, NOT_ENTITLED]
-
ENTITLED
= 'ENTITLED'¶
-
NOT_ENTITLED
= 'NOT_ENTITLED'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.entitlement_reason module¶
-
class
ask_sdk_model.services.monetization.entitlement_reason.
EntitlementReason
¶ Bases:
enum.Enum
Reason for the entitlement status. * 'PURCHASED' - The user is entitled to the product because they purchased it. * 'NOT_PURCHASED' - The user is not entitled to the product because they have not purchased it. * 'AUTO_ENTITLED' - The user is auto entitled to the product because they have subscribed to a broader service.
Allowed enum values: [PURCHASED, NOT_PURCHASED, AUTO_ENTITLED]
-
AUTO_ENTITLED
= 'AUTO_ENTITLED'¶
-
NOT_PURCHASED
= 'NOT_PURCHASED'¶
-
PURCHASED
= 'PURCHASED'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.error module¶
-
class
ask_sdk_model.services.monetization.error.
Error
(message=None)¶ Bases:
object
Describes error detail
Parameters: message ((optional) str) – Readable description of error -
attribute_map
= {'message': 'message'}¶
-
deserialized_types
= {'message': 'str'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.in_skill_product module¶
-
class
ask_sdk_model.services.monetization.in_skill_product.
InSkillProduct
(product_id=None, reference_name=None, name=None, object_type=None, summary=None, purchasable=None, entitled=None, entitlement_reason=None, active_entitlement_count=None, purchase_mode=None)¶ Bases:
object
Parameters: - product_id ((optional) str) – Product Id
- reference_name ((optional) str) – Developer selected in-skill product name. This is for developer reference only.
- name ((optional) str) – Name of the product in the language from the "Accept-Language" header
- object_type ((optional) ask_sdk_model.services.monetization.product_type.ProductType) –
- summary ((optional) str) – Product summary in the language from the "Accept-Language" header
- purchasable ((optional) ask_sdk_model.services.monetization.purchasable_state.PurchasableState) –
- entitled ((optional) ask_sdk_model.services.monetization.entitled_state.EntitledState) –
- entitlement_reason ((optional) ask_sdk_model.services.monetization.entitlement_reason.EntitlementReason) –
- active_entitlement_count ((optional) int) – Total active purchases of the product made by the user. Note - For ENTITLEMENT and SUBSCRIPTION product types, the value is either zero(NOT_ENTITLED) or one(ENTITLED). For CONSUMABLE product type the value is zero or more, as CONSUMABLE can be re-purchased.
- purchase_mode ((optional) ask_sdk_model.services.monetization.purchase_mode.PurchaseMode) –
-
attribute_map
= {'active_entitlement_count': 'activeEntitlementCount', 'entitled': 'entitled', 'entitlement_reason': 'entitlementReason', 'name': 'name', 'object_type': 'type', 'product_id': 'productId', 'purchasable': 'purchasable', 'purchase_mode': 'purchaseMode', 'reference_name': 'referenceName', 'summary': 'summary'}¶
-
deserialized_types
= {'active_entitlement_count': 'int', 'entitled': 'ask_sdk_model.services.monetization.entitled_state.EntitledState', 'entitlement_reason': 'ask_sdk_model.services.monetization.entitlement_reason.EntitlementReason', 'name': 'str', 'object_type': 'ask_sdk_model.services.monetization.product_type.ProductType', 'product_id': 'str', 'purchasable': 'ask_sdk_model.services.monetization.purchasable_state.PurchasableState', 'purchase_mode': 'ask_sdk_model.services.monetization.purchase_mode.PurchaseMode', 'reference_name': 'str', 'summary': 'str'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
ask_sdk_model.services.monetization.in_skill_product_transactions_response module¶
-
class
ask_sdk_model.services.monetization.in_skill_product_transactions_response.
InSkillProductTransactionsResponse
(results=None, metadata=None)¶ Bases:
object
Parameters: - results ((optional) list[ask_sdk_model.services.monetization.transactions.Transactions]) – List of transactions of in skill products purchases
- metadata ((optional) ask_sdk_model.services.monetization.metadata.Metadata) –
-
attribute_map
= {'metadata': 'metadata', 'results': 'results'}¶
-
deserialized_types
= {'metadata': 'ask_sdk_model.services.monetization.metadata.Metadata', 'results': 'list[ask_sdk_model.services.monetization.transactions.Transactions]'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
ask_sdk_model.services.monetization.in_skill_products_response module¶
-
class
ask_sdk_model.services.monetization.in_skill_products_response.
InSkillProductsResponse
(in_skill_products=None, is_truncated=None, next_token=None)¶ Bases:
object
Parameters: - in_skill_products ((optional) list[ask_sdk_model.services.monetization.in_skill_product.InSkillProduct]) – List of In-Skill Products
- is_truncated ((optional) bool) –
- next_token ((optional) str) –
-
attribute_map
= {'in_skill_products': 'inSkillProducts', 'is_truncated': 'isTruncated', 'next_token': 'nextToken'}¶
-
deserialized_types
= {'in_skill_products': 'list[ask_sdk_model.services.monetization.in_skill_product.InSkillProduct]', 'is_truncated': 'bool', 'next_token': 'str'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
ask_sdk_model.services.monetization.metadata module¶
-
class
ask_sdk_model.services.monetization.metadata.
Metadata
(result_set=None)¶ Bases:
object
Parameters: result_set ((optional) ask_sdk_model.services.monetization.result_set.ResultSet) – -
attribute_map
= {'result_set': 'resultSet'}¶
-
deserialized_types
= {'result_set': 'ask_sdk_model.services.monetization.result_set.ResultSet'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.monetization_service_client module¶
-
class
ask_sdk_model.services.monetization.monetization_service_client.
MonetizationServiceClient
(api_configuration, custom_user_agent=None)¶ Bases:
ask_sdk_model.services.base_service_client.BaseServiceClient
ServiceClient for calling the MonetizationService APIs.
Parameters: api_configuration (ask_sdk_model.services.api_configuration.ApiConfiguration) – Instance of ApiConfiguration -
get_in_skill_product
(accept_language, product_id, **kwargs)¶ Get In-Skill Product information based on user context for the Skill.
Parameters: - accept_language (str) – (required) User’s locale/language in context
- product_id (str) – (required) Product Id.
- full_response (boolean) – Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False.
Return type: Union[ApiResponse, Error, InSkillProduct]
-
get_in_skill_products
(accept_language, **kwargs)¶ Gets In-Skill Products based on user’s context for the Skill.
Parameters: - accept_language (str) – (required) User’s locale/language in context
- purchasable (str) – Filter products based on whether they are purchasable by the user or not. * ‘PURCHASABLE’ - Products that are purchasable by the user. * ‘NOT_PURCHASABLE’ - Products that are not purchasable by the user.
- entitled (str) – Filter products based on whether they are entitled to the user or not. * ‘ENTITLED’ - Products that the user is entitled to. * ‘NOT_ENTITLED’ - Products that the user is not entitled to.
- product_type (str) – Product type. * ‘SUBSCRIPTION’ - Once purchased, customers will own the content for the subscription period. * ‘ENTITLEMENT’ - Once purchased, customers will own the content forever. * ‘CONSUMABLE’ - Once purchased, customers will be entitled to the content until it is consumed. It can also be re-purchased.
- next_token (str) – When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element, the value of which can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that In-Skill Products API understands. Token has expiry of 24 hours.
- max_results (float) – sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 100 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned because maxResults was exceeded, the response contains isTruncated = true.
- full_response (boolean) – Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False.
Return type: Union[ApiResponse, Error, InSkillProductsResponse]
-
get_in_skill_products_transactions
(accept_language, **kwargs)¶ Returns transactions of all in skill products purchases of the customer
Parameters: - accept_language (str) – (required) User’s locale/language in context
- product_id (str) – Product Id.
- status (str) – Transaction status for in skill product purchases. * ‘PENDING_APPROVAL_BY_PARENT’ - The transaction is pending approval from parent. * ‘APPROVED_BY_PARENT’ - The transaction was approved by parent and fulfilled successfully.. * ‘DENIED_BY_PARENT’ - The transaction was declined by parent and hence not fulfilled. * ‘EXPIRED_NO_ACTION_BY_PARENT’ - The transaction was expired due to no response from parent and hence not fulfilled. * ‘ERROR’ - The transaction was not fullfiled as there was an error while processing the transaction.
- from_last_modified_time (datetime) – Filter transactions based on last modified time stamp, FROM duration in format (UTC ISO 8601) i.e. yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
- to_last_modified_time (datetime) – Filter transactions based on last modified time stamp, TO duration in format (UTC ISO 8601) i.e. yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
- next_token (str) – When response to this API call is truncated, the response also includes the nextToken in metadata, the value of which can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that In-Skill Products API understands. Token has expiry of 24 hours.
- max_results (float) – sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 100 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned because maxResults was exceeded, the response contains nextToken which can be used to fetch next set of result.
- full_response (boolean) – Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False.
Return type: Union[ApiResponse, Error, InSkillProductTransactionsResponse]
-
get_voice_purchase_setting
(**kwargs)¶ Returns whether or not voice purchasing is enabled for the skill
Parameters: full_response (boolean) – Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. Return type: Union[ApiResponse, bool, Error]
-
ask_sdk_model.services.monetization.product_type module¶
-
class
ask_sdk_model.services.monetization.product_type.
ProductType
¶ Bases:
enum.Enum
Product type. * 'SUBSCRIPTION' - Once purchased, customers will own the content for the subscription period. * 'ENTITLEMENT' - Once purchased, customers will own the content forever. * 'CONSUMABLE' - Once purchased, customers will be entitled to the content until it is consumed. It can also be re-purchased.
Allowed enum values: [SUBSCRIPTION, ENTITLEMENT, CONSUMABLE]
-
CONSUMABLE
= 'CONSUMABLE'¶
-
ENTITLEMENT
= 'ENTITLEMENT'¶
-
SUBSCRIPTION
= 'SUBSCRIPTION'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.purchasable_state module¶
-
class
ask_sdk_model.services.monetization.purchasable_state.
PurchasableState
¶ Bases:
enum.Enum
State determining if the product is purchasable by the user. Note - Any new values introduced later should be treated as 'NOT_PURCHASABLE'. * 'PURCHASABLE' - The product is purchasable by the user. * 'NOT_PURCHASABLE' - The product is not purchasable by the user.
Allowed enum values: [PURCHASABLE, NOT_PURCHASABLE]
-
NOT_PURCHASABLE
= 'NOT_PURCHASABLE'¶
-
PURCHASABLE
= 'PURCHASABLE'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.purchase_mode module¶
-
class
ask_sdk_model.services.monetization.purchase_mode.
PurchaseMode
¶ Bases:
enum.Enum
Indicates if the entitlements are for TEST or LIVE purchases. * 'TEST' - test purchases made by developers or beta testers. Purchase not sent to payment processing. * 'LIVE' - purchases made by live customers. Purchase sent to payment processing.
Allowed enum values: [TEST, LIVE]
-
LIVE
= 'LIVE'¶
-
TEST
= 'TEST'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.result_set module¶
-
class
ask_sdk_model.services.monetization.result_set.
ResultSet
(next_token=None)¶ Bases:
object
Parameters: next_token ((optional) str) – -
attribute_map
= {'next_token': 'nextToken'}¶
-
deserialized_types
= {'next_token': 'str'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.status module¶
-
class
ask_sdk_model.services.monetization.status.
Status
¶ Bases:
enum.Enum
Transaction status for in skill product purchases. * 'PENDING_APPROVAL_BY_PARENT' - The transaction is pending approval from parent. * 'APPROVED_BY_PARENT' - The transaction was approved by parent and fulfilled successfully.. * 'DENIED_BY_PARENT' - The transaction was declined by parent and hence not fulfilled. * 'EXPIRED_NO_ACTION_BY_PARENT' - The transaction was expired due to no response from parent and hence not fulfilled. * 'ERROR' - The transaction was not fullfiled as there was an error while processing the transaction.
Allowed enum values: [PENDING_APPROVAL_BY_PARENT, APPROVED_BY_PARENT, DENIED_BY_PARENT, EXPIRED_NO_ACTION_BY_PARENT, ERROR]
-
APPROVED_BY_PARENT
= 'APPROVED_BY_PARENT'¶
-
DENIED_BY_PARENT
= 'DENIED_BY_PARENT'¶
-
ERROR
= 'ERROR'¶
-
EXPIRED_NO_ACTION_BY_PARENT
= 'EXPIRED_NO_ACTION_BY_PARENT'¶
-
PENDING_APPROVAL_BY_PARENT
= 'PENDING_APPROVAL_BY_PARENT'¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model
-
ask_sdk_model.services.monetization.transactions module¶
-
class
ask_sdk_model.services.monetization.transactions.
Transactions
(status=None, product_id=None, created_time=None, last_modified_time=None)¶ Bases:
object
Parameters: - status ((optional) ask_sdk_model.services.monetization.status.Status) –
- product_id ((optional) str) – Product Id
- created_time ((optional) datetime) – Time at which transaction's was initiated in ISO 8601 format i.e. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
- last_modified_time ((optional) datetime) – Time at which transaction's status was last updated in ISO 8601 format i.e. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
-
attribute_map
= {'created_time': 'createdTime', 'last_modified_time': 'lastModifiedTime', 'product_id': 'productId', 'status': 'status'}¶
-
deserialized_types
= {'created_time': 'datetime', 'last_modified_time': 'datetime', 'product_id': 'str', 'status': 'ask_sdk_model.services.monetization.status.Status'}¶
-
supports_multiple_types
= False¶
-
to_dict
()¶ Returns the model properties as a dict
-
to_str
()¶ Returns the string representation of the model