Class: MetronomeSDK::Models::V1::Contracts::ProductUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/metronome_sdk/models/v1/contracts/product_update_params.rb

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(product_id: , starting_at: , billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::Contracts::ProductUpdateParams for more details.

Parameters:

  • product_id (String) (defaults to: )

    ID of the product to update

  • starting_at (Time) (defaults to: )

    Timestamp representing when the update should go into effect. It must be on an h

  • billable_metric_id (String) (defaults to: nil)

    Available for USAGE products only. If not provided, defaults to product’s curren

  • composite_product_ids (Array<String>) (defaults to: nil)

    Available for COMPOSITE products only. If not provided, defaults to product’s cu

  • composite_tags (Array<String>) (defaults to: nil)

    Available for COMPOSITE products only. If not provided, defaults to product’s cu

  • exclude_free_usage (Boolean) (defaults to: nil)

    Beta feature only available for composite products. If true, products with $0 wi

  • is_refundable (Boolean) (defaults to: nil)

    Defaults to product’s current refundability status. This field’s availability is

  • name (String) (defaults to: nil)

    displayed on invoices. If not provided, defaults to product’s current name.

  • netsuite_internal_item_id (String) (defaults to: nil)

    If not provided, defaults to product’s current netsuite_internal_item_id. This f

  • netsuite_overage_item_id (String) (defaults to: nil)

    Available for USAGE and COMPOSITE products only. If not provided, defaults to pr

  • presentation_group_key (Array<String>) (defaults to: nil)

    For USAGE products only. Groups usage line items on invoices. The superset of va

  • pricing_group_key (Array<String>) (defaults to: nil)

    For USAGE products only. If set, pricing for this product will be determined for

  • quantity_conversion (MetronomeSDK::Models::V1::Contracts::QuantityConversion, nil) (defaults to: nil)

    Optional. Only valid for USAGE products. If provided, the quantity will be conve

  • quantity_rounding (MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil) (defaults to: nil)

    Optional. Only valid for USAGE products. If provided, the quantity will be round

  • tags (Array<String>) (defaults to: nil)

    If not provided, defaults to product’s current tags

  • request_options (MetronomeSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 125


Instance Attribute Details

#billable_metric_idString?

Available for USAGE products only. If not provided, defaults to product’s current billable metric.

Returns:

  • (String, nil)


30
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 30

optional :billable_metric_id, String

#composite_product_idsArray<String>?

Available for COMPOSITE products only. If not provided, defaults to product’s current composite_product_ids.

Returns:

  • (Array<String>, nil)


37
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 37

optional :composite_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#composite_tagsArray<String>?

Available for COMPOSITE products only. If not provided, defaults to product’s current composite_tags.

Returns:

  • (Array<String>, nil)


44
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 44

optional :composite_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

#exclude_free_usageBoolean?

Beta feature only available for composite products. If true, products with $0 will not be included when computing composite usage. Defaults to false

Returns:

  • (Boolean, nil)


51
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 51

optional :exclude_free_usage, MetronomeSDK::Internal::Type::Boolean

#is_refundableBoolean?

Defaults to product’s current refundability status. This field’s availability is dependent on your client’s configuration.

Returns:

  • (Boolean, nil)


58
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 58

optional :is_refundable, MetronomeSDK::Internal::Type::Boolean

#nameString?

displayed on invoices. If not provided, defaults to product’s current name.

Returns:

  • (String, nil)


64
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 64

optional :name, String

#netsuite_internal_item_idString?

If not provided, defaults to product’s current netsuite_internal_item_id. This field’s availability is dependent on your client’s configuration.

Returns:

  • (String, nil)


71
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 71

optional :netsuite_internal_item_id, String

#netsuite_overage_item_idString?

Available for USAGE and COMPOSITE products only. If not provided, defaults to product’s current netsuite_overage_item_id. This field’s availability is dependent on your client’s configuration.

Returns:

  • (String, nil)


79
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 79

optional :netsuite_overage_item_id, String

#presentation_group_keyArray<String>?

For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

Returns:

  • (Array<String>, nil)


87
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 87

optional :presentation_group_key, MetronomeSDK::Internal::Type::ArrayOf[String]

#pricing_group_keyArray<String>?

For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

Returns:

  • (Array<String>, nil)


96
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 96

optional :pricing_group_key, MetronomeSDK::Internal::Type::ArrayOf[String]

#product_idString

ID of the product to update

Returns:

  • (String)


16
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 16

required :product_id, String

#quantity_conversionMetronomeSDK::Models::V1::Contracts::QuantityConversion?

Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is “multiply” and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be “divide”.



108
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 108

optional :quantity_conversion, -> { MetronomeSDK::V1::Contracts::QuantityConversion }, nil?: true

#quantity_roundingMetronomeSDK::Models::V1::Contracts::QuantityRounding?

Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is “round up” and the decimal places is 0, then the quantity will be rounded up to the nearest integer.



117
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 117

optional :quantity_rounding, -> { MetronomeSDK::V1::Contracts::QuantityRounding }, nil?: true

#starting_atTime

Timestamp representing when the update should go into effect. It must be on an hour boundary (e.g. 1:00, not 1:30).

Returns:

  • (Time)


23
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 23

required :starting_at, Time

#tagsArray<String>?

If not provided, defaults to product’s current tags

Returns:

  • (Array<String>, nil)


123
# File 'lib/metronome_sdk/models/v1/contracts/product_update_params.rb', line 123

optional :tags, MetronomeSDK::Internal::Type::ArrayOf[String]