Class: Killbill::Plugin::Model::InvoiceItem
- Defined in:
- lib/killbill/gen/api/invoice_item.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#bundle_id ⇒ Object
Returns the value of attribute bundle_id.
-
#child_account_id ⇒ Object
Returns the value of attribute child_account_id.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
-
#invoice_item_type ⇒ Object
Returns the value of attribute invoice_item_type.
-
#item_details ⇒ Object
Returns the value of attribute item_details.
-
#linked_item_id ⇒ Object
Returns the value of attribute linked_item_id.
-
#phase_name ⇒ Object
Returns the value of attribute phase_name.
-
#plan_name ⇒ Object
Returns the value of attribute plan_name.
-
#pretty_phase_name ⇒ Object
Returns the value of attribute pretty_phase_name.
-
#pretty_plan_name ⇒ Object
Returns the value of attribute pretty_plan_name.
-
#pretty_product_name ⇒ Object
Returns the value of attribute pretty_product_name.
-
#pretty_usage_name ⇒ Object
Returns the value of attribute pretty_usage_name.
-
#product_name ⇒ Object
Returns the value of attribute product_name.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#rate ⇒ Object
Returns the value of attribute rate.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
-
#usage_name ⇒ Object
Returns the value of attribute usage_name.
Instance Method Summary collapse
-
#initialize ⇒ InvoiceItem
constructor
A new instance of InvoiceItem.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ InvoiceItem
Returns a new instance of InvoiceItem.
39 40 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 39 def initialize() end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def account_id @account_id end |
#amount ⇒ Object
Returns the value of attribute amount.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def amount @amount end |
#bundle_id ⇒ Object
Returns the value of attribute bundle_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def bundle_id @bundle_id end |
#child_account_id ⇒ Object
Returns the value of attribute child_account_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def child_account_id @child_account_id end |
#created_date ⇒ Object
Returns the value of attribute created_date.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def created_date @created_date end |
#currency ⇒ Object
Returns the value of attribute currency.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def description @description end |
#end_date ⇒ Object
Returns the value of attribute end_date.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def end_date @end_date end |
#id ⇒ Object
Returns the value of attribute id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def id @id end |
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def invoice_id @invoice_id end |
#invoice_item_type ⇒ Object
Returns the value of attribute invoice_item_type.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def invoice_item_type @invoice_item_type end |
#item_details ⇒ Object
Returns the value of attribute item_details.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def item_details @item_details end |
#linked_item_id ⇒ Object
Returns the value of attribute linked_item_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def linked_item_id @linked_item_id end |
#phase_name ⇒ Object
Returns the value of attribute phase_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def phase_name @phase_name end |
#plan_name ⇒ Object
Returns the value of attribute plan_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def plan_name @plan_name end |
#pretty_phase_name ⇒ Object
Returns the value of attribute pretty_phase_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def pretty_phase_name @pretty_phase_name end |
#pretty_plan_name ⇒ Object
Returns the value of attribute pretty_plan_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def pretty_plan_name @pretty_plan_name end |
#pretty_product_name ⇒ Object
Returns the value of attribute pretty_product_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def pretty_product_name @pretty_product_name end |
#pretty_usage_name ⇒ Object
Returns the value of attribute pretty_usage_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def pretty_usage_name @pretty_usage_name end |
#product_name ⇒ Object
Returns the value of attribute product_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def product_name @product_name end |
#quantity ⇒ Object
Returns the value of attribute quantity.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def quantity @quantity end |
#rate ⇒ Object
Returns the value of attribute rate.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def rate @rate end |
#start_date ⇒ Object
Returns the value of attribute start_date.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def start_date @start_date end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def subscription_id @subscription_id end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def updated_date @updated_date end |
#usage_name ⇒ Object
Returns the value of attribute usage_name.
37 38 39 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 37 def usage_name @usage_name end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 42 def to_java() # conversion for id [type = java.util.UUID] @id = java.util.UUID.fromString(@id.to_s) unless @id.nil? # conversion for created_date [type = org.joda.time.DateTime] if !@created_date.nil? @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for updated_date [type = org.joda.time.DateTime] if !@updated_date.nil? @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType] @invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of( @invoice_item_type.to_s ) unless @invoice_item_type.nil? # conversion for invoice_id [type = java.util.UUID] @invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil? # conversion for account_id [type = java.util.UUID] @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil? # conversion for child_account_id [type = java.util.UUID] @child_account_id = java.util.UUID.fromString(@child_account_id.to_s) unless @child_account_id.nil? # conversion for start_date [type = org.joda.time.LocalDate] if !@start_date.nil? @start_date = Java::org.joda.time.LocalDate.parse(@start_date.to_s) end # conversion for end_date [type = org.joda.time.LocalDate] if !@end_date.nil? @end_date = Java::org.joda.time.LocalDate.parse(@end_date.to_s) end # conversion for amount [type = java.math.BigDecimal] if @amount.nil? @amount = java.math.BigDecimal::ZERO else @amount = java.math.BigDecimal.new(@amount.to_s) end # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil? # conversion for description [type = java.lang.String] @description = @description.to_s unless @description.nil? # conversion for bundle_id [type = java.util.UUID] @bundle_id = java.util.UUID.fromString(@bundle_id.to_s) unless @bundle_id.nil? # conversion for subscription_id [type = java.util.UUID] @subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil? # conversion for product_name [type = java.lang.String] @product_name = @product_name.to_s unless @product_name.nil? # conversion for pretty_product_name [type = java.lang.String] @pretty_product_name = @pretty_product_name.to_s unless @pretty_product_name.nil? # conversion for plan_name [type = java.lang.String] @plan_name = @plan_name.to_s unless @plan_name.nil? # conversion for pretty_plan_name [type = java.lang.String] @pretty_plan_name = @pretty_plan_name.to_s unless @pretty_plan_name.nil? # conversion for phase_name [type = java.lang.String] @phase_name = @phase_name.to_s unless @phase_name.nil? # conversion for pretty_phase_name [type = java.lang.String] @pretty_phase_name = @pretty_phase_name.to_s unless @pretty_phase_name.nil? # conversion for usage_name [type = java.lang.String] @usage_name = @usage_name.to_s unless @usage_name.nil? # conversion for pretty_usage_name [type = java.lang.String] @pretty_usage_name = @pretty_usage_name.to_s unless @pretty_usage_name.nil? # conversion for rate [type = java.math.BigDecimal] if @rate.nil? @rate = java.math.BigDecimal::ZERO else @rate = java.math.BigDecimal.new(@rate.to_s) end # conversion for linked_item_id [type = java.util.UUID] @linked_item_id = java.util.UUID.fromString(@linked_item_id.to_s) unless @linked_item_id.nil? # conversion for quantity [type = java.lang.Integer] @quantity = @quantity # conversion for item_details [type = java.lang.String] @item_details = @item_details.to_s unless @item_details.nil? self end |
#to_ruby(j_obj) ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/killbill/gen/api/invoice_item.rb', line 141 def to_ruby(j_obj) # conversion for id [type = java.util.UUID] @id = j_obj.id @id = @id.nil? ? nil : @id.to_s # conversion for created_date [type = org.joda.time.DateTime] @created_date = j_obj.created_date if !@created_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@created_date) @created_date = DateTime.iso8601(str) end # conversion for updated_date [type = org.joda.time.DateTime] @updated_date = j_obj.updated_date if !@updated_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@updated_date) @updated_date = DateTime.iso8601(str) end # conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType] @invoice_item_type = j_obj.invoice_item_type @invoice_item_type = @invoice_item_type.to_s.to_sym unless @invoice_item_type.nil? # conversion for invoice_id [type = java.util.UUID] @invoice_id = j_obj.invoice_id @invoice_id = @invoice_id.nil? ? nil : @invoice_id.to_s # conversion for account_id [type = java.util.UUID] @account_id = j_obj.account_id @account_id = @account_id.nil? ? nil : @account_id.to_s # conversion for child_account_id [type = java.util.UUID] @child_account_id = j_obj.child_account_id @child_account_id = @child_account_id.nil? ? nil : @child_account_id.to_s # conversion for start_date [type = org.joda.time.LocalDate] @start_date = j_obj.start_date if !@start_date.nil? @start_date = @start_date.to_s end # conversion for end_date [type = org.joda.time.LocalDate] @end_date = j_obj.end_date if !@end_date.nil? @end_date = @end_date.to_s end # conversion for amount [type = java.math.BigDecimal] @amount = j_obj.amount @amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s) # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = j_obj.currency @currency = @currency.to_s.to_sym unless @currency.nil? # conversion for description [type = java.lang.String] @description = j_obj.description # conversion for bundle_id [type = java.util.UUID] @bundle_id = j_obj.bundle_id @bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s # conversion for subscription_id [type = java.util.UUID] @subscription_id = j_obj.subscription_id @subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s # conversion for product_name [type = java.lang.String] @product_name = j_obj.product_name # conversion for pretty_product_name [type = java.lang.String] @pretty_product_name = j_obj.pretty_product_name # conversion for plan_name [type = java.lang.String] @plan_name = j_obj.plan_name # conversion for pretty_plan_name [type = java.lang.String] @pretty_plan_name = j_obj.pretty_plan_name # conversion for phase_name [type = java.lang.String] @phase_name = j_obj.phase_name # conversion for pretty_phase_name [type = java.lang.String] @pretty_phase_name = j_obj.pretty_phase_name # conversion for usage_name [type = java.lang.String] @usage_name = j_obj.usage_name # conversion for pretty_usage_name [type = java.lang.String] @pretty_usage_name = j_obj.pretty_usage_name # conversion for rate [type = java.math.BigDecimal] @rate = j_obj.rate @rate = @rate.nil? ? 0 : BigDecimal.new(@rate.to_s) # conversion for linked_item_id [type = java.util.UUID] @linked_item_id = j_obj.linked_item_id @linked_item_id = @linked_item_id.nil? ? nil : @linked_item_id.to_s # conversion for quantity [type = java.lang.Integer] @quantity = j_obj.quantity # conversion for item_details [type = java.lang.String] @item_details = j_obj.item_details self end |