def action=(action)
      validator = EnumAttributeValidator.new('String', ["COMPLETE", "CANCEL", "REFUND"])
      unless validator.valid?(action)
        fail ArgumentError, "invalid value for 'action', must be one of #{validator.allowable_values}."
      end
      @action = action
    end
def action=(action)
      validator = EnumAttributeValidator.new('String', ["COMPLETE", "CANCEL", "REFUND"])
      unless validator.valid?(action)
        fail ArgumentError, "invalid value for 'action', must be one of #{validator.allowable_values}."
      end
      @action = action
    end
Custom attribute writer method checking allowed values (enum).
 @param [Object] action Object to be assigned