Class: AWSCDK::BillingConductor::CfnCustomLineItem::CustomLineItemChargeDetailsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
billing_conductor/cfn_custom_line_item.rb

Overview

The charge details of a custom line item.

It should contain only one of Flat or Percentage .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, flat: nil, line_item_filters: nil, percentage: nil) ⇒ CustomLineItemChargeDetailsProperty

Returns a new instance of CustomLineItemChargeDetailsProperty.

Parameters:



716
717
718
719
720
721
722
723
724
725
# File 'billing_conductor/cfn_custom_line_item.rb', line 716

def initialize(type:, flat: nil, line_item_filters: nil, percentage: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @flat = flat.is_a?(Hash) ? ::AWSCDK::BillingConductor::CfnCustomLineItem::CustomLineItemFlatChargeDetailsProperty.new(**flat.transform_keys(&:to_sym)) : flat
  Jsii::Type.check_type(@flat, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iaWxsaW5nY29uZHVjdG9yLkNmbkN1c3RvbUxpbmVJdGVtLkN1c3RvbUxpbmVJdGVtRmxhdENoYXJnZURldGFpbHNQcm9wZXJ0eSJ9XX19")), "flat") unless @flat.nil?
  @line_item_filters = line_item_filters
  Jsii::Type.check_type(@line_item_filters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmlsbGluZ2NvbmR1Y3Rvci5DZm5DdXN0b21MaW5lSXRlbS5MaW5lSXRlbUZpbHRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "lineItemFilters") unless @line_item_filters.nil?
  @percentage = percentage.is_a?(Hash) ? ::AWSCDK::BillingConductor::CfnCustomLineItem::CustomLineItemPercentageChargeDetailsProperty.new(**percentage.transform_keys(&:to_sym)) : percentage
  Jsii::Type.check_type(@percentage, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iaWxsaW5nY29uZHVjdG9yLkNmbkN1c3RvbUxpbmVJdGVtLkN1c3RvbUxpbmVJdGVtUGVyY2VudGFnZUNoYXJnZURldGFpbHNQcm9wZXJ0eSJ9XX19")), "percentage") unless @percentage.nil?
end

Instance Attribute Details

#flatAWSCDK::IResolvable, ... (readonly)

A CustomLineItemFlatChargeDetails that describes the charge details of a flat custom line item.



736
737
738
# File 'billing_conductor/cfn_custom_line_item.rb', line 736

def flat
  @flat
end

#line_item_filtersAWSCDK::IResolvable, ... (readonly)

A representation of the line item filter.



741
742
743
# File 'billing_conductor/cfn_custom_line_item.rb', line 741

def line_item_filters
  @line_item_filters
end

#percentageAWSCDK::IResolvable, ... (readonly)

A CustomLineItemPercentageChargeDetails that describes the charge details of a percentage custom line item.



746
747
748
# File 'billing_conductor/cfn_custom_line_item.rb', line 746

def percentage
  @percentage
end

#typeString (readonly)

The type of the custom line item that indicates whether the charge is a fee or credit.



731
732
733
# File 'billing_conductor/cfn_custom_line_item.rb', line 731

def type
  @type
end

Class Method Details

.jsii_propertiesObject



748
749
750
751
752
753
754
755
# File 'billing_conductor/cfn_custom_line_item.rb', line 748

def self.jsii_properties
  {
    :type => "type",
    :flat => "flat",
    :line_item_filters => "lineItemFilters",
    :percentage => "percentage",
  }
end

Instance Method Details

#to_jsiiObject



757
758
759
760
761
762
763
764
765
766
# File 'billing_conductor/cfn_custom_line_item.rb', line 757

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "flat" => @flat,
    "lineItemFilters" => @line_item_filters,
    "percentage" => @percentage,
  })
  result.compact
end