Class: AdvancedBilling::Component
- Defined in:
- lib/advanced_billing/models/component.rb
Overview
Component Model.
Instance Attribute Summary collapse
-
#accounting_code ⇒ String
E.g.
-
#allow_fractional_quantities ⇒ TrueClass | FalseClass
(Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
-
#archived ⇒ TrueClass | FalseClass
Boolean flag describing whether a component is archived or not.
-
#archived_at ⇒ DateTime
Timestamp indicating when this component was archived.
-
#created_at ⇒ DateTime
Timestamp indicating when this component was created.
-
#default_price_point_id ⇒ Integer
The description of the component.
-
#default_price_point_name ⇒ String
URL that points to the location to read the existing price points via GET request.
-
#description ⇒ String
The description of the component.
-
#downgrade_credit ⇒ CreditType
The type of credit to be created when upgrading/downgrading.
-
#event_based_billing_metric_id ⇒ Integer
(Only for Event Based Components) This is an ID of a metric attached to the component.
-
#handle ⇒ String
The component API handle.
-
#hide_date_range_on_invoice ⇒ TrueClass | FalseClass
(Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
-
#id ⇒ Integer
The unique ID assigned to the component by Chargify.
-
#interval ⇒ Integer
The numerical interval.
-
#interval_unit ⇒ IntervalUnit
A string representing the interval unit for this component’s default price point, either month or day.
-
#item_category ⇒ ItemCategory
One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other.
-
#kind ⇒ ComponentKind
A handle for the component type.
-
#name ⇒ String
The name of the Component, suitable for display on statements.
-
#overage_prices ⇒ Array[ComponentPrice]
An array of price brackets.
-
#price_per_unit_in_cents ⇒ Integer
deprecated - use unit_price instead.
-
#price_point_count ⇒ Integer
Count for the number of price points associated with the component.
-
#price_points_url ⇒ String
URL that points to the location to read the existing price points via GET request.
-
#prices ⇒ Array[ComponentPrice]
An array of price brackets.
-
#pricing_scheme ⇒ PricingScheme
The component API handle.
-
#product_family_id ⇒ Integer
The id of the Product Family to which the Component belongs.
-
#product_family_name ⇒ String
The name of the Product Family to which the Component belongs.
-
#recurring ⇒ TrueClass | FalseClass
A string representing the tax code related to the component type.
-
#tax_code ⇒ String
A string representing the tax code related to the component type.
-
#taxable ⇒ TrueClass | FalseClass
Boolean flag describing whether a component is taxable or not.
-
#unit_name ⇒ String
The name of the unit that the component’s usage is measured in.
-
#unit_price ⇒ String
The amount the customer will be charged per unit.
-
#updated_at ⇒ DateTime
Timestamp indicating when this component was updated.
-
#upgrade_charge ⇒ CreditType
The type of credit to be created when upgrading/downgrading.
-
#use_site_exchange_rate ⇒ TrueClass | FalseClass
One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(id: SKIP, name: SKIP, handle: SKIP, pricing_scheme: SKIP, unit_name: SKIP, unit_price: SKIP, product_family_id: SKIP, product_family_name: SKIP, price_per_unit_in_cents: SKIP, kind: SKIP, archived: SKIP, taxable: SKIP, description: SKIP, default_price_point_id: SKIP, overage_prices: SKIP, prices: SKIP, price_point_count: SKIP, price_points_url: SKIP, default_price_point_name: SKIP, tax_code: SKIP, recurring: SKIP, upgrade_charge: SKIP, downgrade_credit: SKIP, created_at: SKIP, updated_at: SKIP, archived_at: SKIP, hide_date_range_on_invoice: SKIP, allow_fractional_quantities: SKIP, item_category: SKIP, use_site_exchange_rate: SKIP, accounting_code: SKIP, event_based_billing_metric_id: SKIP, interval: SKIP, interval_unit: SKIP, additional_properties: {}) ⇒ Component
constructor
A new instance of Component.
- #to_custom_archived_at ⇒ Object
- #to_custom_created_at ⇒ Object
- #to_custom_updated_at ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(id: SKIP, name: SKIP, handle: SKIP, pricing_scheme: SKIP, unit_name: SKIP, unit_price: SKIP, product_family_id: SKIP, product_family_name: SKIP, price_per_unit_in_cents: SKIP, kind: SKIP, archived: SKIP, taxable: SKIP, description: SKIP, default_price_point_id: SKIP, overage_prices: SKIP, prices: SKIP, price_point_count: SKIP, price_points_url: SKIP, default_price_point_name: SKIP, tax_code: SKIP, recurring: SKIP, upgrade_charge: SKIP, downgrade_credit: SKIP, created_at: SKIP, updated_at: SKIP, archived_at: SKIP, hide_date_range_on_invoice: SKIP, allow_fractional_quantities: SKIP, item_category: SKIP, use_site_exchange_rate: SKIP, accounting_code: SKIP, event_based_billing_metric_id: SKIP, interval: SKIP, interval_unit: SKIP, additional_properties: {}) ⇒ Component
Returns a new instance of Component.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/advanced_billing/models/component.rb', line 281 def initialize(id: SKIP, name: SKIP, handle: SKIP, pricing_scheme: SKIP, unit_name: SKIP, unit_price: SKIP, product_family_id: SKIP, product_family_name: SKIP, price_per_unit_in_cents: SKIP, kind: SKIP, archived: SKIP, taxable: SKIP, description: SKIP, default_price_point_id: SKIP, overage_prices: SKIP, prices: SKIP, price_point_count: SKIP, price_points_url: SKIP, default_price_point_name: SKIP, tax_code: SKIP, recurring: SKIP, upgrade_charge: SKIP, downgrade_credit: SKIP, created_at: SKIP, updated_at: SKIP, archived_at: SKIP, hide_date_range_on_invoice: SKIP, allow_fractional_quantities: SKIP, item_category: SKIP, use_site_exchange_rate: SKIP, accounting_code: SKIP, event_based_billing_metric_id: SKIP, interval: SKIP, interval_unit: SKIP, additional_properties: {}) @id = id unless id == SKIP @name = name unless name == SKIP @handle = handle unless handle == SKIP @pricing_scheme = pricing_scheme unless pricing_scheme == SKIP @unit_name = unit_name unless unit_name == SKIP @unit_price = unit_price unless unit_price == SKIP @product_family_id = product_family_id unless product_family_id == SKIP @product_family_name = product_family_name unless product_family_name == SKIP @price_per_unit_in_cents = price_per_unit_in_cents unless price_per_unit_in_cents == SKIP @kind = kind unless kind == SKIP @archived = archived unless archived == SKIP @taxable = taxable unless taxable == SKIP @description = description unless description == SKIP @default_price_point_id = default_price_point_id unless default_price_point_id == SKIP @overage_prices = overage_prices unless overage_prices == SKIP @prices = prices unless prices == SKIP @price_point_count = price_point_count unless price_point_count == SKIP @price_points_url = price_points_url unless price_points_url == SKIP @default_price_point_name = default_price_point_name unless default_price_point_name == SKIP @tax_code = tax_code unless tax_code == SKIP @recurring = recurring unless recurring == SKIP @upgrade_charge = upgrade_charge unless upgrade_charge == SKIP @downgrade_credit = downgrade_credit unless downgrade_credit == SKIP @created_at = created_at unless created_at == SKIP @updated_at = updated_at unless updated_at == SKIP @archived_at = archived_at unless archived_at == SKIP unless hide_date_range_on_invoice == SKIP @hide_date_range_on_invoice = hide_date_range_on_invoice end unless allow_fractional_quantities == SKIP @allow_fractional_quantities = allow_fractional_quantities end @item_category = item_category unless item_category == SKIP @use_site_exchange_rate = use_site_exchange_rate unless use_site_exchange_rate == SKIP @accounting_code = accounting_code unless accounting_code == SKIP unless event_based_billing_metric_id == SKIP @event_based_billing_metric_id = event_based_billing_metric_id end @interval = interval unless interval == SKIP @interval_unit = interval_unit unless interval_unit == SKIP # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#accounting_code ⇒ String
E.g. Internal ID or SKU Number
157 158 159 |
# File 'lib/advanced_billing/models/component.rb', line 157 def accounting_code @accounting_code end |
#allow_fractional_quantities ⇒ TrueClass | FalseClass
(Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
143 144 145 |
# File 'lib/advanced_billing/models/component.rb', line 143 def allow_fractional_quantities @allow_fractional_quantities end |
#archived ⇒ TrueClass | FalseClass
Boolean flag describing whether a component is archived or not.
59 60 61 |
# File 'lib/advanced_billing/models/component.rb', line 59 def archived @archived end |
#archived_at ⇒ DateTime
Timestamp indicating when this component was archived
131 132 133 |
# File 'lib/advanced_billing/models/component.rb', line 131 def archived_at @archived_at end |
#created_at ⇒ DateTime
Timestamp indicating when this component was created
123 124 125 |
# File 'lib/advanced_billing/models/component.rb', line 123 def created_at @created_at end |
#default_price_point_id ⇒ Integer
The description of the component.
71 72 73 |
# File 'lib/advanced_billing/models/component.rb', line 71 def default_price_point_id @default_price_point_id end |
#default_price_point_name ⇒ String
URL that points to the location to read the existing price points via GET request
95 96 97 |
# File 'lib/advanced_billing/models/component.rb', line 95 def default_price_point_name @default_price_point_name end |
#description ⇒ String
The description of the component.
67 68 69 |
# File 'lib/advanced_billing/models/component.rb', line 67 def description @description end |
#downgrade_credit ⇒ CreditType
The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Available values: ‘full`, `prorated`, `none`.
119 120 121 |
# File 'lib/advanced_billing/models/component.rb', line 119 def downgrade_credit @downgrade_credit end |
#event_based_billing_metric_id ⇒ Integer
(Only for Event Based Components) This is an ID of a metric attached to the component. This metric is used to bill upon collected events.
162 163 164 |
# File 'lib/advanced_billing/models/component.rb', line 162 def event_based_billing_metric_id @event_based_billing_metric_id end |
#handle ⇒ String
The component API handle
25 26 27 |
# File 'lib/advanced_billing/models/component.rb', line 25 def handle @handle end |
#hide_date_range_on_invoice ⇒ TrueClass | FalseClass
(Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
137 138 139 |
# File 'lib/advanced_billing/models/component.rb', line 137 def hide_date_range_on_invoice @hide_date_range_on_invoice end |
#id ⇒ Integer
The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API.
16 17 18 |
# File 'lib/advanced_billing/models/component.rb', line 16 def id @id end |
#interval ⇒ Integer
The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
169 170 171 |
# File 'lib/advanced_billing/models/component.rb', line 169 def interval @interval end |
#interval_unit ⇒ IntervalUnit
A string representing the interval unit for this component’s default price point, either month or day. This property is only available for sites with Multifrequency enabled.
175 176 177 |
# File 'lib/advanced_billing/models/component.rb', line 175 def interval_unit @interval_unit end |
#item_category ⇒ ItemCategory
One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other
148 149 150 |
# File 'lib/advanced_billing/models/component.rb', line 148 def item_category @item_category end |
#kind ⇒ ComponentKind
A handle for the component type
55 56 57 |
# File 'lib/advanced_billing/models/component.rb', line 55 def kind @kind end |
#name ⇒ String
The name of the Component, suitable for display on statements. i.e. Text Messages.
21 22 23 |
# File 'lib/advanced_billing/models/component.rb', line 21 def name @name end |
#overage_prices ⇒ Array[ComponentPrice]
An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty.
76 77 78 |
# File 'lib/advanced_billing/models/component.rb', line 76 def overage_prices @overage_prices end |
#price_per_unit_in_cents ⇒ Integer
deprecated - use unit_price instead
51 52 53 |
# File 'lib/advanced_billing/models/component.rb', line 51 def price_per_unit_in_cents @price_per_unit_in_cents end |
#price_point_count ⇒ Integer
Count for the number of price points associated with the component
85 86 87 |
# File 'lib/advanced_billing/models/component.rb', line 85 def price_point_count @price_point_count end |
#price_points_url ⇒ String
URL that points to the location to read the existing price points via GET request
90 91 92 |
# File 'lib/advanced_billing/models/component.rb', line 90 def price_points_url @price_points_url end |
#prices ⇒ Array[ComponentPrice]
An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty.
81 82 83 |
# File 'lib/advanced_billing/models/component.rb', line 81 def prices @prices end |
#pricing_scheme ⇒ PricingScheme
The component API handle
29 30 31 |
# File 'lib/advanced_billing/models/component.rb', line 29 def pricing_scheme @pricing_scheme end |
#product_family_id ⇒ Integer
The id of the Product Family to which the Component belongs
43 44 45 |
# File 'lib/advanced_billing/models/component.rb', line 43 def product_family_id @product_family_id end |
#product_family_name ⇒ String
The name of the Product Family to which the Component belongs
47 48 49 |
# File 'lib/advanced_billing/models/component.rb', line 47 def product_family_name @product_family_name end |
#recurring ⇒ TrueClass | FalseClass
A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
107 108 109 |
# File 'lib/advanced_billing/models/component.rb', line 107 def recurring @recurring end |
#tax_code ⇒ String
A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
101 102 103 |
# File 'lib/advanced_billing/models/component.rb', line 101 def tax_code @tax_code end |
#taxable ⇒ TrueClass | FalseClass
Boolean flag describing whether a component is taxable or not.
63 64 65 |
# File 'lib/advanced_billing/models/component.rb', line 63 def taxable @taxable end |
#unit_name ⇒ String
The name of the unit that the component’s usage is measured in. i.e. message
34 35 36 |
# File 'lib/advanced_billing/models/component.rb', line 34 def unit_name @unit_name end |
#unit_price ⇒ String
The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null.
39 40 41 |
# File 'lib/advanced_billing/models/component.rb', line 39 def unit_price @unit_price end |
#updated_at ⇒ DateTime
Timestamp indicating when this component was updated
127 128 129 |
# File 'lib/advanced_billing/models/component.rb', line 127 def updated_at @updated_at end |
#upgrade_charge ⇒ CreditType
The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Available values: ‘full`, `prorated`, `none`.
113 114 115 |
# File 'lib/advanced_billing/models/component.rb', line 113 def upgrade_charge @upgrade_charge end |
#use_site_exchange_rate ⇒ TrueClass | FalseClass
One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other
153 154 155 |
# File 'lib/advanced_billing/models/component.rb', line 153 def use_site_exchange_rate @use_site_exchange_rate end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/advanced_billing/models/component.rb', line 346 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP handle = hash.key?('handle') ? hash['handle'] : SKIP pricing_scheme = hash.key?('pricing_scheme') ? hash['pricing_scheme'] : SKIP unit_name = hash.key?('unit_name') ? hash['unit_name'] : SKIP unit_price = hash.key?('unit_price') ? hash['unit_price'] : SKIP product_family_id = hash.key?('product_family_id') ? hash['product_family_id'] : SKIP product_family_name = hash.key?('product_family_name') ? hash['product_family_name'] : SKIP price_per_unit_in_cents = hash.key?('price_per_unit_in_cents') ? hash['price_per_unit_in_cents'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP archived = hash.key?('archived') ? hash['archived'] : SKIP taxable = hash.key?('taxable') ? hash['taxable'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP default_price_point_id = hash.key?('default_price_point_id') ? hash['default_price_point_id'] : SKIP # Parameter is an array, so we need to iterate through it overage_prices = nil unless hash['overage_prices'].nil? overage_prices = [] hash['overage_prices'].each do |structure| overage_prices << (ComponentPrice.from_hash(structure) if structure) end end overage_prices = SKIP unless hash.key?('overage_prices') # Parameter is an array, so we need to iterate through it prices = nil unless hash['prices'].nil? prices = [] hash['prices'].each do |structure| prices << (ComponentPrice.from_hash(structure) if structure) end end prices = SKIP unless hash.key?('prices') price_point_count = hash.key?('price_point_count') ? hash['price_point_count'] : SKIP price_points_url = hash.key?('price_points_url') ? hash['price_points_url'] : SKIP default_price_point_name = hash.key?('default_price_point_name') ? hash['default_price_point_name'] : SKIP tax_code = hash.key?('tax_code') ? hash['tax_code'] : SKIP recurring = hash.key?('recurring') ? hash['recurring'] : SKIP upgrade_charge = hash.key?('upgrade_charge') ? hash['upgrade_charge'] : SKIP downgrade_credit = hash.key?('downgrade_credit') ? hash['downgrade_credit'] : SKIP created_at = if hash.key?('created_at') (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at']) else SKIP end updated_at = if hash.key?('updated_at') (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at']) else SKIP end archived_at = if hash.key?('archived_at') (DateTimeHelper.from_rfc3339(hash['archived_at']) if hash['archived_at']) else SKIP end hide_date_range_on_invoice = hash.key?('hide_date_range_on_invoice') ? hash['hide_date_range_on_invoice'] : SKIP allow_fractional_quantities = hash.key?('allow_fractional_quantities') ? hash['allow_fractional_quantities'] : SKIP item_category = hash.key?('item_category') ? hash['item_category'] : SKIP use_site_exchange_rate = hash.key?('use_site_exchange_rate') ? hash['use_site_exchange_rate'] : SKIP accounting_code = hash.key?('accounting_code') ? hash['accounting_code'] : SKIP event_based_billing_metric_id = hash.key?('event_based_billing_metric_id') ? hash['event_based_billing_metric_id'] : SKIP interval = hash.key?('interval') ? hash['interval'] : SKIP interval_unit = hash.key?('interval_unit') ? hash['interval_unit'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. Component.new(id: id, name: name, handle: handle, pricing_scheme: pricing_scheme, unit_name: unit_name, unit_price: unit_price, product_family_id: product_family_id, product_family_name: product_family_name, price_per_unit_in_cents: price_per_unit_in_cents, kind: kind, archived: archived, taxable: taxable, description: description, default_price_point_id: default_price_point_id, overage_prices: overage_prices, prices: prices, price_point_count: price_point_count, price_points_url: price_points_url, default_price_point_name: default_price_point_name, tax_code: tax_code, recurring: recurring, upgrade_charge: upgrade_charge, downgrade_credit: downgrade_credit, created_at: created_at, updated_at: updated_at, archived_at: archived_at, hide_date_range_on_invoice: hide_date_range_on_invoice, allow_fractional_quantities: allow_fractional_quantities, item_category: item_category, use_site_exchange_rate: use_site_exchange_rate, accounting_code: accounting_code, event_based_billing_metric_id: event_based_billing_metric_id, interval: interval, interval_unit: interval_unit, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 |
# File 'lib/advanced_billing/models/component.rb', line 178 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['handle'] = 'handle' @_hash['pricing_scheme'] = 'pricing_scheme' @_hash['unit_name'] = 'unit_name' @_hash['unit_price'] = 'unit_price' @_hash['product_family_id'] = 'product_family_id' @_hash['product_family_name'] = 'product_family_name' @_hash['price_per_unit_in_cents'] = 'price_per_unit_in_cents' @_hash['kind'] = 'kind' @_hash['archived'] = 'archived' @_hash['taxable'] = 'taxable' @_hash['description'] = 'description' @_hash['default_price_point_id'] = 'default_price_point_id' @_hash['overage_prices'] = 'overage_prices' @_hash['prices'] = 'prices' @_hash['price_point_count'] = 'price_point_count' @_hash['price_points_url'] = 'price_points_url' @_hash['default_price_point_name'] = 'default_price_point_name' @_hash['tax_code'] = 'tax_code' @_hash['recurring'] = 'recurring' @_hash['upgrade_charge'] = 'upgrade_charge' @_hash['downgrade_credit'] = 'downgrade_credit' @_hash['created_at'] = 'created_at' @_hash['updated_at'] = 'updated_at' @_hash['archived_at'] = 'archived_at' @_hash['hide_date_range_on_invoice'] = 'hide_date_range_on_invoice' @_hash['allow_fractional_quantities'] = 'allow_fractional_quantities' @_hash['item_category'] = 'item_category' @_hash['use_site_exchange_rate'] = 'use_site_exchange_rate' @_hash['accounting_code'] = 'accounting_code' @_hash['event_based_billing_metric_id'] = 'event_based_billing_metric_id' @_hash['interval'] = 'interval' @_hash['interval_unit'] = 'interval_unit' @_hash end |
.nullables ⇒ Object
An array for nullable fields
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/advanced_billing/models/component.rb', line 259 def self.nullables %w[ handle pricing_scheme unit_price price_per_unit_in_cents description default_price_point_id overage_prices prices price_points_url tax_code upgrade_charge downgrade_credit archived_at item_category use_site_exchange_rate accounting_code interval_unit ] end |
.optionals ⇒ Object
An array for optional fields
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 248 249 250 251 252 253 254 255 256 |
# File 'lib/advanced_billing/models/component.rb', line 219 def self.optionals %w[ id name handle pricing_scheme unit_name unit_price product_family_id product_family_name price_per_unit_in_cents kind archived taxable description default_price_point_id overage_prices prices price_point_count price_points_url default_price_point_name tax_code recurring upgrade_charge downgrade_credit created_at updated_at archived_at hide_date_range_on_invoice allow_fractional_quantities item_category use_site_exchange_rate accounting_code event_based_billing_metric_id interval interval_unit ] end |
Instance Method Details
#to_custom_archived_at ⇒ Object
479 480 481 |
# File 'lib/advanced_billing/models/component.rb', line 479 def to_custom_archived_at DateTimeHelper.to_rfc3339(archived_at) end |
#to_custom_created_at ⇒ Object
471 472 473 |
# File 'lib/advanced_billing/models/component.rb', line 471 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_custom_updated_at ⇒ Object
475 476 477 |
# File 'lib/advanced_billing/models/component.rb', line 475 def to_custom_updated_at DateTimeHelper.to_rfc3339(updated_at) end |