Class: Unit::Types::CreateSchedule
- Inherits:
-
Object
- Object
- Unit::Types::CreateSchedule
- Defined in:
- lib/unit/types/create_schedule.rb
Instance Attribute Summary collapse
-
#day_of_month ⇒ Object
readonly
Returns the value of attribute day_of_month.
-
#day_of_week ⇒ Object
readonly
Returns the value of attribute day_of_week.
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#total_number_of_payments ⇒ Object
readonly
Returns the value of attribute total_number_of_payments.
Instance Method Summary collapse
-
#initialize(interval, day_of_month, day_of_week = nil, start_time = nil, end_time = nil, total_number_of_payments = nil) ⇒ CreateSchedule
constructor
A new instance of CreateSchedule.
- #represent ⇒ Object
Constructor Details
#initialize(interval, day_of_month, day_of_week = nil, start_time = nil, end_time = nil, total_number_of_payments = nil) ⇒ CreateSchedule
Returns a new instance of CreateSchedule.
16 17 18 19 20 21 22 23 |
# File 'lib/unit/types/create_schedule.rb', line 16 def initialize(interval, day_of_month, day_of_week = nil, start_time = nil, end_time = nil, total_number_of_payments = nil) @interval = interval @day_of_month = day_of_month @day_of_week = day_of_week @start_time = start_time @end_time = end_time @total_number_of_payments = total_number_of_payments end |
Instance Attribute Details
#day_of_month ⇒ Object (readonly)
Returns the value of attribute day_of_month.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def day_of_month @day_of_month end |
#day_of_week ⇒ Object (readonly)
Returns the value of attribute day_of_week.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def day_of_week @day_of_week end |
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def end_time @end_time end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def interval @interval end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def start_time @start_time end |
#total_number_of_payments ⇒ Object (readonly)
Returns the value of attribute total_number_of_payments.
8 9 10 |
# File 'lib/unit/types/create_schedule.rb', line 8 def total_number_of_payments @total_number_of_payments end |
Instance Method Details
#represent ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/unit/types/create_schedule.rb', line 25 def represent payload = { interval: interval, dayOfMonth: day_of_month, dayOfWeek: day_of_week, startTime: start_time, endTime: end_time, totalNumberOfPayments: total_number_of_payments } payload.compact! end |