Class: AWSCDK::BillingConductor::CfnCustomLineItem::CustomLineItemChargeDetailsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BillingConductor::CfnCustomLineItem::CustomLineItemChargeDetailsProperty
- 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
-
#flat ⇒ AWSCDK::IResolvable, ...
readonly
A
CustomLineItemFlatChargeDetailsthat describes the charge details of a flat custom line item. -
#line_item_filters ⇒ AWSCDK::IResolvable, ...
readonly
A representation of the line item filter.
-
#percentage ⇒ AWSCDK::IResolvable, ...
readonly
A
CustomLineItemPercentageChargeDetailsthat describes the charge details of a percentage custom line item. -
#type ⇒ String
readonly
The type of the custom line item that indicates whether the charge is a fee or credit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, flat: nil, line_item_filters: nil, percentage: nil) ⇒ CustomLineItemChargeDetailsProperty
constructor
A new instance of CustomLineItemChargeDetailsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, flat: nil, line_item_filters: nil, percentage: nil) ⇒ CustomLineItemChargeDetailsProperty
Returns a new instance of CustomLineItemChargeDetailsProperty.
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
#flat ⇒ AWSCDK::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_filters ⇒ AWSCDK::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 |
#percentage ⇒ AWSCDK::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 |
#type ⇒ String (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_properties ⇒ Object
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_jsii ⇒ Object
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 |