Class: GlobalCollect::RequestModels::InsertOrderWithPayment::RecurringOrder

Inherits:
Order
  • Object
show all
Defined in:
lib/global_collect/request_models/insert_order_with_payment/recurring_order.rb

Instance Attribute Summary

Attributes inherited from Base

#errors

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #suggested_response_mixins, #validate

Constructor Details

#initialize(attributes) ⇒ RecurringOrder

Returns a new instance of RecurringOrder.



3
4
5
6
7
8
9
10
# File 'lib/global_collect/request_models/insert_order_with_payment/recurring_order.rb', line 3

def initialize(attributes)
  super(attributes)
  # WDL Appendix F specifies the recurring order type as '4'
  @attributes["ORDERTYPE"] = "4"
  # WDL Appendix F specifies the recurring order should have STEPMONTH
  # set to a filler value. They say a default of "120" is fine.
  @attributes["STEPMONTH"] ||= "120"
end

Instance Method Details

#fieldsObject



11
12
13
14
15
# File 'lib/global_collect/request_models/insert_order_with_payment/recurring_order.rb', line 11

def fields
  super.merge({
    "STEPMONTH" => ["N5", "R"]
  })
end