Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MonetizationServiceClient

Hierarchy

Index

Constructors

constructor

Properties

Protected apiConfiguration

apiConfiguration: ApiConfiguration

ApiConfiguration instance to provide dependencies for this service client

Private userAgent

userAgent: string

Methods

callGetInSkillProduct

  • callGetInSkillProduct(acceptLanguage: string, productId: string): Promise<ApiResponse>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • productId: string

      Product Id.

    Returns Promise<ApiResponse>

callGetInSkillProducts

  • callGetInSkillProducts(acceptLanguage: string, purchasable?: string, entitled?: string, productType?: string, nextToken?: string, maxResults?: number): Promise<ApiResponse>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • Optional purchasable: string

      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.

    • Optional entitled: string

      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.

    • Optional productType: string

      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.

    • Optional nextToken: string

      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.

    • Optional maxResults: number

      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.

    Returns Promise<ApiResponse>

callGetInSkillProductsTransactions

  • callGetInSkillProductsTransactions(acceptLanguage: string, productId?: string, status?: string, fromLastModifiedTime?: string, toLastModifiedTime?: string, nextToken?: string, maxResults?: number): Promise<ApiResponse>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • Optional productId: string

      Product Id.

    • Optional status: string

      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.

    • Optional fromLastModifiedTime: string

      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'

    • Optional toLastModifiedTime: string

      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'

    • Optional nextToken: string

      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.

    • Optional maxResults: number

      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.

    Returns Promise<ApiResponse>

callGetVoicePurchaseSetting

  • Returns Promise<ApiResponse>

getInSkillProduct

  • getInSkillProduct(acceptLanguage: string, productId: string): Promise<InSkillProduct>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • productId: string

      Product Id.

    Returns Promise<InSkillProduct>

getInSkillProducts

  • getInSkillProducts(acceptLanguage: string, purchasable?: string, entitled?: string, productType?: string, nextToken?: string, maxResults?: number): Promise<InSkillProductsResponse>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • Optional purchasable: string

      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.

    • Optional entitled: string

      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.

    • Optional productType: string

      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.

    • Optional nextToken: string

      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.

    • Optional maxResults: number

      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.

    Returns Promise<InSkillProductsResponse>

getInSkillProductsTransactions

  • getInSkillProductsTransactions(acceptLanguage: string, productId?: string, status?: string, fromLastModifiedTime?: string, toLastModifiedTime?: string, nextToken?: string, maxResults?: number): Promise<InSkillProductTransactionsResponse>
  • Parameters

    • acceptLanguage: string

      User's locale/language in context

    • Optional productId: string

      Product Id.

    • Optional status: string

      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.

    • Optional fromLastModifiedTime: string

      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'

    • Optional toLastModifiedTime: string

      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'

    • Optional nextToken: string

      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.

    • Optional maxResults: number

      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.

    Returns Promise<InSkillProductTransactionsResponse>

getVoicePurchaseSetting

  • getVoicePurchaseSetting(): Promise<boolean>
  • Returns Promise<boolean>

Protected invoke

  • invoke(method: string, endpoint: string, path: string, pathParams: Map<string, string>, queryParams: Array<object>, headerParams: Array<object>, bodyParam: any, errors: Map<number, string>, nonJsonBody?: boolean): Promise<any>
  • Invocation wrapper to implement service operations in generated classes

    Parameters

    • method: string

      HTTP method, such as 'POST', 'GET', 'DELETE', etc.

    • endpoint: string

      base API url

    • path: string

      the path pattern with possible placeholders for path parameters in form {paramName}

    • pathParams: Map<string, string>

      path parameters collection

    • queryParams: Array<object>

      query parameters collection

    • headerParams: Array<object>

      headers collection

    • bodyParam: any

      if body parameter is present it is provided here, otherwise null or undefined

    • errors: Map<number, string>

      maps recognized status codes to messages

    • Optional nonJsonBody: boolean

      if the body is in JSON format

    Returns Promise<any>

withRequestInterceptors

  • withRequestInterceptors(...requestInterceptors: Array<function>): BaseServiceClient

withResponseInterceptors

  • withResponseInterceptors(...responseInterceptors: Array<function>): BaseServiceClient