You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::MarketplaceMetering::Types::UsageRecord

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-marketplacemetering/lib/aws-sdk-marketplacemetering/types.rb

Overview

Note:

When making an API call, you may pass UsageRecord data as a hash:

{
  timestamp: Time.now, # required
  customer_identifier: "CustomerIdentifier", # required
  dimension: "UsageDimension", # required
  quantity: 1, # required
}

A UsageRecord indicates a quantity of usage for a given product, customer, dimension and time.

Multiple requests with the same UsageRecords as input will be deduplicated to prevent double charges.

Instance Attribute Summary collapse

Instance Attribute Details

#customer_identifierString

The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.

Returns:

  • (String)


218
219
220
221
222
223
224
# File 'gems/aws-sdk-marketplacemetering/lib/aws-sdk-marketplacemetering/types.rb', line 218

class UsageRecord < Struct.new(
  :timestamp,
  :customer_identifier,
  :dimension,
  :quantity)
  include Aws::Structure
end

#dimensionString

During the process of registering a product on AWS Marketplace, up to eight dimensions are specified. These represent different units of value in your application.

Returns:

  • (String)


218
219
220
221
222
223
224
# File 'gems/aws-sdk-marketplacemetering/lib/aws-sdk-marketplacemetering/types.rb', line 218

class UsageRecord < Struct.new(
  :timestamp,
  :customer_identifier,
  :dimension,
  :quantity)
  include Aws::Structure
end

#quantityInteger

The quantity of usage consumed by the customer for the given dimension and time.

Returns:

  • (Integer)


218
219
220
221
222
223
224
# File 'gems/aws-sdk-marketplacemetering/lib/aws-sdk-marketplacemetering/types.rb', line 218

class UsageRecord < Struct.new(
  :timestamp,
  :customer_identifier,
  :dimension,
  :quantity)
  include Aws::Structure
end

#timestampTime

Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions of the timestamp will be ignored.

Your application can meter usage for up to one hour in the past.

Returns:

  • (Time)


218
219
220
221
222
223
224
# File 'gems/aws-sdk-marketplacemetering/lib/aws-sdk-marketplacemetering/types.rb', line 218

class UsageRecord < Struct.new(
  :timestamp,
  :customer_identifier,
  :dimension,
  :quantity)
  include Aws::Structure
end