Class: UltracartClient::AutoOrderItem

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/auto_order_item.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AutoOrderItem

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
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
# File 'lib/ultracart_api/models/auto_order_item.rb', line 204

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::AutoOrderItem` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::AutoOrderItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'arbitrary_item_id')
    self.arbitrary_item_id = attributes[:'arbitrary_item_id']
  end

  if attributes.key?(:'arbitrary_percentage_discount')
    self.arbitrary_percentage_discount = attributes[:'arbitrary_percentage_discount']
  end

  if attributes.key?(:'arbitrary_quantity')
    self.arbitrary_quantity = attributes[:'arbitrary_quantity']
  end

  if attributes.key?(:'arbitrary_schedule_days')
    self.arbitrary_schedule_days = attributes[:'arbitrary_schedule_days']
  end

  if attributes.key?(:'arbitrary_unit_cost')
    self.arbitrary_unit_cost = attributes[:'arbitrary_unit_cost']
  end

  if attributes.key?(:'arbitrary_unit_cost_remaining_orders')
    self.arbitrary_unit_cost_remaining_orders = attributes[:'arbitrary_unit_cost_remaining_orders']
  end

  if attributes.key?(:'auto_order_item_oid')
    self.auto_order_item_oid = attributes[:'auto_order_item_oid']
  end

  if attributes.key?(:'calculated_next_shipment_dts')
    self.calculated_next_shipment_dts = attributes[:'calculated_next_shipment_dts']
  end

  if attributes.key?(:'first_order_dts')
    self.first_order_dts = attributes[:'first_order_dts']
  end

  if attributes.key?(:'frequency')
    self.frequency = attributes[:'frequency']
  end

  if attributes.key?(:'future_schedules')
    if (value = attributes[:'future_schedules']).is_a?(Array)
      self.future_schedules = value
    end
  end

  if attributes.key?(:'last_order_dts')
    self.last_order_dts = attributes[:'last_order_dts']
  end

  if attributes.key?(:'life_time_value')
    self.life_time_value = attributes[:'life_time_value']
  end

  if attributes.key?(:'next_item_id')
    self.next_item_id = attributes[:'next_item_id']
  end

  if attributes.key?(:'next_preshipment_notice_dts')
    self.next_preshipment_notice_dts = attributes[:'next_preshipment_notice_dts']
  end

  if attributes.key?(:'next_shipment_dts')
    self.next_shipment_dts = attributes[:'next_shipment_dts']
  end

  if attributes.key?(:'no_order_after_dts')
    self.no_order_after_dts = attributes[:'no_order_after_dts']
  end

  if attributes.key?(:'number_of_rebills')
    self.number_of_rebills = attributes[:'number_of_rebills']
  end

  if attributes.key?(:'options')
    if (value = attributes[:'options']).is_a?(Array)
      self.options = value
    end
  end

  if attributes.key?(:'original_item_id')
    self.original_item_id = attributes[:'original_item_id']
  end

  if attributes.key?(:'original_quantity')
    self.original_quantity = attributes[:'original_quantity']
  end

  if attributes.key?(:'paused')
    self.paused = attributes[:'paused']
  end

  if attributes.key?(:'paypal_payer_id')
    self.paypal_payer_id = attributes[:'paypal_payer_id']
  end

  if attributes.key?(:'paypal_recurring_payment_profile_id')
    self.paypal_recurring_payment_profile_id = attributes[:'paypal_recurring_payment_profile_id']
  end

  if attributes.key?(:'preshipment_notice_sent')
    self.preshipment_notice_sent = attributes[:'preshipment_notice_sent']
  end

  if attributes.key?(:'rebill_value')
    self.rebill_value = attributes[:'rebill_value']
  end

  if attributes.key?(:'remaining_repeat_count')
    self.remaining_repeat_count = attributes[:'remaining_repeat_count']
  end

  if attributes.key?(:'simple_schedule')
    self.simple_schedule = attributes[:'simple_schedule']
  end
end

Instance Attribute Details

#arbitrary_item_idObject

Arbitrary item id that should be rebilled instead of the normal schedule



19
20
21
# File 'lib/ultracart_api/models/auto_order_item.rb', line 19

def arbitrary_item_id
  @arbitrary_item_id
end

#arbitrary_percentage_discountObject

An arbitrary percentage discount to provide on future rebills



22
23
24
# File 'lib/ultracart_api/models/auto_order_item.rb', line 22

def arbitrary_percentage_discount
  @arbitrary_percentage_discount
end

#arbitrary_quantityObject

Arbitrary quantity to rebill



25
26
27
# File 'lib/ultracart_api/models/auto_order_item.rb', line 25

def arbitrary_quantity
  @arbitrary_quantity
end

#arbitrary_schedule_daysObject

The number of days to rebill if the frequency is set to an arbitrary number of days



28
29
30
# File 'lib/ultracart_api/models/auto_order_item.rb', line 28

def arbitrary_schedule_days
  @arbitrary_schedule_days
end

#arbitrary_unit_costObject

Arbitrary unit cost that rebills of this item should occur at



31
32
33
# File 'lib/ultracart_api/models/auto_order_item.rb', line 31

def arbitrary_unit_cost
  @arbitrary_unit_cost
end

#arbitrary_unit_cost_remaining_ordersObject

The number of rebills to give the arbitrary unit cost on before reverting to normal pricing.



34
35
36
# File 'lib/ultracart_api/models/auto_order_item.rb', line 34

def arbitrary_unit_cost_remaining_orders
  @arbitrary_unit_cost_remaining_orders
end

#auto_order_item_oidObject

Primary key of AutoOrderItem



37
38
39
# File 'lib/ultracart_api/models/auto_order_item.rb', line 37

def auto_order_item_oid
  @auto_order_item_oid
end

#calculated_next_shipment_dtsObject

Calculated Date/time that this item is scheduled to rebill. Will be null if no more shipments are going to occur on this item



40
41
42
# File 'lib/ultracart_api/models/auto_order_item.rb', line 40

def calculated_next_shipment_dts
  @calculated_next_shipment_dts
end

#first_order_dtsObject

Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet.



43
44
45
# File 'lib/ultracart_api/models/auto_order_item.rb', line 43

def first_order_dts
  @first_order_dts
end

#frequencyObject

Frequency of the rebill if not a fixed schedule



46
47
48
# File 'lib/ultracart_api/models/auto_order_item.rb', line 46

def frequency
  @frequency
end

#future_schedulesObject

The future rebill schedule for this item up to the next ten rebills



49
50
51
# File 'lib/ultracart_api/models/auto_order_item.rb', line 49

def future_schedules
  @future_schedules
end

#last_order_dtsObject

Date/time of the last order of this item



52
53
54
# File 'lib/ultracart_api/models/auto_order_item.rb', line 52

def last_order_dts
  @last_order_dts
end

#life_time_valueObject

The life time value of this item including the original purchase



55
56
57
# File 'lib/ultracart_api/models/auto_order_item.rb', line 55

def life_time_value
  @life_time_value
end

#next_item_idObject

Calculated next item id



58
59
60
# File 'lib/ultracart_api/models/auto_order_item.rb', line 58

def next_item_id
  @next_item_id
end

#next_preshipment_notice_dtsObject

The date/time of when the next pre-shipment notice should be sent



61
62
63
# File 'lib/ultracart_api/models/auto_order_item.rb', line 61

def next_preshipment_notice_dts
  @next_preshipment_notice_dts
end

#next_shipment_dtsObject

Date/time that this item is scheduled to rebill



64
65
66
# File 'lib/ultracart_api/models/auto_order_item.rb', line 64

def next_shipment_dts
  @next_shipment_dts
end

#no_order_after_dtsObject

Date/time after which no additional rebills of this item should occur



67
68
69
# File 'lib/ultracart_api/models/auto_order_item.rb', line 67

def no_order_after_dts
  @no_order_after_dts
end

#number_of_rebillsObject

The number of times this item has rebilled



70
71
72
# File 'lib/ultracart_api/models/auto_order_item.rb', line 70

def number_of_rebills
  @number_of_rebills
end

#optionsObject

Options associated with this item



73
74
75
# File 'lib/ultracart_api/models/auto_order_item.rb', line 73

def options
  @options
end

#original_item_idObject

The original item id purchased. This item controls scheduling. If you wish to modify a schedule, for example, from monthly to yearly, change this item from your monthly item to your yearly item, and then change the next_shipment_dts to your desired date.



76
77
78
# File 'lib/ultracart_api/models/auto_order_item.rb', line 76

def original_item_id
  @original_item_id
end

#original_quantityObject

The original quantity purchased



79
80
81
# File 'lib/ultracart_api/models/auto_order_item.rb', line 79

def original_quantity
  @original_quantity
end

#pausedObject

True if paused. This field is an object instead of a primitive for backwards compatibility.



82
83
84
# File 'lib/ultracart_api/models/auto_order_item.rb', line 82

def paused
  @paused
end

#paypal_payer_idObject

The PayPal Payer ID tied to this item



85
86
87
# File 'lib/ultracart_api/models/auto_order_item.rb', line 85

def paypal_payer_id
  @paypal_payer_id
end

#paypal_recurring_payment_profile_idObject

The PayPal Profile ID tied to this item



88
89
90
# File 'lib/ultracart_api/models/auto_order_item.rb', line 88

def paypal_recurring_payment_profile_id
  @paypal_recurring_payment_profile_id
end

#preshipment_notice_sentObject

True if the preshipment notice associated with the next rebill has been sent



91
92
93
# File 'lib/ultracart_api/models/auto_order_item.rb', line 91

def preshipment_notice_sent
  @preshipment_notice_sent
end

#rebill_valueObject

The value of the rebills of this item



94
95
96
# File 'lib/ultracart_api/models/auto_order_item.rb', line 94

def rebill_value
  @rebill_value
end

#remaining_repeat_countObject

The number of rebills remaining before this item is complete



97
98
99
# File 'lib/ultracart_api/models/auto_order_item.rb', line 97

def remaining_repeat_count
  @remaining_repeat_count
end

#simple_scheduleObject

Returns the value of attribute simple_schedule.



99
100
101
# File 'lib/ultracart_api/models/auto_order_item.rb', line 99

def simple_schedule
  @simple_schedule
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



158
159
160
# File 'lib/ultracart_api/models/auto_order_item.rb', line 158

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/ultracart_api/models/auto_order_item.rb', line 124

def self.attribute_map
  {
    :'arbitrary_item_id' => :'arbitrary_item_id',
    :'arbitrary_percentage_discount' => :'arbitrary_percentage_discount',
    :'arbitrary_quantity' => :'arbitrary_quantity',
    :'arbitrary_schedule_days' => :'arbitrary_schedule_days',
    :'arbitrary_unit_cost' => :'arbitrary_unit_cost',
    :'arbitrary_unit_cost_remaining_orders' => :'arbitrary_unit_cost_remaining_orders',
    :'auto_order_item_oid' => :'auto_order_item_oid',
    :'calculated_next_shipment_dts' => :'calculated_next_shipment_dts',
    :'first_order_dts' => :'first_order_dts',
    :'frequency' => :'frequency',
    :'future_schedules' => :'future_schedules',
    :'last_order_dts' => :'last_order_dts',
    :'life_time_value' => :'life_time_value',
    :'next_item_id' => :'next_item_id',
    :'next_preshipment_notice_dts' => :'next_preshipment_notice_dts',
    :'next_shipment_dts' => :'next_shipment_dts',
    :'no_order_after_dts' => :'no_order_after_dts',
    :'number_of_rebills' => :'number_of_rebills',
    :'options' => :'options',
    :'original_item_id' => :'original_item_id',
    :'original_quantity' => :'original_quantity',
    :'paused' => :'paused',
    :'paypal_payer_id' => :'paypal_payer_id',
    :'paypal_recurring_payment_profile_id' => :'paypal_recurring_payment_profile_id',
    :'preshipment_notice_sent' => :'preshipment_notice_sent',
    :'rebill_value' => :'rebill_value',
    :'remaining_repeat_count' => :'remaining_repeat_count',
    :'simple_schedule' => :'simple_schedule'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



409
410
411
# File 'lib/ultracart_api/models/auto_order_item.rb', line 409

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



197
198
199
200
# File 'lib/ultracart_api/models/auto_order_item.rb', line 197

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/ultracart_api/models/auto_order_item.rb', line 163

def self.openapi_types
  {
    :'arbitrary_item_id' => :'String',
    :'arbitrary_percentage_discount' => :'Float',
    :'arbitrary_quantity' => :'Float',
    :'arbitrary_schedule_days' => :'Integer',
    :'arbitrary_unit_cost' => :'Float',
    :'arbitrary_unit_cost_remaining_orders' => :'Integer',
    :'auto_order_item_oid' => :'Integer',
    :'calculated_next_shipment_dts' => :'String',
    :'first_order_dts' => :'String',
    :'frequency' => :'String',
    :'future_schedules' => :'Array<AutoOrderItemFutureSchedule>',
    :'last_order_dts' => :'String',
    :'life_time_value' => :'Float',
    :'next_item_id' => :'String',
    :'next_preshipment_notice_dts' => :'String',
    :'next_shipment_dts' => :'String',
    :'no_order_after_dts' => :'String',
    :'number_of_rebills' => :'Integer',
    :'options' => :'Array<AutoOrderItemOption>',
    :'original_item_id' => :'String',
    :'original_quantity' => :'Float',
    :'paused' => :'Boolean',
    :'paypal_payer_id' => :'String',
    :'paypal_recurring_payment_profile_id' => :'String',
    :'preshipment_notice_sent' => :'Boolean',
    :'rebill_value' => :'Float',
    :'remaining_repeat_count' => :'Integer',
    :'simple_schedule' => :'AutoOrderItemSimpleSchedule'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/ultracart_api/models/auto_order_item.rb', line 361

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      arbitrary_item_id == o.arbitrary_item_id &&
      arbitrary_percentage_discount == o.arbitrary_percentage_discount &&
      arbitrary_quantity == o.arbitrary_quantity &&
      arbitrary_schedule_days == o.arbitrary_schedule_days &&
      arbitrary_unit_cost == o.arbitrary_unit_cost &&
      arbitrary_unit_cost_remaining_orders == o.arbitrary_unit_cost_remaining_orders &&
      auto_order_item_oid == o.auto_order_item_oid &&
      calculated_next_shipment_dts == o.calculated_next_shipment_dts &&
      first_order_dts == o.first_order_dts &&
      frequency == o.frequency &&
      future_schedules == o.future_schedules &&
      last_order_dts == o.last_order_dts &&
      life_time_value == o.life_time_value &&
      next_item_id == o.next_item_id &&
      next_preshipment_notice_dts == o.next_preshipment_notice_dts &&
      next_shipment_dts == o.next_shipment_dts &&
      no_order_after_dts == o.no_order_after_dts &&
      number_of_rebills == o.number_of_rebills &&
      options == o.options &&
      original_item_id == o.original_item_id &&
      original_quantity == o.original_quantity &&
      paused == o.paused &&
      paypal_payer_id == o.paypal_payer_id &&
      paypal_recurring_payment_profile_id == o.paypal_recurring_payment_profile_id &&
      preshipment_notice_sent == o.preshipment_notice_sent &&
      rebill_value == o.rebill_value &&
      remaining_repeat_count == o.remaining_repeat_count &&
      simple_schedule == o.simple_schedule
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
470
471
472
473
474
475
476
477
# File 'lib/ultracart_api/models/auto_order_item.rb', line 440

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = UltracartClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/ultracart_api/models/auto_order_item.rb', line 511

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/ultracart_api/models/auto_order_item.rb', line 416

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


396
397
398
# File 'lib/ultracart_api/models/auto_order_item.rb', line 396

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



402
403
404
# File 'lib/ultracart_api/models/auto_order_item.rb', line 402

def hash
  [arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, calculated_next_shipment_dts, first_order_dts, frequency, future_schedules, last_order_dts, life_time_value, next_item_id, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paused, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, rebill_value, remaining_repeat_count, simple_schedule].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



336
337
338
339
# File 'lib/ultracart_api/models/auto_order_item.rb', line 336

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



487
488
489
# File 'lib/ultracart_api/models/auto_order_item.rb', line 487

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/ultracart_api/models/auto_order_item.rb', line 493

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



481
482
483
# File 'lib/ultracart_api/models/auto_order_item.rb', line 481

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



343
344
345
346
347
# File 'lib/ultracart_api/models/auto_order_item.rb', line 343

def valid?
  frequency_validator = EnumAttributeValidator.new('String', ["Weekly", "Biweekly", "Every...", "Every 10 Days", "Every 24 Days", "Every 28 Days", "Monthly", "Every 45 Days", "Every 2 Months", "Every 3 Months", "Every 4 Months", "Every 5 Months", "Every 6 Months", "Yearly", "Every 4 Weeks", "Every 6 Weeks", "Every 8 Weeks"])
  return false unless frequency_validator.valid?(@frequency)
  true
end