Class: Recurly::Requests::UsageCreate

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/usage_create.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Request

#attributes

Method Summary

Methods inherited from Recurly::Request

#==, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::RequestCaster

#cast_request

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#amountFloat

Returns The amount of usage. Can be positive, negative, or 0. No decimals allowed, we will strip them. If the usage-based add-on is billed with a percentage, your usage will be a monetary amount you will want to format in cents. (e.g., $5.00 is “500”).

Returns:

  • (Float)

    The amount of usage. Can be positive, negative, or 0. No decimals allowed, we will strip them. If the usage-based add-on is billed with a percentage, your usage will be a monetary amount you will want to format in cents. (e.g., $5.00 is “500”).



11
# File 'lib/recurly/requests/usage_create.rb', line 11

define_attribute :amount, Float

#merchant_tagString

Returns Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.

Returns:

  • (String)

    Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.



15
# File 'lib/recurly/requests/usage_create.rb', line 15

define_attribute :merchant_tag, String

#recording_timestampDateTime

Returns When the usage was recorded in your system.

Returns:

  • (DateTime)

    When the usage was recorded in your system.



19
# File 'lib/recurly/requests/usage_create.rb', line 19

define_attribute :recording_timestamp, DateTime

#usage_timestampDateTime

Returns When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition.

Returns:

  • (DateTime)

    When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition.



23
# File 'lib/recurly/requests/usage_create.rb', line 23

define_attribute :usage_timestamp, DateTime